From e4243568c57444c60f01c08da3dfa839e56773e7 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Fri, 15 Dec 2023 22:54:55 -0700 Subject: [PATCH] Speed up the inbox reader for L3 chains --- cmd/nitro/nitro.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/nitro/nitro.go b/cmd/nitro/nitro.go index 3efba5df28..b850b98981 100644 --- a/cmd/nitro/nitro.go +++ b/cmd/nitro/nitro.go @@ -925,9 +925,12 @@ func applyChainParameters(ctx context.Context, k *koanf.Koanf, chainId uint64, c safeBatchSize := l2MaxTxSize - bufferSpace chainDefaults["node.batch-poster.max-size"] = safeBatchSize chainDefaults["execution.sequencer.max-tx-data-size"] = safeBatchSize - bufferSpace + // Arbitrum chains produce blocks more quickly, so the inbox reader should read more blocks at once. + // Even if this is too large, on error the inbox reader will reset its query size down to the default. + chainDefaults["node.inbox-reader.max-blocks-to-read"] = 10_000 } if chainInfo.DasIndexUrl != "" { - chainDefaults["node.batch-poster.max-size"] = 1000000 + chainDefaults["node.batch-poster.max-size"] = 1_000_000 } err = k.Load(confmap.Provider(chainDefaults, "."), nil) if err != nil {