-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CGP [0013]: Celo Core Contracts Release 1 #53
Conversation
CGPs/0013.md
Outdated
|
||
## Overview | ||
|
||
In this governance proposal, we propose to complete the first Celo Core Contracts Upgrade. This release debuts a new [release process](https://docs.celo.org/community/release-process/smart-contracts) that culminates in this proposal. The goal of this new release process is to enable more agile changes to the Celo Core Contracts while prioritizing realiability and security of the whole Celo platform. cLabs engineers have invested significant effort in verfication tooling in the past months to allow Celo stakeholders to assert the validity of the prposal itself. See more under [Verification](#Verification) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding link to Core Contracts
CGPs/0013.md
Outdated
|
||
## Risks | ||
|
||
This proposal is the first governance proposal on Celo mainnet to significantly changing Celo Core Contracts beyind simple parameter updates. Celo Core Contracts are critical for the functioning of the Celo Platform. This proposal touches all of the contracts which impact Celo's Proof-of-Stake and consensus, the stability and identity protocol and Governance itself. While cLabs have invested significant efforts to expand testing and verification tooling, errors in this proposal could lead to catastrophic situations that are only recoverable with a very difficult hard fork. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"beyind" typo
Co-authored-by: Martín Volpe <[email protected]>
CGPs/0013.md
Outdated
celocli governance:show --proposalID <proposalId> --jsonTransactions "upgrade_proposal.json" | ||
``` | ||
|
||
With that proposal, any Celo stakeholder can run the following script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add that this is in the protocol/
package of the monorepo? celocli
is expected to be installed globally, but this needs to be run from the monorepo.
|
||
Since this release is larger than usual and more opaque, it is crucial for Celo stakeholders to follow the verification steps below. | ||
|
||
## Verification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this section also include instructions for verifying the current deployment as well as that versions have been correctly set between the current deployment and the proposed release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had tried to keep it short as to not effectively copy everything from the docs. I'd also imagine that stakeholders will mostly care about verifying the proposal, than verifying the current deployment (as there is nothing this proposal could do about it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though I guess the version check is maybe a good idea
# (from the `protocol` package in the `celo-monorepo`) | ||
RELEASE="celo-core-contracts-v1.rc1" | ||
NETWORK=${"baklava"|"alfajores"|"mainnet"} | ||
# A -f boolean flag can be provided to use a forno full node to connect to the provided network |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment saying that you can omit -f
if you have a local node exposing RPC at 8545?
Overview
In this governance proposal, we propose to complete the first Celo Core Contracts Upgrade. This release debuts a new release process that culminates in this proposal. The goal of this new release process is to enable more agile changes to the Celo Core Contracts while prioritizing realiability and security of the whole Celo platform. cLabs engineers have invested significant effort in verfication tooling in the past months to allow Celo stakeholders to assert the validity of the prposal itself. See more under Verification
Changes that are being proposed in this release are described in this Github release. OpenZeppelin audited all core Celo contracts and found no “critical” or “high” severity issues. The audit report can be found here.
Proposed Changes
This Celo Core Contracts Upgrade proposal is special since it operationalizes the new release process. As part of the new versioning schema, most Celo Core Contracts added a
getVersionNumber
function which changed the bytecode of all implementations. For that reason, this proposal contains transactions to update the implementation contract of these contracts' proxies.setImplementation
setImplementation
setImplementation
setImplementation
setImplementation
setImplementation
setImplementation
setImplementation
setImplementation
setImplementation
setImplementation
setImplementation
setImplementation
setImplementation
setImplementation
setImplementation
setImplementation
Additionally, to avoid future updated bytecode of Celo Core Contracts when underlying libraries are changed, some libraries are being proxied and linked via the proxy. That necessitates the following transactions:
setAddressFor
Signatures librarysetAddressFor
AddressLinkedList librarysetAddressFor
AddressSortedLinkedList librarysetAddressFor
AddressSortedLinkedListWithMedian librarysetAddressFor
Proposals librarysetAddressFor
IntegerSortedLinkedList libraryRegular features that were being added or bugs that were fixed are described in the Github release. Since the major version of these Celo Core Contracts changed due to the version change, no separate transactions will reflect the "regular" changes. One exception to that is the newly added
DowntimeSlasher
:setAddressFor
DowntimeSlasherSince this release is larger than usual and more opaque, it is crucial for Celo stakeholders to follow the verification steps below.
Verification
This section follows the process as prescribed in Smart Contract Release Process.
Any Celo stakeholder can fetch the proposal as a JSON file by running
With that proposal, any Celo stakeholder can run the following script
With this script, any Celo stakeholder can verify that the proposal will result in Celo Core Contracts bytecode that matches the release tag (which stakeholders can verify that it matches the audited commit in the OpenZeppelin report)
Risks
This proposal is the first governance proposal on Celo mainnet to significantly changing Celo Core Contracts beyind simple parameter updates. Celo Core Contracts are critical for the functioning of the Celo Platform. This proposal touches all of the contracts which impact Celo's Proof-of-Stake and consensus, the stability and identity protocol and Governance itself. While cLabs have invested significant efforts to expand testing and verification tooling, errors in this proposal could lead to catastrophic situations that are only recoverable with a very difficult hard fork.
Useful Links