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

RFC-0313: Validator node shuffling can be manipulated #74

Open
AaronFeickert opened this issue Nov 22, 2022 · 0 comments
Open

RFC-0313: Validator node shuffling can be manipulated #74

AaronFeickert opened this issue Nov 22, 2022 · 0 comments

Comments

@AaronFeickert
Copy link
Contributor

In RFC-0313, an algorithm is specified for determining when a validator node's shard key is reassigned (the terminology used is shuffled, but that's not quite what happens). In particular, if a node's public key is V, then for a given epoch and a fixed ShufflePeriod, the node's shard key is reassigned if and only if the modular equivalence V + epoch mod ShufflePeriod == 0. This ensures that a node's shard key is reassigned precisely once per ShufflePeriod, but with the assumed design goal that the alignment of this reassignment is uniformly distributed across nodes in a manner that nodes should not be able to control.

However, the design means nodes can manipulate their reassignment alignment. Because ShufflePeriod is small, and because the modular equivalence is independent of chain and validator set state, a node can trivially generate its public key V by brute force to set its alignment prior to registration. This is almost certainly not desirable.

One alternative design is to uniformly sample and fix a hash function H, and use the equivalence test H(V, B) + epoch mod ShufflePeriod == 0, where B is the hash of the block where the registration of V occurs. This shifts control of the alignment from the node to the block producer and, in the absence of influence at that level, ensures that alignment is uniformly distributed.

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

No branches or pull requests

1 participant