diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 1f8f0f0..0089d7c 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -59,6 +59,7 @@ services: entrypoint: ["nitro"] command: - --conf.file=/config/l3-nodeConfig.json + - --execution.sequencer.max-block-speed=250ms - --node.dangerous.disable-blob-reader - --http.addr=0.0.0.0 - --http.port=8547 diff --git a/docker/testnode-entrypoint.sh b/docker/testnode-entrypoint.sh index fc67d87..61f32ad 100644 --- a/docker/testnode-entrypoint.sh +++ b/docker/testnode-entrypoint.sh @@ -137,6 +137,7 @@ if [ "$VARIANT" != "l2" ]; then start_background env HOME="$DATA_ROOT/l3node" /usr/local/bin/nitro \ --validation.wasm.allowed-wasm-module-roots "$NITRO_WASM_ROOTS" \ --conf.file="$CONFIG_ROOT/l3-nodeConfig.json" \ + --execution.sequencer.max-block-speed=250ms \ --node.dangerous.disable-blob-reader \ --node.bold.check-staker-switch-interval=1s \ --node.staker.dangerous.without-block-validator \ diff --git a/packages/core/src/node-config-patches.ts b/packages/core/src/node-config-patches.ts index 35ff67c..e987fcd 100644 --- a/packages/core/src/node-config-patches.ts +++ b/packages/core/src/node-config-patches.ts @@ -25,6 +25,14 @@ const FAST_EXECUTION_SEQUENCER_CONFIG = { "max-block-speed": "100ms", } as const; +// L3 sequencer runs at 250ms (not 100ms) to widen the gap between block +// production cycles, reducing the consensus/execution msgIdx-race window that +// under load makes the TransactionStreamer reject eth_sendRawTransaction with +// "wrong msgIdx" (JSON-RPC -32000). +const L3_EXECUTION_SEQUENCER_CONFIG = { + "max-block-speed": "250ms", +} as const; + function getJsonObject(parent: JsonObject, key: string): JsonObject { const value = parent[key]; if (typeof value !== "object" || value === null || Array.isArray(value)) { @@ -146,7 +154,7 @@ export function patchGeneratedL3NodeConfig( dangerous["disable-blob-reader"] = true; delayedSequencer["finalize-distance"] = 0; execution["forwarding-target"] = "null"; - Object.assign(getOrCreateJsonObject(execution, "sequencer"), FAST_EXECUTION_SEQUENCER_CONFIG); + Object.assign(getOrCreateJsonObject(execution, "sequencer"), L3_EXECUTION_SEQUENCER_CONFIG); next["persistent"] = { chain: "local" }; next["ws"] = { addr: "0.0.0.0" }; diff --git a/packages/core/test/node-config-patches.test.ts b/packages/core/test/node-config-patches.test.ts index 0853771..44c9439 100644 --- a/packages/core/test/node-config-patches.test.ts +++ b/packages/core/test/node-config-patches.test.ts @@ -185,7 +185,7 @@ describe("patchGeneratedL3NodeConfig", () => { expect(result.execution).toEqual({ "forwarding-target": "null", sequencer: { - "max-block-speed": "100ms", + "max-block-speed": "250ms", }, }); expect(result.persistent).toEqual({ chain: "local" });