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(l1): batch account updates in full sync #2088

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

MarcosNicolau
Copy link
Contributor

@MarcosNicolau MarcosNicolau commented Feb 25, 2025

Motivation
Full syncing in holesky

Description
Batches account updates which was identified as the main bottleneck when syncing in full mode. Now, instead of applying the updates on every block, we do it only for the last one in the batch, which is currently every 128 blocks because of the request limit.

Closes None

@MarcosNicolau MarcosNicolau self-assigned this Feb 25, 2025
@@ -48,7 +48,11 @@ impl Blockchain {
}
}

pub fn add_block(&self, block: &Block) -> Result<(), ChainError> {
pub fn add_block(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was thinking something in the lines of adding add_blocks, which only commits the trie once.

Then you can trivially add
fn add_block(block) { add_blocks(vec![block])}

Thoughts?

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.

2 participants