github equilibriumco/pathfinder v0.24.0

6 hours ago

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 blockifier and starknet_api crates have been upgraded to 0.20.0-rc.0.
  • Class downloads no longer send block_number=latest to the feeder gateway, as required by Starknet 0.14.4.

Added

  • --rpc.gateway-trace-timeout CLI option (default 30s) bounding how long starknet_traceTransaction and starknet_traceBlockTransactions may spend on the feeder gateway fallback path.
  • BREAKING: The RPC server now pings websocket peers that have been quiet for --rpc.websocket.ping-interval and closes connections that leave --rpc.websocket.max-missed-pings pings 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-timeout and --rpc.websocket.max-missed-pings all reject 0. 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-connections CLI 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-timeout CLI option.
  • New metrics: rpc_websocket_connections (gauge), rpc_websocket_connections_rejected_total and rpc_websocket_connections_closed_total (labelled with reason).

Fixed

  • --max-rpc-connections is now shared across all routes.
  • A batch request could open more subscriptions than --rpc.websocket.max-subscriptions allows, because the requests within a batch are handled concurrently and each of them checked the limit before any of them counted towards it.
  • starknet_traceTransaction and starknet_traceBlockTransactions requests 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-timeout and 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_traceTransaction and starknet_traceBlockTransactions for 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 bounds internal_calls nesting depth, caps the length of every Vec<Felt>/Vec<Event>/Vec<MsgToL1> field, and rejects unknown fields on FunctionInvocation; the trace mapper walks internal_calls iteratively instead of recursively (preventing a stack-overflow SIGSEGV that escapes the RPC layer's catch_unwind); and the resource counters are summed with checked arithmetic instead of +/.unwrap() (preventing overflow panics). The gateway fallback path is also logged with a trace_source marker.

Don't miss a new pathfinder release

NewReleases is sending notifications on new releases.