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.
Thanks!