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

protocol upgrade to validate eligibility without downloading activesets #5682

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

dshulyak
Copy link
Contributor

@dshulyak dshulyak commented Mar 11, 2024

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.

atxs_by_epoch_by_pubkey|284180480wq
atxs_by_epoch_pubkey_weight|281997312
@dshulyak dshulyak changed the title protocol upgrade to turnoff activeset-based validation protocol upgrade to validate eligibility without downloading activesets Mar 12, 2024
@dshulyak dshulyak marked this pull request as ready for review March 20, 2024 07:22
Copy link

codecov bot commented Mar 20, 2024

Codecov Report

Attention: Patch coverage is 85.81560% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 80.0%. Comparing base (c5f79cc) to head (455b2c1).
Report is 8 commits behind head on develop.

Files Patch % Lines
atxsdata/data.go 81.6% 4 Missing and 5 partials ⚠️
proposals/handler.go 25.0% 6 Missing and 3 partials ⚠️
proposals/eligibility_validator.go 95.2% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #5682     +/-   ##
=========================================
- Coverage     80.0%   80.0%   -0.1%     
=========================================
  Files          279     279             
  Lines        29009   29157    +148     
=========================================
+ Hits         23225   23341    +116     
- Misses        4182    4207     +25     
- Partials      1602    1609      +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

validate ballot using weight from the local activeset
1 participant