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(bin): latest block in status message #4856

Merged
merged 3 commits into from
Sep 29, 2023
Merged

Conversation

shekhirin
Copy link
Collaborator

@shekhirin shekhirin commented Sep 29, 2023

Ref #4854 (comment)

Report latest block in Status message as the latest reached by either pipeline or blockchain tree.

@shekhirin shekhirin added A-observability Related to tracing, metrics, logs and other observability tools A-cli Related to the reth CLI labels Sep 29, 2023
@shekhirin shekhirin requested a review from onbjerg as a code owner September 29, 2023 13:33
@shekhirin shekhirin assigned mattsse and unassigned mattsse Sep 29, 2023
@shekhirin shekhirin requested a review from mattsse September 29, 2023 13:33
@shekhirin shekhirin force-pushed the alexey/status-latest-block branch from da6e1fd to 6f9d0a7 Compare September 29, 2023 13:36
@@ -79,6 +79,7 @@ impl NodeState {
result: ExecOutput { checkpoint, done },
} => {
self.current_checkpoint = checkpoint;
self.latest_block = Some(checkpoint.block_number);
Copy link
Collaborator

@mattsse mattsse Sep 29, 2023

Choose a reason for hiding this comment

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

hmm, I'm skeptical that this is the correct fix, because we only want to do this for the finish stage but this updates it for every stage, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hmm, you're right, added a check for Finish stage

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Merging #4856 (dd902d5) into main (23d2baf) will decrease coverage by 0.05%.
Report is 1 commits behind head on main.
The diff coverage is 0.00%.

Impacted file tree graph

Files Coverage Δ
bin/reth/src/node/events.rs 11.06% <0.00%> (-0.15%) ⬇️

... and 12 files with indirect coverage changes

Flag Coverage Δ
integration-tests 15.52% <0.00%> (-0.01%) ⬇️
unit-tests 62.63% <0.00%> (-0.05%) ⬇️

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

Components Coverage Δ
reth binary 32.28% <0.00%> (-0.02%) ⬇️
blockchain tree 80.44% <ø> (ø)
pipeline 88.45% <ø> (ø)
storage (db) 73.31% <ø> (ø)
trie 94.48% <ø> (+0.03%) ⬆️
txpool 49.03% <ø> (-0.46%) ⬇️
networking 76.43% <ø> (-0.07%) ⬇️
rpc 57.78% <ø> (-0.01%) ⬇️
consensus 61.06% <ø> (ø)
revm 28.54% <ø> (ø)
payload builder 8.16% <ø> (ø)
primitives 85.27% <ø> (-0.03%) ⬇️

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, pending q re engine update of latest block

@@ -124,7 +127,7 @@ impl NodeState {
);
}
BeaconConsensusEngineEvent::CanonicalBlockAdded(block) => {
self.latest_canonical_engine_block = Some(block.number);
self.latest_block = Some(block.number);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this needs to be moved to the CanonicalChainCommitted event ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

makes sense, CanonicalBlockAdded is called on new payloads

@mattsse mattsse added the C-bug An unexpected or incorrect behavior label Sep 29, 2023
@mattsse mattsse added this pull request to the merge queue Sep 29, 2023
Merged via the queue into main with commit ce85e17 Sep 29, 2023
@mattsse mattsse deleted the alexey/status-latest-block branch September 29, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Related to the reth CLI A-observability Related to tracing, metrics, logs and other observability tools C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants