Validate the genesis config downloaded over RPC before accepting it #8474
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR replaces #8467, and additionally adds verification of a downloaded genesis.tar.bz2 before accepting it. If an RPC node serves a bad genesis, that node gets blacklisted and the validator tries another.
This should be sufficient to prevent the Chorus One poisoned genesis attack during SLP2 boot from reoccurring. However note that the Certus One bzip2 bomb as described by #8427 is not fixed here.
This also might be a fix for Harden untrusted genesis file consumption #7919, what do you think @ryoqun?- update: no, because it doesn't consider genesis deserialization