protocol upgrade to validate eligibility without downloading activesets #5682
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.
closes: #5598
to realize proposed solution i introduced
non_decreasing_weight
for an epoch, this weight tracks the weight of all known atxs in the epoch. however for equivocating atxs we can't count weight multiple times, therefore we count only largest atx from an identity in the epoch. this way we guarantee that peers will be eventually in agreement what weight they are using for validating ballots.using that weight we compute
lower_boundary
. if any ballot claims that it has lower eligibility than this boundary it is either intentionally concentrating weight or it knows about more atxs then we have locally. in 2nd case we will eventually download those atxs and validate referenced ballot.additionally we introduce
upper_boundary
. this boundary computed using hardcoded minimal weight. if any ballot claims larger boundary we know that node is misconfigured or intentionally creates many small ballots for dos. in both cases we will disconnect that node with reject.