Skip to content

fix(stages): transaction lookup stage checkpoint calculation#3909

Merged
onbjerg merged 5 commits intomainfrom
alexey/transaction-lookup-checkpoint
Jul 26, 2023
Merged

fix(stages): transaction lookup stage checkpoint calculation#3909
onbjerg merged 5 commits intomainfrom
alexey/transaction-lookup-checkpoint

Conversation

@shekhirin
Copy link
Member

@shekhirin shekhirin commented Jul 25, 2023

One missing thing in #3892 was the stage checkpoint fixes for the TransactionLookup stage which currently relies on the number of rows in the TxHashNumber table which will obviously break once pruned:

fn stage_checkpoint<DB: Database>(
provider: &DatabaseProviderRW<'_, &DB>,
) -> Result<EntitiesCheckpoint, DatabaseError> {
Ok(EntitiesCheckpoint {
processed: provider.tx_ref().entries::<tables::TxHashNumber>()? as u64,
total: provider.tx_ref().entries::<tables::Transactions>()? as u64,
})
}

@shekhirin shekhirin requested review from onbjerg and rkrasiuk July 25, 2023 15:12
@shekhirin shekhirin added C-enhancement New feature or request A-pruning Related to pruning or full node labels Jul 25, 2023
@shekhirin shekhirin requested review from joshieDo and mattsse and removed request for onbjerg and rkrasiuk July 25, 2023 15:14
@shekhirin shekhirin marked this pull request as draft July 25, 2023 15:20
@shekhirin shekhirin marked this pull request as ready for review July 25, 2023 16:19
@shekhirin shekhirin force-pushed the alexey/pruner-transaction-lookup branch from 4e42e78 to 6ba3ea4 Compare July 25, 2023 16:40
@shekhirin shekhirin requested review from gakonst and rakita July 25, 2023 16:40
@shekhirin shekhirin force-pushed the alexey/pruner-transaction-lookup branch from 6ba3ea4 to 7228862 Compare July 25, 2023 16:52
@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Merging #3909 (daf7ae9) into main (d5ea168) will increase coverage by 0.00%.
The diff coverage is 94.44%.

❗ Current head daf7ae9 differs from pull request most recent head dc226eb. Consider uploading reports for the commit dc226eb to get more accurate results

Impacted file tree graph

Files Changed Coverage Δ
crates/prune/src/error.rs 0.00% <ø> (ø)
...torage/provider/src/providers/database/provider.rs 77.63% <75.00%> (ø)
crates/prune/src/pruner.rs 90.32% <92.37%> (ø)
crates/stages/src/stages/tx_lookup.rs 96.36% <100.00%> (+0.79%) ⬆️
crates/stages/src/test_utils/test_db.rs 83.46% <100.00%> (ø)

... and 7 files with indirect coverage changes

Flag Coverage Δ
integration-tests 15.46% <0.00%> (-0.02%) ⬇️
unit-tests 64.55% <94.44%> (+<0.01%) ⬆️

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

Components Coverage Δ
reth binary 27.24% <ø> (ø)
blockchain tree 83.01% <ø> (ø)
pipeline 89.79% <100.00%> (+0.10%) ⬆️
storage (db) 74.19% <75.00%> (ø)
trie 94.70% <ø> (ø)
txpool 46.56% <ø> (-0.03%) ⬇️
networking 77.63% <ø> (-0.09%) ⬇️
rpc 58.38% <ø> (ø)
consensus 64.46% <ø> (ø)
revm 33.68% <ø> (ø)
payload builder 6.61% <ø> (ø)
primitives 88.03% <ø> (-0.01%) ⬇️

Base automatically changed from alexey/pruner-transaction-lookup to main July 25, 2023 17:49
@shekhirin shekhirin force-pushed the alexey/transaction-lookup-checkpoint branch from daf7ae9 to dc226eb Compare July 26, 2023 12:35
@shekhirin shekhirin requested a review from onbjerg July 26, 2023 16:38
Copy link
Collaborator

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

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

lgtm

@onbjerg onbjerg added this pull request to the merge queue Jul 26, 2023
Merged via the queue into main with commit 74bbe5a Jul 26, 2023
@onbjerg onbjerg deleted the alexey/transaction-lookup-checkpoint branch July 26, 2023 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-pruning Related to pruning or full node C-enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants