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(snapshot, prune): highest snapshots tracker #4721

Merged
merged 26 commits into from
Sep 29, 2023

Conversation

shekhirin
Copy link
Collaborator

@shekhirin shekhirin commented Sep 21, 2023

When highest snapshotted block numbers for transactions or headers are known, pruner should act prune this tables too.

This PR adds a tracker for highest snapshots and initiates a Snapshotter inside the node/mod.rs.

@shekhirin shekhirin force-pushed the alexey/pruner-highest-snapshots branch 2 times, most recently from c32a6e4 to 3e23b11 Compare September 21, 2023 18:46
@shekhirin shekhirin force-pushed the alexey/pruner-highest-snapshots branch from 3e23b11 to d986eb8 Compare September 21, 2023 18:52
@shekhirin shekhirin marked this pull request as ready for review September 22, 2023 13:00
@shekhirin shekhirin added A-pruning Related to pruning or full node A-static-files Related to static files C-enhancement New feature or request labels Sep 22, 2023
@shekhirin shekhirin mentioned this pull request Sep 22, 2023
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #4721 (4d61b7a) into main (8f3e4a1) will increase coverage by 0.00%.
The diff coverage is 82.85%.

Impacted file tree graph

Files Coverage Δ
crates/consensus/beacon/src/engine/test_utils.rs 67.20% <100.00%> (+0.10%) ⬆️
crates/primitives/src/chain/spec.rs 98.08% <100.00%> (+<0.01%) ⬆️
crates/prune/src/pruner.rs 78.58% <100.00%> (+0.21%) ⬆️
crates/snapshot/src/snapshotter.rs 94.31% <90.90%> (-0.37%) ⬇️
bin/reth/src/node/mod.rs 25.68% <0.00%> (-0.33%) ⬇️

... and 7 files with indirect coverage changes

Flag Coverage Δ
integration-tests 15.54% <2.85%> (-0.02%) ⬇️
unit-tests 62.73% <82.85%> (+<0.01%) ⬆️

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

Components Coverage Δ
reth binary 32.02% <0.00%> (-0.05%) ⬇️
blockchain tree 83.76% <ø> (ø)
pipeline 88.45% <ø> (ø)
storage (db) 73.31% <ø> (ø)
trie 94.48% <ø> (ø)
txpool 49.54% <ø> (ø)
networking 76.46% <ø> (ø)
rpc 57.79% <ø> (ø)
consensus 61.06% <100.00%> (+<0.01%) ⬆️
revm 28.54% <ø> (ø)
payload builder 8.16% <ø> (ø)
primitives 85.26% <100.00%> (-0.03%) ⬇️

@shekhirin shekhirin marked this pull request as draft September 27, 2023 15:29
@shekhirin shekhirin force-pushed the alexey/pruner-highest-snapshots branch 2 times, most recently from bfd231b to 6e5ff22 Compare September 27, 2023 16:19
@shekhirin shekhirin force-pushed the alexey/pruner-highest-snapshots branch from 6e5ff22 to aa35d53 Compare September 27, 2023 16:41
@shekhirin shekhirin changed the title feat(snapshot, prune): respect highest snapshots in pruner feat(snapshot, prune): highest snapshots tracker Sep 27, 2023
@shekhirin shekhirin force-pushed the alexey/pruner-highest-snapshots branch from 7045ba8 to db2d084 Compare September 27, 2023 17:37
@shekhirin shekhirin force-pushed the alexey/pruner-highest-snapshots branch from db2d084 to 17e030a Compare September 27, 2023 18:01
@shekhirin shekhirin marked this pull request as ready for review September 27, 2023 18:24
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.

lgtm

Base automatically changed from alexey/engine-hook-snapshot to main September 28, 2023 18:26
@shekhirin shekhirin force-pushed the alexey/pruner-highest-snapshots branch from cfa12f6 to 10dcc1a Compare September 29, 2023 09:42
@shekhirin shekhirin force-pushed the alexey/pruner-highest-snapshots branch from 10dcc1a to 15f33b8 Compare September 29, 2023 09:42
@shekhirin shekhirin added this pull request to the merge queue Sep 29, 2023
Merged via the queue into main with commit 6b29454 Sep 29, 2023
24 checks passed
@shekhirin shekhirin deleted the alexey/pruner-highest-snapshots branch September 29, 2023 10:12
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 A-static-files Related to static files C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants