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

fix(engine): poll prune first #4048

Merged
merged 3 commits into from
Aug 3, 2023
Merged

fix(engine): poll prune first #4048

merged 3 commits into from
Aug 3, 2023

Conversation

shekhirin
Copy link
Collaborator

Before:

2023-08-03T15:19:00.917405Z TRACE consensus::engine: Pruner started tip_block_number=4018894
2023-08-03T15:19:00.917436Z  INFO reth::node::events: Forkchoice updated head_block_hash=0x410dd4e37016f600aa2d3493c3f2911fb608899e9ba5cbbbc08c3493e1dbcdc0 safe_block_hash=0xa8d08c509befce1d6af93fc1e15d135a200427232694389e5b6f863d81ba747f finalized_block_hash=0x8a127bf4e82d7e3e0d7791dd76379fb34d123f646a636a17683a4648faffd562 status=Valid
2023-08-03T15:19:00.917471Z TRACE pruner: Pruner started tip_block_number=4018894
2023-08-03T15:19:00.917827Z TRACE prune_transaction_senders{to_block=4018766 prune_mode=Distance(128)}: pruner: Pruned transaction senders rows=319 progress="100.0%"
2023-08-03T15:19:00.918173Z TRACE prune_account_history{to_block=4018766 prune_mode=Distance(128)}: pruner: Pruned account history (changesets) keys=5 rows=323 progress="100.0%"
2023-08-03T15:19:00.922173Z TRACE prune_account_history{to_block=4018766 prune_mode=Distance(128)}: pruner: Pruned account history (indices) rows=4602
2023-08-03T15:19:00.922381Z TRACE prune_storage_history{to_block=4018766 prune_mode=Distance(128)}: pruner: Pruned storage history (changesets) keys=114 rows=661
2023-08-03T15:19:00.929166Z TRACE prune_storage_history{to_block=4018766 prune_mode=Distance(128)}: pruner: Pruned storage history (indices) rows=10000
2023-08-03T15:19:00.929930Z TRACE prune_storage_history{to_block=4018766 prune_mode=Distance(128)}: pruner: Pruned storage history (indices) rows=1163
2023-08-03T15:19:00.931938Z TRACE pruner: Pruner finished tip_block_number=4018894 elapsed=14.438464ms
2023-08-03T15:19:10.995899Z  INFO reth::cli: Status connected_peers=19 latest_block=4018894
2023-08-03T15:19:11.523130Z  INFO net: Session established remote_addr=185.181.230.77:30317 client_version=Geth/v1.12.0-stable-e501b3b0/linux-amd64/go1.20.4 peer_id=0x11ebd3b04dbfe99055c014591b8bd528963ef825d9f88e4d1b21c01062aa1415da61c92cbd6b23d19744b078af4318ecbdea5144ab55aaec01eae3760a3f0ab2 total_active=20
2023-08-03T15:19:24.221512Z  WARN on_new_payload{block_hash=0xcd08522e157330b6256be4d5aa7a78ed0a2b3d1681b41d362e8c9c504cb3a42f block_number=4018895 is_pipeline_idle=true}: consensus::engine: Pruning is in progress, buffering new payload.
2023-08-03T15:19:24.226229Z TRACE on_new_payload{block_hash=0xcd08522e157330b6256be4d5aa7a78ed0a2b3d1681b41d362e8c9c504cb3a42f block_number=4018895 is_pipeline_idle=true}:try_buffer_payload: consensus::engine: return=Ok(PayloadStatus { status: Syncing, latest_valid_hash: None })
2023-08-03T15:19:24.226242Z TRACE on_new_payload{block_hash=0xcd08522e157330b6256be4d5aa7a78ed0a2b3d1681b41d362e8c9c504cb3a42f block_number=4018895 is_pipeline_idle=true}: consensus::engine: Returning payload status status=Ok(PayloadStatus { status: Syncing, latest_valid_hash: None })
2023-08-03T15:19:24.226253Z TRACE consensus::engine: Pruner finished result=Ok(()

After:

2023-08-03T15:21:36.716905Z TRACE pruner: Pruner started tip_block_number=4018905
2023-08-03T15:21:36.717302Z TRACE prune_transaction_senders{to_block=4018777 prune_mode=Distance(128)}: pruner: Pruned transaction senders rows=262 progress="100.0%"
2023-08-03T15:21:36.717674Z TRACE prune_account_history{to_block=4018777 prune_mode=Distance(128)}: pruner: Pruned account history (changesets) keys=5 rows=500 progress="100.0%"
2023-08-03T15:21:36.721857Z TRACE prune_account_history{to_block=4018777 prune_mode=Distance(128)}: pruner: Pruned account history (indices) rows=4748
2023-08-03T15:21:36.722107Z TRACE prune_storage_history{to_block=4018777 prune_mode=Distance(128)}: pruner: Pruned storage history (changesets) keys=96 rows=826
2023-08-03T15:21:36.728847Z TRACE prune_storage_history{to_block=4018777 prune_mode=Distance(128)}: pruner: Pruned storage history (indices) rows=10000
2023-08-03T15:21:36.729621Z TRACE prune_storage_history{to_block=4018777 prune_mode=Distance(128)}: pruner: Pruned storage history (indices) rows=1083
2023-08-03T15:21:36.731233Z TRACE pruner: Pruner finished tip_block_number=4018905 elapsed=14.276671ms
2023-08-03T15:21:44.924710Z  INFO net: Session established remote_addr=206.189.4.165:55270 client_version=Nethermind/v1.20.1+9f39c0c7/linux-x64/dotnet7.0.9 peer_id=0x121f485cac03abbe3dc2f83aad5edad89a777c68597b2f26f95a3ac0bed2f02a05f703e896db746084f54a1b224eb3b0ca0bd1870e74dd5a6818511cd7d86641 total_active=7
2023-08-03T15:21:47.623161Z  INFO reth::cli: Status connected_peers=7 latest_block=4018905
2023-08-03T15:21:47.979402Z  INFO net: Session established remote_addr=185.181.230.77:30317 client_version=Geth/v1.12.0-stable-e501b3b0/linux-amd64/go1.20.4 peer_id=0x11ebd3b04dbfe99055c014591b8bd528963ef825d9f88e4d1b21c01062aa1415da61c92cbd6b23d19744b078af4318ecbdea5144ab55aaec01eae3760a3f0ab2 total_active=8
2023-08-03T15:21:48.362758Z TRACE consensus::engine: Pruner finished result=Ok(())
2023-08-03T15:21:48.413082Z  INFO on_new_payload{block_hash=0x2ada50c84bb12168ebe76e0005837f633c69d7b4fdbc5e4d0d423b9b95d30b8c block_number=4018906 is_pipeline_idle=true}:try_insert_new_payload:try_insert_validated_block{block=(4018906, 0x2ada50c84bb12168ebe76e0005837f633c69d7b4fdbc5e4d0d423b9b95d30b8c)}: blockchain_tree: return=Ok(Valid

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.

doc nit

Comment on lines 1638 to 1639

fn poll_prune(
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 add some docs where when this returns Some?

@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Merging #4048 (96804d0) into main (f917d49) will increase coverage by 0.00%.
The diff coverage is 89.47%.

Impacted file tree graph

Files Changed Coverage Δ
crates/consensus/beacon/src/engine/mod.rs 75.70% <89.47%> (+0.16%) ⬆️

... and 12 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.43% <0.00%> (-0.01%) ⬇️
unit-tests 64.12% <89.47%> (-0.01%) ⬇️

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

Components Coverage Δ
reth binary 25.85% <ø> (ø)
blockchain tree 83.04% <ø> (ø)
pipeline 90.07% <ø> (ø)
storage (db) 74.41% <ø> (ø)
trie 94.70% <ø> (ø)
txpool 47.36% <ø> (ø)
networking 77.46% <ø> (+0.01%) ⬆️
rpc 57.86% <ø> (+<0.01%) ⬆️
consensus 64.03% <89.47%> (+0.09%) ⬆️
revm 32.71% <ø> (ø)
payload builder 6.58% <ø> (ø)
primitives 87.99% <ø> (-0.03%) ⬇️

@shekhirin shekhirin added this pull request to the merge queue Aug 3, 2023
@shekhirin shekhirin added C-bug An unexpected or incorrect behavior A-pruning Related to pruning or full node labels Aug 3, 2023
Merged via the queue into main with commit 77b7d77 Aug 3, 2023
@shekhirin shekhirin deleted the alexey/engine-prune-poll branch August 3, 2023 16:11
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-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants