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

block: make withdrawals trie check consistent with txtrie #3338

Merged
merged 5 commits into from Apr 5, 2024

Conversation

jochem-brouwer
Copy link
Member

When working on #3336 I noticed some inconsistent things unrelated to EIP 7002.

This PR fixes that. (Have currently set it up to not run CI yet since I might want to add other things I find)

Currently:

  • Adds withdrawalsTrie cache (we do not want to re-calculate the withdrawals trie each time)
  • Speeds up withdrawals trie calculation if there are no withdrawals
  • Speeds up uncle hash calculation if there are no uncles (now each time there are no uncles we return return equalsBytes(this.keccakFunction(RLP.encode([])), this.header.uncleHash), this is unnecessary especially since we currently have no uncles)

@acolytec3 acolytec3 marked this pull request as ready for review April 5, 2024 14:20
acolytec3
acolytec3 previously approved these changes Apr 5, 2024
Copy link
Contributor

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.92%. Comparing base (ad6c603) to head (65544f2).
Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 82.24% <100.00%> (?)
blockchain 90.92% <ø> (ø)
client 84.92% <ø> (?)
common 94.02% <ø> (ø)
devp2p 81.36% <ø> (ø)
evm 73.30% <ø> (?)
genesis 99.98% <ø> (ø)
statemanager 74.71% <ø> (ø)
trie 59.60% <ø> (-0.08%) ⬇️
tx 85.70% <ø> (ø)
util 81.32% <ø> (ø)
vm 61.56% <ø> (ø)
wallet 87.25% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@acolytec3 acolytec3 changed the title block: make withdrawals trie check consistent with txtrie [no ci] block: make withdrawals trie check consistent with txtrie Apr 5, 2024
Copy link
Contributor

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@acolytec3 acolytec3 merged commit faef42c into master Apr 5, 2024
36 checks passed
@holgerd77 holgerd77 deleted the optimize-block-cache branch April 9, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants