Closed
Milestone
Dec 6, 2023–Feb 8, 2024
Preserved Cycles Rework
Preserved cycles is actually multiple things in the protocol:
- The number of cycles in advance for which we register things: consensus rights, delegate parameters, consensus_keys
- The number of cycles in the past that points to the LAFL, communicated to the shell.
The number of cycle in the future will be renamed to make its purpose clearer: We could use something like foreseeable_cycles. Changing this number of cycles to something else than zero would have little effect on the protocol's code complexity. Effects of changing it to zero need to be thoroughly studied.
The LAFL itself is used in two different ways by the shell:
- LAFL change events notify the shell of a cycle change (which is used to delimit chunks of store)
- LAFL is used to prevent forks below this level (as its name tells Last Allowed Fork Level) Since Tenderbake LAFL can be set to HEAD~2 However the shell still “needs” to get cycle boundaries that we will call LPBL Protocol’s side
Work breakdown
- Environment’s side (see %Reduce preserved cycles)
- Rework the preserved_cycle naming
-
split preserved_cycles into meaningful constants, keep their value to the same number of cycles as before cycles (days) see !11220 (closed) -
Devise the different usages for the constant (1 day) -
Address the question of the relevance of one constant per usage (1 day) -
implement renaming including in test and documentation (days) -
block_preservation_cycles -
consensus_rights_delay -
delegate_parameter_activation_delay
-
-
- Think hard on how to reduce it to something that simplify protocol’s logic (days)
- Also communicate with ecosystem to hear their needs wrt foreseeing things (bakers/indexers) (days)
-
update the documentation to introduce each new constants and remove preserved cycles - Update the last_allowed_fork_level value to 2 blocks (day) (see %Reduce preserved cycles)
-
- Storage Plugin (days) (see %Reduce preserved cycles)
- Expose compressed block encoding to allow drastic reduction of blocks footprint
- Actually reduce consensus_rights_delay (see %Reduce preserved cycles)
-
Have a clear document on the consequence and benefit of changing the constant. Make informed decisions that might involve to split the constant for its different use cases. (day) -
Change the constant (hours) -
Stitching code (days) -
Test the stitching (days)
-
Loading
Loading
Loading
Loading