-
Notifications
You must be signed in to change notification settings - Fork 78
[ETCM-313] and [ETCM-316]: Header skeleton using new branch resolver #892
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
Conversation
bdc0dfb to
e2618f6
Compare
30d464b to
b07dbef
Compare
88128d9 to
5c8e0f2
Compare
156eef3 to
5254dfb
Compare
5c8e0f2 to
7608c20
Compare
7608c20 to
d293268
Compare
5254dfb to
111b188
Compare
d293268 to
4c7150e
Compare
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.
PullRequest Breakdown
Reviewable lines of change
+ 1,784
- 210
56% Scala
43% Scala (tests)
1% Other (tests)
<1% Other
<1% XML (tests)Type of change
Feature - These changes are adding a new feature or improvement to existing code.
| 1 Message | |
|---|---|
| Due to its size, this pull request will likely have a little longer turnaround time and will probably require multiple passes from our reviewers. |
|
This PR now also includes the changes from #887 |
|
Wrapping up the work described in the initial PR description. Further work to extract the header skeleton download into a separate actor and get rid of most mutable state variables will be addressed in another PR. |
|
Successfully synced with Sagano testnet. |
|
and add the following line in |
…t be higher than the default max number of headers returned
Description
See ETCM-313 and ethereum/go-ethereum#2315
Proposed Solution
bestBlockHeaderNumber+ N (i.e. block headersbestBlockHeaderNumber+ kN where 1 <= k <= N). To achieve this, use theskipparameter in theGetBlockHeadersrequest.bestBlockHeaderNumber+ 1 + kN where 0 <= k <= N-1.batchFailuresCount. This is because these validation failures might mean that the master peer is sending us wrong data and that we couldn't find a matching batch from another peer.fastSyncMaxBatchRetriesis reached, start branch resolution.1 N is determined by
blockHeadersPerRequest. Currently set exactly to its value but this is open for discussion.A class called
HeaderSkeletonhandles the logic of the skeleton size, numbers, batches, gap size, and all that is needed from theFastSyncactor. It is kept in memory so if the node goes down everything is recalculated.Pending work
assignBlockchainWorkwe just take the peer with the highest block number.