diff --git a/.gas-snapshot b/.gas-snapshot index ef638edd..fbffee02 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -55,7 +55,7 @@ L1ArbitrumTokenTest:testInitZeroNovaGateway() (gas: 3177301) L1ArbitrumTokenTest:testInitZeroNovaRouter() (gas: 3177235) L1ArbitrumTokenTest:testRegisterTokenOnL2() (gas: 4568612) L1ArbitrumTokenTest:testRegisterTokenOnL2NotEnoughVal() (gas: 4425799) -L1GovernanceFactoryTest:testL1GovernanceFactory() (gas: 10771117) +L1GovernanceFactoryTest:testL1GovernanceFactory() (gas: 10771109) L1GovernanceFactoryTest:testSetMinDelay() (gas: 10746003) L1GovernanceFactoryTest:testSetMinDelayRevertsForCoreAddress() (gas: 10798958) L2AddressRegistryTest:testAddressRegistryAddress() (gas: 54658) @@ -98,11 +98,11 @@ L2SecurityCouncilMgmtFactoryTest:testNomineeElectionGovDeployment() (gas: 303673 L2SecurityCouncilMgmtFactoryTest:testOnlyOwnerCanDeploy() (gas: 25498765) L2SecurityCouncilMgmtFactoryTest:testRemovalGovDeployment() (gas: 30365353) L2SecurityCouncilMgmtFactoryTest:testSecurityCouncilManagerDeployment() (gas: 30384446) -OutboxActionsTest:testAddOutbxesAction() (gas: 651591) -OutboxActionsTest:testCantAddEOA() (gas: 969161) -OutboxActionsTest:testCantReAddOutbox() (gas: 974559) -OutboxActionsTest:testRemoveAllOutboxes() (gas: 693238) -OutboxActionsTest:testRemoveOutboxes() (gas: 854205) +OutboxActionsTest:testAddOutbxesAction() (gas: 651420) +OutboxActionsTest:testCantAddEOA() (gas: 968990) +OutboxActionsTest:testCantReAddOutbox() (gas: 974388) +OutboxActionsTest:testRemoveAllOutboxes() (gas: 692972) +OutboxActionsTest:testRemoveOutboxes() (gas: 853926) ProxyUpgradeAndCallActionTest:testUpgrade() (gas: 137095) ProxyUpgradeAndCallActionTest:testUpgradeAndCall() (gas: 143042) SecurityCouncilManagerTest:testAddMemberAffordances() (gas: 249651) @@ -142,7 +142,7 @@ SecurityCouncilMemberElectionGovernorTest:testOnlyNomineeElectionGovernorCanProp SecurityCouncilMemberElectionGovernorTest:testProperInitialization() (gas: 49388) SecurityCouncilMemberElectionGovernorTest:testProposeReverts() (gas: 32916) SecurityCouncilMemberElectionGovernorTest:testRelay() (gas: 42229) -SecurityCouncilMemberElectionGovernorTest:testSelectTopNominees(uint256) (runs: 256, μ: 340004, ~: 339432) +SecurityCouncilMemberElectionGovernorTest:testSelectTopNominees(uint256) (runs: 256, μ: 339959, ~: 339349) SecurityCouncilMemberElectionGovernorTest:testSelectTopNomineesFails() (gas: 273335) SecurityCouncilMemberElectionGovernorTest:testSetFullWeightDuration() (gas: 34951) SecurityCouncilMemberElectionGovernorTest:testVotesToWeight() (gas: 152898) @@ -191,7 +191,7 @@ SecurityCouncilNomineeElectionGovernorTest:testProperInitialization() (gas: 7809 SecurityCouncilNomineeElectionGovernorTest:testProposeFails() (gas: 19744) SecurityCouncilNomineeElectionGovernorTest:testRelay() (gas: 42365) SecurityCouncilNomineeElectionGovernorTest:testSetNomineeVetter() (gas: 40019) -SequencerActionsTest:testAddAndRemoveSequencer() (gas: 483356) +SequencerActionsTest:testAddAndRemoveSequencer() (gas: 483444) SequencerActionsTest:testCantAddZeroAddress() (gas: 235614) SetInitialGovParamsActionTest:testL1() (gas: 259904) SetInitialGovParamsActionTest:testL2() (gas: 688888) diff --git a/audits/Offchain Labs Governance Actions Summary Report.pdf b/audits/Offchain Labs Governance Actions Summary Report.pdf new file mode 100644 index 00000000..b2c292c0 Binary files /dev/null and b/audits/Offchain Labs Governance Actions Summary Report.pdf differ diff --git a/files/mainnet/deployedContracts.json b/files/mainnet/deployedContracts.json index 5ec9467a..6129f6f2 100644 --- a/files/mainnet/deployedContracts.json +++ b/files/mainnet/deployedContracts.json @@ -31,5 +31,6 @@ "l1ProxyAdmin": "0x5613AF0474EB9c528A34701A5b1662E3C8FA0678", "l1Timelock": "0xE6841D92B0C345144506576eC13ECf5103aC7f49", "l1AddressRegistry": "0xd514C2b3aaBDBfa10800B9C96dc1eB25427520A0", - "l2AddressRegistry":"0x56C4E9Eb6c63aCDD19AeC2b1a00e4f0d7aBda9d3" + "l2AddressRegistry":"0x56C4E9Eb6c63aCDD19AeC2b1a00e4f0d7aBda9d3", + "novaL1AddressRegistry":"0x2F06643fc2CC18585Ae790b546388F0DE4Ec6635" } \ No newline at end of file diff --git a/package.json b/package.json index 5279f8ea..21932be7 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "typescript": "^4.8.4" }, "dependencies": { - "@arbitrum/nitro-contracts": "1.0.1", + "@arbitrum/nitro-contracts": "1.0.3-beta.0", "@arbitrum/token-bridge-contracts": "1.0.0-beta.0", "@gnosis.pm/safe-contracts": "1.3.0", "@openzeppelin/contracts": "4.7.3", diff --git a/scripts/deployNovaAddressRegistry.ts b/scripts/deployNovaAddressRegistry.ts new file mode 100644 index 00000000..36ca1e0f --- /dev/null +++ b/scripts/deployNovaAddressRegistry.ts @@ -0,0 +1,52 @@ +import { Wallet } from "@ethersproject/wallet"; +import { JsonRpcProvider } from "@ethersproject/providers"; +import { L1AddressRegistry__factory } from "../typechain-types"; + +import { ContractVerifier } from "./contractVerifier"; +import dotenv from "dotenv"; +import { utils } from "ethers"; +const abi = utils.defaultAbiCoder; + +dotenv.config(); + +const ETH_URL = process.env.ETH_URL; +const ETH_KEY = process.env.ETH_KEY; +const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY; + +if (!ETH_URL) throw new Error("ETH_URL required"); +if (!ETH_KEY) throw new Error("ETH_KEY required"); +if (!ETHERSCAN_API_KEY) throw new Error("ETHERSCAN_API_KEY required"); + +const main = async () => { + const l1Provider = new JsonRpcProvider(ETH_URL); + const signer = new Wallet(ETH_KEY, l1Provider); + + const l1Verifier = new ContractVerifier(1, ETHERSCAN_API_KEY, {}); + + const NOVA_INBOX = "0xc4448b71118c9071Bcb9734A0EAc55D18A153949"; + const L1_GOV_TIMELOCK = "0xE6841D92B0C345144506576eC13ECf5103aC7f49"; + const NOVA_L1_CUSTOM_GATEWAY = "0x23122da8C581AA7E0d07A36Ff1f16F799650232f"; + const NOVA_L1_GATEWAY_ROUTER = "0xC840838Bc438d73C16c2f8b22D2Ce3669963cD48"; + + const novaL1AddressRegistry = await new L1AddressRegistry__factory(signer).deploy( + NOVA_INBOX, // nova inbox + L1_GOV_TIMELOCK, // l1 gov timelock + NOVA_L1_CUSTOM_GATEWAY, // nova l1 custom gateway + NOVA_L1_GATEWAY_ROUTER // nova l1 gateway router + ); + await novaL1AddressRegistry.deployed(); + console.log("L1AddressRegistry deployed at", novaL1AddressRegistry.address); + + await l1Verifier.verifyWithAddress( + "L1AddressRegistry", + novaL1AddressRegistry.address, + abi.encode( + ["address", "address", "address", "address"], + [NOVA_INBOX, L1_GOV_TIMELOCK, NOVA_L1_CUSTOM_GATEWAY, NOVA_L1_GATEWAY_ROUTER] + ) + ); +}; + +main().then(() => { + console.log("Done"); +}); diff --git a/scripts/proposals/ArbOS11AIP/data/ArbOS-11-AIP-data.json b/scripts/proposals/ArbOS11AIP/data/ArbOS-11-AIP-data.json new file mode 100644 index 00000000..3d7a6f3e --- /dev/null +++ b/scripts/proposals/ArbOS11AIP/data/ArbOS-11-AIP-data.json @@ -0,0 +1,19 @@ +{ + "actionChainID": [ + 1, + 1, + 42161, + 42170 + ], + "actionAddress": [ + "0x3b70f2da6f3b01f9a53dcbcb3e59ad3ad8bed924", + "0x54c2c372943572ac2a8e84d502ebc13f14b62246", + "0xF6c7Dc6eaE78aBF2f32df899654ca425Dfa99481", + "0x5357f4d3e8f8250a77bcddd5e58886ad1358220c" + ], + "description": "# AIP: ArbOS Version 11\n\n# Constitutional\n\n## Abstract\n\nThis AIP introduces a number of improvements to Arbitrum chains, including support for the EVM Shanghai upgrade and the PUSH0 opcode, along with miscellaneous bug fixes. These improvements are now audited and ready for adoption, including by Arbitrum Orbit chains, Arbitrum One, and Arbitrum Nova. This proposal concerns the latter two, as they are governed by the Arbitrum DAO. On a high level an ArbOS upgrade can be seen as Arbitrum's equivalent of a hardfork - more can be read about the subject over in https://forum.arbitrum.foundation/t/arbitrum-arbos-upgrades/19695\n\n## Changes Included\n\n### 1. EVM Shanghai support (including the PUSH0 opcode)\n\nRecent versions of go-ethereum already includes support for the changes to the EVM made in the Shanghai L1 upgrade, but we need to enable them for Arbitrum chains. Instead of using a time based activation, it’s better to activate support based on the ArbOS version, which makes sure that even if the upgrade is delayed, Shanghai support will take effect uniformly and without causing divergences with out of date node software.\n\nPRs: \nhttps://github.com/OffchainLabs/nitro/pull/1583 \nhttps://github.com/OffchainLabs/nitro/pull/1664 \nhttps://github.com/OffchainLabs/nitro/pull/1712\n\n### 2. Retryable fixes\n\nRetryable fees previously always used the network fee account, instead of also using the infrastructure fee account. The infrastructure fee account should be paid fees from the basefee, and the network fee account should be paid any surplus fees when the gas price is elevated. That was correctly implemented for normal transactions, but retryables only dealt with the network fee account. Retryable redemption also reported an incorrect gas usage in the block header. This matters to Arbitrum Nova, where the infrastructure fee account pays out some fees to the Data Availability Committee members, but the network fee account does not.\n\nPRs: \nhttps://github.com/OffchainLabs/nitro/pull/1789\nhttps://github.com/OffchainLabs/nitro/pull/1980\n\n### 3. Fix the chain owner list returned by precompile\n\nThis change doesn’t affect the actual chain owner set, but the list being returned by the ArbOwnerPublic precompile was incorrect for Arbitrum Nova due to an internal ArbOS issue. To be clear, this does not affect who was able to make chain owner actions. As intended, only the DAO is able to make chain owner actions on Arbitrum One and Arbitrum Nova. This change only affects the list of chain owners presented by the ArbOwnerPublic precompile.\n\nPRs: \nhttps://github.com/OffchainLabs/nitro/pull/1525\nhttps://github.com/OffchainLabs/nitro/pull/1768\n\n### 4. Fix some precompile methods taking up all gas when reverting\n\nSome precompile methods such as ArbSys’s arbBlockHash method took up all gas when reverting. That meant that if a transaction called arbBlockHash with an out-of-range block number, it’d use up all the gas when reverting.\n\nPR: \nhttps://github.com/OffchainLabs/nitro/pull/1490\n\n### 5. Create missing precompile methods to view some L1 pricing parameters\n\nThe L1RewardReceipient and L1RewardRate were previously not exposed via precompiles. This change adds methods to get them to ArbGasInfo so that the current chain configuration can be easily checked.\n\nPR: \nhttps://github.com/OffchainLabs/nitro/pull/1775\n\n### 6. Fix the possibility of a staticcall from the owner to ArbOwner emitting a log\n\nThis shouldn’t matter in practice, but it was theoretically for a staticcall from the chain owner to the ArbOwner precompile to emit a log. In the EVM, staticcalls should never be able to emit logs. This PR fixes the Arbitrum precompile logic to disallow emitting logs in staticcall contexts.\n\nPR: \nhttps://github.com/OffchainLabs/nitro/pull/1562\n\n### 7. Fix default L1 pricing params\n\nThis shouldn’t matter for Arbitrum One and Arbitrum Nova, because these parameters were already corrected in [AIP-7](https://forum.arbitrum.foundation/t/aip-7-arbitrum-one-governance-parameter-fixes/15920). However, it’s included in ArbOS version 11 so that any Arbitrum Orbit chains automatically get the correct parameters.\n\nPR: \nhttps://github.com/OffchainLabs/nitro/pull/1549\n\n## Implementation\n\nThe canonical version of ArbOS 11 this proposal aims to adopt is implemented in the Arbitrum Nitro git commit hash `df93361a1293574903f28fbbbe0469a3ea5c644d`\n\nThat commit builds a WASM module root of `0xf4389b835497a910d7ba3ebfb77aa93da985634f3c052de1290360635be40c4a`, which is a hash of the code that’s put on-chain for fraud proofs. You can verify this WASM module root on a x86_64 computer (i.e. not on ARM which builds slightly different symbol names) with Docker setup by checking out the previously mentioned commit of the nitro repository, running `git submodule update --init --recursive`, and then running `docker build . --target module-root-calc --tag wavm-machine && docker run --rm wavm-machine cat /workspace/target/machines/latest/module-root.txt` This uses Docker to perform a reproducible build of the WebAssembly code used in fraud proofs, and outputs its hash.\n\nThe above code has audited by Trail of Bits - the audit report can be viewed in https://drive.google.com/file/d/1uwA1PK3AB9ggHMqaw91mubu5WHcEp398/view?usp=sharing\n\n### Upgrade Action smart contracts\n\nThe Action smart contracts used to execute the on-chain upgrade can be viewed in \n\nhttps://github.com/ArbitrumFoundation/governance/pull/170\n\nAction contract addresses:\n[SetArbOneArbOS11ModuleRootAction](https://etherscan.io/address/0x3b70f2da6f3b01f9a53dcbcb3e59ad3ad8bed924#code)\n[SetNovaArbOS11ModuleRootAction](https://etherscan.io/address/0x54c2c372943572ac2a8e84d502ebc13f14b62246#code)\n[SetArbOS11VersionAction](https://arbiscan.io/address/0xF6c7Dc6eaE78aBF2f32df899654ca425Dfa99481#code)\n[SetArbOS11VersionAction](https://nova.arbiscan.io/address/0x5357f4d3e8f8250a77bcddd5e58886ad1358220c#code)\n\n\nThe above code has audited by Trail of Bits - the audit report can be viewed in https://drive.google.com/file/d/1N3197Z7DuqBpu9qdt-GWPewe8HQakfLY/view?usp=sharing\n\n\n\n### Verifying the ArbOS Code Difference\n\nThe current ArbOS version used on Arbitrum One and Arbitrum Nova is ArbOS 10, corresponding to the Arbitrum Nitro `consensus-v10` git tag. You can verify this by running the previously mentioned steps to build the WASM module root on that git tag, which produces the WASM module root `0x6b94a7fc388fd8ef3def759297828dc311761e88d8179c7ee8d3887dc554f3c3`, which is what the rollup contract’s `wasmModuleRoot()` method returns for both Arbitrum One and Arbitrum Nova.\n\nTo audit the code difference from ArbOS 10 to ArbOS 11, you could simple generate a full nitro diff with `git diff consensus-v10 df93361a1293574903f28fbbbe0469a3ea5c644d` (and also generate a diff of the go-ethereum submodule mentioned in that nitro diff). However, that includes a lot of code that isn’t part of the WASM module root. To filter down to just the replay binary which defines the state transition function, you can start by generating a list of files in the nitro and go-ethereum repositories included by the replay binary in either ArbOS 10 or ArbOS 11 with bash:\n\n```\n#!/usr/bin/env bash\nset -e\nmkdir -p ~/tmp # this script uses ~/tmp as scratch space and output\n# this script should be run in the nitro repository\ngit checkout df93361a1293574903f28fbbbe0469a3ea5c644d\ngit submodule update --init --recursive\nmake solgen\ngo list -f \"{{.Deps}}\" ./cmd/replay | tr -d '[]' | sed 's/ /\\\\n/g' | grep 'github.com/offchainlabs/nitro/' | sed 's@github.com/offchainlabs/nitro/@@' | while read dir; do find \"$dir\" -type f -name '*.go' -maxdepth 1; done | grep -v '_test\\\\.go\n```\n\nNow, `~/tmp/replay-binary-dependencies.txt` contains a list of dependencies of the replay binary that were present in ArbOS 10 or 11. To use that to generate a smaller diff of the nitro repository, you can run:\n\n```\ngit diff consensus-v10 df93361a1293574903f28fbbbe0469a3ea5c644d -- cmd/replay $(cat ~/tmp/replay-binary-nitro-dependencies.txt)\n```\n\nFor the go-ethereum submodule, you can first find out what go-ethereum commit ArbOS 10 and 11 used:\n\n```\n$ git ls-tree consensus-v10 go-ethereum 128 ↵\n160000 commit 941aa323e5cbbde1d5806eb4e3dd70553c5a1298 go-ethereum\n$ git ls-tree df93361a1293574903f28fbbbe0469a3ea5c644d go-ethereum\n160000 commit abe584818e104dd5b4fdb8f60381a14eede896de go-ethereum\n```\n\nThose commit hashes are the go-ethereum commit hashes pinned by each nitro commit. Then, you can again use `git diff` and the files generated by the earlier script to generate a diff limited to code used by the replay binary:\n\n```\ngit diff 941aa323e5cbbde1d5806eb4e3dd70553c5a1298 abe584818e104dd5b4fdb8f60381a14eede896de -- $(cat ~/tmp/replay-binary-geth-dependencies.txt)\n```\n\nThis diff also includes the diff between upstream go-ethereum versions v1.10.25 and v1.11.6, as ArbOS 10 used the former and ArbOS 11 uses the latter. To filter out that difference, you can use this tool to find the intersection of two git diffs: https://gist.github.com/PlasmaPower/795af590f88cfb5e21c5ad9b8a32afdf\n\nWe can use that to find the intersection of the diff of ArbOS 11’s go-ethereum against ArbOS 10’s go-ethereum and the diff of ArbOS 11’s go-etheruem against upstream go-ethereum v1.11.6:\n\n```\ngit diff 941aa323e5cbbde1d5806eb4e3dd70553c5a1298 abe584818e104dd5b4fdb8f60381a14eede896de -- $(cat ~/tmp/replay-binary-geth-dependencies.txt) > ~/tmp/arbos-10-vs-11-geth.diff\ngit diff v1.11.6 abe584818e104dd5b4fdb8f60381a14eede896de -- $(cat ~/tmp/replay-binary-geth-dependencies.txt) > ~/tmp/arbos-11-vs-upstream-geth.diff\ndiff-intersection.py ~/tmp/arbos-10-vs-11-geth.diff ~/tmp/arbos-11-vs-upstream-geth.diff\n```\nIn addition, you can pass the following arguments to `diff-intersection.py` to ignore files that are included by the replay binary but whose components are not used: `--ignore-files 'core/blockchain*.go' arbitrum_types/txoptions.go 'rawdb/**' 'rpc/**'`\n\nNote that by default, `diff-intersection.py` does a line based intersection. To instead do an intersection based on chunks in the diff, known as hunks in git terminology, you can add the `--only-hunks` flag.", + "arbSysSendTxToL1Args": { + "l1Timelock": "0xE6841D92B0C345144506576eC13ECf5103aC7f49", + "calldata": "0x8f2a0bb000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000d8344f9a656e39a4aa0f30a26fbc012108188d5307af76353994bbe74b3cd22000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000000000000000000000040000000000000000000000003fffbadaf827559da092217e474760e2b2c3cedd0000000000000000000000003fffbadaf827559da092217e474760e2b2c3cedd000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000000841cff79cd0000000000000000000000003b70f2da6f3b01f9a53dcbcb3e59ad3ad8bed92400000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000841cff79cd00000000000000000000000054c2c372943572ac2a8e84d502ebc13f14b6224600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f000000000000000000000000cf57572261c7c2bcf21ffd220ea7d1a27d40a82700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000f6c7dc6eae78abf2f32df899654ca425dfa9948100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a15394900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a748200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd0000000000000000000000005357f4d3e8f8250a77bcddd5e58886ad1358220c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + } +} \ No newline at end of file diff --git a/scripts/proposals/ArbOS11AIP/description.txt b/scripts/proposals/ArbOS11AIP/description.txt new file mode 100644 index 00000000..79e2e5bd --- /dev/null +++ b/scripts/proposals/ArbOS11AIP/description.txt @@ -0,0 +1,138 @@ +# AIP: ArbOS Version 11 + +# Constitutional + +## Abstract + +This AIP introduces a number of improvements to Arbitrum chains, including support for the EVM Shanghai upgrade and the PUSH0 opcode, along with miscellaneous bug fixes. These improvements are now audited and ready for adoption, including by Arbitrum Orbit chains, Arbitrum One, and Arbitrum Nova. This proposal concerns the latter two, as they are governed by the Arbitrum DAO. On a high level an ArbOS upgrade can be seen as Arbitrum's equivalent of a hardfork - more can be read about the subject over in https://forum.arbitrum.foundation/t/arbitrum-arbos-upgrades/19695 + +## Changes Included + +### 1. EVM Shanghai support (including the PUSH0 opcode) + +Recent versions of go-ethereum already includes support for the changes to the EVM made in the Shanghai L1 upgrade, but we need to enable them for Arbitrum chains. Instead of using a time based activation, it’s better to activate support based on the ArbOS version, which makes sure that even if the upgrade is delayed, Shanghai support will take effect uniformly and without causing divergences with out of date node software. + +PRs: +https://github.com/OffchainLabs/nitro/pull/1583 +https://github.com/OffchainLabs/nitro/pull/1664 +https://github.com/OffchainLabs/nitro/pull/1712 + +### 2. Retryable fixes + +Retryable fees previously always used the network fee account, instead of also using the infrastructure fee account. The infrastructure fee account should be paid fees from the basefee, and the network fee account should be paid any surplus fees when the gas price is elevated. That was correctly implemented for normal transactions, but retryables only dealt with the network fee account. Retryable redemption also reported an incorrect gas usage in the block header. This matters to Arbitrum Nova, where the infrastructure fee account pays out some fees to the Data Availability Committee members, but the network fee account does not. + +PRs: +https://github.com/OffchainLabs/nitro/pull/1789 +https://github.com/OffchainLabs/nitro/pull/1980 + +### 3. Fix the chain owner list returned by precompile + +This change doesn’t affect the actual chain owner set, but the list being returned by the ArbOwnerPublic precompile was incorrect for Arbitrum Nova due to an internal ArbOS issue. To be clear, this does not affect who was able to make chain owner actions. As intended, only the DAO is able to make chain owner actions on Arbitrum One and Arbitrum Nova. This change only affects the list of chain owners presented by the ArbOwnerPublic precompile. + +PRs: +https://github.com/OffchainLabs/nitro/pull/1525 +https://github.com/OffchainLabs/nitro/pull/1768 + +### 4. Fix some precompile methods taking up all gas when reverting + +Some precompile methods such as ArbSys’s arbBlockHash method took up all gas when reverting. That meant that if a transaction called arbBlockHash with an out-of-range block number, it’d use up all the gas when reverting. + +PR: +https://github.com/OffchainLabs/nitro/pull/1490 + +### 5. Create missing precompile methods to view some L1 pricing parameters + +The L1RewardReceipient and L1RewardRate were previously not exposed via precompiles. This change adds methods to get them to ArbGasInfo so that the current chain configuration can be easily checked. + +PR: +https://github.com/OffchainLabs/nitro/pull/1775 + +### 6. Fix the possibility of a staticcall from the owner to ArbOwner emitting a log + +This shouldn’t matter in practice, but it was theoretically for a staticcall from the chain owner to the ArbOwner precompile to emit a log. In the EVM, staticcalls should never be able to emit logs. This PR fixes the Arbitrum precompile logic to disallow emitting logs in staticcall contexts. + +PR: +https://github.com/OffchainLabs/nitro/pull/1562 + +### 7. Fix default L1 pricing params + +This shouldn’t matter for Arbitrum One and Arbitrum Nova, because these parameters were already corrected in [AIP-7](https://forum.arbitrum.foundation/t/aip-7-arbitrum-one-governance-parameter-fixes/15920). However, it’s included in ArbOS version 11 so that any Arbitrum Orbit chains automatically get the correct parameters. + +PR: +https://github.com/OffchainLabs/nitro/pull/1549 + +## Implementation + +The canonical version of ArbOS 11 this proposal aims to adopt is implemented in the Arbitrum Nitro git commit hash `df93361a1293574903f28fbbbe0469a3ea5c644d` + +That commit builds a WASM module root of `0xf4389b835497a910d7ba3ebfb77aa93da985634f3c052de1290360635be40c4a`, which is a hash of the code that’s put on-chain for fraud proofs. You can verify this WASM module root on a x86_64 computer (i.e. not on ARM which builds slightly different symbol names) with Docker setup by checking out the previously mentioned commit of the nitro repository, running `git submodule update --init --recursive`, and then running `docker build . --target module-root-calc --tag wavm-machine && docker run --rm wavm-machine cat /workspace/target/machines/latest/module-root.txt` This uses Docker to perform a reproducible build of the WebAssembly code used in fraud proofs, and outputs its hash. + +The above code has audited by Trail of Bits - the audit report can be viewed in https://drive.google.com/file/d/1uwA1PK3AB9ggHMqaw91mubu5WHcEp398/view?usp=sharing + +### Upgrade Action smart contracts + +The Action smart contracts used to execute the on-chain upgrade can be viewed in + +https://github.com/ArbitrumFoundation/governance/pull/170 + +Action contract addresses: +[SetArbOneArbOS11ModuleRootAction](https://etherscan.io/address/0x3b70f2da6f3b01f9a53dcbcb3e59ad3ad8bed924#code) +[SetNovaArbOS11ModuleRootAction](https://etherscan.io/address/0x54c2c372943572ac2a8e84d502ebc13f14b62246#code) +[SetArbOS11VersionAction](https://arbiscan.io/address/0xF6c7Dc6eaE78aBF2f32df899654ca425Dfa99481#code) +[SetArbOS11VersionAction](https://nova.arbiscan.io/address/0x5357f4d3e8f8250a77bcddd5e58886ad1358220c#code) + + +The above code has audited by Trail of Bits - the audit report can be viewed in https://drive.google.com/file/d/1N3197Z7DuqBpu9qdt-GWPewe8HQakfLY/view?usp=sharing + + + +### Verifying the ArbOS Code Difference + +The current ArbOS version used on Arbitrum One and Arbitrum Nova is ArbOS 10, corresponding to the Arbitrum Nitro `consensus-v10` git tag. You can verify this by running the previously mentioned steps to build the WASM module root on that git tag, which produces the WASM module root `0x6b94a7fc388fd8ef3def759297828dc311761e88d8179c7ee8d3887dc554f3c3`, which is what the rollup contract’s `wasmModuleRoot()` method returns for both Arbitrum One and Arbitrum Nova. + +To audit the code difference from ArbOS 10 to ArbOS 11, you could simple generate a full nitro diff with `git diff consensus-v10 df93361a1293574903f28fbbbe0469a3ea5c644d` (and also generate a diff of the go-ethereum submodule mentioned in that nitro diff). However, that includes a lot of code that isn’t part of the WASM module root. To filter down to just the replay binary which defines the state transition function, you can start by generating a list of files in the nitro and go-ethereum repositories included by the replay binary in either ArbOS 10 or ArbOS 11 with bash: + +``` +#!/usr/bin/env bash +set -e +mkdir -p ~/tmp # this script uses ~/tmp as scratch space and output +# this script should be run in the nitro repository +git checkout df93361a1293574903f28fbbbe0469a3ea5c644d +git submodule update --init --recursive +make solgen +go list -f "{{.Deps}}" ./cmd/replay | tr -d '[]' | sed 's/ /\\n/g' | grep 'github.com/offchainlabs/nitro/' | sed 's@github.com/offchainlabs/nitro/@@' | while read dir; do find "$dir" -type f -name '*.go' -maxdepth 1; done | grep -v '_test\\.go +``` + +Now, `~/tmp/replay-binary-dependencies.txt` contains a list of dependencies of the replay binary that were present in ArbOS 10 or 11. To use that to generate a smaller diff of the nitro repository, you can run: + +``` +git diff consensus-v10 df93361a1293574903f28fbbbe0469a3ea5c644d -- cmd/replay $(cat ~/tmp/replay-binary-nitro-dependencies.txt) +``` + +For the go-ethereum submodule, you can first find out what go-ethereum commit ArbOS 10 and 11 used: + +``` +$ git ls-tree consensus-v10 go-ethereum 128 ↵ +160000 commit 941aa323e5cbbde1d5806eb4e3dd70553c5a1298 go-ethereum +$ git ls-tree df93361a1293574903f28fbbbe0469a3ea5c644d go-ethereum +160000 commit abe584818e104dd5b4fdb8f60381a14eede896de go-ethereum +``` + +Those commit hashes are the go-ethereum commit hashes pinned by each nitro commit. Then, you can again use `git diff` and the files generated by the earlier script to generate a diff limited to code used by the replay binary: + +``` +git diff 941aa323e5cbbde1d5806eb4e3dd70553c5a1298 abe584818e104dd5b4fdb8f60381a14eede896de -- $(cat ~/tmp/replay-binary-geth-dependencies.txt) +``` + +This diff also includes the diff between upstream go-ethereum versions v1.10.25 and v1.11.6, as ArbOS 10 used the former and ArbOS 11 uses the latter. To filter out that difference, you can use this tool to find the intersection of two git diffs: https://gist.github.com/PlasmaPower/795af590f88cfb5e21c5ad9b8a32afdf + +We can use that to find the intersection of the diff of ArbOS 11’s go-ethereum against ArbOS 10’s go-ethereum and the diff of ArbOS 11’s go-etheruem against upstream go-ethereum v1.11.6: + +``` +git diff 941aa323e5cbbde1d5806eb4e3dd70553c5a1298 abe584818e104dd5b4fdb8f60381a14eede896de -- $(cat ~/tmp/replay-binary-geth-dependencies.txt) > ~/tmp/arbos-10-vs-11-geth.diff +git diff v1.11.6 abe584818e104dd5b4fdb8f60381a14eede896de -- $(cat ~/tmp/replay-binary-geth-dependencies.txt) > ~/tmp/arbos-11-vs-upstream-geth.diff +diff-intersection.py ~/tmp/arbos-10-vs-11-geth.diff ~/tmp/arbos-11-vs-upstream-geth.diff +``` +In addition, you can pass the following arguments to `diff-intersection.py` to ignore files that are included by the replay binary but whose components are not used: `--ignore-files 'core/blockchain*.go' arbitrum_types/txoptions.go 'rawdb/**' 'rpc/**'` + +Note that by default, `diff-intersection.py` does a line based intersection. To instead do an intersection based on chunks in the diff, known as hunks in git terminology, you can add the `--only-hunks` flag. \ No newline at end of file diff --git a/scripts/proposals/ArbOS11AIP/generateProposalData.ts b/scripts/proposals/ArbOS11AIP/generateProposalData.ts new file mode 100644 index 00000000..7f634d82 --- /dev/null +++ b/scripts/proposals/ArbOS11AIP/generateProposalData.ts @@ -0,0 +1,94 @@ +import { RoundTripProposalCreator } from "./../../../src-ts/proposalCreator"; +import { JsonRpcProvider } from "@ethersproject/providers"; +import { constants, utils } from "ethers"; +import { CoreGovPropposal } from "../coreGovProposalInterface"; +import dotenv from "dotenv"; +import { importDeployedContracts } from "../../../src-ts/utils"; +import fs from "fs"; +const zero = constants.Zero; +dotenv.config(); + +const mainnetDeployedContracts = importDeployedContracts("./files/mainnet/deployedContracts.json"); + +dotenv.config(); + +const description = fs.readFileSync("./scripts/proposals/ArbOS11AIP/description.txt").toString() + +if(!process.env.ETH_URL) throw new Error("no eth rpc") +if(!process.env.ARB_URL) throw new Error("no arb1 rpc") +if(!process.env.NOVA_URL) throw new Error("no nova rpc") + +const l1Provider = new JsonRpcProvider(process.env.ETH_URL); +const govChainProvider = new JsonRpcProvider(process.env.ARB_URL); +const novaProvider = new JsonRpcProvider(process.env.NOVA_URL); + +const l1GovConfig = { + timelockAddr: mainnetDeployedContracts.l1Timelock, + provider: l1Provider, +}; + +if (!mainnetDeployedContracts.novaUpgradeExecutorProxy) + throw new Error("novaUpgradeExecutorProxy not found"); +const upgradeExecs = [ + { + upgradeExecutorAddr: mainnetDeployedContracts.l1Executor, + provider: l1Provider, + }, + { + upgradeExecutorAddr: mainnetDeployedContracts.l1Executor, + provider: l1Provider, + }, + { + upgradeExecutorAddr: mainnetDeployedContracts.l2Executor, + provider: govChainProvider, + }, + { + upgradeExecutorAddr: mainnetDeployedContracts.novaUpgradeExecutorProxy, + provider: novaProvider, + }, +]; + +const actionAddresses = [ + "0x3b70f2da6f3b01f9a53dcbcb3e59ad3ad8bed924", + "0x54c2c372943572ac2a8e84d502ebc13f14b62246", + "0xF6c7Dc6eaE78aBF2f32df899654ca425Dfa99481", + "0x5357f4d3e8f8250a77bcddd5e58886ad1358220c", +]; + +const performEncoded = new utils.Interface(["function perform() external"]).encodeFunctionData( + "perform", + [] +); + +const values = actionAddresses.map(() => zero); +const datas = actionAddresses.map(() => performEncoded); + +const main = async () => { + const propCreator = new RoundTripProposalCreator(l1GovConfig, upgradeExecs); + + const res = await propCreator.createRoundTripCallDataForArbSysCall( + actionAddresses, + values, + datas, + description + ); + console.log(res.l1TimelockScheduleCallData); + + const proposal: CoreGovPropposal = { + actionChainID: [1, 1, 42161, 42170], + actionAddress: actionAddresses, + description, + arbSysSendTxToL1Args: { + l1Timelock: mainnetDeployedContracts.l1Timelock, + calldata: res.l1TimelockScheduleCallData, + }, + }; + + const path = `${__dirname}/data/ArbOS-11-AIP-data.json`; + fs.writeFileSync(path, JSON.stringify(proposal, null, 2)); + console.log("Wrote proposal data to", path); +}; + +main().then(() => { + console.log("done"); +}); diff --git a/src-ts/types.ts b/src-ts/types.ts index a0955165..fb4b1842 100644 --- a/src-ts/types.ts +++ b/src-ts/types.ts @@ -27,4 +27,5 @@ export interface DeployedContracts { l1Timelock: string; l1AddressRegistry: string; l2AddressRegistry: string; + novaUpgradeExecutorProxy?: string } diff --git a/src/L1ArbitrumMessenger.sol b/src/L1ArbitrumMessenger.sol index 5b875837..c2bca8cc 100644 --- a/src/L1ArbitrumMessenger.sol +++ b/src/L1ArbitrumMessenger.sol @@ -139,7 +139,7 @@ abstract contract L1ArbitrumMessenger { } /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies - function getL2ToL1Sender(address _inbox) internal returns (address) { + function getL2ToL1Sender(address _inbox) internal view returns (address) { IOutbox outbox = IOutbox(getBridge(_inbox).activeOutbox()); address l2ToL1Sender = outbox.l2ToL1Sender(); diff --git a/src/gov-action-contracts/AIPs/AIP1Point2Action.sol b/src/gov-action-contracts/AIPs/AIP1Point2Action.sol index ff0553e1..66ccd98b 100644 --- a/src/gov-action-contracts/AIPs/AIP1Point2Action.sol +++ b/src/gov-action-contracts/AIPs/AIP1Point2Action.sol @@ -41,9 +41,11 @@ contract AIP1Point2Action { ); } - function setProposalThreshold(IL2ArbitrumGoverner gov, uint256 newProposalThreshold) internal { + function setProposalThreshold(IL2ArbitrumGoverner gov, uint256 _newProposalThreshold) + internal + { bytes memory setProposalThresholdCalldata = abi.encodeWithSelector( - IL2ArbitrumGoverner.setProposalThreshold.selector, newProposalThreshold + IL2ArbitrumGoverner.setProposalThreshold.selector, _newProposalThreshold ); gov.relay(address(gov), 0, setProposalThresholdCalldata); } diff --git a/src/gov-action-contracts/AIPs/ArbOS11/SetArbOS11VersionAction.sol b/src/gov-action-contracts/AIPs/ArbOS11/SetArbOS11VersionAction.sol new file mode 100644 index 00000000..f9840655 --- /dev/null +++ b/src/gov-action-contracts/AIPs/ArbOS11/SetArbOS11VersionAction.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity 0.8.16; + +import "../../arbos-upgrade/UpgradeArbOSVersionAction.sol"; +import "../../address-registries/L1AddressRegistry.sol"; + +/// @notice identical copies of this contract to be deployed on Arb One and Nova for ArbOS11 upgrades +contract SetArbOS11VersionAction is UpgradeArbOSVersionAction { + constructor() UpgradeArbOSVersionAction(uint64(11), uint64(1 weeks)) {} +} diff --git a/src/gov-action-contracts/AIPs/ArbOS11/SetArbOneArbOS11ModuleRootAciton.sol b/src/gov-action-contracts/AIPs/ArbOS11/SetArbOneArbOS11ModuleRootAciton.sol new file mode 100644 index 00000000..5e64d90b --- /dev/null +++ b/src/gov-action-contracts/AIPs/ArbOS11/SetArbOneArbOS11ModuleRootAciton.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity 0.8.16; + +import "../../arbos-upgrade/SetWasmModuleRootAction.sol"; +import "../../address-registries/L1AddressRegistry.sol"; + +/// @notice action deployed on L1 to set Arb One's wasm module root for ARBOS11 upgrade +contract SetArbOneArbOS11ModuleRootAciton is SetWasmModuleRootAction { + constructor() + SetWasmModuleRootAction( + L1AddressRegistry(0xd514C2b3aaBDBfa10800B9C96dc1eB25427520A0), + bytes32(0xf4389b835497a910d7ba3ebfb77aa93da985634f3c052de1290360635be40c4a) + ) + {} +} diff --git a/src/gov-action-contracts/AIPs/ArbOS11/SetNovaArbOS11ModuleRootAction.sol b/src/gov-action-contracts/AIPs/ArbOS11/SetNovaArbOS11ModuleRootAction.sol new file mode 100644 index 00000000..e8b0e997 --- /dev/null +++ b/src/gov-action-contracts/AIPs/ArbOS11/SetNovaArbOS11ModuleRootAction.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity 0.8.16; + +import "../../arbos-upgrade/SetWasmModuleRootAction.sol"; +import "../../address-registries/L1AddressRegistry.sol"; + +/// @notice action deployed on L1 to set nova's wasm module root for ARBOS11 upgrade +contract SetNovaArbOS11ModuleRootAction is SetWasmModuleRootAction { + constructor() + SetWasmModuleRootAction( + L1AddressRegistry(0x2F06643fc2CC18585Ae790b546388F0DE4Ec6635), + bytes32(0xf4389b835497a910d7ba3ebfb77aa93da985634f3c052de1290360635be40c4a) + ) + {} +} diff --git a/src/gov-action-contracts/address-registries/interfaces.sol b/src/gov-action-contracts/address-registries/interfaces.sol index 9a713356..127e09bf 100644 --- a/src/gov-action-contracts/address-registries/interfaces.sol +++ b/src/gov-action-contracts/address-registries/interfaces.sol @@ -5,16 +5,8 @@ import "@arbitrum/nitro-contracts/src/bridge/IBridge.sol"; import "@arbitrum/nitro-contracts/src/bridge/IInbox.sol"; import "@arbitrum/nitro-contracts/src/bridge/IOutbox.sol"; import "@arbitrum/nitro-contracts/src/bridge/ISequencerInbox.sol"; - -interface IRollupCore { - function pause() external; - function resume() external; - function forceResolveChallenge(address[] memory stackerA, address[] memory stackerB) external; - function outbox() external view returns (IOutbox); - function setOutbox(IOutbox _outbox) external; - function setValidator(address[] memory _validator, bool[] memory _val) external; - function setValidatorWhitelistDisabled(bool _validatorWhitelistDisabled) external; -} +import "@arbitrum/nitro-contracts/src/rollup/IRollupAdmin.sol"; +import "@arbitrum/nitro-contracts/src/rollup/IRollupLogic.sol"; interface IL1Timelock { function updateDelay(uint256 newDelay) external; diff --git a/src/gov-action-contracts/arbos-upgrade/SetWasmModuleRootAction.sol b/src/gov-action-contracts/arbos-upgrade/SetWasmModuleRootAction.sol new file mode 100644 index 00000000..5cbf94a1 --- /dev/null +++ b/src/gov-action-contracts/arbos-upgrade/SetWasmModuleRootAction.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity 0.8.16; + +import "../address-registries/L1AddressRegistry.sol"; + +/// @notice should be included in an operation batch in the L1 timelock along with UpgradeArbOSVersionAction +contract SetWasmModuleRootAction { + address public immutable rollup; + bytes32 public immutable newWasmModuleRoot; + + constructor(L1AddressRegistry _l1AddressRegistry, bytes32 _newWasmModuleRoot) { + rollup = address(_l1AddressRegistry.rollup()); + newWasmModuleRoot = _newWasmModuleRoot; + } + + function perform() external { + IRollupAdmin(rollup).setWasmModuleRoot(newWasmModuleRoot); + + // verify: + require( + IRollupCore(rollup).wasmModuleRoot() == newWasmModuleRoot, + "SetWasmModuleRootAction: wasm module root not set" + ); + } +} diff --git a/src/gov-action-contracts/arbos-upgrade/UpgradeArbOSVersionAction.sol b/src/gov-action-contracts/arbos-upgrade/UpgradeArbOSVersionAction.sol new file mode 100644 index 00000000..be9a0483 --- /dev/null +++ b/src/gov-action-contracts/arbos-upgrade/UpgradeArbOSVersionAction.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity 0.8.16; + +import "@arbitrum/nitro-contracts/src/precompiles/ArbOwner.sol"; + +/// @notice should be included in an operation batch in the L1 timelock along with SetWasmModuleRootAction +contract UpgradeArbOSVersionAction { + uint64 public immutable newArbOSVersion; + uint64 public immutable upgradeTimeDelaySeconds; + + constructor(uint64 _newArbOSVersion, uint64 _upgradeTimeDelaySeconds) { + newArbOSVersion = _newArbOSVersion; + upgradeTimeDelaySeconds = _upgradeTimeDelaySeconds; + } + + function perform() external { + ArbOwner arbOwner = ArbOwner(0x0000000000000000000000000000000000000070); + arbOwner.scheduleArbOSUpgrade({ + newVersion: newArbOSVersion, + timestamp: uint64(block.timestamp) + upgradeTimeDelaySeconds + }); + } +} diff --git a/src/gov-action-contracts/rollup/EnableValidatorWhitelistAction.sol b/src/gov-action-contracts/rollup/EnableValidatorWhitelistAction.sol index 52dd2ea2..c1ac3ad9 100644 --- a/src/gov-action-contracts/rollup/EnableValidatorWhitelistAction.sol +++ b/src/gov-action-contracts/rollup/EnableValidatorWhitelistAction.sol @@ -11,6 +11,6 @@ contract EnableValidatorWhitelistAction { } function perform() external { - addressRegistry.rollup().setValidatorWhitelistDisabled(false); + IRollupAdmin(address(addressRegistry.rollup())).setValidatorWhitelistDisabled(false); } } diff --git a/src/gov-action-contracts/rollup/ForceResolveChallengeAction.sol b/src/gov-action-contracts/rollup/ForceResolveChallengeAction.sol index ec356054..ff490405 100644 --- a/src/gov-action-contracts/rollup/ForceResolveChallengeAction.sol +++ b/src/gov-action-contracts/rollup/ForceResolveChallengeAction.sol @@ -11,6 +11,6 @@ contract ForceResolveChallengeAction { } function perform(address[] calldata stakerA, address[] calldata stakerB) external { - addressRegistry.rollup().forceResolveChallenge(stakerA, stakerB); + IRollupAdmin(address(addressRegistry.rollup())).forceResolveChallenge(stakerA, stakerB); } } diff --git a/src/gov-action-contracts/rollup/PauseRollupAction.sol b/src/gov-action-contracts/rollup/PauseRollupAction.sol index 3cb8b37e..afb52c9a 100644 --- a/src/gov-action-contracts/rollup/PauseRollupAction.sol +++ b/src/gov-action-contracts/rollup/PauseRollupAction.sol @@ -11,6 +11,6 @@ contract PauseRollupAction { } function perform() external { - addressRegistry.rollup().pause(); + IRollupAdmin(address(addressRegistry.rollup())).pause(); } } diff --git a/src/gov-action-contracts/rollup/RemoveValidatorWhitelistAction.sol b/src/gov-action-contracts/rollup/RemoveValidatorWhitelistAction.sol index 91eb4fc8..43ad32d6 100644 --- a/src/gov-action-contracts/rollup/RemoveValidatorWhitelistAction.sol +++ b/src/gov-action-contracts/rollup/RemoveValidatorWhitelistAction.sol @@ -11,6 +11,6 @@ contract DisableValidatorWhitelistAction { } function perform() external { - addressRegistry.rollup().setValidatorWhitelistDisabled(true); + IRollupAdmin(address(addressRegistry.rollup())).setValidatorWhitelistDisabled(true); } } diff --git a/src/gov-action-contracts/rollup/SetValidatorsAction.sol b/src/gov-action-contracts/rollup/SetValidatorsAction.sol index 42c2b7f0..eb5d8747 100644 --- a/src/gov-action-contracts/rollup/SetValidatorsAction.sol +++ b/src/gov-action-contracts/rollup/SetValidatorsAction.sol @@ -11,6 +11,6 @@ contract SetValidatorsAction { } function perform(address[] calldata _validators, bool[] calldata _values) external { - addressRegistry.rollup().setValidator(_validators, _values); + IRollupAdmin(address(addressRegistry.rollup())).setValidator(_validators, _values); } } diff --git a/src/gov-action-contracts/rollup/UnpauseRollupAction.sol b/src/gov-action-contracts/rollup/UnpauseRollupAction.sol index 2fcf961d..bd0a8ada 100644 --- a/src/gov-action-contracts/rollup/UnpauseRollupAction.sol +++ b/src/gov-action-contracts/rollup/UnpauseRollupAction.sol @@ -11,6 +11,6 @@ contract UnpauseRollupAction { } function perform() external { - addressRegistry.rollup().resume(); + IRollupAdmin(address(addressRegistry.rollup())).resume(); } } diff --git a/src/gov-action-contracts/set-outbox/OutboxActionLib.sol b/src/gov-action-contracts/set-outbox/OutboxActionLib.sol index ee7f57da..4fcb6806 100644 --- a/src/gov-action-contracts/set-outbox/OutboxActionLib.sol +++ b/src/gov-action-contracts/set-outbox/OutboxActionLib.sol @@ -49,6 +49,6 @@ library OutboxActionLib { require( Address.isContract(address(outbox)), "SetRollupOutboxAction: outbox must be contract" ); - addressRegistry.rollup().setOutbox(outbox); + IRollupAdmin(address(addressRegistry.rollup())).setOutbox(outbox); } } diff --git a/test/L1GovernanceFactory.t.sol b/test/L1GovernanceFactory.t.sol index 138314cb..6ab5413f 100644 --- a/test/L1GovernanceFactory.t.sol +++ b/test/L1GovernanceFactory.t.sol @@ -41,7 +41,7 @@ contract L1GovernanceFactoryTest is Test { assertEq(timelock.governanceChainInbox(), address(inbox), "timelock inbox set"); assertEq(timelock.l2Timelock(), l2Timelock, "timelock l2Timelock set"); assertEq(timelock.getMinDelay(), minDelay, "timelock minDelay set"); - address[] memory proposers; + // address[] memory proposers; address[] memory executors; vm.expectRevert("Initializable: contract is already initialized"); timelock.initialize(minDelay, executors, address(inbox), l2Timelock); diff --git a/test/util/InboxMock.sol b/test/util/InboxMock.sol index e582fead..b30349aa 100644 --- a/test/util/InboxMock.sol +++ b/test/util/InboxMock.sol @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity 0.8.16; + import "../../src/L1ArbitrumTimelock.sol"; contract InboxMock is IInboxSubmissionFee { diff --git a/yarn.lock b/yarn.lock index e775be4e..66dfca7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,14 +7,13 @@ resolved "https://registry.npmjs.org/@aduh95/viz.js/-/viz.js-3.7.0.tgz" integrity sha512-20Pk2Z98fbPLkECcrZSJszKos/OgtvJJR3NcbVfgCJ6EQjDNzW2P1BKqImOz3tJ952dvO2DWEhcLhQ1Wz1e9ng== -"@arbitrum/nitro-contracts@1.0.1": - version "1.0.1" - resolved "https://registry.npmjs.org/@arbitrum/nitro-contracts/-/nitro-contracts-1.0.1.tgz" - integrity sha512-gNbtcWM1QkLPYs4nxvC1RnoHqcg+uk6acs11C4XRcp77vC72izpQ1+4GqMVXV6viHCNquz8posG9rButW8nHFw== +"@arbitrum/nitro-contracts@1.0.3-beta.0": + version "1.0.3-beta.0" + resolved "https://registry.yarnpkg.com/@arbitrum/nitro-contracts/-/nitro-contracts-1.0.3-beta.0.tgz#ab6bb7bd2cef453b0d7748a7b13d1d04e62fd286" + integrity sha512-AjUSGSSL9V5cgxHFGVEfRugNnjJ1aCeJOHsedjWt25carFk9bf2eOQhclH92VcZticj7+NZM9aWVCI6fzfipvg== dependencies: "@openzeppelin/contracts" "4.5.0" "@openzeppelin/contracts-upgradeable" "4.5.2" - hardhat "^2.6.6" patch-package "^6.4.7" optionalDependencies: sol2uml "2.2.0"