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(engine): require VALID latest FCU status before pruning #3954

Merged
merged 5 commits into from
Aug 2, 2023

Conversation

shekhirin
Copy link
Collaborator

@shekhirin shekhirin commented Jul 27, 2023

Without this check, we will try to start the pruner on first start even before the node is synced.

@shekhirin shekhirin force-pushed the alexey/pruner-engine-conditions branch from c93777f to 1265547 Compare July 27, 2023 11:01
@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #3954 (3dc5093) into main (88f83fc) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

Files Changed Coverage Δ
crates/consensus/beacon/src/engine/mod.rs 75.17% <100.00%> (-0.32%) ⬇️

... and 10 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.51% <0.00%> (+0.01%) ⬆️
unit-tests 64.15% <100.00%> (-0.02%) ⬇️

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

Components Coverage Δ
reth binary 25.84% <ø> (ø)
blockchain tree 83.04% <ø> (ø)
pipeline 90.10% <ø> (ø)
storage (db) 74.33% <ø> (ø)
trie 94.70% <ø> (ø)
txpool 47.96% <ø> (-0.03%) ⬇️
networking 77.46% <ø> (+0.01%) ⬆️
rpc 58.25% <ø> (-0.04%) ⬇️
consensus 63.55% <100.00%> (+0.04%) ⬆️
revm 32.71% <ø> (ø)
payload builder 6.58% <ø> (ø)
primitives 87.97% <ø> (-0.04%) ⬇️

@shekhirin shekhirin marked this pull request as ready for review July 27, 2023 11:49
@shekhirin shekhirin closed this Jul 27, 2023
@shekhirin shekhirin changed the title feat(engine): require at least one FCU before pruning feat(engine): require VALID latest FCU status before pruning Jul 31, 2023
@shekhirin shekhirin reopened this Jul 31, 2023
@shekhirin shekhirin marked this pull request as draft July 31, 2023 17:41
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.

smol nit

makes sense to only do this when fully synced I believe

Comment on lines 1720 to 1723
this.forkchoice_state_tracker
.latest_status()
.map(|status| status.is_valid())
.unwrap_or_default()
Copy link
Collaborator

Choose a reason for hiding this comment

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

this makes

there is .is_latest_valid() already, we can now remove the unused attr there

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oops TIL, fixed

@shekhirin shekhirin marked this pull request as ready for review August 2, 2023 14:53
@mattsse mattsse added the A-pruning Related to pruning or full node label Aug 2, 2023
@shekhirin shekhirin added the C-enhancement New feature or request label Aug 2, 2023
@shekhirin shekhirin added this pull request to the merge queue Aug 2, 2023
Merged via the queue into main with commit bddb60b Aug 2, 2023
@shekhirin shekhirin deleted the alexey/pruner-engine-conditions branch August 2, 2023 15:17
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.

2 participants