Skip to content

v3.7.0

Latest

Choose a tag to compare

@BSVanon BSVanon released this 29 Nov 22:30

v3.7.0

v3.7.0 gives operators tighter control over content serving, more resilient transaction and spent-status sources, stronger header and mesh safeguards, signed upgrades, identity transfer, and optional automatic updates. Upgrade every node; review the new content, provider, mesh, header, broadcaster, and update settings below if you want to use their non-default behaviour.


New

  • A node can read transactions from a local folder before it uses P2P, cache, or outside sources.
    • Under [content], set tx_folder to an absolute directory. It is empty by default, so this source is off unless you enable it.
    • Put one binary transaction in each <txid>.tx file. The node checks that the bytes hash to the requested transaction ID; a missing, oversize, or mismatched file is a miss and the next source is tried. Only regular files are read: a FIFO, a device file, or a link to one is a miss and never blocks a read.
    • tx_folder_max_bytes defaults to 100000000 (100 MB). The node does not need the directory at startup: it warns once if the path is missing, inaccessible, or not a directory, and treats reads as misses until it is usable.
  • Raw transactions and merkle proofs have configurable outside-source fallback.
    • [providers] order defaults to whatsonchain, then bananablocks, then bitails. Sources are tried in that order, and the next one is tried when a source fails or returns data that does not verify. A source that is only pacing its requests is passed over for the moment, then waited for briefly, within the request's deadline, if no other source answers. Raw-transaction and merkle-proof fetches both work this way, and the WhatsOnChain block-height lookup used to build BEEF shares WhatsOnChain's pacing and 429 back-off.
    • whatsonchain_url, bananablocks_url, and bitails_url are optional empty-by-default base-URL overrides. A URL with a query string or fragment is refused at startup. The overrides apply to the provider raw-transaction, proof, and spent-status requests; the WhatsOnChain override also applies to the block-height lookup used to build BEEF.
    • Every fetched raw transaction must match its requested transaction ID. A provider proof is accepted only after its merkle root matches this node's header chain; a bad proof falls through to the next proof candidate, then the next provider. Every proof candidate WhatsOnChain returns is tried.
    • The node paces its requests to each provider: WhatsOnChain at most 3 requests/second, BananaBlocks 240 requests/minute, and Bitails 10 requests/second and 1,000 requests/day. Bitails' daily count resets at the start of each UTC day, and also when the node restarts.
    • After a 429, raw-transaction and proof fetches move on to the next source for that provider's cool-down: the wait the provider asked for, in seconds or as an HTTP date and capped at one hour, or one minute if it named none.
    • A provider reply that redirects to another host is not followed; it counts as that provider failing.
  • The API can now limit which on-chain content it serves.
    • [content] serve defaults to "all", which keeps the previous API behaviour exactly.
    • serve = "scoped" serves only transactions in tx_folder and the scope of allowed origins. allow_origins is empty by default; it is used only in scoped mode, alongside track_origins and gateway site origins.
    • serve = "off" makes API /content routes return their usual not-found answer. Gateway site hosts retain their own content scope in every mode.
    • In scoped mode, the node builds the allowed-origin index in the background and refuses unindexed content while it warms. /status and /stats report the mode, refusals, and index state.
  • Header validation now has enforceable safety checks.
    • The node rejects headers outside the network proof-of-work limit, a chain that does not contain the checkpoint block at height 976000, and headers above that checkpoint with less than one quarter of the average work of the preceding 144 headers.
    • [bsv] header_rules_enforce defaults to true. Set it to false only to investigate a stalled sync: the node keeps rule-breaking headers in observe mode, logs and counts them, and anvil doctor reports the setting.
    • GET /status and GET /stats now include headers.checkpoint and headers.rules. In observe mode, headers.rules.violations counts headers rather than individual rule breaks, and last_violation.rule can name more than one rule.
  • Mesh connections have a bounded authenticated-peer count.
    • [mesh] max_peers defaults to 64. Configured seeds, allow-listed peers, and peers with a verified bond do not count towards it.
    • A non-exempt peer over the cap is refused, and peer exchange does not knowingly dial past it. GET /mesh/status reports the cap, current counted peers, and cap refusals.
    • Inbound SHIP sync messages now have their own per-peer limit of 2/second with a burst of 40. Excess sync messages are dropped and counted without closing the connection.
  • The installer supports unattended fresh installs.
    • Set ANVIL_UNATTENDED=1 and provide ANVIL_MODE; gateway installs also require ANVIL_API_HOST. The installer never reads a terminal or prints the identity private key in this mode.
    • A fresh installer run without a terminal now exits with a clear message instead of waiting for input. Gateway installs skip the funding screen because the gateway does not need wallet funds for its own operation.
  • A new operator guide covers serving the API through a Tor onion address.
    • It explains the listener layouts, gateway Host routing, advertising limits, outbound limitations, backup requirements, and the shared rate-limit bucket for onion visitors.
  • Browser clients can preflight ordinary API routes.
    • An OPTIONS request with Access-Control-Request-Method now receives the common CORS answer for any method served on that route's own clean, non-redirecting path, including GET /tx/{txid}/beef, GET /tx/{txid}/status, and POST /broadcast.
    • Routes that handle OPTIONS themselves keep their own answer and CORS policy. Unclean paths and paths needing a trailing-slash redirect keep the router's redirect or 405 response.
  • You can export an identity to a passphrase-encrypted bundle and import it onto a replacement server.
    • Export with sudo anvil identity export --out FILE [--node NAME] [--passphrase-stdin]. The bundle carries the node identity and validated settings; it is encrypted with the passphrase. Do not share the bundle and passphrase, and move wallet funds before replacing a server because wallet records are not included.
    • On a freshly deployed node with the same node name and mode, run sudo anvil identity import FILE [--passphrase-stdin] [--yes]. Without --yes, it displays the old and imported public keys and requires REPLACE.
    • Import retains each replaced file as a .replaced-<UTC timestamp> backup, restarts the service, and waits up to 90 seconds for its configured local /status to report the imported identity_key. HTTPS checks pin the configured certificate.
    • A write, restart, or identity-check failure restores the prior files and identity, restarts the service, and checks the original identity. If that rollback fails, the command prints a manual-recovery block with the affected paths.
    • Gateway bundles include /etc/anvil/gateway-sites.conf when it exists; standard-node bundles do not. On platforms other than Linux, use --passphrase-stdin instead of a terminal passphrase prompt.
    • GET /status now reports the public identity key as identity_key.
  • Releases can be signed and checked before installation.
    • anvil upgrade verifies the trusted-key signature over the resolved release tag and its checksums.txt, then verifies the downloaded binary's SHA-256 before it installs. The binary, checksums.txt, and checksums.txt.sig are all fetched from that resolved tag's GitHub download URL.
    • --allow-unsigned only permits a missing checksums.txt.sig for a release older than v3.7.0; it does not ignore a bad signature, unknown signer, timeout, or other signature-fetch error.
    • Release owners can use anvil release keygen --out FILE, anvil release sign (--key FILE | --wallet [--wallet-url URL]) --tag vX.Y.Z [--out FILE] [--force] checksums.txt, anvil release verify --tag vX.Y.Z checksums.txt checksums.txt.sig [--key PUBHEX ...], anvil release wallet-key [--wallet-url URL], and anvil release keys.
    • --wallet signs through a BRC-100 desktop wallet listening on 127.0.0.1 or [::1] (BSV Desktop's default is http://127.0.0.1:3321), so the signing key never leaves the wallet. anvil release wallet-key prints the wallet's release-signing public key for enrollment. A wallet restored from a single private key cannot make these signatures; use a recovery-phrase wallet or --key.
    • When upgrading from v3.6.x, that older upgrader performs the hop: it checks the downloaded binary against checksums.txt but does not check a release signature. Signature checks apply once v3.7.0 or later is running.
  • Automatic updates can install eligible signed patch and minor releases.
    • They are off by default. Use sudo anvil upgrade auto on [--delay DURATION], sudo anvil upgrade auto off, anvil upgrade auto status [--json], or sudo anvil upgrade auto run [--delay DURATION]; anvil deploy --auto-update enables the default schedule after a healthy deployment.
    • The systemd timer runs hourly with a fixed per-server random delay of up to 55 minutes and is persistent across missed runs. The default release age is 24 hours; --delay accepts 0 through 720 hours.
    • A run considers only a newer stable, non-draft canonical release in the running major version, after its delay, with a signature from a compiled-in trusted key. The signature is checked before the binary is downloaded.
    • Drafts, prereleases, malformed tags, equal or older versions, and new major versions are not installed. A binary that cannot run its help check, or a health failure that cleanly rolls back, is skipped while it remains the latest release.
    • An interruption or another unresolved failure after installation starts leaves updates stopped in a needs-attention state. Run anvil doctor, correct the problem, then run sudo anvil upgrade auto on to clear it and resume.
    • Automatic updates run from a systemd timer. On systemd older than 247, the per-server delay is drawn again on every run instead of staying fixed.
    • anvil upgrade auto status --json reports enabled, delay_seconds, current_version, next_run, last_run, last_installed, skipped_releases, needs_attention, installing, state_error, and timer_error. installing contains release, from, and started_at; state_error and timer_error are present when those sources cannot be read or queried.
  • Signed releases can be published and retrieved on chain.
    • anvil release publish --tag vX.Y.Z --funding-key FILE [--dir DIR] [--funding-tx TXID] [--sat-per-kb N] [--part-size N] [--change-address ADDRESS] [--work DIR] [--config FILE] prepares and, after you type PUBLISH, broadcasts a signed release from a funding key that must be separate from the release signing key.
    • anvil release verify-chain <manifest-txid> [--out DIR] fetches and verifies the manifest and every binary; sudo anvil upgrade --from-chain <manifest-txid> verifies and installs the binary for this platform. --check verifies without installing.
    • --part-size N sets the compressed bytes per part: 1,000 through 400,000, default 400,000. In a live test, GorillaPool ARC, BSV Broadcaster, WhatsOnChain and Bitails each accepted every tested size up to 400,000 bytes. A binary may have at most 1,024 parts; if it does not fit, the command reports the smallest part size that does.
    • Publishing keeps an authenticated journal and its signed transactions in --work (default <dir>/onchain-<tag>). If a publish is interrupted, rerun the same command with the original --funding-tx: it resumes from the journal without rebuilding or re-signing, and a different --part-size or any other conflicting flag is refused.
    • Before anything is sent, including on resume, every journal transaction is checked against the signed manifest and its input scripts are verified. Confirmation names the release, the manifest txid, the pending transaction count and the exact satoshis still to spend.
    • An interrupted publish can leave .publish-write-* temporary files in the work directory. Later runs ignore them, and they can be deleted while no publish is running.
    • Publish from Linux or another Unix system. Elsewhere, publishing skips the work directory's owner and permission checks and the directory syncs that make an interrupted publish safe to resume.
    • Upgrades download into the system temp directory (TMPDIR, usually /tmp). A GitHub upgrade needs room for one binary (about 40 MB today, at most 256 MiB); an on-chain upgrade needs room for its compressed and unpacked copies (at most 512 MiB). If /tmp is small, run sudo TMPDIR=/path/with/room anvil upgrade.

Changed

  • Spent-status checks use the configured providers and require proof before a spend counts.
    • WhatsOnChain, BananaBlocks, and Bitails are tried in [providers] order. A claimed spend is acted on only after the node fetches the spending transaction, confirms the named input, and verifies its unlocking script against the spent output.
    • An unspent answer can receive a short second opinion from the next provider that can name a spend; a second opinion never waits. A provider that is pacing its requests, or cooling down after a 429, delays the check within its deadline instead of failing it; only Bitails' daily cap is skipped.
    • GET /status now counts the claimed spends that failed verification, in total and per provider, and the second opinions skipped for pacing. A claimed spend that does not verify counts as no answer from that provider, and the next provider is tried.
  • Scoped-content updates fail closed when scope narrows.
    • Once a rollback is seen, content referenced only by the rolled-back version stops being served immediately. The same applies when an allowed origin is removed, a version root is removed, or a scope hits its cap.
    • When an origin moves beyond its 500-version window, the oldest version and content referenced only by it stop being served as the window moves on.
    • New versions and rollbacks are detected by the existing poll within about 30 seconds; while a replacement scope scan runs, referenced content not yet re-scanned is refused.
  • The content guides and status describe the routes that remain available in every serving mode.
    • GET /tx/{txid}/beef still returns the full transaction in all, scoped, and off modes. GET /data and GET /data/subscribe?topic=ordtip:v1 can still carry BEEF-bearing tip envelopes in every mode.
    • /data/subscribe is a live stream, not a history query. A tip from a mesh peer can reach a subscriber even if storage rejects it; this node's own tip reaches the mesh and subscribers only after storage accepts it.
  • GET /tx/{txid}/beef can wait for paced providers, and says when no proof checks out.
    • On a cache miss with every source waiting or failing, the route can take about a minute, plus ARC time, before it answers: up to 30 seconds for the raw transaction, then up to 30 more for the block height and proof.
    • When providers return proofs but none matches this node's headers, it returns 404 with text beginning no BEEF available: no provider proof checked out for tx, and caches nothing. The unconfirmed text is used only when WhatsOnChain's own record shows the transaction unconfirmed.
  • A configured mesh advertise_url no longer warns just because the listener has not started yet.
    • Its self-check retries for about a minute before warning about a real failure.
  • All transaction submissions now walk one broadcaster list.
    • With the default [arc] enabled = true, the ordered list is GorillaPool ARC (url = "https://arc.gorillapool.io"), BSV Broadcaster, WhatsOnChain, Bitails, then BananaBlocks. [arc] api_key = ""; setting [[arc.broadcasters]] replaces the list (1 to 8 entries), and its kind, url, and api_key fields set each entry. The WhatsOnChain, Bitails, and BananaBlocks entries use their [providers] whatsonchain_url, bitails_url, and bananablocks_url overrides when no entry URL is supplied.
    • TAAL's company has dissolved. TAAL is not in the default list; it is added only by existing [arc] taal_enabled = true, taal_url = "https://arc.taal.com", and optional taal_api_key = "" settings (or ANVIL_TAAL_API_KEY). Remove those TAAL settings and environment variable, or replace them with a working [[arc.broadcasters]] list.
    • A service answer counts only when it names the submitted transaction. A conclusive ARC or BSV Broadcaster refusal for that transaction ends the walk; a failed service cools down for 60 seconds before later walks use it again.
    • Direct-payment submission now has a 20-second total budget, up from 10 seconds.
    • BananaBlocks submissions use its native POST /api/v1/tx/broadcast endpoint and count only when BananaBlocks reports the transaction accepted and seen on the network or mined. It is last in the list because anonymous callers and free keys are limited to 10 broadcasts per minute per IP.
    • A WhatsOnChain or Bitails answer that the transaction is already known counts as accepted for that transaction, matching the BSV wallet toolbox. Failed WhatsOnChain, Bitails and BananaBlocks answers include a short, redacted excerpt of the provider's reply.
    • Configured API keys are redacted from broadcaster error text. A broadcaster url with embedded credentials is refused at startup; use api_key instead.
  • Node-wallet sends now go through the broadcaster list.
    • Transactions from /wallet/send, create-action and sign-action are submitted through the same broadcaster list as every other submission, with a 30-second deadline each, and, unless refused, admitted to this node's mempool as before. Previously they entered only this node's mempool.
    • A transaction a broadcaster accepts becomes unproven. One with no clear answer stays sending and is retried every 5 minutes once it is at least 2 minutes old. One conclusively refused becomes failed, and its inputs are released for reuse.
    • Transactions sent together go out parents first. A transaction whose parent was refused is not submitted and fails too; one whose parent has no clear answer waits as sending.
    • /wallet/send now waits for the answer: HTTP 200 with "status":"accepted"; HTTP 200 with "status":"sending" (do not resend: it is retried); or HTTP 422 with "status":"failed" and the refusal. Create-action and sign-action keep their delayed default and return sending.
    • A wallet with no broadcaster configured logs one warning at startup: its sends stay waiting until one is configured.

Fixed

  • Restored private-home admissions no longer lose valid members on a failed revocation check.
    • In strict mode as well as non-strict mode, a restored admission survives a provider outage, no network at boot, or an expired check deadline. It is watched and retried soon instead.
    • Only a verified spend revokes the admission and broadcasts that revocation.
  • Provider and proof failures are contained and retried safely.
    • A malformed provider merkle proof is a failed provider response, not a node panic. If a provider proof has an unknown height or the wrong merkle root for this node's headers, the next provider is tried.
    • A transaction-fetch or proof-fetch panic in version tracking or a certificate spend check is logged and retried later instead of stopping the tracking loop.
  • Content scope no longer stays published behind a slow unrelated version read.
    • A scan or origin dropped from scope, a version-root contraction, a rollback, or a cap refusal is removed from the published index immediately instead of waiting for the rest of the polling round.
    • Failed background fetches are held off for one minute, with a 10,000-entry bound. Expired entries are removed first; otherwise the entry nearest expiry is evicted.
  • The deprecated X402-Proof payment scheme is removed.
    • A request carrying only X402-Proof receives 402 ERR_PROOF_PAYMENT_UNAVAILABLE and never pays. A request that combines it with a valid payment or tip credential is refused, not paid: send one payment method per request.
    • A configuration that previously enabled the proof scheme no longer enables payment handling through it. A node without a wallet uses the remaining app-payment gate.
    • The old nonce_pool warning is no longer shown by GET /status or anvil doctor.
  • Installing a messaging policy while peers are connected no longer races.
    • The node installs an immutable policy snapshot under serialization; each decision reads one snapshot.

Removed

  • The X402-Proof settings are retained only for compatibility.
    • [api] x402_proof_scheme (default false), x402_mint_burst (default 0), x402_mints_per_minute (default 0), nonce_pool_size (default 100), and require_mempool (default false) are ignored.
    • Existing configurations still load. The daemon warns once for each old setting set away from its default, and anvil doctor reports the same advisory; negative values of the old numeric settings no longer stop startup.

Upgrade

  • Run sudo anvil upgrade on each box. No config change is needed: content serving keeps its previous behaviour by default ([content] serve = "all"), the default provider order is WhatsOnChain, BananaBlocks, Bitails, and the default broadcaster list is GorillaPool ARC, BSV Broadcaster, WhatsOnChain, Bitails, BananaBlocks.
  • New and on by default: the header rules ([bsv] header_rules_enforce = true) and the mesh peer cap ([mesh] max_peers = 64; configured seeds, allow-listed peers and bonded peers are exempt).
  • New or changed configuration:
    • [content] tx_folder = "" is off by default; [content] tx_folder_max_bytes = 100000000.
    • [content] serve = "all"; [content] allow_origins = [].
    • [providers] order = ["whatsonchain", "bananablocks", "bitails"]; [providers] whatsonchain_url = "", bananablocks_url = "", and bitails_url = "".
    • [arc] enabled = true, url = "https://arc.gorillapool.io", api_key = "", taal_enabled = false, taal_url = "https://arc.taal.com", and taal_api_key = "". [arc] broadcasters is unset by default; when set, it replaces the default list.
    • [mesh] max_peers = 64.
    • [bsv] header_rules_enforce = true.
    • The removed [api] compatibility keys keep the defaults listed in Removed, but are ignored.
  • What you may notice after upgrading: browser applications can preflight clean routed API paths; a node with legacy TAAL settings continues to use TAAL until you remove or replace them; direct payments may wait up to 20 seconds; broadcaster URLs that embed credentials now prevent startup; /status adds identity_key; a manual upgrade reports any restarted service whose health configuration could not be read and calls the result partial; and automatic updates stay off until enabled.
  • v3.7.0 works with v3.6.x peers. The mesh wire format is unchanged.
  • anvil upgrade checks that each configured restarted service answers GET /status with the target version within 5 minutes. A manual upgrade restarts but reports an unchecked service; an automatic upgrade refuses to begin unless every running service can be checked.

Checksums (SHA-256)

537e341a414635bef38cc9e4388ade6feedcaf10905fd57fd12bca7ee8e8f87e  anvil-linux-amd64
e61171f1d2892ce799ccb5d31ed75a0d65a0a25a41b877337a4eaf1a5e31b77d  anvil-linux-arm64

checksums.txt is signed by the release-signing key 03d75f65bc4ddcf6aacc18f1e84b24b83da7d4fae5b72f1d099343e5212af23ebe; anvil release keys prints the keys a binary trusts.