Skip to content

Commit

Permalink
make migration-block-time a required flag
Browse files Browse the repository at this point in the history
  • Loading branch information
alecps committed Oct 3, 2024
1 parent 2bbb7c3 commit 34ba0ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 3 additions & 2 deletions op-chain-ops/cmd/celo-migrate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 0 additions & 6 deletions op-chain-ops/cmd/celo-migrate/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 34ba0ba

Please sign in to comment.