I understand that the seed associated with a cycle is generated from information from the previous two cycles. This seed the PRG that is used to determine the bakers for the cycle. This is all the information I can find on the docs regarding its implementation:

We admit, for the time being, that the protocol generates a random seed for each cycle. From this random seed, we can seed a cryptographically secure pseudo-random number generator which is used to draw baking rights for a cycle.

I also found this post, which has been helpful in further details on how the PRG is constructed:

The function take generates a new random value using State_hash.

How exactly is this output from the PRG used to pick the bakers for the cycle? I'm having trouble finding this in the docs/implementation, so I'm looking for an explanation and maybe a pointer to where this is in the repository.


1 Answer 1


I think the implementation is here: https://gitlab.com/tezos/tezos/-/blob/a88a1ed6f5da8d0f016d70ea43b6e5ec073aae12/src/proto_alpha/lib_protocol/roll_storage.ml#L159

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.