Skip to content
Closed
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
7 changes: 0 additions & 7 deletions .semgrep/rules/sol-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,6 @@ rules:
_disableInitializers();
...
}
paths:
exclude:
- packages/contracts-bedrock/src/L1/SystemConfigInterop.sol
- packages/contracts-bedrock/src/L1/OptimismPortalInterop.sol

- id: sol-safety-proper-initializer
languages: [solidity]
Expand Down Expand Up @@ -273,9 +269,6 @@ rules:
function initialize(...) public reinitializer(...) {
...
}
paths:
exclude:
- packages/contracts-bedrock/src/L1/SystemConfigInterop.sol

- id: sol-safety-proper-upgrade-function
languages: [solidity]
Expand Down
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
19 changes: 0 additions & 19 deletions op-deployer/pkg/deployer/integration_test/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,24 +401,6 @@ func TestProofParamOverrides(t *testing.T) {
}
}

func TestInteropDeployment(t *testing.T) {
op_e2e.InitParallel(t)

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

opts, intent, st := setupGenesisChain(t, defaultL1ChainID)
intent.UseInterop = true

require.NoError(t, deployer.ApplyPipeline(ctx, opts))

chainState := st.Chains[0]
depManagerSlot := common.HexToHash("0x1708e077affb93e89be2665fb0fb72581be66f84dc00d25fed755ae911905b1c")
checkImmutable(t, st.L1StateDump.Data.Accounts, st.ImplementationsDeployment.SystemConfigImplAddress, depManagerSlot)
proxyAdminOwnerHash := common.BytesToHash(intent.Chains[0].Roles.SystemConfigOwner.Bytes())
checkStorageSlot(t, st.L1StateDump.Data.Accounts, chainState.SystemConfigProxyAddress, depManagerSlot, proxyAdminOwnerHash)
}

func TestAltDADeployment(t *testing.T) {
op_e2e.InitParallel(t)

Expand Down Expand Up @@ -529,7 +511,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
6 changes: 0 additions & 6 deletions op-deployer/pkg/deployer/opcm/implementations.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ func DeployImplementations(
defer cleanupOutput()

implContract := "DeployImplementations"
if input.UseInterop {
implContract = "DeployImplementationsInterop"
}
deployScript, cleanupDeploy, err := script.WithScript[DeployImplementationsScript](host, "DeployImplementations.s.sol", implContract)
if err != nil {
return output, fmt.Errorf("failed to load %s script: %w", implContract, err)
Expand All @@ -97,9 +94,6 @@ func DeployImplementations(

// So we can see in detail where the SystemConfig interop initializer fails
sysConfig := "SystemConfig"
if input.UseInterop {
sysConfig = "SystemConfigInterop"
}
if err := host.RememberOnLabel("SystemConfigImpl", sysConfig+".sol", sysConfig); err != nil {
return output, fmt.Errorf("failed to link SystemConfig label: %w", err)
}
Expand Down
21 changes: 0 additions & 21 deletions op-deployer/pkg/deployer/opcm/manage_dependencies.go

This file was deleted.

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
31 changes: 14 additions & 17 deletions op-e2e/interop/interop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,19 @@ func TestInterop_EmitLogs(t *testing.T) {
ids := s2.L2IDs()
chainA := ids[0]
chainB := ids[1]
EmitterA := s2.DeployEmitterContract(chainA, "Alice")
EmitterB := s2.DeployEmitterContract(chainB, "Alice")
payload1 := "SUPER JACKPOT!"
numEmits := 10

// Deploy emitter to chain A
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
EmitterA := s2.DeployEmitterContract(ctx, chainA, "Alice")

// Deploy emitter to chain B
ctx, cancel = context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
EmitterB := s2.DeployEmitterContract(ctx, chainB, "Alice")

// emit logs on both chains in parallel
var emitParallel sync.WaitGroup
emitOn := func(chainID string) {
Expand Down Expand Up @@ -258,26 +267,14 @@ func TestInteropBlockBuilding(t *testing.T) {
ids := s2.L2IDs()
chainA := ids[0]
chainB := ids[1]
// We will initiate on chain A, and execute on chain B
s2.DeployEmitterContract(chainA, "Alice")

// Add chain A as dependency to chain B,
// such that we can execute a message on B that was initiated on A.
// We will initiate on chain A, and execute on chain B
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
depRec := s2.AddDependency(ctx, chainB, s2.ChainID(chainA))
cancel()
t.Logf("Dependency set in L1 block %d", depRec.BlockNumber)
defer cancel()
s2.DeployEmitterContract(ctx, chainA, "Alice")

rollupClA := s2.L2RollupClient(chainA, "sequencer")

// Now wait for the dependency to be visible in the L2 (receipt needs to be picked up)
require.Eventually(t, func() bool {
status, err := rollupClA.SyncStatus(context.Background())
require.NoError(t, err)
return status.CrossUnsafeL2.L1Origin.Number >= depRec.BlockNumber.Uint64()
}, time.Second*30, time.Second, "wait for L1 origin to match dependency L1 block")
t.Log("Dependency information has been processed in L2 block")

// emit log on chain A
ctx, cancel = context.WithTimeout(context.Background(), 30*time.Second)
emitRec := s2.EmitData(ctx, chainA, "sequencer", "Alice", "hello world")
Expand Down
Loading