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

perf(root): prefetch account proofs for the block #13431

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

shekhirin
Copy link
Collaborator

/// Prefetch proofs for the accounts in the provided block.
///
/// Accounts that will be prefetched are:
/// - Transaction senders
/// - Transaction recipients
/// - Withdrawal recipients

@shekhirin shekhirin added C-perf A change motivated by improving speed, memory usage or disk footprint A-trie Related to Merkle Patricia Trie implementation labels Dec 17, 2024
@shekhirin shekhirin force-pushed the alexey/state-root-task-prefetch branch from 39cc718 to e9254b6 Compare December 17, 2024 22:22
@@ -2255,6 +2255,7 @@ where
//
// let state_root_task = StateRootTask::new(state_root_config,
// blinded_provider_factory); let state_hook = state_root_task.state_hook();
// state_root_task.prefetch_account_proofs(&sealed_block.body);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// state_root_task.prefetch_account_proofs(&sealed_block.body);
// state_root_task.prefetch_account_proofs(sealed_block.transactions_with_sender());

accounts.extend(
body.transactions()
.iter()
.flat_map(|tx| [tx.recover_signer(), tx.kind().to().copied()])
Copy link
Member

Choose a reason for hiding this comment

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

cuz tis expensive

@shekhirin shekhirin force-pushed the alexey/state-root-task-prefetch branch from 1d9befb to 3906e82 Compare December 18, 2024 20:27
@shekhirin shekhirin requested a review from rkrasiuk December 18, 2024 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trie Related to Merkle Patricia Trie implementation C-perf A change motivated by improving speed, memory usage or disk footprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants