Skip to content

Commit 544ba3f

Browse files
committed
fix: slow L3 sequencer to 333ms to avoid msgIdx race under load
The L3 nitro sequencer ran with execution.sequencer.max-block-speed=100ms. Under load the consensus/execution message index momentarily diverges and nitro's TransactionStreamer rejects eth_sendRawTransaction with "wrong msgIdx got X expected Y" (JSON-RPC -32000), hanging chain-sdk tests and crashing arbitrum-portal E2E setup on the L3 node. Make 333ms the default L3 sequencer max-block-speed in patchGeneratedL3NodeConfig to widen the block-production cycle and shrink the race window. L2 is unchanged (still 100ms; it has timeboost).
1 parent e09f99b commit 544ba3f

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

packages/core/src/node-config-patches.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ const FAST_EXECUTION_SEQUENCER_CONFIG = {
2525
"max-block-speed": "100ms",
2626
} as const;
2727

28+
// L3 sequencer runs at 333ms (not 100ms) to widen the gap between block
29+
// production cycles, reducing the consensus/execution msgIdx-race window that
30+
// under load makes the TransactionStreamer reject eth_sendRawTransaction with
31+
// "wrong msgIdx" (JSON-RPC -32000).
32+
const L3_EXECUTION_SEQUENCER_CONFIG = {
33+
"max-block-speed": "333ms",
34+
} as const;
35+
2836
function getJsonObject(parent: JsonObject, key: string): JsonObject {
2937
const value = parent[key];
3038
if (typeof value !== "object" || value === null || Array.isArray(value)) {
@@ -146,7 +154,7 @@ export function patchGeneratedL3NodeConfig(
146154
dangerous["disable-blob-reader"] = true;
147155
delayedSequencer["finalize-distance"] = 0;
148156
execution["forwarding-target"] = "null";
149-
Object.assign(getOrCreateJsonObject(execution, "sequencer"), FAST_EXECUTION_SEQUENCER_CONFIG);
157+
Object.assign(getOrCreateJsonObject(execution, "sequencer"), L3_EXECUTION_SEQUENCER_CONFIG);
150158
next["persistent"] = { chain: "local" };
151159
next["ws"] = { addr: "0.0.0.0" };
152160

packages/core/test/node-config-patches.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ describe("patchGeneratedL3NodeConfig", () => {
185185
expect(result.execution).toEqual({
186186
"forwarding-target": "null",
187187
sequencer: {
188-
"max-block-speed": "100ms",
188+
"max-block-speed": "333ms",
189189
},
190190
});
191191
expect(result.persistent).toEqual({ chain: "local" });

0 commit comments

Comments
 (0)