Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Sortition ¶
Simplified sortition algorithm implementation In original design, each candidate need to generate verifiable random based on their secret key before sortition. In this case, we need a round of consensus to make sure all candidates are honest. In the simplied vesion, we'll use ordinary SHA3-256 to generate random which is public and fair to everyone. However, candidate's public key and each block's VRF seed will be used as entropy sources.
Params
key: candidate's public key seed: block's VRF seed t: each subuser's stake s: size of subuser committee (to be nominated) w: current candidate's stake W: all candidates' total stake
Returns
hash: generated random j: nominated subuser number
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.