Release highlights
Pathfinder 0.24.0 enables support for Starknet 0.14.4, improves RPC WebSocket reliability and limits, and hardens the feeder-gateway trace fallback against slow or untrusted responses.
⚠️ This is a breaking release: RPC WebSocket clients must respond to server-initiated pings, which are now used to detect inactive connections. ⚠️
Changed
- The
blockifierandstarknet_apicrates have been upgraded to 0.20.0-rc.0. - Class downloads no longer send
block_number=latestto the feeder gateway, as required by Starknet 0.14.4.
Added
--rpc.gateway-trace-timeoutCLI option (default 30s) bounding how longstarknet_traceTransactionandstarknet_traceBlockTransactionsmay spend on the feeder gateway fallback path.- BREAKING: The RPC server now pings websocket peers that have been quiet for
--rpc.websocket.ping-intervaland closes connections that leave--rpc.websocket.max-missed-pingspings unanswered. Clients are required to answer pings, which RFC 6455 mandates and which browsers and the mainstream websocket libraries handle for you, but only while the client is reading from the connection. A client that stops reading for longer than the ping interval times the missed ping limit is disconnected. The keepalive cannot be turned off, so--rpc.websocket.ping-interval,--rpc.websocket.initial-frame-timeoutand--rpc.websocket.max-missed-pingsall reject0. Raise the ping interval rather than trying to disable it. - Concurrently open RPC websocket connections are now limited to 1024 by default, configurable with the
--rpc.websocket.max-connectionsCLI option. Upgrade requests over the limit are rejected with HTTP 503. - RPC websocket connections that don't send anything after being established now time out, configurable with the
--rpc.websocket.initial-frame-timeoutCLI option. - New metrics:
rpc_websocket_connections(gauge),rpc_websocket_connections_rejected_totalandrpc_websocket_connections_closed_total(labelled withreason).
Fixed
--max-rpc-connectionsis now shared across all routes.- A batch request could open more subscriptions than
--rpc.websocket.max-subscriptionsallows, because the requests within a batch are handled concurrently and each of them checked the limit before any of them counted towards it. starknet_traceTransactionandstarknet_traceBlockTransactionsrequests that fall back to the feeder gateway could hang indefinitely on a slow or unresponsive sequencer (the gateway client retries transport errors with an unbounded exponential backoff), holding RPC tasks and letting a public-network client exhaust the RPC concurrency budget. These requests are now bounded by--rpc.gateway-trace-timeoutand bail out early on graceful shutdown.- Subscriptions are now torn down when their websocket connection closes, instead of when they next try to send.
- Hardened the feeder-gateway trace fallback path used by
starknet_traceTransactionandstarknet_traceBlockTransactionsfor the mainnet block range where local re-execution is impossible. Any public-network caller can force this path for the affected blocks, so a compromised or byzantine gateway response is untrusted authoritative input. The trace deserialiser now boundsinternal_callsnesting depth, caps the length of everyVec<Felt>/Vec<Event>/Vec<MsgToL1>field, and rejects unknown fields onFunctionInvocation; the trace mapper walksinternal_callsiteratively instead of recursively (preventing a stack-overflowSIGSEGVthat escapes the RPC layer'scatch_unwind); and the resource counters are summed with checked arithmetic instead of+/.unwrap()(preventing overflow panics). The gateway fallback path is also logged with atrace_sourcemarker.