Skip to content

v3.5.1

Choose a tag to compare

@BSVanon BSVanon released this 21 Nov 22:51
· 12 commits to main since this release

v3.5.1

v3.5.1 fixes a startup hang in v3.5.0: the node froze on its first log line and never opened its API. Don't install v3.5.0. A node already on it upgrades with sudo anvil upgrade as usual.

The test suite now starts the real node process, alone and as a two-node mesh, so a build that can't start fails before it ships.

Everything below is what v3.5.0 brought, unchanged. It all applies to a node moving up from v3.4.0.


Before you upgrade

These changes can affect clients, scripts, and operator policy:

  • X402-Proof is deprecated and off by default. A client that sends it now
    receives 402 ERR_PROOF_PAYMENT_UNAVAILABLE with a proof-free direct-payment
    offer. Migrate the client to BRC-121 or X-Bsv-Payment. To keep the old
    development path temporarily, set [api] x402_proof_scheme = true before
    restarting the node.
  • Only the operator token reads private envelopes. Payments and app tokens
    no longer reveal a private envelope or its metadata. If nodes exchange
    private data, upgrade them together: an older node keeps the old read rule.
  • Lookup answers are paged. /lookup and /overlay/query return at most
    10,000 outputs and 8 MiB per page. Clients must send the returned
    X-Overlay-Cursor until X-Overlay-Truncated is no longer true, and should
    record X-Overlay-Omitted when an individual output could not fit.
  • Public mesh lists are capped. /mesh/status returns at most 1,000 newest
    public topics and is rate-limited. /mesh/nodes returns at most 500 nodes
    and 100 topics per node. Read the new total and truncation fields rather than
    treating a returned list as complete.
  • Topic reads are exact. A read for topic X no longer includes durable
    subtopics such as X:child. Query each topic explicitly.
  • Forwarded message copies default to 24 hours. Home copies still default
    to seven days. If an operator relied on seven-day in-transit copies, set
    [messaging] forward_copy_ttl just below ttl_seconds.
  • Direct-payment acceptance is stricter. Clients must send Extended Format
    transactions with verifiable input scripts. Only ARC
    SEEN_ON_NETWORK or locally proven MINED outcomes are accepted. A 503
    ERR_PAYMENT_SUBMIT_UNCERTAIN response is ambiguous and carries no new
    offer; retry the same transaction, not a new payment. Capacity-related 503
    responses also leave the transaction reusable for a retry.
  • The config refuses impossible values. A negative [api]
    payment_satoshis, endpoint_prices entry, nonce_pool_size or
    app_payments.max_app_price_sats now stops the node at startup with an error
    that names the key, where it used to load. Check these keys before upgrading.
    The sections added in this release refuse invalid values the same way.
  • A replayed BRC-31 nonce now returns 401 instead of 500. Authentication
    clients should re-handshake on that response.

Payments and private data

  • Added BRC-121 for paying the node's own route price. Offers use x-bsv-sats
    and x-bsv-server; payments are verified, submitted through ARC, recorded in
    the node wallet, and protected across restarts by the wallet record or the
    journal under data_dir.
  • Added proof-free 402 offers for X-Bsv-Payment, with itemized payees for
    split payments and stable ERR_PAYMENT_REQUIRED and
    ERR_PROOF_PAYMENT_UNAVAILABLE codes.
  • Direct and proof payments share bounded replay and ARC-submit capacity.
    Full capacity and ambiguous outcomes return 503 without inviting a second
    payment. Direct replay memory is process-local; a recent payment can be used
    once more after restart.
  • Discovery still describes configured prices and methods when ARC is off.
    anvil doctor now warns when priced routes cannot use BRC-121 or
    X-Bsv-Payment, or when discovery does not publish a configured price.
  • Private envelopes now stay out of public exact and peer indexes, discovery,
    statistics, mesh topic lists, and heartbeat demand. Credential-dependent
    reads are private, no-store, and SSE operator credentials are header-only.

Content, headers, and overlays

  • Added ORDFS-compatible content versions at /content/<origin>?seq=N and the
    :N path form. Every spend advances the sequence, responses include
    X-Ord-Seq, and explicit versions become immutable after six confirmations.
  • Added [content] tracking for configured origins and gateway sites. A
    verified spend of the current tracked tip can authorize its own bounded
    broadcast.
  • Added the public Chaintracks v2 route set under /chaintracks/v2, including
    JSON, raw 80-byte header, range, tip-stream, and reorg-stream routes. Header
    ranges truncate at the local tip and at 2,000 headers.
  • Fetched transaction bytes are checked against the requested txid before
    content or wallet-scanner use.
  • Lookup pages and remote overlay replies are parsed within fixed size, work,
    concurrency, and time limits. TypeScript SHIP off-chain framing is accepted.
  • UHRP admission now validates canonical BRC-26 PushDrop advertisements and
    their identity linkage before indexing them.

Gateway and certificate admission

  • Added gateway mode for serving allowed on-chain sites by Host header, with
    _ordfs TXT resolution, site-scoped content, per-site request limits, and a
    fail-closed API host.
  • Added automatic TLS and ACME listeners on ports 443 and 80. Certificate
    issuance is limited to allowed hosts, stores state under <data_dir>/acme,
    and requires explicit acceptance of the CA terms. Allowed mesh peers can
    replicate short-lived challenge entries.
  • Added optional [certgate] admission.
    [messaging] require_sender_certificate returns
    403 ERR_SENDER_CERTIFICATE_REQUIRED
    for a sender without current admission. [gateway] allow_registration
    enables certificate-owned POST /gateway/sites and
    DELETE /gateway/sites/{domain} registrations.
  • Registrations are stored in <data_dir>/gateway-registrations.conf and are
    removed when the owning certificate is revoked through the spend watch.
  • Either certificate switch requests a certificate during the shared BRC-31
    handshake, so a client without an accepted certificate can't use the
    messaging or registration routes as an identity on that node. Use @bsv/sdk
    (TypeScript) clients with such a node: Go SDK v1.7.8 clients can't complete a
    certificate-requesting handshake with it.

Mesh and messaging

  • Added closed-network controls: [mesh] allowed_peers restricts authenticated
    gossip peers, while [overlay] named_peers restricts GASP, lookup, submit,
    and SHIP/SLAP traffic and disables public advertisements.
  • Mesh status topics are newest first and include total/truncation fields.
    Node lists expose their own totals and per-node topic totals when capped.
  • Messaging now follows canonical tm_messagebox and ls_messagebox host
    advertisements. Home copies retain the full message TTL; other copies use
    forward_copy_ttl. Operators can restrict forward peers and operator-token
    box access independently.
  • A message send that is neither stored locally nor delivered to a peer now
    returns 503 ERR_MESSAGE_UNDELIVERED.

Reliability and resource bounds

  • Unauthenticated mesh handshakes and pre-authentication frames have fixed
    connection and size limits.
  • Signed-envelope bodies, GASP pages and replies, lookup decoding, payment
    bodies, SSE writes, and messagebox lookups now have explicit size, work,
    concurrency, or time bounds.
  • Stored BEEFs are normalized before aggregation; malformed or unverifiable
    transaction data is refused rather than merged or served.
  • The process applies a soft memory limit when GOMEMLIMIT is unset and warns
    when the available memory limit is too low.
  • anvil doctor now checks gateway listeners and certificate state, BRC-121
    journal health, x402 discovery, and ARC-dependent payment readiness.
  • Updated the BSV Go SDK dependency to v1.7.8.

New config

All keys are optional. Defaults apply without editing the config.

[node]
mode = "standard"

[mesh]
allowed_peers = []

[overlay]
named_peers = []
gasp_sync_run_timeout_secs = 600

[messaging]
require_sender_certificate = false
forward_copy_ttl = 86400
forward_peers = []
operator_reads_all_boxes = true
home_hosts = []

[gateway]
enabled = false
api_host = ""                 # defaults from [node] public_url when enabled
sites_file = ""               # defaults beside anvil.toml
txt_cache_ttl = 300
txt_stale_grace = 86400
root_max_age = 60
content_scope = "site"
https_listen = ":443"
http_listen = ":80"
acme_directory = "https://acme-v02.api.letsencrypt.org/directory"
acme_email = ""
acme_accept_tos = false
allow_registration = false

# Certificate admission is off when this section is absent.
# [certgate]
# certifiers = []
# types = []
# revocation_check = "strict"
# revocation_recheck = "1h"
# [certgate.reveal_fields]
# [certgate.allow_unrevocable]

# Version tracking is inactive when track_origins is empty and gateway is off.
[content]
track_origins = []
max_tracked_origins = 1000
max_watched_outpoints = 10000
spend_poll_interval = 600
tip_pending_timeout = 86400

[api]
x402_proof_scheme = false
x402_mint_burst = 10
x402_mints_per_minute = 2

Upgrade

If a client still depends on X402-Proof, add the temporary compatibility
switch before restarting. Upgrade nodes that exchange private data together.
For a new gateway, open ports 80 and 443 and set acme_accept_tos = true only
after reviewing the configured CA terms. Then run:

sudo anvil upgrade

After the node restarts, run sudo anvil doctor. Confirm that priced routes are
published, ARC is enabled for production payment methods, the BRC-121 journal
is healthy, and any gateway listener and certificate findings are resolved.