Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
AIP1Point2ActionTest:testAction() (gas: 629328)
AIPNovaFeeRoutingActionTest:testAction() (gas: 3074)
ArbitrumDAOConstitutionTest:testConstructor() (gas: 259383)
ArbitrumDAOConstitutionTest:testMonOwnerCannotSetHash() (gas: 262836)
ArbitrumDAOConstitutionTest:testOwnerCanSetHash() (gas: 261148)
Expand Down Expand Up @@ -143,7 +144,7 @@ SecurityCouncilMemberElectionGovernorTest:testOnlyNomineeElectionGovernorCanProp
SecurityCouncilMemberElectionGovernorTest:testProperInitialization() (gas: 49388)
SecurityCouncilMemberElectionGovernorTest:testProposeReverts() (gas: 32916)
SecurityCouncilMemberElectionGovernorTest:testRelay() (gas: 42229)
SecurityCouncilMemberElectionGovernorTest:testSelectTopNominees(uint256) (runs: 256, μ: 340009, ~: 339543)
SecurityCouncilMemberElectionGovernorTest:testSelectTopNominees(uint256) (runs: 256, μ: 339999, ~: 339822)
SecurityCouncilMemberElectionGovernorTest:testSelectTopNomineesFails() (gas: 273335)
SecurityCouncilMemberElectionGovernorTest:testSetFullWeightDuration() (gas: 34951)
SecurityCouncilMemberElectionGovernorTest:testVotesToWeight() (gas: 152898)
Expand Down
24 changes: 24 additions & 0 deletions scripts/proposals/ArbOS31AIP/ArbOS31AIP.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"actionChainIds": [
1,
1,
42161,
42161,
42170,
42170,
42170
],
"actionAddresses": [
"0x19b715cF310C28C9020e53AAA11Ce9dF42E718b5",
"0x658AFc9d5Ec4476Fa6bb7033eA465F9901FBfF27",
"0xaF81C82Ec98f86D0017d78cD66F1026f1A5Cf1Db",
"0xb040b105A4a0C7a9CC290164AcCBC32855368322",
"0x6dD43360d2a69BB9FfFC5349F2511f2A3bCbC2da",
"0x61703Bf337341f2e09d96Dd6488c2907718A8E26",
"0x849E360a247132F961c9CBE95Ba39106c72e1268"
],
"arbSysSendTxToL1Args": {
"l1Timelock": "0xE6841D92B0C345144506576eC13ECf5103aC7f49",
"calldata": "0x8f2a0bb000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000000e13fb8241eb0e976305ff5f40d43d783c08468da55f38eee093510e004f512aa000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000000000000000000000070000000000000000000000003fffbadaf827559da092217e474760e2b2c3cedd0000000000000000000000003fffbadaf827559da092217e474760e2b2c3cedd000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005a0000000000000000000000000000000000000000000000000000000000000074000000000000000000000000000000000000000000000000000000000000008e000000000000000000000000000000000000000000000000000000000000000841cff79cd00000000000000000000000019b715cf310c28c9020e53aaa11ce9df42e718b500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000658afc9d5ec4476fa6bb7033ea465f9901fbff2700000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f000000000000000000000000cf57572261c7c2bcf21ffd220ea7d1a27d40a82700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000af81c82ec98f86d0017d78cd66f1026f1a5cf1db00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f000000000000000000000000cf57572261c7c2bcf21ffd220ea7d1a27d40a82700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000b040b105a4a0c7a9cc290164accbc3285536832200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a15394900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a748200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd0000000000000000000000006dd43360d2a69bb9fffc5349f2511f2a3bcbc2da00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a15394900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a748200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd00000000000000000000000061703bf337341f2e09d96dd6488c2907718a8e2600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a15394900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a748200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000849e360a247132f961c9cbe95ba39106c72e126800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
}
24 changes: 24 additions & 0 deletions scripts/proposals/ArbOS31AIP/generate.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# SetArbOS31VersionAction contracts may be redeployed with nonzero delay

# ArbOneAIPArbOS31UpgradeChallengeManagerAction: 0x19b715cF310C28C9020e53AAA11Ce9dF42E718b5 @ 1
# NovaAIPArbOS31UpgradeChallengeManagerAction: 0x658AFc9d5Ec4476Fa6bb7033eA465F9901FBfF27 @ 1

# SetArbOS31VersionAction: 0xaF81C82Ec98f86D0017d78cD66F1026f1A5Cf1Db @ 42161
# ArbOneAIPArbOS31AddWasmCacheManagerAction: 0xb040b105A4a0C7a9CC290164AcCBC32855368322 @ 42161

# SetArbOS31VersionAction: 0x6dD43360d2a69BB9FfFC5349F2511f2A3bCbC2da @ 42170
# NovaAIPArbOS31AddWasmCacheManagerAction: 0x61703Bf337341f2e09d96Dd6488c2907718A8E26 @ 42170
# AIPNovaFeeRoutingAction: 0x849E360a247132F961c9CBE95Ba39106c72e1268 @ 42170

yarn gen:proposalData --govChainProviderRPC https://arb1.arbitrum.io/rpc \
--actionChainIds \
1 1 \
42161 42161 \
42170 42170 42170 \
--actionAddresses \
0x19b715cF310C28C9020e53AAA11Ce9dF42E718b5 0x658AFc9d5Ec4476Fa6bb7033eA465F9901FBfF27 \
0xaF81C82Ec98f86D0017d78cD66F1026f1A5Cf1Db 0xb040b105A4a0C7a9CC290164AcCBC32855368322 \
0x6dD43360d2a69BB9FfFC5349F2511f2A3bCbC2da 0x61703Bf337341f2e09d96Dd6488c2907718A8E26 0x849E360a247132F961c9CBE95Ba39106c72e1268 \
--writeToJsonPath ./scripts/proposals/ArbOS31AIP/ArbOS31AIP.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.16;

import "./parent_contracts/AIPArbOS31AddWasmCacheManagerAction.sol";

/// @notice for deloployment on Arb One
contract ArbOneAIPArbOS31AddWasmCacheManagerAction is AIPArbOS31AddWasmCacheManagerAction {
constructor()
AIPArbOS31AddWasmCacheManagerAction(
0x51dEDBD2f190E0696AFbEE5E60bFdE96d86464ec, // wasm cache manager
31 // target arb os version
)
{}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.16;

import "./parent_contracts/AIPArbOS31UpgradeChallengeManagerAction.sol";
import "@arbitrum/nitro-contracts/src/osp/IOneStepProofEntry.sol";
import "../../address-registries/L1AddressRegistry.sol";
import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";

/// @notice for deloployment on L1 Ethereum
contract ArbOneAIPArbOS31UpgradeChallengeManagerAction is
AIPArbOS31UpgradeChallengeManagerAction
{
constructor()
AIPArbOS31UpgradeChallengeManagerAction(
L1AddressRegistry(0xd514C2b3aaBDBfa10800B9C96dc1eB25427520A0), // l1 address registry
0x260f5fa5c3176a856893642e149cf128b5a8de9f828afec8d11184415dd8dc69, // wasm module root
ProxyAdmin(0x554723262467F125Ac9e1cDFa9Ce15cc53822dbD), // l1 core proxy admin
0x914B7b3053B35B84A24df08D7c9ceBCaEA4E2948, // challenge manager impl
IOneStepProofEntry(0xa328BAF257A937b7934429a5d8458d98693C6FC7), // new osp
0x8b104a2e80ac6165dc58b9048de12f301d70b02a0ab51396c22b4b4b802a16a4, // cond root
IOneStepProofEntry(0x83fA8eD860514370fbcC5f04eA7969475F48CfEb) // cond osp
)
{}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.16;

import "./parent_contracts/AIPArbOS31AddWasmCacheManagerAction.sol";

/// @notice for deplpoyment on Nova
contract NovaAIPArbOS31AddWasmCacheManagerAction is AIPArbOS31AddWasmCacheManagerAction {
constructor()
AIPArbOS31AddWasmCacheManagerAction(
0x20586F83bF11a7cee0A550C53B9DC9A5887de1b7, // wasm cache manager
31 // target arb os version
)
{}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.16;

import "./parent_contracts/AIPArbOS31UpgradeChallengeManagerAction.sol";
import "@arbitrum/nitro-contracts/src/osp/IOneStepProofEntry.sol";
import "../../address-registries/L1AddressRegistry.sol";
import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";

/// @notice for deloployment on L1 Ethereum
contract NovaAIPArbOS31UpgradeChallengeManagerAction is AIPArbOS31UpgradeChallengeManagerAction {
constructor()
AIPArbOS31UpgradeChallengeManagerAction(
L1AddressRegistry(0x2F06643fc2CC18585Ae790b546388F0DE4Ec6635), // l1 address registry
0x260f5fa5c3176a856893642e149cf128b5a8de9f828afec8d11184415dd8dc69, // wasm module root
ProxyAdmin(0x71D78dC7cCC0e037e12de1E50f5470903ce37148), // l1 core proxy admin
0x914B7b3053B35B84A24df08D7c9ceBCaEA4E2948, // challenge manager impl
IOneStepProofEntry(0xa328BAF257A937b7934429a5d8458d98693C6FC7), // new osp
0x8b104a2e80ac6165dc58b9048de12f301d70b02a0ab51396c22b4b4b802a16a4, // cond root
IOneStepProofEntry(0x83fA8eD860514370fbcC5f04eA7969475F48CfEb) // cond osp
)
{}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.16;

import "../../arbos-upgrade/UpgradeArbOSVersionAtTimestampAction.sol";

/// @notice Sets the ArbOS version to 31. To be run on an arbitrum chain
/// @dev Identical copies of this contract to be deployed on Arb One and Nova for ArbOS31 upgrades
contract SetArbOS31VersionAction is UpgradeArbOSVersionAtTimestampAction {
constructor() UpgradeArbOSVersionAtTimestampAction(uint64(31), 1725382800) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.16;

import "@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol";

// ArbOwner interface will include addWasmCacheManager as of stylus upgrade
interface IUpdatedArbOwner {
function addWasmCacheManager(address manager) external;
}

// ArbWasmCache precompile interface
interface IArbWasmCache {
/// @notice See if the user is a cache manager.
function isCacheManager(address manager) external view returns (bool);
}

// @notice For deployment on an Arbitrum chain;
// adds wasm cache manager only when the stylus ArbOS upgrade activates.
// Should be called via retryable ticket so that if executed before the ArbOS upgrade,
// it reverts can be retried until the target ArbOS version number is active.
contract AIPArbOS31AddWasmCacheManagerAction {
// wasm cache manager to add
address public immutable wasmCachemanager;

// ArbOS version; use value as it's set and commonly used, NOT the value returned by
// ArbSys, which adds 55. E.g., the value here should be 31, not 85
uint256 public immutable targetArbOSVersion;

constructor(address _wasmCachemanager, uint256 _targetArbOSVersion) {
wasmCachemanager = _wasmCachemanager;
targetArbOSVersion = _targetArbOSVersion;
}

function perform() external {
// getter returns a value offset by 55: https://github.com/OffchainLabs/nitro/blob/a20a1c70cc11ac52c7cfe6a20f00c880c2009a8f/precompiles/ArbSys.go#L64
uint256 currentArbOsVersion =
ArbSys(0x0000000000000000000000000000000000000064).arbOSVersion() - 55;
// revert if target arbos version not reached; since this is executed by a retryable, can be re-executed until target version is reached
require(
targetArbOSVersion == currentArbOsVersion,
"AIPArbOS31AddWasmCacheManagerAction: ArbOS version"
);

IUpdatedArbOwner(0x0000000000000000000000000000000000000070).addWasmCacheManager(
wasmCachemanager
);

// verify:
require(
IArbWasmCache(0x0000000000000000000000000000000000000072).isCacheManager(
wasmCachemanager
),
"AIPArbOS31AddWasmCacheManagerAction: is cache manager"
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.16;

import "@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol";
import "@arbitrum/nitro-contracts/src/osp/IOneStepProofEntry.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
import "../../../address-registries/L1AddressRegistry.sol";

interface IChallengeManagerUpgradeInit {
function postUpgradeInit(IOneStepProofEntry osp_, bytes32 condRoot, IOneStepProofEntry condOsp)
external;
function osp() external returns (address);
}

// @notice set wasm module root and upgrade challenge manager for stylus ArbOS upgrade
contract AIPArbOS31UpgradeChallengeManagerAction {
L1AddressRegistry public immutable l1AddressRegistry;
bytes32 public immutable newWasmModuleRoot;
ProxyAdmin public immutable govProxyAdmin;
address public immutable newChallengeManagerImpl;
IOneStepProofEntry public immutable osp;
bytes32 public immutable condRoot;
IOneStepProofEntry public immutable condOsp;

constructor(
L1AddressRegistry _l1AddressRegistry,
bytes32 _newWasmModuleRoot,
ProxyAdmin _govProxyAdmin,
address _newChallengeManagerImpl,
IOneStepProofEntry _osp,
bytes32 _condRoot,
IOneStepProofEntry _condOsp
) {
require(
Address.isContract(address(_l1AddressRegistry)),
"AIPArbOS31UpgradeChallengeManagerAction: l1AddressRegistry is not a contract"
);
require(
Address.isContract(address(_govProxyAdmin)),
"AIPArbOS31UpgradeChallengeManagerAction: _govProxyAdmin is not a contract"
);
require(
Address.isContract(_newChallengeManagerImpl),
"AIPArbOS31UpgradeChallengeManagerAction: _newChallengeManagerImpl is not a contract"
);

require(
Address.isContract(address(_osp)),
"AIPArbOS31UpgradeChallengeManagerAction: _osp is not a contract"
);

require(
Address.isContract(address(_condOsp)),
"AIPArbOS31UpgradeChallengeManagerAction: _condOsp is not a contract"
);
l1AddressRegistry = _l1AddressRegistry;
newWasmModuleRoot = _newWasmModuleRoot;
govProxyAdmin = _govProxyAdmin;
newChallengeManagerImpl = _newChallengeManagerImpl;
osp = _osp;
condRoot = _condRoot;
condOsp = _condOsp;
}

function perform() external {
// set the new challenge manager impl
TransparentUpgradeableProxy challengeManager = TransparentUpgradeableProxy(
payable(address(l1AddressRegistry.rollup().challengeManager()))
);
govProxyAdmin.upgradeAndCall(
challengeManager,
newChallengeManagerImpl,
abi.encodeCall(IChallengeManagerUpgradeInit.postUpgradeInit, (osp, condRoot, condOsp))
);

// verify
require(
govProxyAdmin.getProxyImplementation(challengeManager) == newChallengeManagerImpl,
"AIPArbOS31UpgradeChallengeManagerAction: new challenge manager implementation set"
);
require(
IChallengeManagerUpgradeInit(address(challengeManager)).osp() == address(osp),
"AIPArbOS31UpgradeChallengeManagerAction: new OSP not set"
);

// set new wasm module root
IRollupCore rollup = l1AddressRegistry.rollup();
IRollupAdmin(address(rollup)).setWasmModuleRoot(newWasmModuleRoot);

// verify:
require(
rollup.wasmModuleRoot() == newWasmModuleRoot,
"AIPArbOS31UpgradeChallengeManagerAction: wasm module root not set"
);
}
}
Loading