Skip to content

Commit

Permalink
fix: the calldata for the upgrades, small fixes for the migration scr…
Browse files Browse the repository at this point in the history
…ips (#1785)

## What ❔

-- calldata for upgrades, 
-- scripts for the migration/upgrade
-- bumping contracts to latest release-v23

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.
- [ ] Spellcheck has been run via `zk spellcheck`.
- [ ] Linkcheck has been run via `zk linkcheck`.

---------

Signed-off-by: Danil <deniallugo@gmail.com>
Co-authored-by: Javier Chatruc <jrchatruc@gmail.com>
Co-authored-by: Francisco Krause Arnim <fkrausear@gmail.com>
Co-authored-by: Jmunoz <juanmunoz890@gmail.com>
Co-authored-by: Javier Rodríguez Chatruc <49622509+jrchatruc@users.noreply.github.com>
Co-authored-by: Francisco Krause Arnim <56402156+fkrause98@users.noreply.github.com>
Co-authored-by: Lyova Potyomkin <lyova.potyomkin@gmail.com>
Co-authored-by: Bence Haromi <56651250+benceharomi@users.noreply.github.com>
Co-authored-by: Santiago Pittella <santiagopittella@Santiagos-MacBook-Air-6.local>
Co-authored-by: Danil <deniallugo@gmail.com>
Co-authored-by: Leandro Ferrigno <leanrafa@gmail.com>
Co-authored-by: Raid Ateir <ra@matterlabs.dev>
Co-authored-by: fborello-lambda <federicoborello@lambdaclass.com>
Co-authored-by: Stanislav Breadless <stanislavbezkor@gmail.com>
Co-authored-by: mm <mm@matterlabs.dev>
Co-authored-by: Marcin M <128217157+mm-zk@users.noreply.github.com>
Co-authored-by: Bence Haromi <bence.haromi@gmail.com>
Co-authored-by: perekopskiy <53865202+perekopskiy@users.noreply.github.com>
Co-authored-by: Alex Ostrovski <slowli@users.noreply.github.com>
Co-authored-by: Raid5594 <52794079+Raid5594@users.noreply.github.com>
  • Loading branch information
20 people committed May 9, 2024
1 parent e22d708 commit c3d4d2f
Show file tree
Hide file tree
Showing 34 changed files with 3,736 additions and 73 deletions.
2 changes: 1 addition & 1 deletion contracts
Submodule contracts updated 45 files
+0 −0 .github/workflows/build-release.yaml
+0 −50 .github/workflows/buld-release.yaml
+3 −1 .github/workflows/l1-contracts-foundry-ci.yaml
+3 −1 .github/workflows/slither.yaml
+51 −0 gas-bound-caller/README.md
+1 −0 gas-bound-caller/canonical-bytecodes/GasBoundCaller
+27 −8 gas-bound-caller/contracts/GasBoundCaller.sol
+61 −0 gas-bound-caller/contracts/ISystemContext.sol
+35 −6 gas-bound-caller/contracts/test-contracts/GasBoundCallerTester.sol
+355 −0 gas-bound-caller/contracts/test-contracts/SystemContractHelper.sol
+268 −0 gas-bound-caller/contracts/test-contracts/SystemContractsCaller.sol
+62 −0 gas-bound-caller/hardhat.config.ts
+60 −0 gas-bound-caller/package.json
+42 −0 gas-bound-caller/scripts/check-canonical-bytecode.ts
+104 −0 gas-bound-caller/scripts/deploy-on-hyperchain.ts
+11 −0 gas-bound-caller/scripts/utils.ts
+22 −14 gas-bound-caller/test/GasBoundCaller.spec.ts
+0 −10 l1-contracts-foundry/script-config-template/config-deploy-l1.toml
+12 −0 l1-contracts-foundry/script-config-template/register-hyperchain.toml
+7 −3 l1-contracts-foundry/script/DeployL1.s.sol
+76 −165 l1-contracts-foundry/script/RegisterHyperchain.s.sol
+15 −8 l1-contracts/scripts/governance-accept-ownership.ts
+4 −2 l1-contracts/scripts/hyperchain-upgrade-1.ts
+2 −1 l1-contracts/scripts/hyperchain-upgrade-2.ts
+3 −2 l1-contracts/scripts/hyperchain-upgrade-3.ts
+2 −2 l1-contracts/scripts/token-migration.ts
+39 −83 l1-contracts/scripts/upgrade-consistency-checker.ts
+129 −17 l1-contracts/scripts/verify.ts
+3 −1 l1-contracts/src.ts/deploy-utils.ts
+32 −8 l1-contracts/src.ts/deploy.ts
+180 −277 l1-contracts/src.ts/hyperchain-upgrade.ts
+16 −16 l1-contracts/test/test_config/constant/hardhat.json
+13 −10 l2-contracts/contracts/bridge/L2SharedBridge.sol
+2 −0 l2-contracts/contracts/bridge/interfaces/IL2SharedBridge.sol
+33 −0 l2-contracts/contracts/dev-contracts/DevL2SharedBridge.sol
+1 −1 l2-contracts/hardhat.config.ts
+34 −17 l2-contracts/src/deploy-shared-bridge-on-l2-through-l1.ts
+2 −2 l2-contracts/src/upgrade-consistency-checker.ts
+2 −1 l2-contracts/src/verify.ts
+4 −2 package.json
+0 −7 system-contracts/SystemContractsHashes.json
+8 −0 system-contracts/hardhat.config.ts
+3 −1 system-contracts/scripts/compile-yul.ts
+1 −1 system-contracts/scripts/deploy-preimages.ts
+6 −1 yarn.lock
6 changes: 6 additions & 0 deletions etc/tokens/mainnet.json
Expand Up @@ -94,5 +94,11 @@
"decimals": 18,
"symbol": "ZRX",
"name": "0x Protocol Token"
},
{
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18,
"address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
}
]
2 changes: 1 addition & 1 deletion etc/upgrades/1711451944-hyperchain-upgrade/common.json
@@ -1,5 +1,5 @@
{
"name": "hyperchain-upgrade",
"creationTimestamp": 1711451944,
"protocolVersion": "23"
"protocolVersion": "24"
}
@@ -0,0 +1,17 @@
{
"l2BridgeUpgrade": {
"schedule": "0x2c43191700000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000005fe1dacc4e47823f85a74421515ca7361ea5f02b8ac7aed31564ef15a1a297860000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000032400084c286cf3e17e7b677ea9583e60a0003240000000000000000000000000000000000000000000000000654099584706c0000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000244eb67241900000000000000000000000011f943b2c77b743ab90f4a0ae7d5a4e7fca3e102000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000044aa2000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000022000000000000000000000000071d84c3404a6ae258e6471d4934b96a2033f943800000000000000000000000000000000000000000000000000000000000001044f1ef286000000000000000000000000470afaacce2acdaefcc662419b74c79d76c914ae00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000084a31ee5b0000000000000000000000000241f19ea8ccd04515b309f1c9953a322f51891fc00000000000000000000000057891966931eb4bb6fb81430e6ce0a03aabde063010001211b0c33353cdf7a320f768e3dc40bce1326d639fcac099bba9ecd8e340000000000000000000000001c732a2061eaccae1c664ebc3e868b8438e050720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"execute": "0x74da756b0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000005fe1dacc4e47823f85a74421515ca7361ea5f02b8ac7aed31564ef15a1a297860000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000032400084c286cf3e17e7b677ea9583e60a0003240000000000000000000000000000000000000000000000000654099584706c0000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000244eb67241900000000000000000000000011f943b2c77b743ab90f4a0ae7d5a4e7fca3e102000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000044aa2000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000022000000000000000000000000071d84c3404a6ae258e6471d4934b96a2033f943800000000000000000000000000000000000000000000000000000000000001044f1ef286000000000000000000000000470afaacce2acdaefcc662419b74c79d76c914ae00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000084a31ee5b0000000000000000000000000241f19ea8ccd04515b309f1c9953a322f51891fc00000000000000000000000057891966931eb4bb6fb81430e6ce0a03aabde063010001211b0c33353cdf7a320f768e3dc40bce1326d639fcac099bba9ecd8e340000000000000000000000001c732a2061eaccae1c664ebc3e868b8438e050720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"value": "456000000048000000"
},
"l1BridgeTransferAdmin": {
"schedule": "0x2c43191700000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000004fa7041c2dd7ae4f5dfadca3f7248f2b9c3dea4340eb8d2bad94e445f6bde4cc0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000057891966931eb4bb6fb81430e6ce0a03aabde0630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000f2c1d17441074ffb18e9a918db81a17db175214600000000000000000000000000000000000000000000000000000000",
"execute": "0x74da756b0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000004fa7041c2dd7ae4f5dfadca3f7248f2b9c3dea4340eb8d2bad94e445f6bde4cc0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000057891966931eb4bb6fb81430e6ce0a03aabde0630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000248f283970000000000000000000000000f2c1d17441074ffb18e9a918db81a17db175214600000000000000000000000000000000000000000000000000000000",
"value": "0"
},
"l1BridgeUpgrade": {
"schedule": "0x2c4319170000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000587b437f52256a45b3f8d167a466ffb69883ad7b22bd52e2f12ebd078fef01af00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000f2c1d17441074ffb18e9a918db81a17db175214600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000004499a88ec400000000000000000000000057891966931eb4bb6fb81430e6ce0a03aabde063000000000000000000000000bf3d4109d65a66c629d1999fb630be2ee16d703800000000000000000000000000000000000000000000000000000000",
"execute": "0x74da756b000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000587b437f52256a45b3f8d167a466ffb69883ad7b22bd52e2f12ebd078fef01af00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000f2c1d17441074ffb18e9a918db81a17db175214600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000004499a88ec400000000000000000000000057891966931eb4bb6fb81430e6ce0a03aabde063000000000000000000000000bf3d4109d65a66c629d1999fb630be2ee16d703800000000000000000000000000000000000000000000000000000000",
"value": "0"
}
}
11 changes: 11 additions & 0 deletions etc/upgrades/1711451944-hyperchain-upgrade/mainnet/crypto.json
@@ -0,0 +1,11 @@
{
"verifier": {
"address": "0x9D6c59D9A234F585B367b4ba3C62e5Ec7A6179FD",
"txHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"keys": {
"recursionNodeLevelVkHash": "0xf520cd5b37e74e19fdb369c8d676a04dce8a19457497ac6686d2bb95d94109c8",
"recursionLeafLevelVkHash": "0x435202d277dd06ef3c64ddd99fda043fc27c2bd8b7c66882966840202c27f4f6",
"recursionCircuitsSetVksHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
}
181 changes: 181 additions & 0 deletions etc/upgrades/1711451944-hyperchain-upgrade/mainnet/facetCuts.json
@@ -0,0 +1,181 @@
[
{
"facet": "0x0000000000000000000000000000000000000000",
"selectors": [
"0x0e18b681",
"0xe58bb639",
"0x64bf8d66",
"0xa9f6d941",
"0x27ae4c16",
"0x4dd18bf5",
"0xf235757f",
"0x1cc5d103",
"0xbe6f11cf",
"0x4623c91d",
"0x17338945"
],
"action": 2,
"isFreezable": false
},
{
"facet": "0x0000000000000000000000000000000000000000",
"selectors": [
"0xcdffacc6",
"0x52ef6b2c",
"0xadfca15e",
"0x7a0ed627",
"0x79823c9a",
"0x4fc07d75",
"0xd86970d8",
"0xfd791f3c",
"0xe5355c75",
"0x9d1b5a81",
"0x7b30c8da",
"0x8665b150",
"0x631f4bac",
"0x0ec6b0b7",
"0x33ce93fe",
"0xdb1f0bf9",
"0xb8c2f66f",
"0xef3f0bae",
"0xfe26699e",
"0x39607382",
"0xaf6a2dcd",
"0xa1954fc5",
"0x46657fe9",
"0x18e3a941",
"0x29b98c67",
"0xbd7c5412",
"0xc3bbd2d7",
"0xe81e0ba1",
"0xfacd743b",
"0x9cd939e4",
"0x56142d7a",
"0xb22dd78e",
"0x74f4d30d"
],
"action": 2,
"isFreezable": false
},
{
"facet": "0x0000000000000000000000000000000000000000",
"selectors": [
"0x6c0960f9",
"0xb473318e",
"0x042901c7",
"0x263b7f8e",
"0xe4948f43",
"0xeb672419"
],
"action": 2,
"isFreezable": false
},
{
"facet": "0x0000000000000000000000000000000000000000",
"selectors": [
"0x701f58c5",
"0xc3d93e7c",
"0x7f61885c",
"0x97c09d34"
],
"action": 2,
"isFreezable": false
},
{
"facet": "0x342a09385E9BAD4AD32a6220765A6c333552e565",
"selectors": [
"0x0e18b681",
"0x64bf8d66",
"0xa9f6d941",
"0x27ae4c16",
"0x4dd18bf5",
"0x1cc5d103",
"0xbe6f11cf",
"0xe76db865",
"0x235d9eb5",
"0x21f603d7",
"0x4623c91d",
"0x17338945",
"0xfc57565f"
],
"action": 0,
"isFreezable": false
},
{
"facet": "0x345c6ca2F3E08445614f4299001418F125AD330a",
"selectors": [
"0x1de72e34",
"0xea6c029c",
"0xcdffacc6",
"0x52ef6b2c",
"0xadfca15e",
"0x7a0ed627",
"0x6e9960c3",
"0x98acd7a6",
"0x086a56f8",
"0x3591c1a0",
"0x79823c9a",
"0xd86970d8",
"0xfd791f3c",
"0xe5355c75",
"0x9d1b5a81",
"0x7b30c8da",
"0xd0468156",
"0x631f4bac",
"0x0ec6b0b7",
"0x33ce93fe",
"0x06d49e5b",
"0x5518c73b",
"0xdb1f0bf9",
"0xb8c2f66f",
"0xef3f0bae",
"0xfe26699e",
"0x39607382",
"0xaf6a2dcd",
"0xa1954fc5",
"0x46657fe9",
"0x18e3a941",
"0x29b98c67",
"0xbd7c5412",
"0xc3bbd2d7",
"0xe81e0ba1",
"0xfacd743b",
"0x9cd939e4",
"0x56142d7a",
"0xb22dd78e",
"0x74f4d30d"
],
"action": 0,
"isFreezable": false
},
{
"facet": "0x7814399116C17F2750Ca99cBFD2b75bA9a0793d7",
"selectors": [
"0x12f43dab",
"0x6c0960f9",
"0xb473318e",
"0x042901c7",
"0x263b7f8e",
"0xe4948f43",
"0xeb672419",
"0xc924de35"
],
"action": 0,
"isFreezable": true
},
{
"facet": "0x1a451d9bFBd176321966e9bc540596Ca9d39B4B1",
"selectors": [
"0x701f58c5",
"0x6edd4f12",
"0xc3d93e7c",
"0x6f497ac6",
"0x7f61885c",
"0xc37533bb",
"0x97c09d34",
"0x0f23da43"
],
"action": 0,
"isFreezable": true
}
]
18 changes: 18 additions & 0 deletions etc/upgrades/1711451944-hyperchain-upgrade/mainnet/facets.json
@@ -0,0 +1,18 @@
{
"ExecutorFacet": {
"address": "0x1a451d9bFBd176321966e9bc540596Ca9d39B4B1",
"txHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"AdminFacet": {
"address": "0x342a09385E9BAD4AD32a6220765A6c333552e565",
"txHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"GettersFacet": {
"address": "0x345c6ca2F3E08445614f4299001418F125AD330a",
"txHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"MailboxFacet": {
"address": "0x7814399116C17F2750Ca99cBFD2b75bA9a0793d7",
"txHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
}

0 comments on commit c3d4d2f

Please sign in to comment.