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

validate ballot using weight from the local activeset #5598

Open
dshulyak opened this issue Feb 23, 2024 · 2 comments · May be fixed by #5682
Open

validate ballot using weight from the local activeset #5598

dshulyak opened this issue Feb 23, 2024 · 2 comments · May be fixed by #5682
Assignees

Comments

@dshulyak
Copy link
Contributor

dshulyak commented Feb 23, 2024

use locally generated activeset for validation

we are using activeset to prove how many atxs were seen at the time of deciding how many ballots will be created by an identity in the epoch, this is also called eligibility counter. on the validation/remote side, we get referenced activeset, download any missing atxs and test that eligibility counter was computed correctly.

any node is free to use smaller activeset, in order to get more eligibilities, this opens DoS but can be maintained by setting upper_boundary for activeset (which we do with minimal active set weight in configuration). what we actually want to enforce with activeset is that node can't concentrate all its weight in single layer, this is enforced by setting lower_boundary, and we can compute such lower_boundary using locally available atxs.

the proposal is to change validation to the following algorithm:

  • compute lower_boundary using all locally available atxs, counting only highest equivocated atx
  • compute upper_boundary with configured minimal weight for the given epoch
  • ballot passes validation is eligibility counter is between lower_boundary and upper_boundary
  • if it doesn't pass validation, then either our local node is not synced or the other node is dishonest. eventually we will either download all weight and process that ballot, or rightfully discard it

it removes the need for referencing activeset in ballot, however we can leave that part as is, in order to avoid versioning.

activesets for ballots referenced in the first block

activesets that are used for ballots in the first block will be used to contruct hare activeset. we don't reference them directly, but we get them by looking up first ballot from atx referenced in block.

in current version we are relying on so called trusted activeset to setup hare participants, and thus we can ignore this part.

graded active set removes this dependency, therefore we should implement it before disabling trusted activeset. feat/graded oracle

@dshulyak
Copy link
Contributor Author

dshulyak commented Feb 23, 2024

there seems to be a problem with this solution.
for example if there are 3 nodes, A, B ,C.
A connected to B, B to C.
A created ballot, it passed validation on B without downloading A's activeset, but failed on C and now C can't request it from B.

the other version was proposed by Tal, can be summarized as:

  • remove activeset reference completely
  • validate eligibility using local activeset
  • but if it fails, sync missing atxs from peer

this last step is problematic due to missing protocol to do it efficiently.

@dshulyak dshulyak assigned dshulyak and unassigned dshulyak Feb 26, 2024
@dshulyak
Copy link
Contributor Author

i updated description, the implementation is still simple, however it became more dependant on correctly functioning atx sync.
should be safe after #5599 is merged

@dshulyak dshulyak changed the title validate ballot using weight from the local activeset before fetching remote validate ballot using weight from the local activeset Feb 27, 2024
@dshulyak dshulyak self-assigned this Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Next
Development

Successfully merging a pull request may close this issue.

1 participant