Skip to content
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

Conduct contract release 1 #4812

Closed
60 tasks done
yorhodes opened this issue Aug 26, 2020 · 24 comments
Closed
60 tasks done

Conduct contract release 1 #4812

yorhodes opened this issue Aug 26, 2020 · 24 comments

Comments

@yorhodes
Copy link
Contributor

yorhodes commented Aug 26, 2020

This issue is tracking Celo's first smart contract upgrade release. While executing upon this release according to the process laid out in https://docs.celo.org/community/release-process/smart-contracts, we are simultaneously going to improve it as we go and reference those changes here as well

Process Checklist:

Blockers:

To-Dos:

@nambrot
Copy link
Contributor

nambrot commented Sep 11, 2020

Meaningful PRs that went in this release:

@nambrot
Copy link
Contributor

nambrot commented Sep 11, 2020

The commit that was submitted to OpenZeppelin was https://github.com/celo-org/celo-monorepo/tree/b2f0a58fcc7667d41585123aae5b24c47aa894f6 and the release branch is oz-prerelease

@alecps
Copy link
Contributor

alecps commented Sep 15, 2020

Release Notes draft in progress here https://docs.google.com/document/d/1vmZCKJRM9WO4VYinKEb5q4QetXjNzYFxq0AvPy_t8pA/edit Please add any improvements!

@nambrot
Copy link
Contributor

nambrot commented Sep 21, 2020

@pranaymohan confirmed that increasing the block gas limit to 13M is safe to do with the current blockchain version on Mainnet. Thanks @jcortejoso @kevjue @vslavich @mcortesi!

@nambrot
Copy link
Contributor

nambrot commented Sep 24, 2020

CGP for the block gas limit increase proposal celo-org/celo-proposals#46

@nambrot
Copy link
Contributor

nambrot commented Sep 25, 2020

@nambrot nambrot changed the title Conduct contract release 1.0.0 and deploy via governance to networks Conduct contract release 1 and deploy via governance to networks Sep 29, 2020
@aslawson
Copy link
Contributor

aslawson commented Sep 29, 2020

Baklava Gas Limit Increase has been proposed as proposal 4.
celocli governance:view --proposalID 4 --node https://baklava-forno.celo-testnet.org

It will enter into approval stage tomorrow ~10:40AM PDT. Baklava just needs 1 approver.

It will then enter the voting stage Thursday.

@nambrot
Copy link
Contributor

nambrot commented Sep 30, 2020

Block Gas Limit Increase Proposal on Baklava is approved

celocli governance:view --proposalID 4 --node https://baklava-forno.celo-testnet.org
Running Checks:
   ✔  4 is an existing proposal 
proposal: 
  0: 
    contract: BlockchainParameters
    function: setBlockGasLimit
    args: 
      0: 130000000
    params: 
      gasLimit: 130000000
    value: 0
metadata: 
  proposer: 0xF3EB910DA09B8AF348E0E5B6636da442cFa79239
  deposit: 100000000000000000000 (~100 10^18)
  timestamp: 1601494320 
  transactionCount: 1
  descriptionURL: https://github.com/celo-org/celo-proposals/blob/master/CGPs/0011.md
stage: Approval
upvotes: 0 
votes: 
  Yes: 0 
  No: 0 
  Abstain: 0 
passing: false
requirements: 
  participation: 0.0143430905876 
  agreement: 80%
isApproved: true
isProposalPassing: false
secondsUntilStages: 
  referendum: 12863 
  execution: 99263 
  expiration: 704063 

@nambrot
Copy link
Contributor

nambrot commented Oct 2, 2020

Baklava GasLimit Proposal is executed, blocks are stable!

celocli governance:execute --proposalID 4 --from 0xfcf982bb4015852e706100b14e21f947a5bb718e
Running Checks:
   ✔  4 is an existing proposal 
   ✔  4 is in stage Execution 
   ✔  Proposal 4 is passing corresponding constitutional quorum 
SendTransaction: executeTx
txHash: 0x552d82ceeeafce060c5b28557c513af60f957280aebc4853ad0e7a99a0a2c315
Sending Transaction: executeTx... done
ProposalExecuted:
proposalId: 4

@alecps
Copy link
Contributor

alecps commented Oct 6, 2020

The Block Gas Limit update has been proposed on Alfajores with proposalID 1

proposal: 
  0: 
    contract: BlockchainParameters
    function: setBlockGasLimit
    args: 
      0: 130000000
    params: 
      gasLimit: 130000000
    value: 0
metadata: 
  proposer: 0xB10c80EB948057eDfb7D0eF9BAD319144efC8568
  deposit: 100000000000000000000 (~100 10^18)
  timestamp: 1602004704 
  transactionCount: 1
  descriptionURL: https://github.com/celo-org/celo-proposals/blob/master/CGPs/0011.md
stage: Queued
upvotes: 0 
votes: 
  Yes: 0 
  No: 0 
  Abstain: 0 
passing: false
requirements: 
  participation: 0.005 
  agreement: 80%
isApproved: false
isProposalPassing: false
secondsUntilStages: 
  referendum: 1509 
  execution: 5109 
  expiration: 91509 

@alecps
Copy link
Contributor

alecps commented Oct 8, 2020

The blockGasLimit proposal has been executed on alfajores

@yorhodes
Copy link
Contributor Author

yorhodes commented Oct 8, 2020

The release process documentation is up to date with the internal and community tooling.
https://docs.celo.org/community/release-process/smart-contracts#release-process

@abcoathup
Copy link

The cLabs team asked OpenZeppelin to review and audit the recent changes in the smart contracts from their protocol.

We examined the code, and here we publish our findings in Phase 3. 👇
The relevant commits are specified in the report.
https://blog.openzeppelin.com/celo-contracts-audit

@nambrot
Copy link
Contributor

nambrot commented Oct 13, 2020

Block GasLimit increase proposal is live on Mainnet, thanks @aslawson https://celo.stake.id/#/proposal/11

@nambrot
Copy link
Contributor

nambrot commented Oct 14, 2020

Thanks @zviadm for noticing that our block gasLimit proposals had specified the wrong number for the increase (130M instead of 13M). This post will track the work needed to rectify that mistake:

@nambrot
Copy link
Contributor

nambrot commented Oct 14, 2020

Baklava Proposal to set the gasLimit to 13M has been proposed

celocli governance:view  --proposalID 5 --node https://baklava-forno.celo-testnet.org
Running Checks:
   ✔  5 is an existing proposal 
proposal: 
  0: 
    contract: BlockchainParameters
    function: setBlockGasLimit
    args: 
      0: 13000000
    params: 
      gasLimit: 13000000
    value: 0
metadata: 
  proposer: 0xfCf982bb4015852e706100B14E21f947a5Bb718E
  deposit: 101000000000000000000 (~101 10^18)
  timestamp: 1602710113 
  transactionCount: 1
  descriptionURL: https://github.com/celo-org/celo-proposals/pull/51
stage: Queued
upvotes: 0 
votes: 
  Yes: 0 
  No: 0 
  Abstain: 0 
passing: false
requirements: 
  participation: 0.1842132935244 
  agreement: 80%
isApproved: false
isProposalPassing: false
secondsUntilStages: 
  referendum: 14357 
  execution: 100757 
  expiration: 705557 

@nambrot
Copy link
Contributor

nambrot commented Oct 14, 2020

Alfajores Proposal to set the gasLimit to 13M has been proposed

celocli governance:view  --proposalID 2 --node https://alfajores-forno.celo-testnet.org
Running Checks:
   ✔  2 is an existing proposal 
proposal: 
  0: 
    contract: BlockchainParameters
    function: setBlockGasLimit
    args: 
      0: 13000000
    params: 
      gasLimit: 13000000
    value: 0
metadata: 
  proposer: 0x456f41406B32c45D59E539e4BBA3D7898c3584dA
  deposit: 101000000000000000000 (~101 10^18)
  timestamp: 1602710543 
  transactionCount: 1
  descriptionURL: https://github.com/celo-org/celo-proposals/pull/51
stage: Queued
upvotes: 0 
votes: 
  Yes: 0 
  No: 0 
  Abstain: 0 
passing: false
requirements: 
  participation: 0.013997244463 
  agreement: 80%
isApproved: false
isProposalPassing: false
secondsUntilStages: 
  referendum: 1774 
  execution: 5374 
  expiration: 91774 

@nambrot
Copy link
Contributor

nambrot commented Oct 15, 2020

Alfajores Proposal to set the gasLimit to 13M has been executed

@nambrot
Copy link
Contributor

nambrot commented Oct 16, 2020

Baklalva Proposal to set the gasLimit to 13M has been executed

mergify bot pushed a commit that referenced this issue Oct 16, 2020
### Description

Previously the script would just exit with code 0 and no stdout output about success. Added logs reporting which contracts have been checked and at which address on the network.

Added a `--quiet` flag to optionally suppress this new output (`-q` in the bash wrapper).

### Other changes

`getImplementationAddress` was previously returning pre-release 1 library addresses without a "0x" prefix, fixed this for consistency in logs.

Improved the documentation comment in `verify-bytecodes.ts`.

### Tested

`yarn verify-bytecodes -b rc1 -n rc1 -r -f` succeeds outputs the new logs. Adding `-q` still succeeds and suppresses output.

### Related issues

- Part of #4812 

### Backwards compatibility

Only cosmetic script change.
mergify bot pushed a commit that referenced this issue Oct 16, 2020
…lease (#5418)

### Description

When running the verification scripts, output of dependent commands like build commands should not be shown to the user. This PR adds an `-l` flag to these scripts to specify a log file, defaulting to `/dev/null`.

### Tested

- #4812
mergify bot pushed a commit that referenced this issue Oct 19, 2020
### Description

Some regressions sneaked their way into the make-release script.

* missing `;;` in `case` statement
* wrong artifacts directory passed (extra `/contracts` appended)
* the "all libraries have been relinked" check could fail on ignored contracts

This PR also makes it such that when running `make-release.sh`, it will return to the current branch to run `make-release.js`. Similar steps should be taken with `check-versions` (and potentially other scripts in the backwards compatibility suite?). 

### Other changes

There is a temporary hack to increase the gas limit when making the release. This should ideally be captured in a more global config?

### Tested

`yarn make-release -b celo-core-contracts-v1.rc1 -n development -p proposal.json -i example-initialize-data.json -r report.json` against a previously generated devchain with rc1 contracts, and a correctly generated `report.json` .

### Related issues

- Part of #4812

### Backwards compatibility

Should be good.
mergify bot pushed a commit that referenced this issue Oct 19, 2020
)

### Description

Makes it such that when running check-versions.sh, it will return to the current branch to run make-release.js.

### Tested

`yarn check-versions -a rc1 -b celo-core-contracts-v1.rc1 -r report.json`. I made a temporary commit that added logging to check-backwards.ts, and verified that you could see the new log with this PR's change.

### Related issues

- Part of #4812

### Backwards compatibility

All good.
@nambrot nambrot changed the title Conduct contract release 1 and deploy via governance to networks Conduct contract release 1 Oct 20, 2020
@ewilz ewilz added this to the Milestone 7 milestone Oct 20, 2020
@nambrot
Copy link
Contributor

nambrot commented Oct 22, 2020

The block gas limit increase has been proposed on Mainnet

celocli governance:view  --proposalID 12 --node https://rc1-forno.celo-testnet.org
Running Checks:
   ✔  12 is an existing proposal 
proposal: 
  0: 
    contract: BlockchainParameters
    function: setBlockGasLimit
    args: 
      0: 13000000
    params: 
      gasLimit: 13000000
    value: 0
metadata: 
  proposer: 0xF3EB910DA09B8AF348E0E5B6636da442cFa79239
  deposit: 100000000000000000000 (~100 10^18)
  timestamp: 1603315388 
  transactionCount: 1
  descriptionURL: https://github.com/celo-org/celo-proposals/blob/master/CGPs/0012.md
stage: Approval
upvotes: 0 
votes: 
  Yes: 0 
  No: 0 
  Abstain: 0 
passing: false
requirements: 
  participation: 0.1807886970308 
  agreement: 80%
isApproved: false
isProposalPassing: false
secondsUntilStages: 
  referendum: 26131 
  execution: 458131 
  expiration: 717331 

@nambrot
Copy link
Contributor

nambrot commented Oct 23, 2020

Baklava Contract Upgrade has been proposed

Proposal was not executed since it contained a bug

@AlexBHarley
Copy link
Contributor

Baklava contract upgrade has been proposed

➜  protocol git:(master) ✗ celocli governance:show --proposalID 10

Running Checks:
   ✔  10 is an existing proposal
Outputting proposal JSON to upgrade_proposal.json
proposal:
  0:
    contract: AccountsProxy
    function: _setImplementation
    args:
      0: 0xf757feFA575bceA6Eba3fFB25723916F94858997
    params:
      implementation: 0xf757feFA575bceA6Eba3fFB25723916F94858997
    value: 0
  1:
    contract: AttestationsProxy
    function: _setImplementation
    args:
      0: 0x087bc230d256E5107C805c261817A1EF621C5046
    params:
      implementation: 0x087bc230d256E5107C805c261817A1EF621C5046
    value: 0
  2:
    contract: DoubleSigningSlasherProxy
    function: _setImplementation
    args:
      0: 0x8781541FAb84d7f83a670d057b5a75896947fE5d
    params:
      implementation: 0x8781541FAb84d7f83a670d057b5a75896947fE5d
    value: 0
  3:
    contract: Registry
    function: setAddressFor
    args:
      0: DowntimeSlasher
      1: 0xC743C9a58050a669ec4aff41D8A6C76f2264e206
    params:
      identifier: DowntimeSlasher
      addr: 0xC743C9a58050a669ec4aff41D8A6C76f2264e206
    value: 0
  4:
    contract: DowntimeSlasherProxy
    function: _setAndInitializeImplementation
    args:
      0: 0xf50E030d37D5d243b246D9cBe44Eff6144d8302A
      1: 0x4ec81af1000000000000000000000000000000000000000000000000000000000000ce100000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000021c0
    params:
      implementation: 0xf50E030d37D5d243b246D9cBe44Eff6144d8302A
      callbackData: 0x4ec81af1000000000000000000000000000000000000000000000000000000000000ce100000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000021c0
      initialize@0x4ec81af1:
        registryAddress: 0x000000000000000000000000000000000000ce10
        _penalty: 100000000000000000000
        _reward: 10000000000000000000
        _slashableDowntime: 8640
    value: 0
  5:
    contract: ElectionProxy
    function: _setImplementation
    args:
      0: 0xDEF73db69E5aaCcbC803ab89ef6b9a31CF5F4Ff0
    params:
      implementation: 0xDEF73db69E5aaCcbC803ab89ef6b9a31CF5F4Ff0
    value: 0
  6:
    contract: EpochRewardsProxy
    function: _setImplementation
    args:
      0: 0x274d63D315BfDd1A5c1409C1B1Ad1a88aeB07331
    params:
      implementation: 0x274d63D315BfDd1A5c1409C1B1Ad1a88aeB07331
    value: 0
  7:
    contract: EscrowProxy
    function: _setImplementation
    args:
      0: 0x372e54C597110Da170e96BF5baE3aABC367A9A18
    params:
      implementation: 0x372e54C597110Da170e96BF5baE3aABC367A9A18
    value: 0
  8:
    contract: ExchangeProxy
    function: _setImplementation
    args:
      0: 0x21b8dF5fBd0bcEf63Bef4f2cD22d4BCA4fFD3dEB
    params:
      implementation: 0x21b8dF5fBd0bcEf63Bef4f2cD22d4BCA4fFD3dEB
    value: 0
  9:
    contract: GasPriceMinimumProxy
    function: _setImplementation
    args:
      0: 0x011EC8fc4812daF3924A979A171C3Bb54D68B50c
    params:
      implementation: 0x011EC8fc4812daF3924A979A171C3Bb54D68B50c
    value: 0
  10:
    contract: GoldTokenProxy
    function: _setImplementation
    args:
      0: 0xa12d4bA7a4D5DAf29523eb87c519cb1dca6273F3
    params:
      implementation: 0xa12d4bA7a4D5DAf29523eb87c519cb1dca6273F3
    value: 0
  11:
    contract: GovernanceProxy
    function: _setImplementation
    args:
      0: 0xA92630F95a7Ec5EaFb791C93d60F4fa72EFa0e86
    params:
      implementation: 0xA92630F95a7Ec5EaFb791C93d60F4fa72EFa0e86
    value: 0
  12:
    contract: LockedGoldProxy
    function: _setImplementation
    args:
      0: 0x40cc4861e42a7867eC6d2De2800E9E1893fC3d07
    params:
      implementation: 0x40cc4861e42a7867eC6d2De2800E9E1893fC3d07
    value: 0
  13:
    contract: RandomProxy
    function: _setImplementation
    args:
      0: 0x876C992B4808E242E0113001FD51EA05790ed892
    params:
      implementation: 0x876C992B4808E242E0113001FD51EA05790ed892
    value: 0
  14:
    contract: ReserveProxy
    function: _setImplementation
    args:
      0: 0x330295A02E363e544c8C4ac8736A79Ba2DE382Bd
    params:
      implementation: 0x330295A02E363e544c8C4ac8736A79Ba2DE382Bd
    value: 0
  15:
    contract: SortedOraclesProxy
    function: _setImplementation
    args:
      0: 0xEFe7a08239Cd853383F4FD76e90616371096Efc7
    params:
      implementation: 0xEFe7a08239Cd853383F4FD76e90616371096Efc7
    value: 0
  16:
    contract: StableTokenProxy
    function: _setImplementation
    args:
      0: 0x4A1b48FC0ED957578EC697532b5c975fE94B6Ccf
    params:
      implementation: 0x4A1b48FC0ED957578EC697532b5c975fE94B6Ccf
    value: 0
  17:
    contract: ValidatorsProxy
    function: _setImplementation
    args:
      0: 0x3353c275FD5d37985cC5720C98E037f4dAE67301
    params:
      implementation: 0x3353c275FD5d37985cC5720C98E037f4dAE67301
    value: 0
metadata:
  proposer: 0x0Cc59Ed03B3e763c02d54D695FFE353055f1502D
  deposit: 10000000000000000000000 (~10000 10^18)
  timestamp: 1603826450
  transactionCount: 18
  descriptionURL: https://github.com/celo-org/celo-proposals/blob/master/CGPs/0013.md
stage: Queued
upvotes: 0
votes:
  Yes: 0
  No: 0
  Abstain: 0
passing: false
requirements:
  participation: 0.317813188295
  agreement: 90%
isApproved: false
isProposalPassing: false
secondsUntilStages:
  referendum: 14357
  execution: 100757
  expiration: 705557

@alecps
Copy link
Contributor

alecps commented Nov 5, 2020

Alfajores has been upgraded 🎉

@nambrot
Copy link
Contributor

nambrot commented Nov 19, 2020

Mainnet has been executed! celo-org/celo-proposals#85

mergify bot pushed a commit that referenced this issue Nov 23, 2020
…#5931)

…ication

### Description

Really quick fix to keep contracts release process consistent with docs

### Other changes
no

### Tested

n/a
### Related issues

#4812 

### Backwards compatibility

yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants