diff --git a/README.md b/README.md index 19be645..bf5fe02 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,12 @@ This action schedule an upgrade of the ArbOS to a specific version at a specific Here is a list of common upgrade paths that can be used to upgrade the Orbit chains, beginning with the most recent upgrade. These instructions are duplicated from the docs on [How to upgrade ArbOS on your Orbit chain](https://docs.arbitrum.io/launch-orbit-chain/how-tos/arbos-upgrade), specifically Steps 1 through 3. Step 4 is mentioned below under "Other Actions". +### [ArbOS 51 Dia](https://docs.arbitrum.io/run-arbitrum-node/arbos-releases/arbos51) + +1. Upgrade your Nitro node(s) to [Nitro v3.9.3](https://github.com/OffchainLabs/nitro/releases/tag/v3.9.3) or higher +1. Update the wasm module root on the Rollup contract in the parent chain to `0x8a7513bf7bb3e3db04b0d982d0e973bcf57bf8b88aef7c6d03dba3a81a56a499`, following the instructions in [Set wasmModuleRoot](docs/arbos-upgrades/set-wasm-module-root/README.md) +1. Schedule the ArbOS 51 Dia upgrade using [ArbOS upgrade at timestamp action](scripts/foundry/arbos-upgrades/at-timestamp) + ### [ArbOS 40 Callisto](https://docs.arbitrum.io/run-arbitrum-node/arbos-releases/arbos40) 1. Upgrade your Nitro node(s) to [Nitro v3.6.5](https://github.com/OffchainLabs/nitro/releases/tag/v3.6.5) or higher diff --git a/docs/arbos-upgrades/set-wasm-module-root/README.md b/docs/arbos-upgrades/set-wasm-module-root/README.md new file mode 100644 index 0000000..5482643 --- /dev/null +++ b/docs/arbos-upgrades/set-wasm-module-root/README.md @@ -0,0 +1,35 @@ +# Set WasmModuleRoot + +This document shows how to update the wasmModuleRoot for existing Arbitrum chains, on the Rollup contract deployed on their parent chain, by using the `executeCall` method of the [UpgradeExecutor](https://github.com/OffchainLabs/upgrade-executor/blob/v1.1.1/src/UpgradeExecutor.sol#L73). + +## How to update the WasmModuleRoot of a chain + +1. Add the following env variables to a .env file placed in the project root: + + - `ROLLUP_ADDRESS`: address of the rollup contract of your chain + - `WASM_MODULE_ROOT`: new wasmModuleRoot to update the chain to + - `PARENT_UPGRADE_EXECUTOR_ADDRESS`: address of the UpgradeExecutor on the parent chain + - `PARENT_CHAIN_RPC`: RPC of the parent chain + +> [!CAUTION] +> The .env file must be in project root. + +2. Call the Rollup contract to update the wasmModuleRoot. In this case, we assume that there is an EOA which has executor rights on the parent chain's UpgradeExecutor. The upgrade can be executed using the `cast` CLI command (part of Foundry installation), using the account with executor rights on the parent chain UpgradeExecutor to send the transaction: + +```shell +(export $(cat .env | xargs) && cast send $PARENT_UPGRADE_EXECUTOR_ADDRESS "executeCall(address, bytes)" $ROLLUP_ADDRESS $(cast calldata "setWasmModuleRoot(bytes32)" $WASM_MODULE_ROOT) --rpc-url $PARENT_CHAIN_RPC) +# use --account XXX / --private-key XXX / --interactive / --ledger to set the account to send the transaction from +``` + +If you have a multisig as the executor, you can use the following command to create the payload for calling into the `PARENT_UPGRADE_EXECUTOR_ADDRESS`: + +```shell +(export $(cat .env | xargs) && cast calldata "executeCall(address, bytes)" $ROLLUP_ADDRESS $(cast calldata "setWasmModuleRoot(bytes32)" $WASM_MODULE_ROOT)) +``` + +3. That's it, the wasm module root should be updated. You can make sure it has successfully executed by checking: + +```shell +# Check the current wasm module root (should be the new wasm module root) +cast call --rpc-url $PARENT_CHAIN_RPC $ROLLUP_ADDRESS "wasmModuleRoot()(bytes32)" +```