Skip to content

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 requested a review from LukaszRozmej May 19, 2024 14:48
@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
@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

3 participants