Skip to content

Commit a398f64

Browse files
author
colinlyguo
committed
enforce single batch submission in validium mode
1 parent f4d6e67 commit a398f64

File tree

1 file changed

+7
-0
lines changed
  • rollup/cmd/rollup_relayer/app

1 file changed

+7
-0
lines changed

rollup/cmd/rollup_relayer/app/app.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ func action(ctx *cli.Context) error {
9696
log.Crit("cfg.L2Config.ChunkProposerConfig.MaxL2GasPerChunk must be greater than 0")
9797
}
9898

99+
if cfg.L2Config.RelayerConfig.ValidiumMode {
100+
// Force single batch submission for validium mode, this looks a bit hacky but it avoids more changes in the relayer code.
101+
cfg.L2Config.RelayerConfig.BatchSubmission.MinBatches = 1
102+
cfg.L2Config.RelayerConfig.BatchSubmission.MaxBatches = 1
103+
log.Info("Validium mode detected, forcing single batch submission", "minBatches", 1, "maxBatches", 1)
104+
}
105+
99106
l2relayer, err := relayer.NewLayer2Relayer(ctx.Context, l2client, db, cfg.L2Config.RelayerConfig, genesis.Config, relayer.ServiceTypeL2RollupRelayer, registry)
100107
if err != nil {
101108
log.Crit("failed to create l2 relayer", "config file", cfgFile, "error", err)

0 commit comments

Comments
 (0)