Skip to content

v3.7.0

Choose a tag to compare

@github-actions github-actions released this 13 Sep 21:35
· 3669 commits to main since this release
2c0a6a4

The first release since the 2026 feature freeze ended on 2026-09-08 (#1231), and the first built
from the programme that replaced it. A nest can now mirror its sealed segments to a bucket as it
seals them. The DuckDB memory walls are operator settings and new seals are zstd. A declared query
is bounded by what it will read. Behind a Cargo feature the release binaries do not enable, a mount
can charge for its declared queries in x402 and settle what it recorded. Alongside those come a
local file drop, the subgraph port tooling, and a GraphQL read surface that has been measured,
rescoped and parked. For most operators it is a binary swap and a restart. The exceptions are one
environment setting and nests with a fully named tuple event parameter, both below.

Compatibility and upgrade

No CLI flag, nuthatch.toml key or metric was removed or renamed. One change forces a re-index: a
nest with a fully named tuple event parameter gets a new NID and data identity (#1364).
Checked: git diff v3.6.1..origin/main -- src/cli.rs adds commands and flags
and removes none; src/metrics.rs only adds series; src/blob.rs is untouched, so the NID and
data_identity are computed as before; decode/src/registry.rs's registry_hash still hashes
each column's name, Solidity type and storage kind, plus the component names and types of a tuple it
now stores as an object; the segment catalogue gains two fields
with serde defaults, so a 3.6.1 catalogue reads as version 0 and profile snappy. Every new knob
is a flag, an environment variable or a mounts.toml table, never nuthatch.toml, so it cannot
move a content address.

Seven behaviours change. The first two can stop a nest from starting.

  • NUTHATCH_SQL_MAX_CONCURRENCY above 2 now refuses to start unless the memory per connection
    comes down with it (#1241). Since 3.5.0 (#1165), extra permits split 1024 MB between them without
    saying so. Startup now checks (sql_permits × analytics.memory_limit) + ingestion_reservation ≤ 2 GiB, and at the 512 MB default, four permits come to 3072 MB. To keep 3.6.1's behaviour at four
    permits, set NUTHATCH_ANALYTICS_MEMORY_LIMIT=256MB. At the default of two permits nothing
    changes.
  • A declared query (/q/{name}) can now answer 422 where 3.6.1 answered (#1340). This applies
    on every mount, priced or not. A query is refused when its plan could read more than 512 MiB, or
    could rescan (a nested-loop or delim join, or a recursive CTE). It is also refused when it touches
    a relation the catalogue cannot account for: labels, offchain snapshots, factory children, or a
    view that calls a file-reading table function.
  • A nest with a fully named tuple event parameter must be re-indexed (#1336, #1364). Such a
    parameter is now stored as a JSON object keyed by its component names rather than a positional
    array. So that one data identity never holds both shapes, the registry hash now records that
    shape, which gives the nest a new NID and data identity. On its old data the nest refuses to start
    with "Re-index from scratch": remove nuthatch.redb and segments/ and let it backfill, or build
    the new copy beside the old one and swap. A tuple left unnamed, partly named, duplicate-named,
    indexed or used as an array is stored as before, and every other nest keeps its identity and its
    data. A published mirror of an affected nest starts again under the new identity's prefix; the
    old prefix is left in place.
  • New segments are byte-different from 3.6.1's for the same rows (#1239). Hash comparison between
    two operators holds only when both segments were written under the same writer profile. The
    catalogue records the profile of every segment.
  • A runtime's root /ready now answers 503 when any nest inside it has stalled, not only when
    one is quarantined (#1232). A supervisor that restarts on a failed readiness check should watch
    /health instead.
  • A sparse nest reads stalled later than it did in 3.6.1 (#1347).
  • A contract address of 0x0 is refused when the nest starts (#1338).

Downgrading to 3.6.1 after running this release is not safe. The 3.6.1 binary reads segments back
through a parquet crate built without zstd. It also reads a block checkpoint as a bare hash, and
this release stores hash\ttimestamp. Keep a copy of the directory from before the upgrade if you
might need to roll back.

What is feature-gated. The x402 counter, [mounts.counter] and nuthatch settle exist only in
a --features counter build. The release workflow builds the default and postgres-store binaries,
so no release binary contains them. S3 publishing needs object-store, which is on by default.
port-report, port-emit and graph-validate are hidden authoring commands.

A nest mirrors its sealed segments to a bucket (RFC-0052)

nuthatch publish sync --target <dir or s3://bucket/prefix> copies every segment that is not
provisional to <target>/<data identity>/. It writes Parquet under per-table keys first, then the
catalogue byte for byte, then publish.json. A second run uploads only the envelope (#1335).
nuthatch publish verify checks every published object against the local catalogue; --deep
downloads each object and hashes it again.

dev and serve publish continuously with --publish-target, --publish-interval (60 s) and
--publish-parallelism (2, at most 16). A runtime directory takes the same settings per mount, from
[mounts.publish] in mounts.toml, and refuses the flag (#1349). The mirror runs a pass at start,
after every seal and on the interval, on its own thread, so a slow bucket delays the mirror and never
a seal. Five consecutive failures on one object dead-letter it, and retries slow tenfold until an
upload succeeds. Credentials are the usual AWS_* variables. Leave out DeleteObject: a mirror that
cannot delete is append-only by policy.

A publishing nest also exports nuthatch_publish_sealed_through, _lag_blocks,
_pending_segments, _bytes_total, _errors_total and _dead_letter. A nest that does not publish
exports none of them, so a column of zeros cannot be mistaken for a mirror that is caught up.
docs/operators.md carries a "Mirror behind" alert.

docs/reading-published-nest.md is the contract for reading a mirror (#1353). It covers the layout,
why globbing a published table is safe when globbing a local one is not, and the catalogue_sha256
check a reader makes before trusting sealed_through. A test publishes a nest and holds the page to
what was written. CI now publishes to a real MinIO (#1350). It also runs Trino 483 over the prefix,
on a table whose second seal added a column, and requires the counts and sums to match DuckDB's
(#1354). With Trino's mapping of columns by name turned off, that run returned
10503500000000000004501500 against 14007000000000000006003000 and raised no error. Trino 483 maps by
name by default, so the risk is a catalog or fork that turns the mapping off.

The analytical walls are settings, and they refuse rather than shrink (RFC-0047 C4, #1241)

The DuckDB limits are now environment settings with the same defaults as before:
NUTHATCH_ANALYTICS_MEMORY_LIMIT (512 MB), NUTHATCH_ANALYTICS_THREADS (2, ceiling 16),
NUTHATCH_ANALYTICS_TEMP_DIRECTORY, NUTHATCH_ANALYTICS_MAX_TEMP_SIZE and
NUTHATCH_INGESTION_RESERVATION. The reservation defaults to 1024 MB, which is what the 2 GiB budget
leaves after two 512 MB permits. It can be raised but not lowered, because nothing caps ingest at that
figure: a lower number would hand DuckDB memory against a promise no code keeps. No configuration
the gate accepts gives DuckDB more memory than the shipped default that the footprint CI job
measures.
A query that cannot run inside its budget fails and names these keys, and block
processing is never slowed for it.

New seals are zstd, and the catalogue names the writer (RFC-0047 C1 to C3)

New segments are written with zstd at level 3 (#1239). Address and hash columns carry bloom filters,
near-unique hash columns skip the dictionary, and rows are sorted by block_number then log_index.
The catalogue now has a version (#1237). It names each segment's writer profile: zstd-bloom-v1 for
new seals, snappy for anything older or unlabelled. The order was deliberate: the catalogue had to
name the profile before the codec could change (#1235). A nest holding both profiles serves across
the seam. A test fails if new bytes are labelled snappy. parquet 58 has no flag for page
checksums, so they stay at the crate default.

nuthatch doctor --catalogue confirms that every catalogue entry's file exists and hashes, and exits
1 if one does not; it quarantines nothing. docs/reading-segments.md is the contract for reading the
sealed directory without nuthatch (#1238). Four counters are UInt64, 256-bit values are canonical
decimal Utf8, and _dec and _overflow exist only as DuckDB view columns, never in the file.
docs/bench/segment-layout.md holds the writer spec, checked against a real footer (#1236). Storing
256-bit values in a narrower Parquet type (#1222) is deferred.

Readiness sees every nest, and a quiet one is left alone (#1232, #1347)

A runtime's root /ready read only the quarantine set. It answered {"quarantined":[],"ready":true}
while the horizon nest inside it sat 753,000 blocks behind for two days, on the surface that issues
TAP receipts. The root and the per-nest endpoint now call one function. The root's 503 body names
each stalled nest under stalled, with the conditions that made it unready.

The opposite fault read a healthy nest as unready. hackathon-arcaidia-v2-sepolia answered 503 at
5,974 blocks behind while serving complete data. Its only seal is the span cut: 10,800 blocks for a
chain outside the registry, about 36 hours on Sepolia, against a 12-hour seal clock. A tip seal now
counts as stalled only when the clock has run out and the seal lag also exceeds twice the chain's
seal_span. The case #1199 fixed, 739,192 blocks behind, still reads stalled.

A declared query is bounded by what it reads (RFC-0048 Phase 0, #1340)

Admission runs on the connection that executes the statement. Rows copied from the hot store and from
maintained entities count against a 512 MiB cap at their serialized size. The physical plan is then
bounded before it runs: each Parquet scan is charged at the size of the widest table it can reach.
What it refuses is listed under compatibility. The cap was checked against the catalogues of fourteen
production nests on 2026-09-13. The widest sealed table is 88.1 MiB, and the largest nest is 642.5 MiB
in total. RFC-0048 §9 notes that no deployment serves named queries yet, so this is a measurement of
catalogues, not of real queries. nuthatch_named_scan_bytes (a histogram) and
nuthatch_named_scan_refusals_total supply the telemetry Phase 1 waits on. Item 4, the two-tier
price, stays unbuilt.

The x402 counter and nuthatch settle (RFC-0046, --features counter)

RFC-0046 §1 is now a test (#1240): with payment absent, the default surface must not charge. It
fails the build if a 402 reaches router(), if an x402 crate appears in Cargo.lock, or if dev or
serve gains a payment flag. Verification is a pure function (#1243). It recovers the EIP-3009
signer and checks recipient, amount, validity window and network against the operator's own
configuration, never the payment's claims. It refuses high-s signatures and unsupported protocol
versions.

In a counter build, a mount may put a price on its declared queries with [mounts.counter]: a
price in USDC base units, a recipient and a network (#1271). An unpaid request gets 402 with
a quote. The quote carries the byte bound, the catalogue hash and sealed_through (#1340). A client
that echoes the quote id in nuthatch-quote gets 409 and a fresh quote if either has moved. A valid
authorisation is recorded once an answer exists, with its nonce spent per payer. The counter makes no
RPC or facilitator call.

nuthatch settle --dir <nest> --exec <cmd> drains the recorded authorisations (#1339). The command's
exit code decides each one: 0 settled, 2 failed, anything else deferred. Outcomes are journalled to
spent.jsonl and payers.jsonl, and the counter refuses a payer whose settlement failed. The counter
and the settler share a lock file, so a second settler will not start. --batch N passes up to N rows
per invocation, and a row the command does not report stays pending. --dry-run lists the queue
without writing anything.

Decode: named tuples and block timestamps (#1305, #1336, #1337)

The schema now records each tuple column's ABI component names, one level deep (#1305). A fully named
tuple decodes to a JSON object keyed by those names (#1336). A tuple whose components are partly
named, unnamed or duplicated stays a positional array; no name is ever invented. schema.json is
byte-identical for a nest with no tuple.

A block checkpoint now stores the timestamp beside the hash, so the generated
_meta { block { timestamp } } answers instead of returning null (#1337). A store written before this
still reads, and reorg comparison still reads only the hash.

init and add take --start-block (#1332)

When the deploy-block probe is rate-limited or the endpoint prunes state, the probe used to fail
silently and the nest backfilled a recent window instead of the contract's history.
--start-block <n,...> sets the start block per address, in address order, and an empty entry still
probes. A probe that fails now ends the report with a warning naming the addresses.

The builder skill's workflows.md now states what 3.6.1 actually does after nuthatch add (#1348). Adding a contract
changes the decode registry hash, so the next dev refuses to start and asks for a re-index; it does
not resume. The page describes the build-a-copy-then-swap route. On the two Arcaidia v2 nests that
route kept the outage to about a second.

Offchain file drop (RFC-0045 stage 1, #1272)

nuthatch offchain drop <file> --table <name> stores a CSV file, a JSON array or a Parquet file as an
immutable, content-addressed snapshot under the offchain__ SQL namespace. A local manifest records
the source, ingest time, tool version, row count and columns. Snapshots join chain tables in /sql
but stay outside the chain seal and the replay path, so a nest still re-indexes from chain with the
offchain directory absent. A table name that differs from an existing one only by case is refused. A
declared query cannot read an offchain table (see #1340 above). Stage 2, a pull connector for prices
(#1216), is open.

Subgraph port tooling (RFC-0044 S1, S2, S5)

nuthatch port-report --dir <subgraph> classifies every entity field as exact, call-derived, fixed
point or unreachable, and cites a mapping line for each (#1242). nuthatch port-emit --dir <subgraph> --out <nest> runs on a nest that init --from-subgraph has scaffolded (#1244). It overlays the
[[calls]] taken from the mapping's real contract reads, a view for each exact field, the checks and
a README. Running totals become RFC-0041 incremental entities, with an _overflow companion so a
value past 38 digits cannot drop out of a sum without anyone knowing (#1254).

The overlay now prints a coverage line (fields answered out of fields classified exact), and a field
it cannot render is named rather than answered wrongly (#1251, #1253, #1279, #1293). The Uniswap V4
acceptance port was pinned at block 25,943,500 and showed zero field divergences across 150,883
aligned rows on the fields it answers (#1278). The two remaining slices, S3 (#1212) and S4 (#1213),
were closed as not planned on 2026-09-12.

The Graph compatibility surface: a partial read surface, now parked (RFC-0053)

A nest carrying a ported graph/schema.graphql answers POST /graphql, /subgraphs/id/{id} and
/subgraphs/name/{*name}. It serves graph-node's generated schema, filters, ordering and pagination,
derived from a recorded real introspection (#1282). It is not a drop-in replacement. Every field
either answers exactly or is refused by name. GraphQL refuses a whole query for one unanswerable
field, and the fields a nest cannot answer are prices, running totals and day and hour aggregates,
the fields a dashboard needs. On the pinned Uniswap V4 target, 70 of 184 fields answer. It suits
reading the event record, not backing a dashboard. docs/graph-compatibility-what-it-is.md explains
how to tell whether it fits your queries before trying it.

Also shipped: block: { number_gte: N } is answered as a precondition on the head, with graph-node's
own refusal text (#1330). orderBy and the numeric comparisons on BigInt, BigDecimal and Int8
now compare by value rather than by text, exactly at any precision (#1328). Before this, 9000351
ranked above 60000353. Chief parked the programme on 2026-09-12 (#1331, #1333). What shipped stays
supported, and it will be unparked when someone with a stopped subgraph whose queries fit the
event-shaped surface asks for it.

Documents

The RFC status lines for RFC-0044, 0045, 0046, 0047 and 0052 now name what shipped, with issue numbers
and dates (#1352). RFC-0018 is closed (#1233). RFC-0053 was accepted and is now parked, and it records
its override of RFC-0044 §11 (#1255, #1269). RFC-0054, a proposed amendment to non-negotiable 3, is a
draft blocked on a decision; nothing in the binary changes because of it (#1300).

Streaming uploads, and publishing does not slow ingestion (RFC-0052 S2, #1361)

An object-store upload read the whole segment into memory. Uploads now stream in 8 MiB parts, one in
flight per object, so a publisher holds at most parallelism × 8 MiB, 16 MiB at the defaults. The
gate, scripts/publish-throughput-gate.sh, ran four alternated batches of 15 backfill runs against a
MinIO throttled to 1 MB/s: 119,046 events a second without the mirror, 118,502 with it, 0.46%
apart
. The two identical baseline batches differed from each other by 1.4%. On a live dev nest,
publish lag stayed at zero across a seal for 94 s. The gate refuses to report if the throttle does not
bite or if a run uploaded nothing. bench backfill --publish-target runs a publisher beside each run.
Figures and reports are in docs/bench/publish-throttled.md. Closes #1260.

publish status, a verify that compares content, and doctor --publish (RFC-0052 S4)

nuthatch publish status --target <target> prints the target, local and remote sealed_through, and
the segments and bytes still to upload, and writes nothing. publish verify now checks content,
not only size. On a filesystem target it hashes each object. On a bucket it trusts an ETag as a content
hash only when the operator says the store produces one: pass --etag-md5 to publish verify, or
--publish-etag-md5 to doctor --publish, for AWS S3 without SSE-KMS or SSE-C, or for MinIO, and each object's ETag is compared with the one S3 would compute for the local
file, so an object replaced by hand at the same size fails. Without that flag, a bucket's objects are
size-checked and reported as not content-checked, and verify fails closed rather than passing, naming
--etag-md5 and --deep. verify --deep downloads and hashes every object, whatever the store.
nuthatch doctor --publish <target> runs the shallow form under the same rule. /_admin/ shows each publishing nest's
target, lag and last success.

The IAM policy in docs/operators.md is corrected. S3 has no HeadObject action (GetObject
authorises HEAD). Segments upload in parts, so the policy needs AbortMultipartUpload; without it a
failed upload leaves billable parts behind. Without ListBucket on the bucket, scoped by a prefix
condition, a missing key answers 403 and the first sync fails. Closes #1262.

RFC-0055: the Dune view emitter (accepted, docs only, #1355)

Chief accepted RFC-0055 on 2026-09-13 (#1344). It proposes nuthatch emit dune, which reads a nest's
schema.json and semantic.toml and writes one plain DuneSQL query per table. Each query casts every
column from its physical type to its DuneSQL type and keeps the exact text beside every wide integer.
Plain SQL rather than dbt, because views and dbt on Dune are Enterprise-only. No public route points
Dune at a Parquet prefix, so the recorded run (S4) waits on RFC-0052's row-insert sidecar (#1362). No
public page showed a varchar to uint256 cast working, so S0 (#1356) ran the casts on Dune first:
decimal text round-trips exactly into uint256 and int256 at both extremes, and Dune's from_hex
accepts the 0x prefix. The RFC was written from public sources only. No binary change.

nuthatch emit dune (RFC-0055 S1, S2)

nuthatch emit dune --dir <nest> --out <dir> --source <namespace> writes one plain DuneSQL SELECT per
event table over dune.<namespace>.<table>, deterministically and offline (#1366). Each column is cast
from its physical type as RFC-0055 §3.2 says, every wide integer keeps its exact text beside it as
<name>_raw, and implicit columns take the evt_* names Dune's own decoded tables use. Each query's
comment header carries the table and column descriptions and the grain from semantic.toml (S2).
Views, call tables and block tables are listed as not emitted. The command refuses, naming the column
or value, an unknown storage kind, a storage kind that disagrees with the footguns, a name collision, a
--source that is not a plain lowercase namespace, a nest name or chain that is not an identifier once
hyphens become underscores, and an --out inside the nest, whose files would change its identity. The
queries push interpretation, not rows; they do not by themselves put data in Dune. Closes #1357 and
#1358.

Also in this release

  • A compatible hot upgrade could move the served head backwards. The old writer is now stopped and
    awaited before the swap, and a new version that stalls for 60 s abandons the upgrade (#1332, #1314).
  • A 429 from the whole endpoint pool no longer narrows the eth_getLogs window. On a quota-limited
    endpoint, narrowing only spent the quota faster (#1332, #1297).
  • Scaffolded views now say _dec is NULL for a full-width uint256, and that ids, nonces and hashes
    belong on the raw column (#1332, #1317).
  • A flaky RPC cap test is fixed, and mutants no longer hangs on a zero contract address (#1338).
  • The port classifier and emitter fixes behind the coverage figures: #1276, #1290, #1298, #1311,
    #1312, #1315, #1316, #1329.
  • init/add with --chain <name> --rpc <url> on a chain outside the registry is documented as
    supported, and so are call handlers in --from-subgraph (528809e).
  • Contributor tooling: CI builds, lints and tests the counter feature (#1271). The PR reviewer
    budgets its diff per file and remembers what it already said (#1285, #1295, #1245, #1246).
    gate-audit --check no longer modifies the working tree (#1287).