-
Notifications
You must be signed in to change notification settings - Fork 678
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
refactor: Rename BodySync to BlockSync for consistency #10293
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #10293 +/- ##
==========================================
- Coverage 71.82% 71.81% -0.02%
==========================================
Files 712 712
Lines 143055 143097 +42
Branches 143055 143097 +42
==========================================
+ Hits 102754 102763 +9
- Misses 35585 35630 +45
+ Partials 4716 4704 -12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I've turned off automatic merging altogether until I understand this problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's much easier to read with your comments and cleanup, thank you for this work
chain/client/src/sync/block.rs
Outdated
fn get_last_processed_block( | ||
&self, | ||
chain: &Chain, | ||
last_block_hash: &CryptoHash, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do I need to pass last_block_hash
here? When I look at the signature, I don't expect to pass last_block_hash
, I intend to receive it as the result
About implementation: why can't I just ask chain.store().get_latest_known
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a TODO about get_latest_known()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
} | ||
return; | ||
} | ||
// This is a very sneaky piece of logic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is good to know :)
It solves the problem of nodes going into header sync or body sync for just a few seconds. It's not a problem for an rpc node, but for a validator that is enough to miss production of a chunk or a block. Short syncs are not shown in prometheus due to the large poll interval.
A refactoring of receiving blocks for StateSync. Logging is now more friendly to the traces format.
5228596
to
c4ef2d8
Compare
And a bit of documentation for header sync.
And a bit of documentation of block sync.
And a bit of refactoring of block sync.
And a tiny refactoring related to state sync.
And a lot of TODOs.