Commit 66dbe4a8 authored by smartcontracts's avatar smartcontracts Committed by GitHub

feat(ctb): make L2OO addrs immutable (#4095)

Makes the L2OO proposer and challenger addresses immutable and gets rid
of the concept of ownership in the L2OO.
parent 91a80d28
This diff is collapsed.
...@@ -40,7 +40,7 @@ type DeployConfig struct { ...@@ -40,7 +40,7 @@ type DeployConfig struct {
L2OutputOracleSubmissionInterval uint64 `json:"l2OutputOracleSubmissionInterval"` L2OutputOracleSubmissionInterval uint64 `json:"l2OutputOracleSubmissionInterval"`
L2OutputOracleStartingTimestamp int `json:"l2OutputOracleStartingTimestamp"` L2OutputOracleStartingTimestamp int `json:"l2OutputOracleStartingTimestamp"`
L2OutputOracleProposer common.Address `json:"l2OutputOracleProposer"` L2OutputOracleProposer common.Address `json:"l2OutputOracleProposer"`
L2OutputOracleOwner common.Address `json:"l2OutputOracleOwner"` L2OutputOracleChallenger common.Address `json:"l2OutputOracleChallenger"`
SystemConfigOwner common.Address `json:"systemConfigOwner"` SystemConfigOwner common.Address `json:"systemConfigOwner"`
...@@ -141,8 +141,8 @@ func (d *DeployConfig) Check() error { ...@@ -141,8 +141,8 @@ func (d *DeployConfig) Check() error {
if d.L2OutputOracleProposer == (common.Address{}) { if d.L2OutputOracleProposer == (common.Address{}) {
return fmt.Errorf("%w: L2OutputOracleProposer cannot be address(0)", ErrInvalidDeployConfig) return fmt.Errorf("%w: L2OutputOracleProposer cannot be address(0)", ErrInvalidDeployConfig)
} }
if d.L2OutputOracleOwner == (common.Address{}) { if d.L2OutputOracleChallenger == (common.Address{}) {
return fmt.Errorf("%w: L2OutputOracleOwner cannot be address(0)", ErrInvalidDeployConfig) return fmt.Errorf("%w: L2OutputOracleChallenger cannot be address(0)", ErrInvalidDeployConfig)
} }
if d.SystemConfigOwner == (common.Address{}) { if d.SystemConfigOwner == (common.Address{}) {
return fmt.Errorf("%w: SystemConfigOwner cannot be address(0)", ErrInvalidDeployConfig) return fmt.Errorf("%w: SystemConfigOwner cannot be address(0)", ErrInvalidDeployConfig)
......
...@@ -104,8 +104,6 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) { ...@@ -104,8 +104,6 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) {
"initialize", "initialize",
big.NewInt(0), big.NewInt(0),
uint642Big(uint64(config.L1GenesisBlockTimestamp)), uint642Big(uint64(config.L1GenesisBlockTimestamp)),
config.L2OutputOracleProposer,
config.L2OutputOracleOwner,
) )
if err != nil { if err != nil {
return nil, err return nil, err
...@@ -280,7 +278,7 @@ func deployL1Contracts(config *DeployConfig, backend *backends.SimulatedBackend) ...@@ -280,7 +278,7 @@ func deployL1Contracts(config *DeployConfig, backend *backends.SimulatedBackend)
big.NewInt(0), big.NewInt(0),
uint642Big(uint64(config.L1GenesisBlockTimestamp)), uint642Big(uint64(config.L1GenesisBlockTimestamp)),
config.L2OutputOracleProposer, config.L2OutputOracleProposer,
config.L2OutputOracleOwner, config.L2OutputOracleChallenger,
}, },
}, },
{ {
......
...@@ -42,13 +42,13 @@ func TestBuildL1DeveloperGenesis(t *testing.T) { ...@@ -42,13 +42,13 @@ func TestBuildL1DeveloperGenesis(t *testing.T) {
portal, err := bindings.NewOptimismPortal(predeploys.DevOptimismPortalAddr, sim) portal, err := bindings.NewOptimismPortal(predeploys.DevOptimismPortalAddr, sim)
require.NoError(t, err) require.NoError(t, err)
proposer, err := oracle.Proposer(callOpts) proposer, err := oracle.PROPOSER(callOpts)
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, config.L2OutputOracleProposer, proposer) require.Equal(t, config.L2OutputOracleProposer, proposer)
owner, err := oracle.Owner(callOpts) owner, err := oracle.CHALLENGER(callOpts)
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, config.L2OutputOracleOwner, owner) require.Equal(t, config.L2OutputOracleChallenger, owner)
// Same set of tests as exist in the deployment scripts // Same set of tests as exist in the deployment scripts
interval, err := oracle.SUBMISSIONINTERVAL(callOpts) interval, err := oracle.SUBMISSIONINTERVAL(callOpts)
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"l2OutputOracleSubmissionInterval": 20, "l2OutputOracleSubmissionInterval": 20,
"l2OutputOracleStartingTimestamp": -1, "l2OutputOracleStartingTimestamp": -1,
"l2OutputOracleProposer": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", "l2OutputOracleProposer": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"l2OutputOracleOwner": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", "l2OutputOracleChallenger": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"l1BlockTime": 15, "l1BlockTime": 15,
"cliqueSignerAddress": "0xca062b0fd91172d89bcd4bb084ac4e21972cc467", "cliqueSignerAddress": "0xca062b0fd91172d89bcd4bb084ac4e21972cc467",
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"l2OutputOracleSubmissionInterval": 6, "l2OutputOracleSubmissionInterval": 6,
"l2OutputOracleStartingTimestamp": -1, "l2OutputOracleStartingTimestamp": -1,
"l2OutputOracleProposer": "0x7770000000000000000000000000000000000001", "l2OutputOracleProposer": "0x7770000000000000000000000000000000000001",
"l2OutputOracleOwner": "0x7770000000000000000000000000000000000002", "l2OutputOracleChallenger": "0x7770000000000000000000000000000000000002",
"systemConfigOwner": "0x7770000000000000000000000000000000000003", "systemConfigOwner": "0x7770000000000000000000000000000000000003",
"l1BlockTime": 15, "l1BlockTime": 15,
"l1GenesisBlockNonce": "0x0", "l1GenesisBlockNonce": "0x0",
......
...@@ -69,7 +69,7 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams { ...@@ -69,7 +69,7 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams {
L2OutputOracleSubmissionInterval: 6, L2OutputOracleSubmissionInterval: 6,
L2OutputOracleStartingTimestamp: -1, L2OutputOracleStartingTimestamp: -1,
L2OutputOracleProposer: addresses.Proposer, L2OutputOracleProposer: addresses.Proposer,
L2OutputOracleOwner: common.Address{}, // tbd L2OutputOracleChallenger: common.Address{}, // tbd
SystemConfigOwner: addresses.SysCfgOwner, SystemConfigOwner: addresses.SysCfgOwner,
...@@ -264,7 +264,7 @@ func ForkedDeployConfig(t require.TestingT, mnemonicCfg *MnemonicConfig, startBl ...@@ -264,7 +264,7 @@ func ForkedDeployConfig(t require.TestingT, mnemonicCfg *MnemonicConfig, startBl
L2OutputOracleSubmissionInterval: 10, L2OutputOracleSubmissionInterval: 10,
L2OutputOracleStartingTimestamp: int(startBlock.Time()), L2OutputOracleStartingTimestamp: int(startBlock.Time()),
L2OutputOracleProposer: addrs.Proposer, L2OutputOracleProposer: addrs.Proposer,
L2OutputOracleOwner: addrs.Deployer, L2OutputOracleChallenger: addrs.Deployer,
L2GenesisBlockCoinbase: common.HexToAddress("0x42000000000000000000000000000000000000f0"), L2GenesisBlockCoinbase: common.HexToAddress("0x42000000000000000000000000000000000000f0"),
L2GenesisBlockGasLimit: hexutil.Uint64(15_000_000), L2GenesisBlockGasLimit: hexutil.Uint64(15_000_000),
// taken from devnet, need to check this // taken from devnet, need to check this
......
...@@ -62,7 +62,7 @@ func DefaultSystemConfig(t *testing.T) SystemConfig { ...@@ -62,7 +62,7 @@ func DefaultSystemConfig(t *testing.T) SystemConfig {
L2OutputOracleSubmissionInterval: 4, L2OutputOracleSubmissionInterval: 4,
L2OutputOracleStartingTimestamp: -1, L2OutputOracleStartingTimestamp: -1,
L2OutputOracleProposer: addresses.Proposer, L2OutputOracleProposer: addresses.Proposer,
L2OutputOracleOwner: common.Address{}, // tbd L2OutputOracleChallenger: common.Address{}, // tbd
SystemConfigOwner: addresses.SysCfgOwner, SystemConfigOwner: addresses.SysCfgOwner,
......
...@@ -5,7 +5,7 @@ GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_1() (gas: 1122 ...@@ -5,7 +5,7 @@ GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_1() (gas: 1122
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_0() (gas: 348176) GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_0() (gas: 348176)
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_1() (gas: 112253) GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_1() (gas: 112253)
GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (gas: 40502) GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (gas: 40502)
GasBenchMark_L2OutputOracle:test_proposeL2Output_benchmark() (gas: 72829) GasBenchMark_L2OutputOracle:test_proposeL2Output_benchmark() (gas: 70685)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark() (gas: 74956) GasBenchMark_OptimismPortal:test_depositTransaction_benchmark() (gas: 74956)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 35693) GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 35693)
CrossDomainMessenger_Test:testFuzz_baseGas(uint32) (runs: 256, μ: 20196, ~: 20196) CrossDomainMessenger_Test:testFuzz_baseGas(uint32) (runs: 256, μ: 20196, ~: 20196)
...@@ -85,30 +85,28 @@ L2CrossDomainMessenger_Test:test_L2MessengerSendMessage() (gas: 122423) ...@@ -85,30 +85,28 @@ L2CrossDomainMessenger_Test:test_L2MessengerSendMessage() (gas: 122423)
L2CrossDomainMessenger_Test:test_L2MessengerTwiceSendMessage() (gas: 134632) L2CrossDomainMessenger_Test:test_L2MessengerTwiceSendMessage() (gas: 134632)
L2CrossDomainMessenger_Test:test_L2MessengerXDomainSenderReverts() (gas: 10568) L2CrossDomainMessenger_Test:test_L2MessengerXDomainSenderReverts() (gas: 10568)
L2CrossDomainMessenger_Test:test_L2MessengerxDomainMessageSenderResets() (gas: 52615) L2CrossDomainMessenger_Test:test_L2MessengerxDomainMessageSenderResets() (gas: 52615)
L2OutputOracleTest:testCannot_ProposeWithUnmatchedBlockhash() (gas: 31194) L2OutputOracleTest:testCannot_ProposeWithUnmatchedBlockhash() (gas: 29072)
L2OutputOracleTest:testCannot_constructWithBadTimestamp() (gas: 70886) L2OutputOracleTest:testCannot_constructWithBadTimestamp() (gas: 70566)
L2OutputOracleTest:testCannot_deleteL2Outputs_afterLatest() (gas: 199838) L2OutputOracleTest:testCannot_deleteL2Outputs_afterLatest() (gas: 195025)
L2OutputOracleTest:testCannot_deleteL2Outputs_ifNotOwner() (gas: 18871) L2OutputOracleTest:testCannot_deleteL2Outputs_ifNotChallenger() (gas: 16716)
L2OutputOracleTest:testCannot_deleteL2Outputs_nonExistent() (gas: 91129) L2OutputOracleTest:testCannot_deleteL2Outputs_nonExistent() (gas: 86795)
L2OutputOracleTest:testCannot_proposeEmptyOutput() (gas: 28503) L2OutputOracleTest:testCannot_proposeEmptyOutput() (gas: 26359)
L2OutputOracleTest:testCannot_proposeFutureTimetamp() (gas: 30461) L2OutputOracleTest:testCannot_proposeFutureTimetamp() (gas: 28316)
L2OutputOracleTest:testCannot_proposeL2OutputIfNotProposer() (gas: 27724) L2OutputOracleTest:testCannot_proposeL2Output_ifNotProposer() (gas: 25601)
L2OutputOracleTest:testCannot_proposeOnWrongFork() (gas: 30789) L2OutputOracleTest:testCannot_proposeOnWrongFork() (gas: 28645)
L2OutputOracleTest:testCannot_proposeUnexpectedBlockNumber() (gas: 30164) L2OutputOracleTest:testCannot_proposeUnexpectedBlockNumber() (gas: 28020)
L2OutputOracleTest:test_changeProposer() (gas: 47223)
L2OutputOracleTest:test_computeL2Timestamp() (gas: 37163) L2OutputOracleTest:test_computeL2Timestamp() (gas: 37163)
L2OutputOracleTest:test_constructor() (gas: 39324) L2OutputOracleTest:test_constructor() (gas: 33592)
L2OutputOracleTest:test_deleteOutputs_multipleOutputs() (gas: 262835) L2OutputOracleTest:test_deleteOutputs_multipleOutputs() (gas: 258025)
L2OutputOracleTest:test_deleteOutputs_singleOutput() (gas: 152682) L2OutputOracleTest:test_deleteOutputs_singleOutput() (gas: 148182)
L2OutputOracleTest:test_getL2Output() (gas: 89261) L2OutputOracleTest:test_getL2Output() (gas: 87205)
L2OutputOracleTest:test_latestBlockNumber() (gas: 80647) L2OutputOracleTest:test_latestBlockNumber() (gas: 78460)
L2OutputOracleTest:test_nextBlockNumber() (gas: 15187) L2OutputOracleTest:test_nextBlockNumber() (gas: 15143)
L2OutputOracleTest:test_proposeWithBlockhashAndHeight() (gas: 79453) L2OutputOracleTest:test_proposeWithBlockhashAndHeight() (gas: 77309)
L2OutputOracleTest:test_proposingAnotherOutput() (gas: 81255) L2OutputOracleTest:test_proposingAnotherOutput() (gas: 79089)
L2OutputOracleTest:test_updateOwner() (gas: 36063) L2OutputOracleUpgradeable_Test:test_cannotInitImpl() (gas: 15171)
L2OutputOracleUpgradeable_Test:test_cannotInitImpl() (gas: 19546) L2OutputOracleUpgradeable_Test:test_cannotInitProxy() (gas: 20152)
L2OutputOracleUpgradeable_Test:test_cannotInitProxy() (gas: 24523) L2OutputOracleUpgradeable_Test:test_initValuesOnProxy() (gas: 26095)
L2OutputOracleUpgradeable_Test:test_initValuesOnProxy() (gas: 30297)
L2OutputOracleUpgradeable_Test:test_upgrading() (gas: 180457) L2OutputOracleUpgradeable_Test:test_upgrading() (gas: 180457)
L2StandardBridge_Test:test_cannotWithdrawEthWithoutSendingIt() (gas: 21749) L2StandardBridge_Test:test_cannotWithdrawEthWithoutSendingIt() (gas: 21749)
L2StandardBridge_Test:test_finalizeBridgeETH_incorrectValueReverts() (gas: 23733) L2StandardBridge_Test:test_finalizeBridgeETH_incorrectValueReverts() (gas: 23733)
...@@ -150,23 +148,23 @@ OptimismPortalUpgradeable_Test:test_initialize_cannotInitImpl_reverts() (gas: 10 ...@@ -150,23 +148,23 @@ OptimismPortalUpgradeable_Test:test_initialize_cannotInitImpl_reverts() (gas: 10
OptimismPortalUpgradeable_Test:test_initialize_cannotInitProxy_reverts() (gas: 15767) OptimismPortalUpgradeable_Test:test_initialize_cannotInitProxy_reverts() (gas: 15767)
OptimismPortalUpgradeable_Test:test_params_initValuesOnProxy_success() (gas: 16010) OptimismPortalUpgradeable_Test:test_params_initValuesOnProxy_success() (gas: 16010)
OptimismPortalUpgradeable_Test:test_upgradeToAndCall_upgrading_success() (gas: 180435) OptimismPortalUpgradeable_Test:test_upgradeToAndCall_upgrading_success() (gas: 180435)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputRootChanges_reverts() (gas: 199367) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputRootChanges_reverts() (gas: 199455)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputTimestampIsNotFinalized_reverts() (gas: 201567) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputTimestampIsNotFinalized_reverts() (gas: 201655)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalNotProven_reverts() (gas: 39634) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalNotProven_reverts() (gas: 39634)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalProofNotOldEnough_reverts() (gas: 197043) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalProofNotOldEnough_reverts() (gas: 197131)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onInsufficientGas_reverts() (gas: 195266) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onInsufficientGas_reverts() (gas: 195340)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onRecentWithdrawal_reverts() (gas: 175309) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onRecentWithdrawal_reverts() (gas: 175375)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onReentrancy_reverts() (gas: 235543) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onReentrancy_reverts() (gas: 235617)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onReplay_reverts() (gas: 239675) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_onReplay_reverts() (gas: 239873)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_provenWithdrawalHash_success() (gas: 231454) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_provenWithdrawalHash_success() (gas: 231564)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_targetFails_fails() (gas: 334069) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_targetFails_fails() (gas: 334179)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_timestampLessThanL2OracleStart_reverts() (gas: 195723) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_timestampLessThanL2OracleStart_reverts() (gas: 195745)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_onInvalidOutputRootProof_reverts() (gas: 85495) OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_onInvalidOutputRootProof_reverts() (gas: 85517)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_onSelfCall_reverts() (gas: 50754) OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_onSelfCall_reverts() (gas: 50754)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_oninvalidWithdrawalProof_reverts() (gas: 138753) OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_oninvalidWithdrawalProof_reverts() (gas: 138775)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_replayProveChangedOutputRoot_success() (gas: 279048) OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_replayProveChangedOutputRoot_success() (gas: 279092)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_replayProve_reverts() (gas: 191110) OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_replayProve_reverts() (gas: 191154)
OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_validWithdrawalProof_success() (gas: 181320) OptimismPortal_FinalizeWithdrawal_Test:test_proveWithdrawalTransaction_validWithdrawalProof_success() (gas: 181342)
OptimismPortal_Test:test_OptimismPortalConstructor() (gas: 17298) OptimismPortal_Test:test_OptimismPortalConstructor() (gas: 17298)
OptimismPortal_Test:test_OptimismPortalReceiveEth_success() (gas: 127483) OptimismPortal_Test:test_OptimismPortalReceiveEth_success() (gas: 127483)
OptimismPortal_Test:test_depositTransaction_NoValueContract_success() (gas: 76706) OptimismPortal_Test:test_depositTransaction_NoValueContract_success() (gas: 76706)
...@@ -178,7 +176,7 @@ OptimismPortal_Test:test_depositTransaction_withEthValueAndContractContractCreat ...@@ -178,7 +176,7 @@ OptimismPortal_Test:test_depositTransaction_withEthValueAndContractContractCreat
OptimismPortal_Test:test_depositTransaction_withEthValueAndEOAContractCreation_success() (gas: 75852) OptimismPortal_Test:test_depositTransaction_withEthValueAndEOAContractCreation_success() (gas: 75852)
OptimismPortal_Test:test_depositTransaction_withEthValueFromContract_success() (gas: 83370) OptimismPortal_Test:test_depositTransaction_withEthValueFromContract_success() (gas: 83370)
OptimismPortal_Test:test_depositTransaction_withEthValueFromEOA_success() (gas: 83964) OptimismPortal_Test:test_depositTransaction_withEthValueFromEOA_success() (gas: 83964)
OptimismPortal_Test:test_isBlockFinalized_success() (gas: 109644) OptimismPortal_Test:test_isBlockFinalized_success() (gas: 107478)
OptimismPortal_Test:test_simple_isBlockFinalized_success() (gas: 24142) OptimismPortal_Test:test_simple_isBlockFinalized_success() (gas: 24142)
Proxy_Test:test_clashingFunctionSignatures() (gas: 101347) Proxy_Test:test_clashingFunctionSignatures() (gas: 101347)
Proxy_Test:test_implementationKey() (gas: 20887) Proxy_Test:test_implementationKey() (gas: 20887)
......
...@@ -71,21 +71,13 @@ ...@@ -71,21 +71,13 @@
|---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------| |---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------|
| _initializing | bool | 0 | 1 | 1 | contracts/L1/L2OutputOracle.sol:L2OutputOracle | | _initializing | bool | 0 | 1 | 1 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------| |---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------|
| __gap | uint256[50] | 1 | 0 | 1600 | contracts/L1/L2OutputOracle.sol:L2OutputOracle | | startingBlockNumber | uint256 | 1 | 0 | 32 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------| |---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------|
| _owner | address | 51 | 0 | 20 | contracts/L1/L2OutputOracle.sol:L2OutputOracle | | startingTimestamp | uint256 | 2 | 0 | 32 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------| |---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------|
| __gap | uint256[49] | 52 | 0 | 1568 | contracts/L1/L2OutputOracle.sol:L2OutputOracle | | latestBlockNumber | uint256 | 3 | 0 | 32 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------| |---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------|
| startingBlockNumber | uint256 | 101 | 0 | 32 | contracts/L1/L2OutputOracle.sol:L2OutputOracle | | l2Outputs | mapping(uint256 => struct Types.OutputProposal) | 4 | 0 | 32 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------|
| startingTimestamp | uint256 | 102 | 0 | 32 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------|
| proposer | address | 103 | 0 | 20 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------|
| latestBlockNumber | uint256 | 104 | 0 | 32 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
|---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------|
| l2Outputs | mapping(uint256 => struct Types.OutputProposal) | 105 | 0 | 32 | contracts/L1/L2OutputOracle.sol:L2OutputOracle |
+---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------+ +---------------------+-------------------------------------------------+------+--------+-------+------------------------------------------------+
======================= =======================
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity 0.8.15; pragma solidity 0.8.15;
import { import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
OwnableUpgradeable
} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import { Semver } from "../universal/Semver.sol"; import { Semver } from "../universal/Semver.sol";
import { Types } from "../libraries/Types.sol"; import { Types } from "../libraries/Types.sol";
...@@ -15,7 +13,7 @@ import { Types } from "../libraries/Types.sol"; ...@@ -15,7 +13,7 @@ import { Types } from "../libraries/Types.sol";
* This contract should be deployed behind an upgradable proxy * This contract should be deployed behind an upgradable proxy
*/ */
// slither-disable-next-line locked-ether // slither-disable-next-line locked-ether
contract L2OutputOracle is OwnableUpgradeable, Semver { contract L2OutputOracle is Initializable, Semver {
/** /**
* @notice The interval in L2 blocks at which checkpoints must be submitted. * @notice The interval in L2 blocks at which checkpoints must be submitted.
*/ */
...@@ -26,6 +24,16 @@ contract L2OutputOracle is OwnableUpgradeable, Semver { ...@@ -26,6 +24,16 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
*/ */
uint256 public immutable L2_BLOCK_TIME; uint256 public immutable L2_BLOCK_TIME;
/**
* @notice The address of the challenger. Can be updated via upgrade.
*/
address public immutable CHALLENGER;
/**
* @notice The address of the proposer. Can be updated via upgrade.
*/
address public immutable PROPOSER;
/** /**
* @notice The number of the first L2 block recorded in this contract. * @notice The number of the first L2 block recorded in this contract.
*/ */
...@@ -36,11 +44,6 @@ contract L2OutputOracle is OwnableUpgradeable, Semver { ...@@ -36,11 +44,6 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
*/ */
uint256 public startingTimestamp; uint256 public startingTimestamp;
/**
* @notice The address of the proposer;
*/
address public proposer;
/** /**
* @notice The number of the most recent L2 block recorded in this contract. * @notice The number of the most recent L2 block recorded in this contract.
*/ */
...@@ -73,22 +76,6 @@ contract L2OutputOracle is OwnableUpgradeable, Semver { ...@@ -73,22 +76,6 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
*/ */
event OutputsDeleted(uint256 indexed l2BlockNumber); event OutputsDeleted(uint256 indexed l2BlockNumber);
/**
* @notice Emitted when the proposer address is changed.
*
* @param previousProposer The previous proposer address.
* @param newProposer The new proposer address.
*/
event ProposerChanged(address indexed previousProposer, address indexed newProposer);
/**
* @notice Reverts if called by any account other than the proposer.
*/
modifier onlyProposer() {
require(proposer == msg.sender, "L2OutputOracle: function can only be called by proposer");
_;
}
/** /**
* @custom:semver 0.0.1 * @custom:semver 0.0.1
* *
...@@ -97,7 +84,7 @@ contract L2OutputOracle is OwnableUpgradeable, Semver { ...@@ -97,7 +84,7 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
* @param _startingBlockNumber The number of the first L2 block. * @param _startingBlockNumber The number of the first L2 block.
* @param _startingTimestamp The timestamp of the first L2 block. * @param _startingTimestamp The timestamp of the first L2 block.
* @param _proposer The address of the proposer. * @param _proposer The address of the proposer.
* @param _owner The address of the owner. * @param _challenger The address of the challenger.
*/ */
constructor( constructor(
uint256 _submissionInterval, uint256 _submissionInterval,
...@@ -105,12 +92,14 @@ contract L2OutputOracle is OwnableUpgradeable, Semver { ...@@ -105,12 +92,14 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
uint256 _startingBlockNumber, uint256 _startingBlockNumber,
uint256 _startingTimestamp, uint256 _startingTimestamp,
address _proposer, address _proposer,
address _owner address _challenger
) Semver(0, 0, 1) { ) Semver(0, 0, 1) {
SUBMISSION_INTERVAL = _submissionInterval; SUBMISSION_INTERVAL = _submissionInterval;
L2_BLOCK_TIME = _l2BlockTime; L2_BLOCK_TIME = _l2BlockTime;
PROPOSER = _proposer;
CHALLENGER = _challenger;
initialize(_startingBlockNumber, _startingTimestamp, _proposer, _owner); initialize(_startingBlockNumber, _startingTimestamp);
} }
/** /**
...@@ -118,15 +107,11 @@ contract L2OutputOracle is OwnableUpgradeable, Semver { ...@@ -118,15 +107,11 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
* *
* @param _startingBlockNumber Block number for the first recoded L2 block. * @param _startingBlockNumber Block number for the first recoded L2 block.
* @param _startingTimestamp Timestamp for the first recoded L2 block. * @param _startingTimestamp Timestamp for the first recoded L2 block.
* @param _proposer The address of the proposer.
* @param _owner The address of the owner.
*/ */
function initialize( function initialize(uint256 _startingBlockNumber, uint256 _startingTimestamp)
uint256 _startingBlockNumber, public
uint256 _startingTimestamp, initializer
address _proposer, {
address _owner
) public initializer {
require( require(
_startingTimestamp <= block.timestamp, _startingTimestamp <= block.timestamp,
"L2OutputOracle: starting L2 timestamp must be less than current time" "L2OutputOracle: starting L2 timestamp must be less than current time"
...@@ -135,21 +120,21 @@ contract L2OutputOracle is OwnableUpgradeable, Semver { ...@@ -135,21 +120,21 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
startingTimestamp = _startingTimestamp; startingTimestamp = _startingTimestamp;
startingBlockNumber = _startingBlockNumber; startingBlockNumber = _startingBlockNumber;
latestBlockNumber = _startingBlockNumber; latestBlockNumber = _startingBlockNumber;
__Ownable_init();
changeProposer(_proposer);
_transferOwnership(_owner);
} }
/** /**
* @notice Deletes all output proposals after and including the proposal that corresponds to * @notice Deletes all output proposals after and including the proposal that corresponds to
* the given block number. Can only be called by the owner, but will be replaced with * the given block number. Only the challenger address can delete outputs.
* a mechanism that allows a challenger contract to delete proposals.
* *
* @param _l2BlockNumber L2 block number of the first output root to delete. * @param _l2BlockNumber L2 block number of the first output root to delete.
*/ */
// solhint-disable-next-line ordering // solhint-disable-next-line ordering
function deleteL2Outputs(uint256 _l2BlockNumber) external onlyOwner { function deleteL2Outputs(uint256 _l2BlockNumber) external {
require(
msg.sender == CHALLENGER,
"L2OutputOracle: only the challenger address can delete outputs"
);
// Simple check that accomplishes two things: // Simple check that accomplishes two things:
// 1. Prevents deleting anything before (and including) the starting block. // 1. Prevents deleting anything before (and including) the starting block.
// 2. Prevents deleting anything other than a checkpoint block. // 2. Prevents deleting anything other than a checkpoint block.
...@@ -188,7 +173,12 @@ contract L2OutputOracle is OwnableUpgradeable, Semver { ...@@ -188,7 +173,12 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
uint256 _l2BlockNumber, uint256 _l2BlockNumber,
bytes32 _l1Blockhash, bytes32 _l1Blockhash,
uint256 _l1BlockNumber uint256 _l1BlockNumber
) external payable onlyProposer { ) external payable {
require(
msg.sender == PROPOSER,
"L2OutputOracle: only the proposer address can propose new outputs"
);
require( require(
_l2BlockNumber == nextBlockNumber(), _l2BlockNumber == nextBlockNumber(),
"L2OutputOracle: block number must be equal to next expected block number" "L2OutputOracle: block number must be equal to next expected block number"
...@@ -262,19 +252,6 @@ contract L2OutputOracle is OwnableUpgradeable, Semver { ...@@ -262,19 +252,6 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
return output; return output;
} }
/**
* @notice Allows the owner to change the proposer address.
*
* @param _proposer New proposer address.
*/
function changeProposer(address _proposer) public onlyOwner {
require(_proposer != address(0), "L2OutputOracle: new proposer cannot be the zero address");
emit ProposerChanged(proposer, _proposer);
proposer = _proposer;
}
/** /**
* @notice Computes the block number of the next L2 block that needs to be checkpointed. * @notice Computes the block number of the next L2 block that needs to be checkpointed.
*/ */
......
...@@ -55,14 +55,6 @@ contract BaseSystemDictator is Ownable { ...@@ -55,14 +55,6 @@ contract BaseSystemDictator is Ownable {
SystemConfig systemConfigImpl; SystemConfig systemConfigImpl;
} }
/**
* @notice Fixed L2OutputOracle config.
*/
struct L2OutputOracleConfig {
address l2OutputOracleProposer;
address l2OutputOracleOwner;
}
/** /**
* @notice Dynamic L2OutputOracle config. * @notice Dynamic L2OutputOracle config.
*/ */
...@@ -89,7 +81,6 @@ contract BaseSystemDictator is Ownable { ...@@ -89,7 +81,6 @@ contract BaseSystemDictator is Ownable {
GlobalConfig globalConfig; GlobalConfig globalConfig;
ProxyAddressConfig proxyAddressConfig; ProxyAddressConfig proxyAddressConfig;
ImplementationAddressConfig implementationAddressConfig; ImplementationAddressConfig implementationAddressConfig;
L2OutputOracleConfig l2OutputOracleConfig;
SystemConfigConfig systemConfigConfig; SystemConfigConfig systemConfigConfig;
} }
......
...@@ -157,9 +157,7 @@ contract MigrationSystemDictator is BaseSystemDictator { ...@@ -157,9 +157,7 @@ contract MigrationSystemDictator is BaseSystemDictator {
L2OutputOracle.initialize, L2OutputOracle.initialize,
( (
l2OutputOracleDynamicConfig.l2OutputOracleStartingBlockNumber, l2OutputOracleDynamicConfig.l2OutputOracleStartingBlockNumber,
l2OutputOracleDynamicConfig.l2OutputOracleStartingTimestamp, l2OutputOracleDynamicConfig.l2OutputOracleStartingTimestamp
config.l2OutputOracleConfig.l2OutputOracleProposer,
config.l2OutputOracleConfig.l2OutputOracleOwner
) )
) )
); );
......
...@@ -131,7 +131,7 @@ contract L2OutputOracle_Initializer is CommonTest { ...@@ -131,7 +131,7 @@ contract L2OutputOracle_Initializer is CommonTest {
address(oracleImpl), address(oracleImpl),
abi.encodeCall( abi.encodeCall(
L2OutputOracle.initialize, L2OutputOracle.initialize,
(startingBlockNumber, startingTimestamp, proposer, owner) (startingBlockNumber, startingTimestamp)
) )
); );
oracle = L2OutputOracle(address(proxy)); oracle = L2OutputOracle(address(proxy));
......
...@@ -15,13 +15,12 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer { ...@@ -15,13 +15,12 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer {
} }
function test_constructor() external { function test_constructor() external {
assertEq(oracle.owner(), owner); assertEq(oracle.PROPOSER(), proposer);
assertEq(oracle.CHALLENGER(), owner);
assertEq(oracle.SUBMISSION_INTERVAL(), submissionInterval); assertEq(oracle.SUBMISSION_INTERVAL(), submissionInterval);
assertEq(oracle.latestBlockNumber(), startingBlockNumber); assertEq(oracle.latestBlockNumber(), startingBlockNumber);
assertEq(oracle.startingBlockNumber(), startingBlockNumber); assertEq(oracle.startingBlockNumber(), startingBlockNumber);
assertEq(oracle.startingTimestamp(), startingTimestamp); assertEq(oracle.startingTimestamp(), startingTimestamp);
assertEq(oracle.proposer(), proposer);
assertEq(oracle.owner(), owner);
} }
function testCannot_constructWithBadTimestamp() external { function testCannot_constructWithBadTimestamp() external {
...@@ -111,47 +110,6 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer { ...@@ -111,47 +110,6 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer {
); );
} }
/*******************
* Ownership tests *
*******************/
event ProposerChanged(address indexed previousProposer, address indexed newProposer);
function test_changeProposer() public {
address newProposer = address(20);
vm.expectRevert("Ownable: caller is not the owner");
oracle.changeProposer(newProposer);
vm.startPrank(owner);
vm.expectRevert("L2OutputOracle: new proposer cannot be the zero address");
oracle.changeProposer(address(0));
// Double check proposer has not changed.
assertEq(proposer, oracle.proposer());
vm.expectEmit(true, true, true, true);
emit ProposerChanged(proposer, newProposer);
oracle.changeProposer(newProposer);
vm.stopPrank();
}
event OwnershipTransferred(address indexed, address indexed);
function test_updateOwner() public {
address newOwner = address(21);
vm.expectRevert("Ownable: caller is not the owner");
oracle.transferOwnership(newOwner);
// Double check owner has not changed.
assertEq(owner, oracle.owner());
vm.startPrank(owner);
vm.expectEmit(true, true, true, true);
emit OwnershipTransferred(owner, newOwner);
oracle.transferOwnership(newOwner);
assertEq(newOwner, oracle.owner());
vm.stopPrank();
}
/***************************** /*****************************
* Propose Tests - Happy Path * * Propose Tests - Happy Path *
*****************************/ *****************************/
...@@ -190,12 +148,12 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer { ...@@ -190,12 +148,12 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer {
***************************/ ***************************/
// Test: proposeL2Output fails if called by a party that is not the proposer. // Test: proposeL2Output fails if called by a party that is not the proposer.
function testCannot_proposeL2OutputIfNotProposer() external { function testCannot_proposeL2Output_ifNotProposer() external {
uint256 nextBlockNumber = oracle.nextBlockNumber(); uint256 nextBlockNumber = oracle.nextBlockNumber();
warpToProposeTime(nextBlockNumber); warpToProposeTime(nextBlockNumber);
vm.prank(address(128)); vm.prank(address(128));
vm.expectRevert("L2OutputOracle: function can only be called by proposer"); vm.expectRevert("L2OutputOracle: only the proposer address can propose new outputs");
oracle.proposeL2Output(nonZeroHash, nextBlockNumber, 0, 0); oracle.proposeL2Output(nonZeroHash, nextBlockNumber, 0, 0);
} }
...@@ -322,10 +280,10 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer { ...@@ -322,10 +280,10 @@ contract L2OutputOracleTest is L2OutputOracle_Initializer {
* Delete Tests - Sad Path * * Delete Tests - Sad Path *
***************************/ ***************************/
function testCannot_deleteL2Outputs_ifNotOwner() external { function testCannot_deleteL2Outputs_ifNotChallenger() external {
uint256 latestBlockNumber = oracle.latestBlockNumber(); uint256 latestBlockNumber = oracle.latestBlockNumber();
vm.expectRevert("Ownable: caller is not the owner"); vm.expectRevert("L2OutputOracle: only the challenger address can delete outputs");
oracle.deleteL2Outputs(latestBlockNumber); oracle.deleteL2Outputs(latestBlockNumber);
} }
...@@ -371,17 +329,15 @@ contract L2OutputOracleUpgradeable_Test is L2OutputOracle_Initializer { ...@@ -371,17 +329,15 @@ contract L2OutputOracleUpgradeable_Test is L2OutputOracle_Initializer {
assertEq(startingBlockNumber, oracleImpl.startingBlockNumber()); assertEq(startingBlockNumber, oracleImpl.startingBlockNumber());
assertEq(startingTimestamp, oracleImpl.startingTimestamp()); assertEq(startingTimestamp, oracleImpl.startingTimestamp());
assertEq(proposer, oracleImpl.proposer()); assertEq(proposer, oracleImpl.PROPOSER());
assertEq(owner, oracleImpl.owner()); assertEq(owner, oracleImpl.CHALLENGER());
} }
function test_cannotInitProxy() external { function test_cannotInitProxy() external {
vm.expectRevert("Initializable: contract is already initialized"); vm.expectRevert("Initializable: contract is already initialized");
L2OutputOracle(payable(proxy)).initialize( L2OutputOracle(payable(proxy)).initialize(
startingBlockNumber, startingBlockNumber,
startingTimestamp, startingTimestamp
proposer,
owner
); );
} }
...@@ -389,9 +345,7 @@ contract L2OutputOracleUpgradeable_Test is L2OutputOracle_Initializer { ...@@ -389,9 +345,7 @@ contract L2OutputOracleUpgradeable_Test is L2OutputOracle_Initializer {
vm.expectRevert("Initializable: contract is already initialized"); vm.expectRevert("Initializable: contract is already initialized");
L2OutputOracle(oracleImpl).initialize( L2OutputOracle(oracleImpl).initialize(
startingBlockNumber, startingBlockNumber,
startingTimestamp, startingTimestamp
proposer,
owner
); );
} }
......
...@@ -233,7 +233,7 @@ contract OptimismPortal_Test is Portal_Initializer { ...@@ -233,7 +233,7 @@ contract OptimismPortal_Test is Portal_Initializer {
uint256 checkpoint = oracle.nextBlockNumber(); uint256 checkpoint = oracle.nextBlockNumber();
vm.roll(checkpoint); vm.roll(checkpoint);
vm.warp(oracle.computeL2Timestamp(checkpoint) + 1); vm.warp(oracle.computeL2Timestamp(checkpoint) + 1);
vm.prank(oracle.proposer()); vm.prank(oracle.PROPOSER());
oracle.proposeL2Output(keccak256(abi.encode(2)), checkpoint, 0, 0); oracle.proposeL2Output(keccak256(abi.encode(2)), checkpoint, 0, 0);
// warp to the final second of the finalization period // warp to the final second of the finalization period
...@@ -312,7 +312,7 @@ contract OptimismPortal_FinalizeWithdrawal_Test is Portal_Initializer { ...@@ -312,7 +312,7 @@ contract OptimismPortal_FinalizeWithdrawal_Test is Portal_Initializer {
function setUp() public override { function setUp() public override {
// Configure the oracle to return the output root we've prepared. // Configure the oracle to return the output root we've prepared.
vm.warp(oracle.computeL2Timestamp(_proposedBlockNumber) + 1); vm.warp(oracle.computeL2Timestamp(_proposedBlockNumber) + 1);
vm.prank(oracle.proposer()); vm.prank(oracle.PROPOSER());
oracle.proposeL2Output(_outputRoot, _proposedBlockNumber, 0, 0); oracle.proposeL2Output(_outputRoot, _proposedBlockNumber, 0, 0);
// Warp beyond the finalization period for the block we've proposed. // Warp beyond the finalization period for the block we've proposed.
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
"l2OutputOracleSubmissionInterval": 20, "l2OutputOracleSubmissionInterval": 20,
"l2OutputOracleStartingTimestamp": -1, "l2OutputOracleStartingTimestamp": -1,
"l2OutputOracleProposer": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", "l2OutputOracleProposer": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"l2OutputOracleOwner": "0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65", "l2OutputOracleChallenger": "0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65",
"l2GenesisBlockCoinbase": "0x42000000000000000000000000000000000000f0", "l2GenesisBlockCoinbase": "0x42000000000000000000000000000000000000f0",
"l2GenesisBlockGasLimit": "0xE4E1C0", "l2GenesisBlockGasLimit": "0xE4E1C0",
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"l2OutputOracleSubmissionInterval": 6, "l2OutputOracleSubmissionInterval": 6,
"l2OutputOracleStartingTimestamp": -1, "l2OutputOracleStartingTimestamp": -1,
"l2OutputOracleProposer": "0x6c23a0dcdfc44b7a57bed148de598895e398d984", "l2OutputOracleProposer": "0x6c23a0dcdfc44b7a57bed148de598895e398d984",
"l2OutputOracleOwner": "0x6925b8704ff96dee942623d6fb5e946ef5884b63", "l2OutputOracleChallenger": "0x6925b8704ff96dee942623d6fb5e946ef5884b63",
"baseFeeVaultRecipient": "0xf116a24056b647e3211d095c667e951536cdebaa", "baseFeeVaultRecipient": "0xf116a24056b647e3211d095c667e951536cdebaa",
"l1FeeVaultRecipient": "0xc731837b696ca3d9720d23336925368ceaa58f83", "l1FeeVaultRecipient": "0xc731837b696ca3d9720d23336925368ceaa58f83",
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"l2OutputOracleSubmissionInterval": 6, "l2OutputOracleSubmissionInterval": 6,
"l2OutputOracleStartingTimestamp": -1, "l2OutputOracleStartingTimestamp": -1,
"l2OutputOracleProposer": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", "l2OutputOracleProposer": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"l2OutputOracleOwner": "0x6925B8704Ff96DEe942623d6FB5e946EF5884b63", "l2OutputOracleChallenger": "0x6925B8704Ff96DEe942623d6FB5e946EF5884b63",
"baseFeeVaultRecipient": "0xBcd4042DE499D14e55001CcbB24a551F3b954096", "baseFeeVaultRecipient": "0xBcd4042DE499D14e55001CcbB24a551F3b954096",
"l1FeeVaultRecipient": "0x71bE63f3384f5fb98995898A86B02Fb2426c5788", "l1FeeVaultRecipient": "0x71bE63f3384f5fb98995898A86B02Fb2426c5788",
......
...@@ -17,7 +17,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -17,7 +17,7 @@ const deployFn: DeployFunction = async (hre) => {
0, 0,
0, 0,
hre.deployConfig.l2OutputOracleProposer, hre.deployConfig.l2OutputOracleProposer,
hre.deployConfig.l2OutputOracleOwner, hre.deployConfig.l2OutputOracleChallenger,
], ],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
...@@ -32,13 +32,13 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -32,13 +32,13 @@ const deployFn: DeployFunction = async (hre) => {
) )
await assertContractVariable( await assertContractVariable(
contract, contract,
'proposer', 'PROPOSER',
hre.deployConfig.l2OutputOracleProposer hre.deployConfig.l2OutputOracleProposer
) )
await assertContractVariable( await assertContractVariable(
contract, contract,
'owner', 'CHALLENGER',
hre.deployConfig.l2OutputOracleOwner hre.deployConfig.l2OutputOracleChallenger
) )
}, },
}) })
......
...@@ -268,16 +268,6 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -268,16 +268,6 @@ const deployFn: DeployFunction = async (hre) => {
'latestBlockNumber', 'latestBlockNumber',
hre.deployConfig.l2OutputOracleStartingBlockNumber hre.deployConfig.l2OutputOracleStartingBlockNumber
) )
await assertContractVariable(
L2OutputOracle,
'proposer',
hre.deployConfig.l2OutputOracleProposer
)
await assertContractVariable(
L2OutputOracle,
'owner',
hre.deployConfig.l2OutputOracleOwner
)
// Check OptimismPortal was initialized properly. // Check OptimismPortal was initialized properly.
await assertContractVariable( await assertContractVariable(
......
...@@ -192,7 +192,7 @@ const config: HardhatUserConfig = { ...@@ -192,7 +192,7 @@ const config: HardhatUserConfig = {
type: 'address', type: 'address',
}, },
// address - The address of the owner. // address - The address of the owner.
l2OutputOracleOwner: { l2OutputOracleChallenger: {
type: 'address', type: 'address',
}, },
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
"test": "yarn build:differential && forge test", "test": "yarn build:differential && forge test",
"coverage": "yarn build:differential && forge coverage", "coverage": "yarn build:differential && forge coverage",
"coverage:lcov": "yarn build:differential && forge coverage --report lcov", "coverage:lcov": "yarn build:differential && forge coverage --report lcov",
"gas-snapshot": "forge snapshot --no-match-test 'differential|fuzz'", "gas-snapshot": "yarn build:differential && forge snapshot --no-match-test 'differential|fuzz'",
"storage-snapshot": "./scripts/storage-snapshot.sh", "storage-snapshot": "./scripts/storage-snapshot.sh",
"validate-spacers": "hardhat validate-spacers", "validate-spacers": "hardhat validate-spacers",
"slither": "./scripts/slither.sh", "slither": "./scripts/slither.sh",
......
...@@ -31,10 +31,6 @@ export interface DictatorConfig { ...@@ -31,10 +31,6 @@ export interface DictatorConfig {
portalSenderImpl: string portalSenderImpl: string
systemConfigImpl: string systemConfigImpl: string
} }
l2OutputOracleConfig: {
l2OutputOracleProposer: string
l2OutputOracleOwner: string
}
systemConfigConfig: { systemConfigConfig: {
owner: string owner: string
overhead: number overhead: number
...@@ -350,10 +346,6 @@ export const makeDictatorConfig = async ( ...@@ -350,10 +346,6 @@ export const makeDictatorConfig = async (
portalSenderImpl: await getDeploymentAddress(hre, 'PortalSender'), portalSenderImpl: await getDeploymentAddress(hre, 'PortalSender'),
systemConfigImpl: await getDeploymentAddress(hre, 'SystemConfig'), systemConfigImpl: await getDeploymentAddress(hre, 'SystemConfig'),
}, },
l2OutputOracleConfig: {
l2OutputOracleProposer: hre.deployConfig.l2OutputOracleProposer,
l2OutputOracleOwner: hre.deployConfig.l2OutputOracleOwner,
},
systemConfigConfig: { systemConfigConfig: {
owner: hre.deployConfig.systemConfigOwner, owner: hre.deployConfig.systemConfigOwner,
overhead: hre.deployConfig.gasPriceOracleOverhead, overhead: hre.deployConfig.gasPriceOracleOverhead,
......
...@@ -12,7 +12,7 @@ task('rekey', 'Generates a new set of keys for a test network').setAction( ...@@ -12,7 +12,7 @@ task('rekey', 'Generates a new set of keys for a test network').setAction(
'optimismBaseFeeRecipient', 'optimismBaseFeeRecipient',
'optimismL1FeeRecipient', 'optimismL1FeeRecipient',
'p2pSequencerAddress', 'p2pSequencerAddress',
'l2OutputOracleOwner', 'l2OutputOracleChallenger',
'batchSenderAddress', 'batchSenderAddress',
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment