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): set eth_syncing = true if pruner is active #4063

Merged
merged 2 commits into from
Aug 4, 2023

Conversation

shekhirin
Copy link
Collaborator

@shekhirin shekhirin commented Aug 4, 2023

Resolves #4056

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Merging #4063 (e5e66e2) into main (689b9d6) will increase coverage by 0.01%.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

Impacted file tree graph

Files Changed Coverage Δ
crates/consensus/beacon/src/engine/mod.rs 75.79% <100.00%> (+0.08%) ⬆️

... and 11 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.45% <0.00%> (-0.01%) ⬇️
unit-tests 64.11% <100.00%> (+0.01%) ⬆️

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

Components Coverage Δ
reth binary 25.64% <ø> (ø)
blockchain tree 83.04% <ø> (ø)
pipeline 90.07% <ø> (ø)
storage (db) 74.41% <ø> (ø)
trie 94.70% <ø> (ø)
txpool 48.29% <ø> (+0.57%) ⬆️
networking 77.39% <ø> (-0.06%) ⬇️
rpc 57.85% <ø> (-0.01%) ⬇️
consensus 64.08% <100.00%> (+0.04%) ⬆️
revm 32.59% <ø> (ø)
payload builder 6.58% <ø> (ø)
primitives 88.01% <ø> (ø)

@rkrasiuk
Copy link
Member

rkrasiuk commented Aug 4, 2023

@mattsse I think it's about time to detach txpool from the syncing state and create another control flag for it, because it's not ideal that we don't accept incoming pool transactions whenever we prune

@shekhirin shekhirin marked this pull request as ready for review August 4, 2023 13:55
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, doc nit

}
EnginePruneEvent::TaskDropped => {
error!(target: "consensus::engine", "Failed to receive spawned pruner");
return Some(Err(BeaconConsensusEngineError::PrunerChannelClosed))
}
EnginePruneEvent::Finished { result } => {
trace!(target: "consensus::engine", ?result, "Pruner finished");
self.sync_state_updater.update_sync_state(SyncState::Idle);
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is okay, and will controlled by the pipeline if we need to resync again

@@ -1599,13 +1599,15 @@ where
EnginePruneEvent::Started(tip_block_number) => {
trace!(target: "consensus::engine", %tip_block_number, "Pruner started");
self.metrics.pruner_runs.increment(1);
self.sync_state_updater.update_sync_state(SyncState::Syncing);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd like a note here why we're doing this, basically, because prune+fcu/engine are mutually exclusive so we're not making progress while we're pruning

@mattsse
Copy link
Collaborator

mattsse commented Aug 4, 2023

@mattsse I think it's about time to detach txpool from the syncing state and create another control flag for it, because it's not ideal that we don't accept incoming pool transactions whenever we prune

agree, will look into it

@shekhirin shekhirin added this pull request to the merge queue Aug 4, 2023
Merged via the queue into main with commit b673b6c Aug 4, 2023
24 checks passed
@shekhirin shekhirin deleted the alexey/pruner-eth-syncing branch August 4, 2023 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reply true to eth_syncing when pruning is in progress
3 participants