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: enable parallel storage root computation on canonical chain write #8128

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

Conversation

fgimenez
Copy link
Member

@fgimenez fgimenez commented May 6, 2024

No description provided.

Copy link
Member

@rkrasiuk rkrasiuk left a comment

Choose a reason for hiding this comment

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

looking good

crates/blockchain-tree/src/blockchain_tree.rs Outdated Show resolved Hide resolved
ParallelStateRoot::new(consistent_view, hashed_state.clone())
.incremental_root_with_updates()
.map(|(root, updates)| (root, Some(updates)))
.map_err(ProviderError::from)?;
Copy link
Member

Choose a reason for hiding this comment

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

this should be BlockValidationError as before

Copy link
Member Author

Choose a reason for hiding this comment

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

I've added an impl for going from ParallelStateRootError directly to CanonicalError, ptal

.provider()?
// State root calculation can take a while, and we're sure no write transaction
// will be open in parallel. See https://github.com/paradigmxyz/reth/issues/6168.
.disable_long_read_transaction_safety();
Copy link
Member

@rkrasiuk rkrasiuk May 6, 2024

Choose a reason for hiding this comment

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

thinking if worth configuring this in the consistent view

Copy link
Member Author

Choose a reason for hiding this comment

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

I can add these changes if needed, lmk

@fgimenez fgimenez force-pushed the fgimenez/enable-parallel-storage-root-computation branch from 67a4847 to 25c0a0e Compare May 7, 2024 10:05
@gakonst
Copy link
Member

gakonst commented May 9, 2024

gm @fgimenez next steps here?

@fgimenez
Copy link
Member Author

fgimenez commented May 9, 2024

next steps here?

@gakonst waiting for @rkrasiuk review

@fgimenez fgimenez marked this pull request as ready for review May 9, 2024 15:29
@fgimenez fgimenez requested a review from rakita as a code owner May 9, 2024 15:29
@fgimenez fgimenez requested a review from rkrasiuk May 9, 2024 15:30
@emhane emhane added C-perf A change motivated by improving speed, memory usage or disk footprint A-blockchain-tree Related to sidechains, reorgs and pending blocks labels May 10, 2024
@Rjected
Copy link
Member

Rjected commented May 22, 2024

bump @rkrasiuk for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-blockchain-tree Related to sidechains, reorgs and pending blocks 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.

None yet

5 participants