Repository navigation
v3.13.2
Nuthatch 3.13.2 is the result of a hardening pass over what 3.13.1 already does: a new user's path from
install to first query, the SQL surface under inputs it should refuse, crash recovery, and measured
performance, run against Arbitrum One and Base. It fixes three silent wrong answers, a query that could
spill gigabytes into memory, and a set of smaller faults. Everyone should take it, and anyone indexing
Arbitrum should read the first section.
What held up, measured: install to a first indexed query in 13.4 seconds, over a 2,000-block backfill;
six kill -9s during backfill and sealing left every one of 17 tables identical to an uninterrupted
run, row for row and hash for hash; a 40,000-block backfill at about 465 blocks a second with a peak RSS
of 315 MB. (That rate was measured through keyless arb1 before the timestamp fix below, which costs a
header per block there. A keyed RPC was not measured.)
Compatibility and upgrade
Replace the binary and restart. There is no storage migration or NID change. Five things an operator
may notice:
- An Arbitrum nest on
arb1.arbitrum.ionow stores real timestamps, fetched as block headers, and
backfills much more slowly through that keyless endpoint (below). A keyed RPC avoids it. analytics.max_temp_sizenow defaults to 2 GB, and is enforced (below). A/sqlquery that spills
past it answers507.- Authored entity columns reach SQL with their types: a
COUNT(*)is aHUGEINT, a boolean a
BOOLEAN, a NULL a NULL. A query that cast them from text still works; one that compared them as
text now compares numbers, which is what it meant. nuthatch checkfails on anuthatch.tomlkey nuthatch does not read, anddevwarns about it.DELETE /_admin/nests/<name>refuses a name no mount could have with400, and says
"was_mounted": falsewhen there was nothing to unmount. A retried DELETE is still a200.
Arbitrum timestamps were stored as 0 (#1570)
arb1.arbitrum.io sends "blockTimestamp": "0x0" on every log. Since 3.11.0 nuthatch takes a
block's timestamp from its logs when they carry one, so every row indexed through that endpoint, the
first one init writes for arbitrum-one, was stored with block_timestamp = 0. A timestamp of 0 is
now treated as absent and the block header is fetched.
That has a cost on the keyless endpoints, and it is stated rather than hidden. arb1 refuses
header batches of the size nuthatch used to send (a 403 at 200, a 429 above about ten), so a pool that
holds arb1 now sends it batches of ten, the size it takes, recorded in the chain registry beside the
endpoint itself. It works, and the timestamps are right, but keyless arb1 rations header calls:
a backfill through it measured about 17 blocks a second, against the chain's four, and sustained use
can be refused for a while. init and dev now say so for an Arbitrum nest on arb1. For history,
use a keyed Arbitrum RPC in place of arb1 in rpc_urls: while arb1 is anywhere in the pool,
primary or fallback, every header batch goes out at ten, keyed endpoints included.
Rows already stored keep their zero: nuthatch does not re-decode stored history, so a nest that
indexed Arbitrum through arb1 on 3.11.0 to 3.13.1 needs the affected range indexed again.
The spill cap is enforced (#1571)
DuckDB reports max_temp_directory_size and does not enforce it on every spill: a single cross join
spilled 2.7 GB in 25 seconds past a 128 MB cap. With no cap set, DuckDB's default is 90% of the free
space where it spills, and on many Linux systems that is a tmpfs /tmp, which is RAM outside the
footprint budget. The /sql guard now measures each query's private spill directory and stops the
query past the cap, answering 507 with the cap it hit. The default is 2 GB. And spill no longer goes
to /tmp by default on Linux, where that is often a tmpfs and so RAM outside the per-cursor budget: it
goes to ~/.cache/nuthatch (or $XDG_CACHE_HOME/nuthatch), unless analytics.temp_directory says
otherwise.
Authored entities reached SQL as text (#1572)
Every maintained cell was rendered as text for the SQL surface. A COUNT(*) column was VARCHAR, so
sum(n) would not bind and max(n) compared strings, returning "97" over the true 2,226; and a NULL
arrived as the four-letter string NULL, so IS NULL matched nothing. Cells are now typed. /derived
is unchanged: it keeps integers as strings for JavaScript clients, as before.
A misspelt key was silently ignored (#1582)
With start_block spelt start_blok, nuthatch check passed and dev backfilled from the
recent-history default instead of the declared block. Every unknown key in nuthatch.toml is now a
warning at startup and a failure in check, naming the key it most likely meant: start_blok is
answered with "did you mean start_block?" (#1584). A key from a feature this build lacks is reported the same
way, since this build does not read it.
Smaller fixes
- A
--finality-onlynest is no longer reported wedged while it waits for finality (#1575). The
stall check measured the distance to the unfinalized tip; it now measures to the cursor's ceiling.
A new nest waiting for finality to reach its start block is counted from that block, not block 0. /sqlanswered 500 for non-ASCII text after a keyword (#1573), such as a CTE namedabéé. The
comment stripper rebuilt the query byte by byte; and the CTE parser now takes the non-ASCII
identifiers DuckDB accepts.- Cold entity point reads (#1574) find the table with one probe instead of one query per table.
- MCP reported HTTP errors as successful tool calls (#1579): a missing entity, and a refused SQL
query. They now setisError, with the server's explanation. - A missing-column hint could suggest a column from another table (#1580). Hints now come from the
columns the query can see. /schematold agents thesqltool could not see rows abovesealed_through(#1576). It reads
the live tip as well.- Offline
nuthatch sqlof an authored entity (#1577) now says the entity lives in the running
node, rather than that the table does not exist. - Unmounting a name that could never be mounted (#1578), described above.
- GraphQL builds only (
--features graph, not the published binaries): a deeply nested query could
overflow the stack and abort the process, and nested fragments could expand without bound (#1581).
Nesting is capped at 128 levels and expansion at 10,000 selections.