-
Notifications
You must be signed in to change notification settings - Fork 20.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eth/tracers/live: run supply tests off of generated artifacts #30451
base: master
Are you sure you want to change the base?
Conversation
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.
I'm pushing some changes. For one thing, the names, instead of
=== RUN TestSupplyTracerBlockchain/omittedFields/omitted_fields_cancun
=== PAUSE TestSupplyTracerBlockchain/omittedFields/omitted_fields_cancun
=== RUN TestSupplyTracerBlockchain/selfdestruct/selfdestruct_cancun
=== PAUSE TestSupplyTracerBlockchain/selfdestruct/selfdestruct_cancun
=== RUN TestSupplyTracerBlockchain/selfdestructItselfAndRevert/selfdestruct_itself_and_revert_grayGlacier
I think it's better to leave the filenames as is:
=== RUN TestSupplyTracerBlockchain/omitted_fields.json/omitted_fields_cancun
=== PAUSE TestSupplyTracerBlockchain/omitted_fields.json/omitted_fields_cancun
=== RUN TestSupplyTracerBlockchain/selfdestruct.json/selfdestruct_cancun
=== PAUSE TestSupplyTracerBlockchain/selfdestruct.json/selfdestruct_cancun
=== RUN TestSupplyTracerBlockchain/selfdestruct_itself_and_revert.json/selfdestruct_itself_and_revert_grayGlacier
That way, when investigating a failure, it's easier to figure out what the source is. Instead of having to first figure out to un-camel it and add .json
suffix.
// IsParis returns whether the given block is either equal to the Paris (merge) | ||
// fork or greater. | ||
// Note: Only usable for post-merge networks where MergeNetsplitBlock has been configured. |
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.
Wait...
- returns whether the given block is either
>= merge
, - only usable for
> merge
-networks
??
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.
Ah never mind, I get it
20ae72c
to
f59f77f
Compare
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.
Mostly LGTM, but I have one open question about that IsParis
method ..?
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.
LGTM
@s1na needs a rebase |
I've approved it already, but it needs a rebase |
I think the block test format used for consensus testing is also ideal for testing live tracers. I have taken our existing tests for the supply tracer and turned them into a filler binary + a dumb test runner that takes processes the json files. I believe this format can be re-used for other live tracers (with the exception of the
"except"
field which would be different).The only thorn in my side is the filler. I've put it as an executable module right now in
eth/tracers/live/tests
.