feat: harden service resources and refresh ChainTracks resilience - #429
Merged
Conversation
Collaborator
Author
|
Final exact-head status for
This draft now contains the complete implementation and remains draft for maintainer review. Publication, deployment, and downstream image cutover remain intentionally out of scope for this PR. |
…e-hardening # Conflicts: # docs/reference/package-api-migrations.md # governance/package-release-notes.json
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
ty-everett
marked this pull request as ready for review
August 4, 2026 23:08
ty-everett
requested review from
BraydenLangley,
sirdeggen and
tonesnotes
as code owners
August 4, 2026 23:08
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Program and scope
This PR combines the reviewed official-service resource hardening program with
the ChainTracks resiliency refresh requested before #429 merges.
The existing program adds bounded, operator-configurable edge/resource policy
to all seven official service contexts, stable health/readiness contracts,
shared-state controls, measured resource profiles, Message Box BRC-105
monetization, and focused autoscaling guidance. It preserves an explicit
operator opt-out while closing caller-controlled memory and fan-out growth.
The ChainTracks refresh removes a WhatsOnChain key as a default availability
dependency, adds resilient Arcade/go-chaintracks bulk and SSE sources, and makes
network selection exact across mainnet, testnet, STN, TerraTestNet, and Terra
Scaling TestNet.
ChainTracks root cause and design
The Tempo Key Server alert path was a configured WhatsOnChain credential being
rejected while ChainTracks treated WoC as an operational dependency. Current
WhatsOnChain documentation says authentication
is not required for public traffic up to three requests per second and documents
public mainnet/testnet surfaces only. ChainTracks therefore no longer needs a
key to operate.
The refreshed source model is:
credential-free defaults for mainnet, testnet, and TerraTestNet;
documented public rate. A rejected configured key retries ChainTracks
header/info requests anonymously.
STN and Terra Scaling TestNet intentionally fail closed without an explicit
operator endpoint (
STN_CHAINTRACKS_URL/TSTN_CHAINTRACKS_URL, or thematching Arcade URL). They are never silently aliased to testnet. Arcade is the
browser-safe HTTPS/SSE gateway for Teranode-backed header data; direct Teranode
P2P is not added to browser/mobile packages.
Remote batches pass local serialization, hash, continuity, and genesis checks.
The implementation rejects wrong-network and incomplete responses, bounds batch
size and timeouts, reconnects SSE with capped backoff, falls through failed
sources, reports last-observed source health, and continues serving synchronized
last-good local data during provider outages.
Compatibility
controls are an appended optional argument.
ChaintracksClientApiinjection and legacy v1 endpointsremain supported. URLs ending in
/v2use the go-chaintracks client.SSE-compatible HTTP. No filesystem, Node Buffer, or direct P2P dependency was
added to those artifacts.
height/bulk/SSE routes, respects
ROUTING_PREFIX, and exposes/healthzplus/readyzin Docker and Compose health checks.in-memory state and exact serialized genesis headers.
Impact and versions
Release candidates relevant to this refresh:
@bsv/wallet-toolbox2.6.0@bsv/wallet-toolbox-client2.6.0@bsv/wallet-toolbox-mobile2.6.0chaintracks-serverimage 1.1.0The other package and service candidates already coordinated by #429 remain
unchanged.
Verification
Local verification on Node 24.18.0:
docs/facts, service operations, and security audit all pass;
and retains 211 governed skips);
including provider failover and shutdown races;
1,201,206 raw / 329,933 gzip / 265,380 brotli bytes, with the expected
browser-only dependency composition;
3,228,178 raw / 1,283,672 gzip / 1,011,761 brotli bytes;
and clean SIGINT shutdown pass;
pnpm audit --audit-level=high: no known vulnerabilities;/network,/height, and SSE surfaces were checked formainnet, testnet, and TerraTestNet; the Babbage CDN exists for mainnet/testnet
and correctly has no default STN/TTN/TSTN resource.
Hosted exact-head checks for
b1e4c8ea6e540425a1324da148a23ec7c49dc808are terminal: 80 successful and two expected policy-selected empty-matrix skips. Codecov patch coverage is 90.01%. No unresolved review thread is being carried forward.Dependency evidence
Release sequence
conformance, platform, mutation, and all official-image runtime contracts are
green.
main; publish the WalletToolbox trio at 2.6.0 with the repository SBOM/provenance/verification path.
publication and revalidate ChainTracks against the published 2.6.0 package.
chaintracks-server1.1.0. Do not publish an image whose lock still resolves Wallet Toolbox 2.5.
No workstation publication or image build is used. Live deployment, DNS,
secrets, and downstream cutover remain separate post-release operational work.
Review checklist
browser/mobile composition, dependencies, docs, and operations