Skip to content

Conversation

@figtracer
Copy link
Contributor

same reasoning as this #20635

@figtracer figtracer marked this pull request as ready for review December 29, 2025 20:53
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.

makes sense, smol suggestions

.collect();

let mut targets = MultiProofTargets::default();
let mut storage_targets = 0usize;
Copy link
Collaborator

Choose a reason for hiding this comment

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

isn't this equivalent to smth like MultiProofTargets::storage_targets_count?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think we don't have that available but we can add it

// do nothing if unchanged
if !slot.is_changed() {
continue
let results: Vec<_> = state
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we could collect this directly into B256Map? then we don't need to collect into vec then insert into map?


/// Returns a set of [`MultiProofTargets`] and the total amount of storage targets, based on the
/// given state.
fn multiproof_targets_from_state(state: EvmState) -> (MultiProofTargets, usize) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can change this to just return MultiProofTargets and then add a helper fn for counting the targets?

@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Jan 6, 2026
@mattsse mattsse added the C-perf A change motivated by improving speed, memory usage or disk footprint label Jan 6, 2026
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.

smol nit

Comment on lines +32 to +39
impl FromParallelIterator<(B256, B256Set)> for MultiProofTargets {
fn from_par_iter<I>(par_iter: I) -> Self
where
I: IntoParallelIterator<Item = (B256, B256Set)>,
{
Self(par_iter.into_par_iter().collect())
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

great

Comment on lines -772 to -778
// if the account was not touched, or if the account was selfdestructed, do not
// fetch proofs for it
//
// Since selfdestruct can only happen in the same transaction, we can skip
// prefetching proofs for selfdestructed accounts
//
// See: https://eips.ethereum.org/EIPS/eip-6780
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we keep these docs?

@mattsse mattsse added this pull request to the merge queue Jan 6, 2026
Merged via the queue into paradigmxyz:main with commit 6384226 Jan 6, 2026
44 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Jan 6, 2026
@figtracer figtracer deleted the parallelize_multiproof_targets_from_state branch January 6, 2026 14:24
mattsse added a commit that referenced this pull request Jan 7, 2026
@figtracer figtracer restored the parallelize_multiproof_targets_from_state branch January 7, 2026 15:58
meetrick pushed a commit to meetrick/reth that referenced this pull request Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-perf A change motivated by improving speed, memory usage or disk footprint

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants