pointers: pass the full transaction hash when requesting a trace - #301
Merged
Merged
Conversation
The integration test machine rebuilt the hash from its integer value, which drops leading zeros. Ganache uses random accounts, so hashes are random, and one that begins with a zero byte reached debug_traceTransaction as 31 bytes: "Unknown transaction". That is the intermittent failure in the dereference integration tests. Pass the hash's own hex encoding instead.
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The dereference integration tests fail intermittently with
Error: Unknown transaction 0x…. The hash in that message has 62 hex digits: 31 bytes, not 32.The test machine asked ganache for the trace with
`0x${transactionHash.asUint().toString(16)}`. Going through the integer value drops leading zeros. Ganache generates random accounts, so transaction hashes are random, and any hash that begins with a zero byte arrived atdebug_traceTransactionone byte short. With four integration cases per run on two Node versions, that is a few percent of CI runs.The fix passes
transactionHash.toHex(), which keeps every byte. Test helper only; nothing published changes.