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

Deploy Timelock in front of Bridge, RedemptionWatchtower, and WalletRegistry #830

Open
10 of 15 tasks
pdyraga opened this issue Dec 10, 2024 · 1 comment
Open
10 of 15 tasks
Assignees
Labels
:shipit: deployment Deployments and CI workflows

Comments

@pdyraga
Copy link
Member

pdyraga commented Dec 10, 2024

Team Address
Deployment Team 0x123694886DBf5Ac94DDA07135349534536D14cAf
Threshold Council 0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f
Contract Address
Bridge Proxy contract 0x5e4861a80B55f035D899f66772117F00FA0E8e7B
Bridge Implementation contract 0xa4996de73682bdf9cf514fbf238ee387c1a21a26
Bridge ProxyAdmin contract 0x16a76d3cd3c1e3ce843c6680d6b37e9116b5c706
RedemptionWatchtower Proxy contract 0xB8dF0A949aC45ff8f401553A1dcb742Feb38E6D3
RedemptionWatchtower implementation contract 0xbfd04e3928923ad8c86256b9a8f64ebd01cf1daf
RedemptionWatchtower ProxyAdmin contract 0x16a76d3cd3c1e3ce843c6680d6b37e9116b5c706
WalletRegistry Proxy contract 0x46d52E41C2F300BC82217Ce22b920c34995204eb
WalletRegistry implementation contract 0x08d7e8ce124921caafd7670502379ced0065c832
WalletRegistry ProxyAdmin contract 0x7affa05f726d293eb1193807a91617318292008e

Prerequisites

Deployment

  • Deploy the Timelock contract (address: 0x92f2d8b72a7F6a551Be60b9aa4194248E9B4913D)
  • Verify Timelock contract on Etherscan

Tag and publish artifacts

  • Publish v1.7.0 deployment artifacts to NPM as @keep-network/tbtc-v2
  • Tag solidity/v1.7.0
  • Bump up solidity module version to 1.8.0-dev

Governance Actions

Threshold Council executes four transactions:

  • To schedule WalletRegistry upgrade
  • To schedule Bridge upgrade
  • To transfer WalletRegistry ProxyAdmin ownership and test the upgrade
  • To transfer Bridge ProxyAdmin ownership and test the upgrade

The test upgrade transaction will upgrade implementations to the same version as currently used. No changes are expected. We want to execute a test upgrade in the same transaction as the ProxyAdmin ownership transfer to ensure future upgrades will be possible and that no human error will happen when assembling those transactions.

Schedule WalletRegistry upgrade

  • Prepare TX data: ProxyAdmin.encodeFunctionData("upgrade", ["0x46d52E41C2F300BC82217Ce22b920c34995204eb", "0x08d7e8ce124921caafd7670502379ced0065c832"]) (data: 0x99a88ec400000000000000000000000046d52e41c2f300bc82217ce22b920c34995204eb00000000000000000000000008d7e8ce124921caafd7670502379ced0065c832)
  • Schedule upgrade: Timelock.schedule(0x7affa05f726d293eb1193807a91617318292008e, 0, 0x99a88ec400000000000000000000000046d52e41c2f300bc82217ce22b920c34995204eb00000000000000000000000008d7e8ce124921caafd7670502379ced0065c832, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000, 86400)

Schedule Bridge upgrade

  • Prepare TX data: ProxyAdmin.encodeFunctionData("upgrade", ["0x5e4861a80B55f035D899f66772117F00FA0E8e7B", "0xa4996de73682bdf9cf514fbf238ee387c1a21a26"]) (data: 0x99a88ec40000000000000000000000005e4861a80b55f035d899f66772117f00fa0e8e7b000000000000000000000000a4996de73682bdf9cf514fbf238ee387c1a21a26)
  • Schedule upgrade: Timelock.schedule(0x16a76d3cd3c1e3ce843c6680d6b37e9116b5c706, 0, 0x99a88ec40000000000000000000000005e4861a80b55f035d899f66772117f00fa0e8e7b000000000000000000000000a4996de73682bdf9cf514fbf238ee387c1a21a26, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000, 86400)

Schedule RedemptionWatchtower upgrade

  • Prepare TX data: ProxyAdmin.encodeFunctionData("upgrade", ["0xB8dF0A949aC45ff8f401553A1dcb742Feb38E6D3", "0xbfd04e3928923ad8c86256b9a8f64ebd01cf1daf"]) (data: 0x99a88ec4000000000000000000000000b8df0a949ac45ff8f401553a1dcb742feb38e6d3000000000000000000000000bfd04e3928923ad8c86256b9a8f64ebd01cf1daf)
  • Schedule upgrade: Timelock.schedule(0x16a76d3cd3c1e3ce843c6680d6b37e9116b5c706, 0, 0x99a88ec4000000000000000000000000b8df0a949ac45ff8f401553a1dcb742feb38e6d3000000000000000000000000bfd04e3928923ad8c86256b9a8f64ebd01cf1daf, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000, 86400)

Transfer WalletRegistry ProxyAdmin ownership and test the upgrade

  • The following batch transaction is executed (tx: 0x...):
    • ProxyAdmin@0x7affa05f726d293eb1193807a91617318292008e.transferOwnership(Timelock.address)
    • Timelock.execute(0x7affa05f726d293eb1193807a91617318292008e, 0, 0x99a88ec400000000000000000000000046d52e41c2f300bc82217ce22b920c34995204eb00000000000000000000000008d7e8ce124921caafd7670502379ced0065c832, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000, 86400)

Transfer Bridge & RedemptionWatchtower ProxyAdmin ownership and test the upgrade

  • The following batch transaction is executed (tx: 0x...):
    • ProxyAdmin@0x16a76d3cd3c1e3ce843c6680d6b37e9116b5c706.transferOwnership(Timelock.address)
    • Timelock.execute(0x16a76d3cd3c1e3ce843c6680d6b37e9116b5c706, 0, 0x99a88ec40000000000000000000000005e4861a80b55f035d899f66772117f00fa0e8e7b000000000000000000000000a4996de73682bdf9cf514fbf238ee387c1a21a26, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000, 86400)
    • Timelock.execute(0x16a76d3cd3c1e3ce843c6680d6b37e9116b5c706, 0, 0x99a88ec40000000000000000000000005e4861a80b55f035d899f66772117f00fa0e8e7b000000000000000000000000a4996de73682bdf9cf514fbf238ee387c1a21a26, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000, 86400)

Release notes

  • Publish solidity/v1.7.0 release notes along with the references to transactions introducing the Timelock.
@pdyraga pdyraga added the :shipit: deployment Deployments and CI workflows label Dec 10, 2024
@pdyraga pdyraga changed the title Deploy Timelock in front of Bridge and WalletRegistry Deploy Timelock in front of Bridge, Redemption Watchtower, and WalletRegistry Dec 12, 2024
@pdyraga pdyraga changed the title Deploy Timelock in front of Bridge, Redemption Watchtower, and WalletRegistry Deploy Timelock in front of Bridge, RedemptionWatchtower, and WalletRegistry Dec 12, 2024
lukasz-zimnoch added a commit that referenced this issue Dec 12, 2024
Upgrade scenario: #830

The goal is to deploy a Timelock between the `Bridge`,
`RedemptionWatchtower`, and `WalletRegistry` `ProxyAdmin`s and the
Threshold Council multisig to enforce 24h delay between upgrades.

This changeset adds the deployment script and a basic integration test
simulation Bridge proxy upgrade. The goal is not to test OpenZeppelin
implementation but to prove the integration works and present how the
upgrade transaction should be assembled.
lukasz-zimnoch added a commit that referenced this issue Dec 13, 2024
Mainnet deployment artifacts for the `Timelock` contract, deployed
according to the plan from
#830.
@pdyraga pdyraga added this to the solidity/v1.7.0 milestone Dec 13, 2024
lukasz-zimnoch added a commit that referenced this issue Dec 13, 2024
See #830

The v1.7.0 version has just been tagged with `solidity/v1.7.0` and
pushed to NPM package repository. v1.7.0 includes the `Timelock`
contract that will take over the ownership of `Bridge`, `WalletRegistry`
and `RedemptionWatchtower` `ProxyAdmin` contracts.
@lukasz-zimnoch
Copy link
Member

I reviewed the above plan and double-checked all addresses. Everything looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:shipit: deployment Deployments and CI workflows
Projects
None yet
Development

No branches or pull requests

2 participants