Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migration: Make migration-block-time a required flag #242

Open
wants to merge 2 commits into
base: celo9
Choose a base branch
from
Open
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
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
5 changes: 0 additions & 5 deletions op-chain-ops/cmd/celo-migrate/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"math/big"
"os"
"time"

"github.com/ethereum-optimism/optimism/op-chain-ops/genesis"
"github.com/ethereum-optimism/optimism/op-service/jsonutil"
Expand Down Expand Up @@ -156,10 +155,6 @@ func applyStateMigrationChanges(config *genesis.DeployConfig, l2Allocs types.Gen
return nil, err
}

if migrationBlockTime == 0 {
migrationBlockTime = uint64(time.Now().Unix())
}

// Set the standard options.
cfg.LondonBlock = migrationBlockNumber
cfg.BerlinBlock = migrationBlockNumber
Expand Down
Loading