cip | title | author | discussions-to | status | type | category | created | license |
---|---|---|---|---|---|---|---|---|
56 |
Remove freezable check on epoch rewards |
Gastón Ponti (@gastonponti) |
Final |
Standards Track |
Ring 0 |
2023-03-27 |
Apache 2.0 |
Remove the freezable check on epoch rewards distribution.
This CIP will remove the freezable check in the finalize stage of the last epoch block creation.
The freeze of the epoch rewards contract was a mechanism used at the beginning of mainnet as a way to control and test all the features needed related to the CELO protocol. The unfreeze of this contract was performed in the first CGP proposal (GCP-0001) after checking that everything was working as expected. The real motivation of this check added in the finalize stage of the last block of the epoch, was to avoid error logs on the pre-mainnet testnets, which was confusing a part of the validator set of those testnets celo-org/celo-blockchain#839. Removing this check will save an unnecessary state call.
Remove the freezer check in the distributeEpochRewards
method called at the finalize stage of the last block of the epoch (https://github.com/celo-org/celo-blockchain/blob/master/consensus/istanbul/backend/pos.go#L48)
The decision of removing this check is not only to save a state call, but also to clean the codebase. The freeze feature was supposed to be used only at the beginning of the blockchain, which makes that check an unnecessary cost now that the network is stable.
This needs to be added as part of a fork.
See this PR.
If for some reason, the whole community votes for a new governance proposal to freeze the epoch rewards again (which seems unlikely), the validators will still generate blocks, and the only downside is that the block receipt of the last block of the epoch will have a revert on that epoch distribution call, which shouldn’t generate any problem at all.
This work is licensed under the Apache License, Version 2.0.