Skip to content

Draft: different voting period duration

Sylvain R. requested to merge sylvain/parametrize-voting-period into proto-proposal

This MR implement the possibility to have differente duration for each voting period.

To do this the parametrized constants blocks_per_voting_period is now a list of int. Currently all period is equal to 32768l.

Also this MR correct the offset problem of .../votes/current_period_kind

This MR modifies level_encoding by removing voting_period and voting_period_position.

This MR does the following modification to the rpc:

  • add .../voting/current_period?offset=0l

    Return the voting period at level = current level + offset. If the offset is greater than the remaining block for the current votign period then this simulate that each voting period are successful.

    Return (level, {voting_period;kind;start_position}) :

    • level = current level + offset
    • start_position: the level_position were the return voting period started
  • modify .../voting/current_period_kind to .../votes/current_period/kind?offset=0l

  • add .../votes/current_period/index?offset=0l

  • add .../votes/current_period/position?offset=0l

  • add .../votes/current_period/remaining?offset=0l

  • add .../votes/current_period/kind_length?offset=0l


implements #109 (closed) #125

Edited by Sylvain R.

Merge request reports