Proto: replace max_slashing_period with denunciation_period and slashing_delay
Depends on !13612 (merged)
Follow-up issue: #7657
What
Replace the max_slashing_period protocol constant with two (currently equal) constants denunciation_delay and slashing_delay. Also introduce a pseudo-constant and helper functions to factorize some uses of this constant.
Why
Because from discussions and threads I have seen on past MRs, we are often confused by max_slashing_period = 2 meaning that the actual period to denounce a given misbehaviour is actually >= 1 cycle and < 2 cycles. So the new constants have a value of 1, their meaning is documented to explain what this means, and everything is updated accordingly.
Manually testing the MR
CI
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) - [in follow-up issue] Document any change to the user interface, including configuration parameters (see node configuration)
-
Provide automatic testing (see the testing guide). - [in follow-up issue] For new features and bug fixes, add an item in the appropriate changelog (
docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else).
Edited by Diane Gallois-Wong