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

Add retry mechanism when downloading genesis and snapshots #8467

Closed
wants to merge 1 commit into from

Conversation

mvines
Copy link
Member

@mvines mvines commented Feb 26, 2020

When the validator selects an RPC node to download genesis or a snapshot from, it currently aborts the process on any failure. This is ripe for exploitation (as we saw in the SLP2 boot) and can cause problems such as #8406 when the selected RPC node returns bad data.

While this PR does not add any additional genesis/snapshot validation (that's for a follow-up), it adds the ability to blacklist any RPC nodes that fail to respond or return unexpected results. Caveats:

  • --trusted-validator nodes are never blacklisted
  • Once all visible nodes are blacklisted, if no new nodes appear in 60 seconds then the blacklist is cleared and all nodes will be retried again.

Progress towards #8406

@codecov
Copy link

codecov bot commented Feb 26, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@407d058). Click here to learn what that means.
The diff coverage is 33.3%.

@@           Coverage Diff            @@
##             master   #8467   +/-   ##
========================================
  Coverage          ?   80.3%           
========================================
  Files             ?     256           
  Lines             ?   56447           
  Branches          ?       0           
========================================
  Hits              ?   45347           
  Misses            ?   11100           
  Partials          ?       0

@mvines
Copy link
Member Author

mvines commented Feb 26, 2020

Obsoleted by #8474

@mvines mvines closed this Feb 26, 2020
@mvines mvines deleted the retry branch February 26, 2020 18:50
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.

1 participant