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
3 changes: 0 additions & 3 deletions op-chain-ops/genesis/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ type DevDeployConfig struct {
// FundDevAccounts configures whether to fund the dev accounts.
// This should only be used during devnet deployments.
FundDevAccounts bool `json:"fundDevAccounts"`
// OverrideMessageExpiryTime configures the message expiry time of interop messages.
// This should only be used during devnet deployments.
OverrideMessageExpiryTime uint64 `json:"overrideMessageExpiryTime"`
}

type L2GenesisBlockDeployConfig struct {
Expand Down
1 change: 0 additions & 1 deletion op-chain-ops/genesis/testdata/test-deploy-config-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"faultGameGenesisOutputRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"faultGameSplitDepth": 0,
"faultGameWithdrawalDelay": 604800,
"overrideMessageExpiryTime": 0,
"preimageOracleMinProposalSize": 1800000,
"preimageOracleChallengePeriod": 86400,
"systemConfigStartBlock": 0,
Expand Down
3 changes: 0 additions & 3 deletions op-chain-ops/interopgen/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,6 @@ func CompleteL2(l2Host *script.Host, cfg *L2Config, l1Block *types.Block, deploy
if err != nil {
return nil, fmt.Errorf("failed to build L2 rollup config: %w", err)
}
if cfg.OverrideMessageExpiryTime != 0 {
rollupCfg.OverrideMessageExpiryTimeInterop = cfg.OverrideMessageExpiryTime
}
return &L2Output{
Genesis: l2Genesis,
RollupCfg: rollupCfg,
Expand Down
3 changes: 1 addition & 2 deletions op-chain-ops/interopgen/recipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ func InteropL2DevConfig(l1ChainID, l2ChainID uint64, addrs devkeys.Addresses, me
SystemConfigOwner: systemConfigOwner,
L2InitializationConfig: genesis.L2InitializationConfig{
DevDeployConfig: genesis.DevDeployConfig{
FundDevAccounts: true,
OverrideMessageExpiryTime: messageExpiryTime,
FundDevAccounts: true,
},
L2GenesisBlockDeployConfig: genesis.L2GenesisBlockDeployConfig{
L2GenesisBlockGasLimit: 60_000_000,
Expand Down
2 changes: 1 addition & 1 deletion op-e2e/actions/interop/proofs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ func TestInteropFaultProofs_MessageExpiry(gt *testing.T) {
system.SubmitBatchData()

// Advance the chain until the init msg expires
msgExpiryTime := actors.ChainA.RollupCfg.GetMessageExpiryTimeInterop()
msgExpiryTime := system.DepSet().MessageExpiryWindow()
end := emitTx.Identifier().Timestamp.Uint64() + msgExpiryTime
system.AddL2Block(actors.ChainA, dsl.WithL2BlocksUntilTimestamp(end))
system.AddL2Block(actors.ChainB, dsl.WithL2BlocksUntilTimestamp(end))
Expand Down
16 changes: 0 additions & 16 deletions op-node/rollup/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/ethereum/go-ethereum/params"

altda "github.com/ethereum-optimism/optimism/op-alt-da"
opparams "github.com/ethereum-optimism/optimism/op-node/params"
"github.com/ethereum-optimism/optimism/op-service/eth"
)

Expand Down Expand Up @@ -150,11 +149,6 @@ type Config struct {
// parameters to the protocol values, like the execution layer does.
// If missing, it is loaded by the op-node from the embedded superchain config at startup.
ChainOpConfig *params.OptimismConfig `json:"chain_op_config,omitempty"`

// OverrideMessageExpiryTimeInterop is only used for testing purposes.
// It is used to override the protocol-defined interop message time expiry.
// DO NOT this read value directly. Use GetMessageExpiryTimeInterop instead.
OverrideMessageExpiryTimeInterop uint64 `json:"override_message_expiry_time_interop,omitempty"`
}

// ValidateL1Config checks L1 config variables for errors.
Expand Down Expand Up @@ -616,16 +610,6 @@ func (c *Config) GetOPAltDAConfig() (altda.Config, error) {
}, nil
}

// GetMessageExpiryTimeInterop returns the expiry time of interop messages in seconds.
// If a message expiry override is set in the rollup config, it returns the override value.
// Otherwise, it returns the protocol-defined interop message time expiry.
func (c *Config) GetMessageExpiryTimeInterop() uint64 {
if c.OverrideMessageExpiryTimeInterop != 0 {
return c.OverrideMessageExpiryTimeInterop
}
return opparams.MessageExpiryTimeSecondsInterop
}

func (c *Config) AltDAEnabled() bool {
return c.AltDAConfig != nil
}
Expand Down
8 changes: 0 additions & 8 deletions op-node/rollup/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (

"github.com/ethereum/go-ethereum/common"

"github.com/ethereum-optimism/optimism/op-node/params"
"github.com/ethereum-optimism/optimism/op-service/eth"
)

Expand Down Expand Up @@ -824,10 +823,3 @@ func TestConfigImplementsBlockType(t *testing.T) {
})
}
}

func TestConfig_GetMessageExpiryTimeInterop(t *testing.T) {
config := randConfig()
assert.Equal(t, config.GetMessageExpiryTimeInterop(), uint64(params.MessageExpiryTimeSecondsInterop))
config.OverrideMessageExpiryTimeInterop = 100
assert.Equal(t, config.GetMessageExpiryTimeInterop(), uint64(100))
}