Skip to content

feat(state): pruning#4397

Merged
rakita merged 3 commits intorakita/revm_statefrom
rkrasiuk/integrate-pruning
Aug 30, 2023
Merged

feat(state): pruning#4397
rakita merged 3 commits intorakita/revm_statefrom
rkrasiuk/integrate-pruning

Conversation

@rkrasiuk
Copy link
Contributor

Description

Integrate pruning into new REVM state.

@rkrasiuk rkrasiuk added A-execution Related to the Execution and EVM A-pruning Related to pruning or full node labels Aug 29, 2023
@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Merging #4397 (b199a48) into rakita/revm_state (7d6f958) will decrease coverage by 0.02%.
The diff coverage is 55.55%.

Impacted file tree graph

Files Changed Coverage Δ
crates/consensus/auto-seal/src/lib.rs 0.00% <0.00%> (ø)
crates/consensus/beacon/src/engine/test_utils.rs 68.72% <0.00%> (-2.45%) ⬇️
crates/payload/basic/src/lib.rs 0.00% <0.00%> (ø)
crates/rpc/rpc/src/eth/api/pending_block.rs 0.00% <0.00%> (ø)
crates/storage/provider/src/test_utils/executor.rs 54.54% <0.00%> (-2.60%) ⬇️
crates/storage/provider/src/traits/executor.rs 36.36% <ø> (ø)
crates/revm/src/processor.rs 69.67% <86.66%> (+0.85%) ⬆️
crates/stages/src/stages/execution.rs 93.27% <100.00%> (+0.01%) ⬆️
crates/storage/provider/src/change.rs 91.19% <100.00%> (ø)

... and 10 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.95% <0.00%> (-0.01%) ⬇️
unit-tests 62.76% <55.55%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 26.37% <ø> (ø)
blockchain tree 82.79% <ø> (ø)
pipeline 88.11% <100.00%> (+<0.01%) ⬆️
storage (db) 72.56% <87.50%> (-0.02%) ⬇️
trie 94.73% <ø> (ø)
txpool 47.27% <ø> (ø)
networking 77.51% <ø> (-0.04%) ⬇️
rpc 57.70% <0.00%> (-0.03%) ⬇️
consensus 62.70% <0.00%> (-0.18%) ⬇️
revm 19.11% <86.66%> (+0.25%) ⬆️
payload builder 6.87% <0.00%> (ø)
primitives 86.16% <ø> (+0.03%) ⬆️

@mattsse mattsse added the S-blocked This cannot more forward until something else changes label Aug 29, 2023
@rkrasiuk rkrasiuk removed the S-blocked This cannot more forward until something else changes label Aug 30, 2023
Copy link
Member

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

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

LGTM modulo merge_transactions enum instead of bool

Comment on lines +305 to +309
let with_reverts = self.tip.map_or(true, |tip| {
!self.prune_modes.should_prune_account_history(block.number, tip) &&
!self.prune_modes.should_prune_storage_history(block.number, tip)
});
self.db().merge_transitions(with_reverts);
Copy link
Member

Choose a reason for hiding this comment

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

makes sense. We collect reverts either if tip is not set, or if pruning tells us to not prune the block we're processing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup, later on we can address the granularity of the revert retention in the bundle state

Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Copy link
Collaborator

@rakita rakita left a comment

Choose a reason for hiding this comment

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

lgtm

@rakita rakita merged commit 0b59c84 into rakita/revm_state Aug 30, 2023
@rakita rakita deleted the rkrasiuk/integrate-pruning branch August 30, 2023 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-execution Related to the Execution and EVM A-pruning Related to pruning or full node

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants