[go: up one dir, main page]

Proto/Adaptive Inflation: add baker parameters

We want the baker to be able to set 2 parameters:

  • their own staking_over_baking_limit
    • ideally a Q but probably easier to just use a uint32 of 1/1_000_000s.
    • should be >= 0 but let's not worry about a value that would be over the global staking_over_baking_limit
    • see Frozen_deposits_limit in Storage
    • default (unset) is 0
  • their baking_over_staking_edge
    • ideally a Q but... (same thing, maybe a value between 0 and 1_000_000_000)
    • should mean a value between 0 and 100%
    • same thing for storage
    • default (unset) is whatever
  • both parameters must take preserved_cycles to be taken into account
    • probably better to look at Pending_consensus_key for the storage and cleanup
  • setting them via a pseudo-transfer of the baker to themself
    • see "stake" in Apply
    • both are set at the same time (forces baker to care about both)
    • entrypoint named set_delegate_parameters?
    • allowed for delegates only
    • amount must be zero
    • parameter is a tuple pair (nat, pair (nat, unit)) (unit may allow adding more parameters later more easily)
Edited by Mehdi Bouaziz