Skip to content
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

fix: scale withdrawals amount to gwei #371

Merged
merged 2 commits into from
Jul 10, 2024
Merged

fix: scale withdrawals amount to gwei #371

merged 2 commits into from
Jul 10, 2024

Conversation

Nashtare
Copy link
Collaborator

@Nashtare Nashtare commented Jul 9, 2024

Withdrawals amounts that are written in blocks are in gwei unit (cf EIP-4895). We were currently processing them as wei, causing invalid balances on the targets and yielding invalid final state root. This hasn't been caught beforehand because:

  • we've tested block contiguity only on John's test chains (which contained no withdrawals)
  • benchmarks were targeting single blocks, hence we didn't need to connect the "invalid" final state root with the initial state root of the next block
  • we don't check the withdrawals_root in the statement, hence no discrepancy noticed

We'd need to add some sanity checks to compare with the block header, but the response we keep post RPC requests does not currently contain the header's state root. Will add a tracking issue for it.

@Nashtare Nashtare self-assigned this Jul 9, 2024
@Nashtare Nashtare requested a review from muursh as a code owner July 9, 2024 18:46
@github-actions github-actions bot added the crate: trace_decoder Anything related to the trace_decoder crate. label Jul 9, 2024
@Nashtare Nashtare merged commit 43a984d into develop Jul 10, 2024
14 checks passed
@Nashtare Nashtare deleted the fix/withdrawals branch July 10, 2024 09:26
@Nashtare Nashtare added this to the Type 1 - Q3 2024 milestone Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: trace_decoder Anything related to the trace_decoder crate.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants