From 34ba0ba52c71838425ccb5ef9e4e8d4663912ff4 Mon Sep 17 00:00:00 2001 From: alecps Date: Thu, 3 Oct 2024 15:28:00 -0400 Subject: [PATCH] make migration-block-time a required flag --- op-chain-ops/cmd/celo-migrate/main.go | 5 +++-- op-chain-ops/cmd/celo-migrate/state.go | 6 ------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/op-chain-ops/cmd/celo-migrate/main.go b/op-chain-ops/cmd/celo-migrate/main.go index e8d1b87c7a8b..b23f2461adc5 100644 --- a/op-chain-ops/cmd/celo-migrate/main.go +++ b/op-chain-ops/cmd/celo-migrate/main.go @@ -66,8 +66,9 @@ var ( Required: true, } migrationBlockTimeFlag = &cli.Uint64Flag{ - Name: "migration-block-time", - Usage: "Specifies a unix timestamp to use for the migration block. If not provided, the current time will be used.", + Name: "migration-block-time", + Usage: "Specifies a unix timestamp to use for the migration block. This should be set to the same timestamp as was used for the sequencer migration. If performing the sequencer migration, this should set to a time in the future around when the migration script is expected to complete.", + Required: true, } oldDBPathFlag = &cli.PathFlag{ Name: "old-db", diff --git a/op-chain-ops/cmd/celo-migrate/state.go b/op-chain-ops/cmd/celo-migrate/state.go index 80eb21618143..6bf998db22a3 100644 --- a/op-chain-ops/cmd/celo-migrate/state.go +++ b/op-chain-ops/cmd/celo-migrate/state.go @@ -155,12 +155,6 @@ func applyStateMigrationChanges(config *genesis.DeployConfig, l2Allocs types.Gen return nil, err } - if migrationBlockTime == 0 { - // If the migration block time is not set, use the time of the last block incremented by one. - // This makes sure the migration is deterministic. - migrationBlockTime = header.Time + config.L2BlockTime - } - // Set the standard options. cfg.LondonBlock = migrationBlockNumber cfg.BerlinBlock = migrationBlockNumber