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

op-node,op-service: Add Fjord override flag #10648

Merged
merged 1 commit into from
May 24, 2024
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
6 changes: 5 additions & 1 deletion op-node/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ func applyOverrides(ctx *cli.Context, rollupConfig *rollup.Config) {
ecotone := ctx.Uint64(opflags.EcotoneOverrideFlagName)
rollupConfig.EcotoneTime = &ecotone
}
if ctx.IsSet(opflags.FjordOverrideFlagName) {
fjord := ctx.Uint64(opflags.FjordOverrideFlagName)
rollupConfig.FjordTime = &fjord
}
}

func NewSnapshotLogger(ctx *cli.Context) (log.Logger, error) {
Expand All @@ -271,7 +275,7 @@ func NewSnapshotLogger(ctx *cli.Context) (log.Logger, error) {

func NewSyncConfig(ctx *cli.Context, log log.Logger) (*sync.Config, error) {
if ctx.IsSet(flags.L2EngineSyncEnabled.Name) && ctx.IsSet(flags.SyncModeFlag.Name) {
return nil, errors.New("cannot set both --l2.engine-sync and --syncmode at the same time.")
return nil, errors.New("cannot set both --l2.engine-sync and --syncmode at the same time")
} else if ctx.IsSet(flags.L2EngineSyncEnabled.Name) {
log.Error("l2.engine-sync is deprecated and will be removed in a future release. Use --syncmode=execution-layer instead.")
}
Expand Down
8 changes: 8 additions & 0 deletions op-service/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const (
CanyonOverrideFlagName = "override.canyon"
DeltaOverrideFlagName = "override.delta"
EcotoneOverrideFlagName = "override.ecotone"
FjordOverrideFlagName = "override.fjord"
)

func CLIFlags(envPrefix string, category string) []cli.Flag {
Expand All @@ -41,6 +42,13 @@ func CLIFlags(envPrefix string, category string) []cli.Flag {
Hidden: false,
Category: category,
},
&cli.Uint64Flag{
Name: FjordOverrideFlagName,
Usage: "Manually specify the Fjord fork timestamp, overriding the bundled setting",
EnvVars: opservice.PrefixEnvVar(envPrefix, "OVERRIDE_FJORD"),
Hidden: false,
Category: category,
},
CLINetworkFlag(envPrefix, category),
CLIRollupConfigFlag(envPrefix, category),
}
Expand Down