Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions docker/testnode-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
10 changes: 9 additions & 1 deletion packages/core/src/node-config-patches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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" };

Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/node-config-patches.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" });
Expand Down
Loading