88 "time"
99
1010 "github.com/prometheus/client_golang/prometheus"
11+ "github.com/scroll-tech/da-codec/encoding"
1112 "github.com/scroll-tech/go-ethereum/ethclient"
1213 "github.com/scroll-tech/go-ethereum/log"
1314 "github.com/urfave/cli/v2"
@@ -84,9 +85,10 @@ func action(ctx *cli.Context) error {
8485 log .Crit ("failed to create l2 relayer" , "config file" , cfgFile , "error" , err )
8586 }
8687
87- chunkProposer := watcher .NewChunkProposer (subCtx , cfg .L2Config .ChunkProposerConfig , genesis .Config , db , registry )
88- batchProposer := watcher .NewBatchProposer (subCtx , cfg .L2Config .BatchProposerConfig , genesis .Config , db , registry )
89- bundleProposer := watcher .NewBundleProposer (subCtx , cfg .L2Config .BundleProposerConfig , genesis .Config , db , registry )
88+ minCodecVersion := encoding .CodecVersion (ctx .Uint (utils .MinCodecVersionFlag .Name ))
89+ chunkProposer := watcher .NewChunkProposer (subCtx , cfg .L2Config .ChunkProposerConfig , minCodecVersion , genesis .Config , db , registry )
90+ batchProposer := watcher .NewBatchProposer (subCtx , cfg .L2Config .BatchProposerConfig , minCodecVersion , genesis .Config , db , registry )
91+ bundleProposer := watcher .NewBundleProposer (subCtx , cfg .L2Config .BundleProposerConfig , minCodecVersion , genesis .Config , db , registry )
9092
9193 l2watcher := watcher .NewL2WatcherClient (subCtx , l2client , cfg .L2Config .Confirmations , cfg .L2Config .L2MessageQueueAddress , cfg .L2Config .WithdrawTrieRootSlot , genesis .Config , db , registry )
9294
@@ -108,8 +110,6 @@ func action(ctx *cli.Context) error {
108110
109111 go utils .Loop (subCtx , 2 * time .Second , l2relayer .ProcessPendingBatches )
110112
111- go utils .Loop (subCtx , 15 * time .Second , l2relayer .ProcessCommittedBatches )
112-
113113 go utils .Loop (subCtx , 15 * time .Second , l2relayer .ProcessPendingBundles )
114114
115115 // Finish start all rollup relayer functions.
0 commit comments