-
Notifications
You must be signed in to change notification settings - Fork 285
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
state: Clean up state finalization #609
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,10 @@ void run_state_test(const StateTransitionTest& test, evmc::VM& vm) | |
validate_deployed_code(state, rev); | ||
|
||
const auto res = state::transition(state, test.block, tx, rev, vm); | ||
|
||
// Finalize block with reward 0. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In state tests it's not 0 on pre-merge revisions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For state tests this is always 0. This effectively only touches/creates the coinbase account. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True, apparently it's non-zero only in blockchain tests. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI, this is configurable in t8n via |
||
state::finalize(state, rev, test.block.coinbase, 0); | ||
|
||
if (holds_alternative<state::TransactionReceipt>(res)) | ||
EXPECT_EQ(logs_hash(get<state::TransactionReceipt>(res).logs), expected.logs_hash); | ||
else | ||
|
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.
Why is this not needed now?
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.
This emulates applying block reward of 0. Previously, I wasn't exactly sure why this is needed. Now the block reward is "properly" applied in the end.