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.
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 givenepochand a fixedShufflePeriod, the node's shard key is reassigned if and only if the modular equivalenceV + epoch mod ShufflePeriod == 0. This ensures that a node's shard key is reassigned precisely once perShufflePeriod, 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
ShufflePeriodis small, and because the modular equivalence is independent of chain and validator set state, a node can trivially generate its public keyVby 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 testH(V, B) + epoch mod ShufflePeriod == 0, whereBis the hash of the block where the registration ofVoccurs. 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.