Files
Mikael BergandPaperclip 970f1f1395 docs: revise infra recommendation — self-hosted own hardware, not cloud VPS
Board clarified all silicon should run on own infrastructure, not cloud/VPS.
Updated node-vs-api.md and infra-cost.md to reflect:
- Production recommendation: BCHN + Fulcrum on own hardware (~$0-7/month marginal)
- Hardware requirements: 4 cores, 8 GB RAM, 500 GB SSD minimum
- BCH bandwidth is ~2-5 GB/month (much lighter than BTC)
- Cloud/VPS figures retained as reference-only fallback ceiling

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-17 16:23:31 +00:00

166 lines
6.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# BCH Node vs Hosted API — Evaluation & Recommendation
_Spike task: PRO-61 | Evaluated: 2026-05-17 | Revised: 2026-05-17 (self-hosted infra constraint)_
---
## Overview
Two primary paths exist to access Bitcoin Cash on-chain data:
| | Option A: Self-Hosted Node | Option B: Hosted API |
|---|---|---|
| **Software** | BCHN v29.0.0 + Fulcrum | Fullstack.cash / GetBlock.io / Tatum |
| **Time to first data** | 12–48 hours (initial sync) | Minutes |
| **Spike cost** | $0 marginal (own hardware) | $0–15/month |
| **Production cost** | ~$0 marginal (own hardware) | $15–100/month |
| **Rate limits** | None | Tier-dependent |
| **Reliability** | Self-managed | Provider SLA |
| **Data completeness** | Full | Full (indexer-dependent) |
| **Ops burden** | Medium | Low |
---
## Option A: Self-Hosted BCH Full Node (BCHN)
### What is BCHN?
[Bitcoin Cash Node (BCHN)](https://bitcoincashnode.org) is the reference implementation for
the BCH network. v29.0.0 (released May 2026) implements the May 2026 network upgrade.
### Technical Requirements (May 2026)
The full stack is BCHN (full node) + Fulcrum (high-performance ElectrumX implementation for xpub indexing).
| Resource | BCHN minimum | BCHN + Fulcrum recommended |
|---|---|---|
| **Blockchain size** | 222 GB (growing ~30 GB/year) | — |
| **Fulcrum index size** | — | ~100–150 GB additional |
| **Storage total** | 280 GB | **400–500 GB SSD** |
| **RAM** | 4 GB | **8 GB** (Fulcrum uses 2–4 GB during sync) |
| **CPU** | 2 cores | **4 cores** (Fulcrum parallelises index build) |
| **Network** | 50 KB/s sustained | 10 Mbps broadband |
| **Initial sync** | 12–48 hours (BCHN) | +4–20 hours (Fulcrum index) |
**Minimum viable hardware for own infrastructure:**
Any server with 4 cores, 8 GB RAM, and 500 GB SSD (or HDD + SSD hybrid with the Fulcrum DB on SSD) will run this stack comfortably.
### Operational Cost on Own Hardware
No VPS line item. Marginal cost is limited to:
| Item | Estimate | Notes |
|---|---|---|
| **Bandwidth** | ~2–5 GB/month | BCH blocks average ≪ 1 MB; p2p + peer propagation is light |
| **Power (dedicated server)** | $3–7/month | ~30–80W × 720h × $0.12/kWh; $0 if server already runs |
| **Storage expansion** (if needed) | $20–60 one-time | 500 GB SSD if not already available |
| **Ongoing marginal cost** | **~$0–7/month** | Within existing infra envelope |
BCH is dramatically lighter on bandwidth than Bitcoin (~2–5 GB/month vs. ~400 GB/month for BTC) because BCH blocks rarely exceed 200 KB in practice despite the 32 MB cap.
### Pros
- No rate limits; unlimited queries
- Full blockchain data including mempool
- Complete indexing control (xpub watch, custom filters)
- No third-party dependency or recurring SaaS cost
- Privacy — no external API traffic logging
- Near-zero marginal cost on existing owned hardware
### Cons
- 12–48 hour initial BCHN sync + 4–20 hour Fulcrum index blocks development start
- Must monitor node health and apply network upgrades (e.g., May 2026 upgrade)
- Storage grows ~30 GB/year; plan capacity for Fulcrum index growth too
- Ops responsibility is internal (vs. provider SLA)
---
## Option B: Hosted Public API
### Providers Evaluated
#### 1. Fullstack.cash ⭐ Recommended for spike
- **URL:** https://fullstack.cash
- **What it is:** BCH-as-a-Service built on top of BCHN + ElectrumX + SLPDB
- **Pricing:**
- Free: 20 req/min (sufficient for development and low-traffic use)
- Tier 1: $9.99–14.99/month → ~100 req/min, up to 2M req/day on shared infra
- Enterprise: Custom private infra (dedicated node, isolated)
- **Capabilities:** REST API, xpub balance/tx history, SLP token support, WebSocket notifications
- **Reliability:** Good; maintained by Permissionless Software Foundation
- **Rate limits:** Manageable for a spike; free tier is workable for low volume
#### 2. GetBlock.io
- **URL:** https://getblock.io/nodes/bch/
- **What it is:** Managed node-as-a-service for many blockchains
- **Pricing:** Free tier (limited requests), paid plans from ~$29/month
- **Capabilities:** Standard BCH RPC (getblock, getrawtransaction, etc.)
- **Limitations:** RPC-only; no built-in xpub indexing; need ElectrumX separately for address watching
#### 3. Tatum.io
- **URL:** https://tatum.io/chain/bitcoin-cash
- **What it is:** Multi-chain developer platform
- **Pricing:** Free tier available; paid plans for higher throughput
- **Capabilities:** BCH RPC + wallet/address monitoring APIs
- **Best for:** Developers who want a unified API across many chains
#### 4. Mainnet.cash
- **URL:** https://mainnet.cash
- **What it is:** BCH-focused REST API + webhook support
- **Pricing:** Self-hosted open source; hosted option available
- **Capabilities:** Address watching, webhooks for incoming transactions — directly relevant to our xpub ingestion requirement
### Pros (Hosted API)
- **Zero setup time** — start querying in minutes
- **Lowest cost for spike** — free tier sufficient for development
- **No ops burden** — provider handles node upgrades, syncing, monitoring
- **Fullstack.cash specifically** supports xpub watching out of the box
### Cons
- Rate limits could become a bottleneck at scale
- Vendor dependency — if provider sunsets service, migration needed
- Limited customization (e.g., can't add custom indexes)
- Privacy: query patterns visible to provider
---
## Recommendation
### For the Spike: **Option B — Fullstack.cash (free tier)**
Start with Fullstack.cash free tier for the spike. Rationale:
1. **Speed**: Development starts in minutes, not 12–48 hours for node sync.
2. **Cost**: $0 during spike — no hardware provisioning needed.
3. **xpub support**: Fullstack.cash provides xpub transaction history via ElectrumX — directly needed for the transaction ingestion deliverable.
4. **Low risk for 2-week spike**: 20 req/min is fine for functional testing.
### For Production: **Option A — Self-Hosted BCHN + Fulcrum on Own Infrastructure**
Board has confirmed that we operate significant own infrastructure and should not use cloud/VPS providers for compute. Self-hosted is both the preferred and most cost-effective path for production:
1. **No rate limits** — critical for payment monitoring at scale.
2. **Near-zero marginal cost** — existing hardware; only incremental storage (~$0–60 one-time) and bandwidth (~2–5 GB/month, well within any broadband quota).
3. **Full control** — no vendor dependency, no data leakage to third-party APIs.
4. **Auditability** — complete on-chain data locally.
**Minimum viable hardware:** 4 cores, 8 GB RAM, 500 GB SSD. Any server meeting this threshold can run BCHN + Fulcrum.
---
## Migration Path
```
Spike (week 1-2) → Production (own hardware)
Fullstack.cash free tier BCHN + Fulcrum on own infra
$0/month ~$0/month marginal
(one-time: 500 GB SSD if needed)
```