It seems that, at cycle n, the context stores one selected snapshot (among 16) for each cycle between n-5 and n+5, and 16 snapshots for cycle n+6, and some number between 0 and 16 for cycle n+7 (depending where we are in cycle n). Is this right?

If yes, then couldn't one already select (at n) the snapshot for cycle n+6, using the seed for cycle n+5 (because the one for n+6 is not yet available)? In this way the context could store 15 snapshots less. Or does there need to be a certain correlation between the seed used for selecting the snapshot and the cycle for which the snapshot is selected? (Same question could be asked for baking/endorsement rights.) I imagine it is simply sufficient to not reuse a seed for the same purpose.

  • If you use the seed of n+5 at both n+5 and n+6, what would you use for n+7 ? Looks like you are going to always use the same seed...
    – lefessan
    Feb 11, 2019 at 17:37
  • I think I'm suggesting to use the seed of n+5 to select the snapshot of n+6 (and the baking/endorsments rights of n+5); then the seed of n+6 to select the snaphsot of n+7 and so on. The same seed would not be used twice for the same purpose (like selecting a snapshot).
    – Eugen
    Feb 12, 2019 at 8:50

1 Answer 1


This is because of when the seed is available. During cycle n, there are 128 commitment blocks where a hash of a nonce must be provided. These must then be revealed before the end of n+1. Once the nonces are revealed, we use them to construct the seed, which is used to determine the snapshot for n+7.

So, n+6 is calculated at the end of n when we are sure all of the nonces have been revealed. All snapshots for n+6 are held until the end as that's when we can use the revealed nonces to calculate the seed. I guess an optimization could be to calculate this seed as soon as all the nonces are revealed, or at the end of the cycle (which ever comes first).

  • 1
    Yes, but why not use the seed for n+5 (computed as you say at the end of cycle n-1 from the nonces revealed during that cycle and committed during cycle n-2) to select the snapshots at n+6 (which are already available)? In this way, those 16 snapshots need not to be stored until the end of a cycle n. I only see a problem in terminology, in the sense that one cannot talk about the "seed for a cycle" because the seed would now be used for more than one cycle (but again, for different purposes). But maybe I'm missing something.
    – Eugen
    Feb 12, 2019 at 9:14
  • It doesn't work for that - if you're reusing seed for n+5 for cycle n+6, then when the next cycle comes along n+6 becomes n+5, and then you're reusing the same seed for the n+6 (which was n+7). Feb 12, 2019 at 15:03
  • One could use n+5 for n+6, then n+6 for n+7, and so on, thus not reusing the seed (for snapshot selection). Well, there is a bootstrap moment (the one when this change would be implemented), which I haven't thought about and one would have to deal with carefully...
    – Eugen
    Feb 12, 2019 at 15:29

Your Answer

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

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