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

feat(rpc): optimize block validation with state caching #12299

Merged

Conversation

lean-apple
Copy link
Contributor

Closes #12266.

Introduces state caching with CachedReads for block validation.

Some next optimizations could be after checking the behavior :

  • Add cache size limits
  • Implement cache cleanup strategy

@lean-apple lean-apple marked this pull request as ready for review November 4, 2024 04:26
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

sorry for the late review.

this looks great, only have two nits really

crates/rpc/rpc/src/validation.rs Outdated Show resolved Hide resolved
crates/rpc/rpc/src/validation.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

great!

I only extracted the cached_read ops into standalone functions

@mattsse mattsse added this pull request to the merge queue Nov 8, 2024
@lean-apple lean-apple closed this Nov 8, 2024
auto-merge was automatically disabled November 8, 2024 13:46

Pull request was closed

@lean-apple lean-apple deleted the builder-validation-requests-cache branch November 8, 2024 13:46
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a manual request Nov 8, 2024
@lean-apple lean-apple restored the builder-validation-requests-cache branch November 8, 2024 13:47
@lean-apple
Copy link
Contributor Author

lean-apple commented Nov 8, 2024

Sorry @mattsse though it was already merged 🙈

@lean-apple lean-apple reopened this Nov 8, 2024
@mattsse mattsse merged commit 74d7fe3 into paradigmxyz:main Nov 8, 2024
80 checks passed
@lean-apple lean-apple deleted the builder-validation-requests-cache branch November 14, 2024 07:18
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.

Use CachedReads for builder validations
2 participants