Commit 49be0579 authored by Peter Goodspeed-Niklaus's avatar Peter Goodspeed-Niklaus Committed by GitHub
Browse files

NPoS Challenge Mode (#8236)



* Add PJR challenge functions

- Updates the PJR check to return a counterexample if one exists
- Adds functions to cheaply check counterexamples

This is in support of off-chain PJR challenges: if a miner discovers
that an accepted election solution does not satisfy PJR, it will be
eligible for substantial rewards. This helps ensure that validator
elections have an absolute quality floor, so even if someone manages
to censor well-behaved solutions to give themselves unfair representation,
we can catch them in the act and penalize them.

* counterexample -> counter_example

* reorganize: high -> low abstraction

* reorganize challenges high -> low abstraction

* add note justifying linear search

* Simplify max_pre_score validation

Co-authored-by: default avatarKian Paimani <[email protected]>

* add minor test of pjr challenge validation

Co-authored-by: default avatarKian Paimani <[email protected]>
parent 844e2552
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment