Anvil-Mesh v2.2.3 - big update v2.1.0 — capabilities for mu…

BSVanon ·

Anvil-Mesh v2.2.3 - big update
v2.1.0 — capabilities for multi-node app consumers
Apps that depend on Anvil-Mesh now have better tools for treating the federation as a fault-tolerant surface instead of a single endpoint.
• client.peers() returns the federation directory merged from SHIP registrations, signed heartbeat envelopes, and direct peer adjacency — each node entry carries evidence flags so consumers can decide which to trust.
• client.health() returns a rich health snapshot including upstream_status (broadcast: healthy/degraded/down, headers sync lag, service health) — CORS-only, no rate limit, no x402. Recommended 30-60s polling for failover decisions.
• /messages/subscribe delivers new BRC-33 messages via SSE the moment they arrive — no more /listMessages polling loops. • POST /broadcast now accepts x402 payment as an alternative to bearer auth (when an operator sets a positive broadcast price) and returns a derived status field consumers can use to make failover decisions without reading the full ARC state.
• GET /tx/{txid}/beef returns a source field (cached / arc / woc) so consumers can distinguish overlay-cached proofs from upstream passthrough — important for anyone building multi-source BEEF chains. • Operators can declare custom capabilities in their node TOML, surfaced in /.well-known/anvil for machine-readable service discovery.
v2.2.x — self-healing, born of a real incident
Today I found an Anvil node had been in a silent systemd crash loop for 12 days. Not "degraded" — an orphan process from a prior restart was holding the LevelDB LOCK file, so systemd's real service unit could never start. The orphan itself answered on the port. Every external check said healthy. I found it by running journalctl by hand.
No operator should ever have to know that. So each node now self-heals far better than previous:
• systemd ExecStartPre runs anvil doctor --fix-locks-only on every service start — orphan LOCK holders are killed before the real start attempt.
• anvil doctor --fix is a one-command operator remediation for orphan processes, crash-looping services, stale header stores with prev-hash-mismatch, and version skew between binary-on-disk and running process.
• anvil upgrade sweeps ALL anvil processes (not just systemd-tracked ones) before binary replacement, and auto-migrates pre-existing systemd unit files to include the ExecStartPre hook. Existing operators get the full self-heal stack on their next upgrade — no manual systemd surgery.
• anvil deploy now uses atomic binary replacement, so re-deploying on a running node doesn't fail with ETXTBSY.
• Mesh heartbeat carries a service_health field (healthy / degraded / broken) so mesh consumers can distinguish an upstream outage from a local service meltdown — same user-visible symptom, very different remediations.
Every Anvil operator on any prior version gets the whole stack as a side effect of sudo anvil upgrade
Spin up a node with one line of code: curl -fsSL https://anvil.sendbsv.com/install | sudo bash
Node v2.2.3 — github.com/BSVanon/Anvil/releases/tag/v2.2.3
SDK — npm install anvil-mesh@0.4.1

Anvil-Mesh v2.2.3 - big update
v2.1.0 — capabilities for multi-node app consumers
Apps that depend …