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

Only recalculate storage roots once per block #7021

Merged
merged 4 commits into from
May 20, 2024
Merged

Conversation

benaadams
Copy link
Member

@benaadams benaadams commented May 14, 2024

Resolves #2324

Changes

  • Only recalculate root hashes for storages once per block than for each tx; if multiple tx use the same contract it is wasteful to recalcuate them multiple times.
  • Also means can recalucate all the storage roots in parallel at the end.
  • Addresses some long standing TODOs and issue Only recalculate storage roots on block commit #2324

Now 1.5% of block processing when running in Parallel

image

Types of changes

What types of changes does your code introduce?

  • Optimization

Testing

Requires testing

  • No

@benaadams benaadams marked this pull request as ready for review May 19, 2024 14:46
@benaadams benaadams changed the title Only recalculate storage hashes once per block Only recalculate storage roots once per block May 19, 2024
@benaadams
Copy link
Member Author

@benaadams benaadams merged commit f0e7fdf into master May 20, 2024
68 checks passed
@benaadams benaadams deleted the storagehashes branch May 20, 2024 09:34
@kamilchodola kamilchodola restored the storagehashes branch May 27, 2024 18:52
@benaadams benaadams deleted the storagehashes branch May 27, 2024 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only recalculate storage roots on block commit
2 participants