You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: validate complete watchdog state on idempotent init; add permissive CORS
Idempotent init now requires readable config.json and a non-empty checkpoint
snapshot before exit 0, so supervisors are not told success on unusable
state. Document LONG_BLOCK_RANGE_ERROR_CODES as init-only. Enable
CorsLayer::permissive for browser POST /tx.
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,6 +146,7 @@ Notes:
146
146
- payload size is bounded at ingress; oversized requests are rejected before entering the hot path.
147
147
- overload is enforced at queue admission: if the inclusion-lane queue is full, `POST /tx` returns HTTP `429` with code `OVERLOADED` and message `queue full`.
148
148
- queue capacity is an internal runtime constant tuned alongside inclusion-lane chunking to absorb short bursts; if this starts triggering persistently, it is a signal to revisit runtime sizing or throughput rather than add another admission layer.
149
+
- CORS is currently **permissive** (`Access-Control-Allow-Origin: *`, all methods/headers) so browser wallets can call `POST /tx`. Tighten once the planned ingress/egress port split lands.
|`CARTESI_WATCHDOG_BLOCKCHAIN_ID`| Chain id label for `status.prom` metrics (prefer set at `init`; optional auto-detect via `eth_chainId` when L1 endpoint is present at `init`) |
161
161
|`CARTESI_WATCHDOG_METRICS_FILE`| Override path for the Prometheus textfile written by each `tick`|
162
162
|`CARTESI_WATCHDOG_LUA_DEPS`|`.deps/lua`|
163
+
|`CARTESI_WATCHDOG_LONG_BLOCK_RANGE_ERROR_CODES`| Optional CSV of RPC error codes that trigger `eth_getLogs` partition retry. **Evaluated only at `init` and persisted in `config.json`** — not a tick-time override; re-running idempotent `init` does not refresh it. Wipe state and re-init (or edit `config.json`) to change. Default matches the sequencer: `-32005,-32012,-32600,-32602,-32616`. |
163
164
164
165
The sequencer discovers and pins `input_box_address` at startup; use the same values as `CARTESI_SEQUENCER_BLOCKCHAIN_HTTP_ENDPOINT` / `CARTESI_SEQUENCER_APP_ADDRESS` configuration.
165
166
@@ -174,13 +175,15 @@ Pick one:
174
175
3.**Replay from genesis** (only for new rollups / low block height — slow).
175
176
176
177
Run `init` once to store the bootstrap CM snapshot into the watchdog state
177
-
layout. Re-running `init` on an already-initialized state directory is a no-op
178
-
success (exit `0`), matching `sequencer setup` — safe for process supervisors
179
-
that always invoke init before tick. The L1 RPC URL is not persisted — each
180
-
`tick` reads `CARTESI_WATCHDOG_BLOCKCHAIN_HTTP_ENDPOINT` so it can rotate
181
-
without editing state. If `CARTESI_WATCHDOG_BLOCKCHAIN_ID` is unset at `init`,
182
-
auto-detect also needs that endpoint present then (prefer setting the chain id
183
-
explicitly):
178
+
layout. Re-running `init` on a **complete** already-initialized state directory
179
+
is a no-op success (exit `0`), matching `sequencer setup` — safe for process
180
+
supervisors that always invoke init before tick. If `head.json` exists but
181
+
`config.json` or the selected snapshot is missing/corrupt, `init` fails (exit
182
+
`1`) and asks you to wipe `state_dir` and re-run — it will not certify an
183
+
unusable state. The L1 RPC URL is not persisted — each `tick` reads
184
+
`CARTESI_WATCHDOG_BLOCKCHAIN_HTTP_ENDPOINT` so it can rotate without editing
185
+
state. If `CARTESI_WATCHDOG_BLOCKCHAIN_ID` is unset at `init`, auto-detect also
186
+
needs that endpoint present then (prefer setting the chain id explicitly):
0 commit comments