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

Intra-block cache #7039

Merged
merged 8 commits into from
May 20, 2024
Merged

Intra-block cache #7039

merged 8 commits into from
May 20, 2024

Conversation

benaadams
Copy link
Member

@benaadams benaadams commented May 17, 2024

Resolves #179

I'd solved this a long time ago; however always had issues doing the more ambitious step of sharing the cache between blocks; and parallel pre-caching.

Recognising the perfect can be the enemy of the good; and that we can make a journey with many steps; this introduces just the part of sharing state and storage between tx in the same block; rather than always starting afresh for each tx.

Changes

  • Maintain state and storage cache between the txs in a block

Even though it clears every block in this iteration

  • > 50% of state reads are cache hits
  • ~ 21% of storage reads are cache hits
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 17, 2024 00:48
@benaadams
Copy link
Member Author

@benaadams benaadams mentioned this pull request May 18, 2024
3 tasks
@benaadams benaadams merged commit 091d255 into master May 20, 2024
67 checks passed
@benaadams benaadams deleted the intrablock-cache branch May 20, 2024 10:05
@kamilchodola kamilchodola restored the intrablock-cache branch May 27, 2024 18:53
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.

Keep caches between transactions
2 participants