Granada: New equation to determine block level of balance snapshots

Soon we will have 2 major context “constants” that will change. blocks per cycle (4096 to 8192) and blocks per snapshot (256 to 512).

This will require payout mechanisms to retool how they determine the level of the roll_snapshot used for rights calculation. Here is my first stab at it, all my testing so far seems to indicate I’ve got it but would like some feedback

  # assuming we already have the value (0 - 15) of roll_snapshot, an we need to find its level
  if cycle > (granadaStartCycle + 6):
    snapLevel = (4096*granadaStartCycle) + ((cycle-granadaStartCycle)*8192) + ((snapNum + 1) * 512)
  else:
    snapLevel = ((cycle - 5 - 2) * 4096) + ((snapNum + 1) * 256)
4 Likes

Where do you calculate granadaStartCycle? Is this another provided constant somewhere or must literally figure this out as static calculation?

granada starts at 388.
please someone let us know if what I have is sound

Nothing? I cant believe this isn’t interesting at all… in about 4 cycles (by my count) the process to calculate a cycle’s rights-determining snapshot level will drastically change. seems that people would be talking about it?

OK I think that up in the OP there is wrong, I think this is correct:

  if cycle > (granadaStartCycle + 6):
    snapLevel = (4096*granadaStartCycle) + ((cycle-granadaStartCycle - 7)*8192) + ((snapNum + 1) * 512)
  else:
    snapLevel = ((cycle - 5 - 2) * 4096) + ((snapNum + 1) * 256)

At least this formula gives results that agree with TZStats as far as the snapshots for cycles > 394 (Cycle 395’s snapshot is the first cycle that has its shapshot in a granada cycle. For 395 its the very first granada cycle (388) that has its snapshot )