Commit 86e6bc8d authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #7549 from ethereum-optimism/ctb/reinit-3

contracts-bedrock: update reinitialize value
parents 058d69d1 1917993f
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -217,8 +217,7 @@ L1StandardBridge_FinalizeERC20Withdrawal_TestFail:test_finalizeERC20Withdrawal_n ...@@ -217,8 +217,7 @@ L1StandardBridge_FinalizeERC20Withdrawal_TestFail:test_finalizeERC20Withdrawal_n
L1StandardBridge_FinalizeERC20Withdrawal_TestFail:test_finalizeERC20Withdrawal_notOtherBridge_reverts() (gas: 34118) L1StandardBridge_FinalizeERC20Withdrawal_TestFail:test_finalizeERC20Withdrawal_notOtherBridge_reverts() (gas: 34118)
L1StandardBridge_FinalizeETHWithdrawal_Test:test_finalizeETHWithdrawal_succeeds() (gas: 64673) L1StandardBridge_FinalizeETHWithdrawal_Test:test_finalizeETHWithdrawal_succeeds() (gas: 64673)
L1StandardBridge_Getter_Test:test_getters_succeeds() (gas: 28383) L1StandardBridge_Getter_Test:test_getters_succeeds() (gas: 28383)
L1StandardBridge_Initialize_Test:test_initialize_fix_succeeds() (gas: 5258) L1StandardBridge_Initialize_Test:test_initialize_succeeds() (gas: 27239)
L1StandardBridge_Initialize_Test:test_initialize_succeeds() (gas: 24195)
L1StandardBridge_Receive_Test:test_receive_succeeds() (gas: 615130) L1StandardBridge_Receive_Test:test_receive_succeeds() (gas: 615130)
L2CrossDomainMessenger_Test:test_messageVersion_succeeds() (gas: 8477) L2CrossDomainMessenger_Test:test_messageVersion_succeeds() (gas: 8477)
L2CrossDomainMessenger_Test:test_relayMessage_retry_succeeds() (gas: 163749) L2CrossDomainMessenger_Test:test_relayMessage_retry_succeeds() (gas: 163749)
...@@ -249,7 +248,7 @@ L2OutputOracleUpgradeable_Test:test_initValuesOnImpl_succeeds() (gas: 23902) ...@@ -249,7 +248,7 @@ L2OutputOracleUpgradeable_Test:test_initValuesOnImpl_succeeds() (gas: 23902)
L2OutputOracleUpgradeable_Test:test_initValuesOnProxy_succeeds() (gas: 46800) L2OutputOracleUpgradeable_Test:test_initValuesOnProxy_succeeds() (gas: 46800)
L2OutputOracleUpgradeable_Test:test_initializeImpl_alreadyInitialized_reverts() (gas: 15216) L2OutputOracleUpgradeable_Test:test_initializeImpl_alreadyInitialized_reverts() (gas: 15216)
L2OutputOracleUpgradeable_Test:test_initializeProxy_alreadyInitialized_reverts() (gas: 20216) L2OutputOracleUpgradeable_Test:test_initializeProxy_alreadyInitialized_reverts() (gas: 20216)
L2OutputOracleUpgradeable_Test:test_upgrading_succeeds() (gas: 191348) L2OutputOracleUpgradeable_Test:test_upgrading_succeeds() (gas: 191455)
L2OutputOracle_constructor_Test:test_constructor_l2BlockTimeZero_reverts() (gas: 39022) L2OutputOracle_constructor_Test:test_constructor_l2BlockTimeZero_reverts() (gas: 39022)
L2OutputOracle_constructor_Test:test_constructor_submissionInterval_reverts() (gas: 39032) L2OutputOracle_constructor_Test:test_constructor_submissionInterval_reverts() (gas: 39032)
L2OutputOracle_constructor_Test:test_constructor_succeeds() (gas: 51777) L2OutputOracle_constructor_Test:test_constructor_succeeds() (gas: 51777)
...@@ -442,7 +441,7 @@ OptimismMintableTokenFactory_Test:test_createStandardL2Token_succeeds() (gas: 13 ...@@ -442,7 +441,7 @@ OptimismMintableTokenFactory_Test:test_createStandardL2Token_succeeds() (gas: 13
OptimismPortalUpgradeable_Test:test_initialize_cannotInitImpl_reverts() (gas: 11178) OptimismPortalUpgradeable_Test:test_initialize_cannotInitImpl_reverts() (gas: 11178)
OptimismPortalUpgradeable_Test:test_initialize_cannotInitProxy_reverts() (gas: 16111) OptimismPortalUpgradeable_Test:test_initialize_cannotInitProxy_reverts() (gas: 16111)
OptimismPortalUpgradeable_Test:test_params_initValuesOnProxy_succeeds() (gas: 26781) OptimismPortalUpgradeable_Test:test_params_initValuesOnProxy_succeeds() (gas: 26781)
OptimismPortalUpgradeable_Test:test_upgradeToAndCall_upgrading_succeeds() (gas: 191414) OptimismPortalUpgradeable_Test:test_upgradeToAndCall_upgrading_succeeds() (gas: 191521)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputRootChanges_reverts() (gas: 178667) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputRootChanges_reverts() (gas: 178667)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputTimestampIsNotFinalized_reverts() (gas: 182306) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifOutputTimestampIsNotFinalized_reverts() (gas: 182306)
OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalNotProven_reverts() (gas: 41780) OptimismPortal_FinalizeWithdrawal_Test:test_finalizeWithdrawalTransaction_ifWithdrawalNotProven_reverts() (gas: 41780)
......
...@@ -703,11 +703,6 @@ contract Deploy is Deployer { ...@@ -703,11 +703,6 @@ contract Deploy is Deployer {
require(address(bridge.messenger()) == l1CrossDomainMessengerProxy); require(address(bridge.messenger()) == l1CrossDomainMessengerProxy);
require(address(bridge.OTHER_BRIDGE()) == Predeploys.L2_STANDARD_BRIDGE); require(address(bridge.OTHER_BRIDGE()) == Predeploys.L2_STANDARD_BRIDGE);
require(address(bridge.otherBridge()) == Predeploys.L2_STANDARD_BRIDGE); require(address(bridge.otherBridge()) == Predeploys.L2_STANDARD_BRIDGE);
// Ensures that the legacy slot is modified correctly. This will fail
// during predeployment simulation on OP Mainnet if there is a bug.
bytes32 slot0 = vm.load(address(bridge), bytes32(uint256(0)));
require(slot0 == bytes32(uint256(2)));
} }
/// @notice Initialize the L1ERC721Bridge /// @notice Initialize the L1ERC721Bridge
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
"src/EAS/EAS.sol": "0xea04b7a9ec170ce9cbd466ede87650f9e9ffe3d725d7951cef5777a98a840173", "src/EAS/EAS.sol": "0xea04b7a9ec170ce9cbd466ede87650f9e9ffe3d725d7951cef5777a98a840173",
"src/EAS/SchemaRegistry.sol": "0x5ee1a0c3b2bf1eb5edb53fb0967cf13856be546f0f16fe7acdc3e4f286db6831", "src/EAS/SchemaRegistry.sol": "0x5ee1a0c3b2bf1eb5edb53fb0967cf13856be546f0f16fe7acdc3e4f286db6831",
"src/L1/DelayedVetoable.sol": "0x276c6276292095e6aa37a70008cf4e0d1cbcc020dbc9107459bbc72ab5ed744f", "src/L1/DelayedVetoable.sol": "0x276c6276292095e6aa37a70008cf4e0d1cbcc020dbc9107459bbc72ab5ed744f",
"src/L1/L1CrossDomainMessenger.sol": "0x702bda69e5e5b4a6a1ead908dd300a982579b4cf2f6c0c3b52f4aaaad9c3c9b1", "src/L1/L1CrossDomainMessenger.sol": "0x314a831b10500182a932ca6a8c34939ba45b6844e78a656c46790641e5811a66",
"src/L1/L1ERC721Bridge.sol": "0xd243a97657bed52f6d7391668dba4a476355b6c1a8d908eebc7d6516b42b04c1", "src/L1/L1ERC721Bridge.sol": "0x679dc0ab891843253bab269a09218bd2706984cae0f52c0f25789c0797096308",
"src/L1/L1StandardBridge.sol": "0xdafe88c8b1255202eb674f4ebfb0dca791d2c87480c2c8d00cc46859671a5fa8", "src/L1/L1StandardBridge.sol": "0x22f77bfdf75e71bb92e38a58ce181131d4ffbdd930e4af8691dc0406735df8d0",
"src/L1/L2OutputOracle.sol": "0xd263f43b79b6f1dca3a27f8bdbacf97deb1a3a95b7e1d395079700eecea65402", "src/L1/L2OutputOracle.sol": "0x1cfa6e41f3449896d2b0f5fba85d759acefe7012d6bffbcdf0bba883a78b50ee",
"src/L1/OptimismPortal.sol": "0x8fdab55ab7c18bb7e037f0719c749f2cf1b0ca2da17da4ea0d1a4c5e2243ac60", "src/L1/OptimismPortal.sol": "0xc4753409d6aca7f7b8a48b9a8ac9542a5c5e0b7e7cb71ca3b6b35dd714806c73",
"src/L1/ProtocolVersions.sol": "0xc4f142ed9c195871ee21902245a9e2b902f8e38fcc77e6f61fb98f4d399031e4", "src/L1/ProtocolVersions.sol": "0xfc92dfc0e4518470c48c74fa9c5b15347da2a791273afd1968ac3eada7c45dd6",
"src/L1/SystemConfig.sol": "0xf23f2c4425996c2719e1baddf468b328de724305f1852b59cd0b09c843075d63", "src/L1/SystemConfig.sol": "0x9ebc7ab20ea65301a477f45169225ac2141c7be9654102befcd448aaab271c0c",
"src/L2/BaseFeeVault.sol": "0xc347c1aebe69178e72d2b1d3e700bbf84e39975319465bb85d69fd0d60fc1759", "src/L2/BaseFeeVault.sol": "0xc347c1aebe69178e72d2b1d3e700bbf84e39975319465bb85d69fd0d60fc1759",
"src/L2/GasPriceOracle.sol": "0x88efffbd40f8d012d700a5d7fde0d92266f65e9d7006cd8f034bacaa036d0eb2", "src/L2/GasPriceOracle.sol": "0x88efffbd40f8d012d700a5d7fde0d92266f65e9d7006cd8f034bacaa036d0eb2",
"src/L2/L1Block.sol": "0x1ed9aa36036ded00a0383692eca81a22f668d64e22af973559d2ccefc86825c0", "src/L2/L1Block.sol": "0x1ed9aa36036ded00a0383692eca81a22f668d64e22af973559d2ccefc86825c0",
......
...@@ -4,6 +4,7 @@ pragma solidity 0.8.15; ...@@ -4,6 +4,7 @@ pragma solidity 0.8.15;
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import { ISemver } from "src/universal/ISemver.sol"; import { ISemver } from "src/universal/ISemver.sol";
import { Types } from "src/libraries/Types.sol"; import { Types } from "src/libraries/Types.sol";
import { Constants } from "src/libraries/Constants.sol";
/// @custom:proxied /// @custom:proxied
/// @title L2OutputOracle /// @title L2OutputOracle
...@@ -63,8 +64,8 @@ contract L2OutputOracle is Initializable, ISemver { ...@@ -63,8 +64,8 @@ contract L2OutputOracle is Initializable, ISemver {
event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex); event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex);
/// @notice Semantic version. /// @notice Semantic version.
/// @custom:semver 1.5.1 /// @custom:semver 1.6.0
string public constant version = "1.5.1"; string public constant version = "1.6.0";
/// @notice Constructs the L2OutputOracle contract. /// @notice Constructs the L2OutputOracle contract.
/// @param _submissionInterval Interval in blocks at which checkpoints must be submitted. /// @param _submissionInterval Interval in blocks at which checkpoints must be submitted.
...@@ -94,7 +95,7 @@ contract L2OutputOracle is Initializable, ISemver { ...@@ -94,7 +95,7 @@ contract L2OutputOracle is Initializable, ISemver {
address _challenger address _challenger
) )
public public
reinitializer(2) reinitializer(Constants.INITIALIZER)
{ {
require( require(
_startingTimestamp <= block.timestamp, _startingTimestamp <= block.timestamp,
......
...@@ -5,6 +5,7 @@ import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/O ...@@ -5,6 +5,7 @@ import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/O
import { ISemver } from "src/universal/ISemver.sol"; import { ISemver } from "src/universal/ISemver.sol";
import { ResourceMetering } from "src/L1/ResourceMetering.sol"; import { ResourceMetering } from "src/L1/ResourceMetering.sol";
import { Storage } from "src/libraries/Storage.sol"; import { Storage } from "src/libraries/Storage.sol";
import { Constants } from "src/libraries/Constants.sol";
/// @title SystemConfig /// @title SystemConfig
/// @notice The SystemConfig contract is used to manage configuration of an Optimism network. /// @notice The SystemConfig contract is used to manage configuration of an Optimism network.
...@@ -100,8 +101,8 @@ contract SystemConfig is OwnableUpgradeable, ISemver { ...@@ -100,8 +101,8 @@ contract SystemConfig is OwnableUpgradeable, ISemver {
uint256 public startBlock; uint256 public startBlock;
/// @notice Semantic version. /// @notice Semantic version.
/// @custom:semver 1.8.0 /// @custom:semver 1.9.0
string public constant version = "1.8.0"; string public constant version = "1.9.0";
/// @notice Constructs the SystemConfig contract. Cannot set /// @notice Constructs the SystemConfig contract. Cannot set
/// the owner to `address(0)` due to the Ownable contract's /// the owner to `address(0)` due to the Ownable contract's
...@@ -164,7 +165,7 @@ contract SystemConfig is OwnableUpgradeable, ISemver { ...@@ -164,7 +165,7 @@ contract SystemConfig is OwnableUpgradeable, ISemver {
SystemConfig.Addresses memory _addresses SystemConfig.Addresses memory _addresses
) )
public public
reinitializer(2) reinitializer(Constants.INITIALIZER)
{ {
__Ownable_init(); __Ownable_init();
transferOwnership(_owner); transferOwnership(_owner);
......
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