This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 673
feat: log warning on legacy-style eth_getTransactionReceipt calls #779
Merged
Conversation
This file contains 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
…and test getTransactionReceipt
eggplantzzz
commented
Feb 11, 2021
davidmurdoch
suggested changes
Feb 12, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great work on this! Thanks for not being afraid to just dive in to these ganache internals. I'm made some suggestions and requested some changes. We should probably talk about some of them... though I know you aren't a huge fan of bikeshedding... so i can always find someone else to be pedantic with if you'd prefer 😁!
src/chains/ethereum/ethereum/tests/api/eth/getTransactionReceipt.test.ts
Outdated
Show resolved
Hide resolved
src/chains/ethereum/ethereum/tests/api/eth/getTransactionReceipt.test.ts
Outdated
Show resolved
Hide resolved
src/chains/ethereum/ethereum/tests/api/eth/getTransactionReceipt.test.ts
Show resolved
Hide resolved
src/chains/ethereum/ethereum/tests/api/eth/getTransactionReceipt.test.ts
Show resolved
Hide resolved
src/chains/ethereum/ethereum/tests/api/eth/getTransactionReceipt.test.ts
Outdated
Show resolved
Hide resolved
src/chains/ethereum/ethereum/tests/api/eth/getTransactionReceipt.test.ts
Show resolved
Hide resolved
src/chains/ethereum/ethereum/tests/api/eth/getTransactionReceipt.test.ts
Show resolved
Hide resolved
Do note @davidmurdoch that I am not against bikeshedding in general. But when I don't feel strongly, I just let others that do decide :) |
davidmurdoch
approved these changes
Feb 19, 2021
sambacha
pushed a commit
to contractshark/ganache-core
that referenced
this pull request
Apr 15, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
In Ganache v7, instamining will be enabled by default but implemented in a different way than v6.
In v6, a transaction is sent, Ganache mines the transaction, and then returns the transaction hash. This enables the user to immediately request the transaction receipt via
eth_getTransactionReceipt
. This is, however, not how nodes in the wild behave. In the wild, the transaction hash is returned to the user and then the user will need to wait until the transaction is mined before requesting the receipt. If they request the receipt before it is mined, they will receive anull
response.For v7, this behavior is modified to more accurately reflect what a user will experience from a node in the wild. This may be problematic for some folks upgrading as tests will probably break etc. In order to help them upgrade with more ease, a warning message is implemented here to help them understand the situation.