Skip to content

v3.11.0

Choose a tag to compare

@github-actions github-actions released this 24 Sep 16:51
· 3353 commits to main since this release
d22d284

Nuthatch 3.11.0 is about the RPC bill. A backfill no longer buys a block header for every block
that carries an event, a nest at the tip stops paying for checks that learn nothing, and the default
poll interval follows the chain instead of asking every two seconds. Nothing indexed changes: the same
rows, the same sealed segments and the same content addresses. It is a binary swap and a restart.

Compatibility and upgrade

The default poll interval is now the chain's block time (#1497). It was 2 s everywhere. It is now
the chain's block time in whole seconds, never below 2 s: 12 s on Ethereum mainnet, 5 s on Gnosis, and
2 s on Base, Optimism, Polygon, BSC, Arbitrum, Monad and Robinhood Chain. A chain nuthatch does not
ship is measured once at startup over its last 100 blocks. --poll-interval still wins whenever it is
given, and /ready now says where the interval came from, in freshness.poll_interval_source
("block_time" or "flag"). A block cannot be seen before it exists, so no freshness is lost; an
operator who relied on the 2 s cadence on a slow chain should pass --poll-interval 2s.

No CLI flag, nuthatch.toml key or metric was removed or renamed. One flag is added. The NID and data
identity are computed as before.

Backfill: timestamps come from the logs

Every row carries block_timestamp, and until now that cost one eth_getBlockByNumber per distinct
block, because eth_getLogs did not return it. Current execution clients put blockTimestamp on every
log, and nuthatch now takes it from there, buying a header only for a block whose logs lack it. We
checked Alchemy's Ethereum, Sepolia, Base, Arbitrum and Arc endpoints and the public Sepolia, Base and
Arc ones: all carry it, and it matches the header.

The same 20,000-block Sepolia backfill paid 4,444 eth_getBlockByNumber on 3.9.0 and 34 on this
release: about 89,600 compute units at Alchemy's prices against 1,300. The sealed segments were
byte-identical. The timestamp cache this fills is the existing one, forgotten above the fork on every
reorg.

At the tip

  • Idle polls skip the reorg check (#1493). A poll that sees the same tip and cursor as the last
    check no longer fetches a header. A poll with a window to commit still checks first, and an idle
    cursor is rechecked every 12 s, so a reorg at a stalled tip still converges.
  • One header per window checkpoint (#1494). The checkpoint took the boundary block's hash and its
    timestamp in two requests; Source::block_record takes both in one.
  • The held seal range reuses its pin (#1495). A nest holding rows short of a seal re-pinned a
    header at the finality boundary every window. It now reuses the last pin until the watermark passes
    it or its hash changes. A nest with nothing held behaves as before.
  • A tip eth_getLogs goes to an endpoint that holds its block (#1498). The pool is round-robin, so
    the tip call and the logs call usually hit different endpoints, and one a block behind refused the
    logs call (-32014) and failed over. Each endpoint's reported head is remembered and the logs call
    goes first to one that holds its toBlock.

Measured on a quiet Sepolia nest against Alchemy over the same ten minutes: 3.9.0 at its 2 s default
spent 14,620 compute units; this release at 2 s spent 8,070, and at its default 12 s, 5,310. What is
left is roughly one eth_getLogs and two headers per block.

--rpc-fallback

Endpoints listed with --rpc-fallback (repeatable) are asked only while every other endpoint is
failing. The pool otherwise shares calls round-robin, so a paid key listed with --rpc takes its share
of every call; behind free endpoints as a fallback it bills only for what they could not answer. A flag
rather than config, because a keyed URL does not belong in the nest. Single-chain runtimes only, like
--rpc.

Folds stay out of the default build

The RFC-0059 checkpointed-folds work (#1479) landed behind the off-by-default folds feature. The
published binary and images are not built with it, and a default build refuses to start a nest that
ships a folds/ directory rather than ignoring it.