Skip to content
Merged
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
19 changes: 9 additions & 10 deletions op-chain-ops/interopgen/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,15 @@ type L2Config struct {
Challenger common.Address
SystemConfigOwner common.Address
genesis.L2InitializationConfig
Prefund map[common.Address]*big.Int
SaltMixer string
GasLimit uint64
DisputeGameUsesSuperRoots bool
DisputeGameType uint32
DisputeAbsolutePrestate common.Hash
DisputeMaxGameDepth uint64
DisputeSplitDepth uint64
DisputeClockExtension uint64
DisputeMaxClockDuration uint64
Prefund map[common.Address]*big.Int
SaltMixer string
GasLimit uint64
DisputeGameType uint32
DisputeAbsolutePrestate common.Hash
DisputeMaxGameDepth uint64
DisputeSplitDepth uint64
DisputeClockExtension uint64
DisputeMaxClockDuration uint64
}

func (c *L2Config) Check(log log.Logger) error {
Expand Down
37 changes: 18 additions & 19 deletions op-chain-ops/interopgen/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,25 +198,24 @@ func DeployL2ToL1(l1Host *script.Host, superCfg *SuperchainConfig, superDeployme
l1Host.SetTxOrigin(cfg.Deployer)

output, err := opcm.DeployOPChain(l1Host, opcm.DeployOPChainInput{
OpChainProxyAdminOwner: cfg.ProxyAdminOwner,
SystemConfigOwner: cfg.SystemConfigOwner,
Batcher: cfg.BatchSenderAddress,
UnsafeBlockSigner: cfg.P2PSequencerAddress,
Proposer: cfg.Proposer,
Challenger: cfg.Challenger,
BasefeeScalar: cfg.GasPriceOracleBaseFeeScalar,
BlobBaseFeeScalar: cfg.GasPriceOracleBlobBaseFeeScalar,
L2ChainId: new(big.Int).SetUint64(cfg.L2ChainID),
Opcm: superDeployment.Opcm,
SaltMixer: cfg.SaltMixer,
GasLimit: cfg.GasLimit,
DisputeGameUsesSuperRoots: cfg.DisputeGameUsesSuperRoots,
DisputeGameType: cfg.DisputeGameType,
DisputeAbsolutePrestate: cfg.DisputeAbsolutePrestate,
DisputeMaxGameDepth: cfg.DisputeMaxGameDepth,
DisputeSplitDepth: cfg.DisputeSplitDepth,
DisputeClockExtension: cfg.DisputeClockExtension,
DisputeMaxClockDuration: cfg.DisputeMaxClockDuration,
OpChainProxyAdminOwner: cfg.ProxyAdminOwner,
SystemConfigOwner: cfg.SystemConfigOwner,
Batcher: cfg.BatchSenderAddress,
UnsafeBlockSigner: cfg.P2PSequencerAddress,
Proposer: cfg.Proposer,
Challenger: cfg.Challenger,
BasefeeScalar: cfg.GasPriceOracleBaseFeeScalar,
BlobBaseFeeScalar: cfg.GasPriceOracleBlobBaseFeeScalar,
L2ChainId: new(big.Int).SetUint64(cfg.L2ChainID),
Opcm: superDeployment.Opcm,
SaltMixer: cfg.SaltMixer,
GasLimit: cfg.GasLimit,
DisputeGameType: cfg.DisputeGameType,
DisputeAbsolutePrestate: cfg.DisputeAbsolutePrestate,
DisputeMaxGameDepth: cfg.DisputeMaxGameDepth,
DisputeSplitDepth: cfg.DisputeSplitDepth,
DisputeClockExtension: cfg.DisputeClockExtension,
DisputeMaxClockDuration: cfg.DisputeMaxClockDuration,
})
if err != nil {
return nil, fmt.Errorf("failed to deploy L2 OP chain: %w", err)
Expand Down
19 changes: 9 additions & 10 deletions op-chain-ops/interopgen/recipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,15 @@ func (r *InteropDevL2Recipe) build(l1ChainID uint64, addrs devkeys.Addresses) (*
UseAltDA: false,
},
},
Prefund: make(map[common.Address]*big.Int),
SaltMixer: "",
GasLimit: 60_000_000,
DisputeGameUsesSuperRoots: true,
DisputeGameType: 1, // PERMISSIONED_CANNON Game Type
DisputeAbsolutePrestate: common.HexToHash("0x038512e02c4c3f7bdaec27d00edf55b7155e0905301e1a88083e4e0a6764d54c"),
DisputeMaxGameDepth: 73,
DisputeSplitDepth: 30,
DisputeClockExtension: 10800, // 3 hours (input in seconds)
DisputeMaxClockDuration: 302400, // 3.5 days (input in seconds)
Prefund: make(map[common.Address]*big.Int),
SaltMixer: "",
GasLimit: 60_000_000,
DisputeGameType: 1, // PERMISSIONED_CANNON Game Type
DisputeAbsolutePrestate: common.HexToHash("0x038512e02c4c3f7bdaec27d00edf55b7155e0905301e1a88083e4e0a6764d54c"),
DisputeMaxGameDepth: 73,
DisputeSplitDepth: 30,
DisputeClockExtension: 10800, // 3 hours (input in seconds)
DisputeMaxClockDuration: 302400, // 3.5 days (input in seconds)
}

l2Users := devkeys.ChainUserKeys(new(big.Int).SetUint64(r.ChainID))
Expand Down
1 change: 0 additions & 1 deletion op-deployer/pkg/deployer/integration_test/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ func TestAdditionalDisputeGames(t *testing.T) {
intent.Chains[0].AdditionalDisputeGames = []state.AdditionalDisputeGame{
{
ChainProofParams: state.ChainProofParams{
DisputeGameUsesSuperRoots: false,
DisputeGameType: 255,
DisputeAbsolutePrestate: standard.DisputeAbsolutePrestate,
DisputeMaxGameDepth: 50,
Expand Down
1 change: 0 additions & 1 deletion op-deployer/pkg/deployer/opcm/opchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ type DeployOPChainInput struct {
SaltMixer string
GasLimit uint64

DisputeGameUsesSuperRoots bool
DisputeGameType uint32
DisputeAbsolutePrestate common.Hash
DisputeMaxGameDepth uint64
Expand Down
14 changes: 6 additions & 8 deletions op-deployer/pkg/deployer/pipeline/opchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,12 @@ func DeployOPChain(env *Env, intent *state.Intent, st *state.State, chainID comm
func makeDCI(intent *state.Intent, thisIntent *state.ChainIntent, chainID common.Hash, st *state.State) (opcm.DeployOPChainInput, error) {
proofParams, err := jsonutil.MergeJSON(
state.ChainProofParams{
DisputeGameUsesSuperRoots: standard.DisputeGameUsesSuperRoots,
DisputeGameType: standard.DisputeGameType,
DisputeAbsolutePrestate: standard.DisputeAbsolutePrestate,
DisputeMaxGameDepth: standard.DisputeMaxGameDepth,
DisputeSplitDepth: standard.DisputeSplitDepth,
DisputeClockExtension: standard.DisputeClockExtension,
DisputeMaxClockDuration: standard.DisputeMaxClockDuration,
DisputeGameType: standard.DisputeGameType,
DisputeAbsolutePrestate: standard.DisputeAbsolutePrestate,
DisputeMaxGameDepth: standard.DisputeMaxGameDepth,
DisputeSplitDepth: standard.DisputeSplitDepth,
DisputeClockExtension: standard.DisputeClockExtension,
DisputeMaxClockDuration: standard.DisputeMaxClockDuration,
},
intent.GlobalDeployOverrides,
thisIntent.DeployOverrides,
Expand All @@ -102,7 +101,6 @@ func makeDCI(intent *state.Intent, thisIntent *state.ChainIntent, chainID common
Opcm: st.ImplementationsDeployment.OpcmAddress,
SaltMixer: st.Create2Salt.String(), // passing through salt generated at state initialization
GasLimit: standard.GasLimit,
DisputeGameUsesSuperRoots: proofParams.DisputeGameUsesSuperRoots,
DisputeGameType: proofParams.DisputeGameType,
DisputeAbsolutePrestate: proofParams.DisputeAbsolutePrestate,
DisputeMaxGameDepth: proofParams.DisputeMaxGameDepth,
Expand Down
1 change: 0 additions & 1 deletion op-deployer/pkg/deployer/standard/standard.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const (
ProofMaturityDelaySeconds uint64 = 604800
DisputeGameFinalityDelaySeconds uint64 = 302400
MIPSVersion uint64 = 1
DisputeGameUsesSuperRoots bool = false
DisputeGameType uint32 = 1 // PERMISSIONED game type
DisputeMaxGameDepth uint64 = 73
DisputeSplitDepth uint64 = 30
Expand Down
1 change: 0 additions & 1 deletion op-deployer/pkg/deployer/state/chain_intent.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const (
)

type ChainProofParams struct {
DisputeGameUsesSuperRoots bool `json:"disputeGameUsesSuperRoots" toml:"disputeGameUsesSuperRoots"`
DisputeGameType uint32 `json:"respectedGameType" toml:"respectedGameType"`
DisputeAbsolutePrestate common.Hash `json:"faultGameAbsolutePrestate" toml:"faultGameAbsolutePrestate"`
DisputeMaxGameDepth uint64 `json:"faultGameMaxDepth" toml:"faultGameMaxDepth"`
Expand Down
2 changes: 0 additions & 2 deletions op-deployer/pkg/deployer/upgrade/v2_0_0/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
)

func TestUpgradeOPChainInput_OpChainConfigs(t *testing.T) {
t.Skip("skipping for upgrade 15")
input := &UpgradeOPChainInput{
Prank: common.Address{0xaa},
Opcm: common.Address{0xbb},
Expand Down Expand Up @@ -55,7 +54,6 @@ func TestUpgradeOPChainInput_OpChainConfigs(t *testing.T) {
}

func TestUpgrader_Upgrade(t *testing.T) {
t.Skip("skipping for upgrade 15")
lgr := testlog.Logger(t, slog.LevelDebug)

forkedL1, stopL1, err := devnet.NewForkedSepolia(lgr)
Expand Down
39 changes: 18 additions & 21 deletions op-e2e/config/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,12 @@ func defaultIntent(root string, loc *artifacts.Locator, deployer common.Address,
{
ChainProofParams: state.ChainProofParams{
// Fast game
DisputeGameUsesSuperRoots: false,
DisputeGameType: 254,
DisputeAbsolutePrestate: defaultPrestate,
DisputeMaxGameDepth: 14 + 3 + 1,
DisputeSplitDepth: 14,
DisputeClockExtension: 0,
DisputeMaxClockDuration: 0,
DisputeGameType: 254,
DisputeAbsolutePrestate: defaultPrestate,
DisputeMaxGameDepth: 14 + 3 + 1,
DisputeSplitDepth: 14,
DisputeClockExtension: 0,
DisputeMaxClockDuration: 0,
},
VMType: state.VMTypeAlphabet,
UseCustomOracle: true,
Expand All @@ -453,25 +452,23 @@ func defaultIntent(root string, loc *artifacts.Locator, deployer common.Address,
{
ChainProofParams: state.ChainProofParams{
// Alphabet game
DisputeGameUsesSuperRoots: false,
DisputeGameType: 255,
DisputeAbsolutePrestate: defaultPrestate,
DisputeMaxGameDepth: 14 + 3 + 1,
DisputeSplitDepth: 14,
DisputeClockExtension: 0,
DisputeMaxClockDuration: 1200,
DisputeGameType: 255,
DisputeAbsolutePrestate: defaultPrestate,
DisputeMaxGameDepth: 14 + 3 + 1,
DisputeSplitDepth: 14,
DisputeClockExtension: 0,
DisputeMaxClockDuration: 1200,
},
VMType: state.VMTypeAlphabet,
},
{
ChainProofParams: state.ChainProofParams{
DisputeGameUsesSuperRoots: false,
DisputeGameType: 0,
DisputeAbsolutePrestate: cannonPrestate(root, allocType),
DisputeMaxGameDepth: 50,
DisputeSplitDepth: 14,
DisputeClockExtension: 0,
DisputeMaxClockDuration: 1200,
DisputeGameType: 0,
DisputeAbsolutePrestate: cannonPrestate(root, allocType),
DisputeMaxGameDepth: 50,
DisputeSplitDepth: 14,
DisputeClockExtension: 0,
DisputeMaxClockDuration: 1200,
},
VMType: cannonVMType(allocType),
},
Expand Down
17 changes: 9 additions & 8 deletions packages/contracts-bedrock/interfaces/L1/IETHLockbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@ interface IETHLockbox is IProxyAdminOwnedBase, ISemver {
error ETHLockbox_InsufficientBalance();
error ETHLockbox_NoWithdrawalTransactions();
error ETHLockbox_DifferentProxyAdminOwner();
error ETHLockbox_DifferentSuperchainConfig();

event Initialized(uint8 version);
event ETHLocked(address indexed portal, uint256 amount);
event ETHUnlocked(address indexed portal, uint256 amount);
event PortalAuthorized(address indexed portal);
event LockboxAuthorized(address indexed lockbox);
event LiquidityMigrated(address indexed lockbox, uint256 amount);
event LiquidityReceived(address indexed lockbox, uint256 amount);
event ETHLocked(IOptimismPortal2 indexed portal, uint256 amount);
event ETHUnlocked(IOptimismPortal2 indexed portal, uint256 amount);
event PortalAuthorized(IOptimismPortal2 indexed portal);
event LockboxAuthorized(IETHLockbox indexed lockbox);
event LiquidityMigrated(IETHLockbox indexed lockbox, uint256 amount);
event LiquidityReceived(IETHLockbox indexed lockbox, uint256 amount);

function initialize(ISuperchainConfig _superchainConfig, IOptimismPortal2[] calldata _portals) external;
function superchainConfig() external view returns (ISuperchainConfig);
function paused() external view returns (bool);
function authorizedPortals(address) external view returns (bool);
function authorizedLockboxes(address) external view returns (bool);
function authorizedPortals(IOptimismPortal2) external view returns (bool);
function authorizedLockboxes(IETHLockbox) external view returns (bool);
function receiveLiquidity() external payable;
function lockETH() external payable;
function unlockETH(uint256 _value) external;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ interface IOPContractsManager {
string saltMixer;
uint64 gasLimit;
// Configurable dispute game parameters.
bool disputeGameUsesSuperRoots;
GameType disputeGameType;
Claim disputeAbsolutePrestate;
uint256 disputeMaxGameDepth;
Expand Down Expand Up @@ -176,7 +175,6 @@ interface IOPContractsManager {
ISystemConfig systemConfigProxy;
IProxyAdmin proxyAdmin;
Claim absolutePrestate;
bool disputeGameUsesSuperRoots;
}

struct AddGameInput {
Expand Down

This file was deleted.

11 changes: 5 additions & 6 deletions packages/contracts-bedrock/interfaces/L1/IOptimismPortal2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ interface IOptimismPortal2 is IProxyAdminOwnedBase {
error OptimismPortal_InvalidSuperRootProof();
error OptimismPortal_InvalidOutputRootChainId();
error OptimismPortal_WrongProofMethod();
error OptimismPortal_MigratingToSameRegistry();
error Encoding_EmptySuperRoot();
error Encoding_InvalidSuperRootVersion();
error OutOfGas();
Expand All @@ -49,7 +50,7 @@ interface IOptimismPortal2 is IProxyAdminOwnedBase {
event WithdrawalProven(bytes32 indexed withdrawalHash, address indexed from, address indexed to);
event WithdrawalProvenExtension1(bytes32 indexed withdrawalHash, address indexed proofSubmitter);
event ETHMigrated(address indexed lockbox, uint256 ethBalance);
event LockboxUpdated(address oldLockbox, address newLockbox);
event PortalMigrated(IETHLockbox oldLockbox, IETHLockbox newLockbox, IAnchorStateRegistry oldAnchorStateRegistry, IAnchorStateRegistry newAnchorStateRegistry);

receive() external payable;

Expand All @@ -68,7 +69,7 @@ interface IOptimismPortal2 is IProxyAdminOwnedBase {
function disputeGameFactory() external view returns (IDisputeGameFactory);
function disputeGameFinalityDelaySeconds() external view returns (uint256);
function donateETH() external payable;
function updateLockbox(IETHLockbox _newLockbox) external;
function migrateToSuperRoots(IETHLockbox _newLockbox, IAnchorStateRegistry _newAnchorStateRegistry) external;
function finalizeWithdrawalTransaction(Types.WithdrawalTransaction memory _tx) external;
function finalizeWithdrawalTransactionExternalProof(
Types.WithdrawalTransaction memory _tx,
Expand All @@ -81,8 +82,7 @@ interface IOptimismPortal2 is IProxyAdminOwnedBase {
ISystemConfig _systemConfig,
ISuperchainConfig _superchainConfig,
IAnchorStateRegistry _anchorStateRegistry,
IETHLockbox _ethLockbox,
bool _superRootsActive
IETHLockbox _ethLockbox
)
external;
function initVersion() external view returns (uint8);
Expand Down Expand Up @@ -123,8 +123,7 @@ interface IOptimismPortal2 is IProxyAdminOwnedBase {
function systemConfig() external view returns (ISystemConfig);
function upgrade(
IAnchorStateRegistry _anchorStateRegistry,
IETHLockbox _ethLockbox,
bool _superRootsActive
IETHLockbox _ethLockbox
)
external;
function version() external pure returns (string memory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ interface IOptimismPortalInterop is IProxyAdminOwnedBase {
error OptimismPortal_InvalidSuperRootProof();
error OptimismPortal_InvalidOutputRootChainId();
error OptimismPortal_WrongProofMethod();
error OptimismPortal_MigratingToSameRegistry();
error Encoding_EmptySuperRoot();
error Encoding_InvalidSuperRootVersion();
error OutOfGas();
Expand All @@ -50,7 +51,7 @@ interface IOptimismPortalInterop is IProxyAdminOwnedBase {
event WithdrawalProven(bytes32 indexed withdrawalHash, address indexed from, address indexed to);
event WithdrawalProvenExtension1(bytes32 indexed withdrawalHash, address indexed proofSubmitter);
event ETHMigrated(address indexed lockbox, uint256 ethBalance);
event LockboxUpdated(address oldLockbox, address newLockbox);
event PortalMigrated(IETHLockbox oldLockbox, IETHLockbox newLockbox, IAnchorStateRegistry oldAnchorStateRegistry, IAnchorStateRegistry newAnchorStateRegistry);

receive() external payable;

Expand All @@ -69,7 +70,7 @@ interface IOptimismPortalInterop is IProxyAdminOwnedBase {
function disputeGameFactory() external view returns (IDisputeGameFactory);
function disputeGameFinalityDelaySeconds() external view returns (uint256);
function donateETH() external payable;
function updateLockbox(IETHLockbox _newLockbox) external;
function migrateToSuperRoots(IETHLockbox _newLockbox, IAnchorStateRegistry _newAnchorStateRegistry) external;
function finalizeWithdrawalTransaction(Types.WithdrawalTransaction memory _tx) external;
function finalizeWithdrawalTransactionExternalProof(
Types.WithdrawalTransaction memory _tx,
Expand All @@ -83,8 +84,7 @@ interface IOptimismPortalInterop is IProxyAdminOwnedBase {
ISystemConfig _systemConfig,
ISuperchainConfig _superchainConfig,
IAnchorStateRegistry _anchorStateRegistry,
IETHLockbox _ethLockbox,
bool _superRootsActive
IETHLockbox _ethLockbox
)
external;
function initVersion() external view returns (uint8);
Expand Down Expand Up @@ -126,8 +126,7 @@ interface IOptimismPortalInterop is IProxyAdminOwnedBase {
function systemConfig() external view returns (ISystemConfig);
function upgrade(
IAnchorStateRegistry _anchorStateRegistry,
IETHLockbox _ethLockbox,
bool _superRootsActive
IETHLockbox _ethLockbox
)
external;
function version() external pure returns (string memory);
Expand Down
Loading