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

statesync: broadcast snapshot request to all peers on startup #5320

Merged
merged 2 commits into from Sep 2, 2020

Conversation

erikgrinaker
Copy link
Contributor

On startup, the peer-to-peer stack may have peers connected before the state sync process begins, causing these to not trigger AddPeer events and thus not be used for snapshot discovery. Broadcasting a snapshot request to these explicitly makes sure we discover snapshots from existing peers as well.

@erikgrinaker erikgrinaker added the C:sync Component: Fast Sync, State Sync label Sep 1, 2020
@erikgrinaker erikgrinaker self-assigned this Sep 1, 2020
@codecov
Copy link

codecov bot commented Sep 1, 2020

Codecov Report

Merging #5320 into master will increase coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #5320      +/-   ##
==========================================
+ Coverage   62.52%   62.53%   +0.01%     
==========================================
  Files         259      259              
  Lines       26766    26768       +2     
==========================================
+ Hits        16735    16739       +4     
  Misses       8574     8574              
+ Partials     1457     1455       -2     
Impacted Files Coverage Δ
statesync/reactor.go 41.31% <0.00%> (-0.51%) ⬇️
p2p/switch.go 65.88% <0.00%> (-1.83%) ⬇️
blockchain/v2/reactor.go 35.16% <0.00%> (-1.47%) ⬇️
statesync/syncer.go 79.44% <0.00%> (-0.80%) ⬇️
consensus/reactor.go 74.68% <0.00%> (-0.69%) ⬇️
blockchain/v0/pool.go 79.29% <0.00%> (-0.32%) ⬇️
p2p/conn/connection.go 79.75% <0.00%> (-0.25%) ⬇️
consensus/state.go 71.70% <0.00%> (-0.18%) ⬇️
privval/signer_endpoint.go 81.57% <0.00%> (ø)
blockchain/v0/reactor.go 64.01% <0.00%> (+0.93%) ⬆️
... and 7 more

@erikgrinaker erikgrinaker added the S:automerge Automatically merge PR when requirements pass label Sep 2, 2020
@mergify mergify bot merged commit 2f4c1f6 into master Sep 2, 2020
@mergify mergify bot deleted the erik/state-sync-broadcast branch September 2, 2020 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:sync Component: Fast Sync, State Sync S:automerge Automatically merge PR when requirements pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants