Bitcoin Network System
Dual-Store Indexing โข Reorg-Safe โข Event-Driven
Power your Bitcoin applications with production-ready infrastructure. This indexing stack validates blocks, streams transactions, and enables lightning-fast queries for explorers and monitoring tools. Efficient state storage, resilient broadcasting, real-time mempool tracking handle demanding network environments. Built with clean architecture to scale horizontally while handling reorgs gracefully.
Bitcoin Infrastructure Fails at the Edges
Indexing the happy path is easy. Reorgs, dropped transactions, node outages, and mempool churn are where explorers show wrong balances and platforms lose money.
Reorgs Corrupt State
Most indexers overwrite or delete on chain reorganization โ history vanishes, UTXOs double-count, and nobody can explain what happened.
One Node, One Failure Domain
A single RPC dependency takes your whole stack down with it โ or worse, silently serves you the wrong chain.
Fire-and-Forget Broadcasts
Transactions dropped from the mempool just disappear. No retry, no state, no audit trail of what was submitted when.
Truth vs. Query Tension
A store built for immutable history is slow at hot lookups; a store built for queries invites rewriting history. Picking one store means losing one property.
An Indexing Stack Built for the Messy Parts
A Kotlin/Spring Boot service suite that treats reorgs, retries, and failover as first-class flows โ with an explorer UI on top and verified cryptography underneath.
Reorg-Aware by Design
Negative-delta detection flags reorgs the moment they happen; orphaned blocks are marked off-best-chain and timestamped โ never deleted โ while UTXOs roll back and a Prometheus counter records the event.
Hybrid Dual Datastore
Cassandra holds the immutable source of truth; PostgreSQL serves a derived, eventually-consistent UTXO view that converges within 5 seconds and survives Postgres downtime.
Event-Sourced Broadcasting
Every submission becomes an event with snapshots, tracked through 1/3/6 confirmation thresholds, with a 30-second rebroadcast loop backing off exponentially from 30s to 600s.
Fail-Closed RPC Failover
Primary and secondary providers per network, with expected-chain pinning that refuses to run against the wrong chain rather than index garbage.
Four Layers, From Signet to Screen
Chain truth enters at the bottom through fail-closed RPC, is indexed once, derived carefully, and served everywhere โ explorer, analytics, webhooks, and dashboards.
Explorer & Tooling
A separate read-facing Spring Boot API (OpenFeign proxy, caching, price service) ships a React 18 + TypeScript + Vite SPA inside the jar โ block, transaction, address, and mempool pages with D3 visualizations, UTXO management, and a network switcher. A Picocli CLI covers demo and HD-wallet commands.
Network Services
Event-sourced transaction broadcasting with snapshots and a confirmation monitor; mempool analytics with fee-rate histograms, fee recommendations, RBF detection, and next-block template simulation; address watching that pushes HMAC-signed webhooks to the MEDUSA backend.
Indexing Core
A 10-second block monitor pulls full blocks with prevouts for exact fees, writes Cassandra as immutable truth, and an async indexer polls every 5 seconds in batches of 100 to keep the PostgreSQL UTXO view converged โ through reorgs and Postgres outages alike.
Node & Crypto Foundation
Multi-provider bitcoind RPC with fail-closed chain pinning; a private signet devnet โ Bitcoin Core 27.0, three dockerized nodes, 10-second blocks โ for deterministic end-to-end chains; and a pure-Kotlin crypto module (BIP341 taproot, BIP340, BIP143, BIP32, bech32) locked by golden vectors against Bitcoin Core and rust-bitcoin.
From Block to Webhook
Every 10 seconds the stack checks the chain tip. What follows is one write to truth, one careful derivation, and event-driven delivery to everything downstream.
Ingest
Node โ CassandraWhat Happens
- 10s block monitor polls bitcoind JSON-RPC
- Full blocks fetched with prevouts for exact fee computation
- Blocks land in Cassandra โ the immutable source of truth
- Multi-provider failover with expected-chain verification
Derive
Cassandra โ PostgreSQLWhat Happens
- Async UTXO indexer polls Cassandra every 5 seconds
- Batches of 100, converging the query view in โค5s
- Survives PostgreSQL downtime โ truth is never blocked by the view
- plpgsql confirmations, coinbase maturity at 100 blocks
Survive Reorgs
When the Chain RewritesWhat Happens
- Negative-delta detection flags the reorganization instantly
- Orphaned blocks marked off-best-chain with timestamps โ never deleted
- UTXO rollback removes orphaned outputs from the query view
- Prometheus reorg counter increments for alerting
Serve & Notify
APIs, Analytics, WebhooksWhat Happens
- Explorer API and SPA query blocks, transactions, addresses, mempool
- Fee histograms, recommendations, RBF detection, next-block templates
- Watched addresses trigger HMAC-signed webhook push
- Broadcast tracking reports 1/3/6-confirmation milestones
Built for Adversity
Four disciplines keep the stack honest when the network isn't: storage separation, delivery persistence, verified cryptography, and adversarial testing.
Dual-Datastore Discipline
Truth vs. ViewControls
- Cassandra immutable, append-oriented truth
- PostgreSQL as a derived, disposable query view
- Eventual consistency with โค5s convergence
- Flyway-managed schema with event-sourced tracking tables
Resilient Broadcasting
Delivery Until ConfirmedControls
- SUBMITTED events plus snapshots โ full submission history
- Rebroadcast loop: 30s cadence, backoff 30โ600s at ร2.0
- Confirmation monitor tracks thresholds 1, 3, and 6
- Rebroadcast state persisted โ restarts don't forget
Verified Cryptography
Golden-Vector LockedControls
- Pure-Kotlin BIP341 taproot key-path SIGHASH_DEFAULT
- BIP340 tagged hashes, BIP143 segwit digests
- BIP32 HD derivation, bech32 P2WPKH and P2TR
- Golden vectors matched against Bitcoin Core and rust-bitcoin
Deterministic Testing
Adversarial by DefaultControls
- Private signet: Core 27.0, 3-node docker fleet, 10s blocks
- Deterministic end-to-end chains for repeatable tests
- 23 Kotlin test files across modules plus Testcontainers
- Dedicated adversarial security test suite
From Signet to Production Networks
The full stack โ indexing, broadcasting, explorer, monitoring โ runs today on testnet4 and a private signet, fail-closed by design. Each phase widens delivery and reach.
Beta
Live TodayDelivered
- Full indexing pipeline on testnet4 + private signet
- Event-sourced broadcasting with rebroadcast and confirmation tracking
- Explorer SPA with mempool analytics and D3 visualizations
- Prometheus + Grafana monitoring stack
Real-Time Delivery
In DesignPlanned Deliverables
- WebSocket/SSE channels alongside webhook push
- Live tip and mempool updates to the explorer UI
- Subscription filters per address and transaction
- Backpressure-aware event fan-out
Wallet Tooling
PlannedPlanned Deliverables
- In-crate PSBT construction and signing
- Expanded CLI wallet and HD commands
- Native ECDSA to retire the temporary BouncyCastle dependency
- Hardware-signer-friendly flows
Mainnet Operation
PlannedPlanned Deliverables
- Mainnet rollout behind the same fail-closed chain pinning
- Horizontal scaling of the indexing tier
- Hardened provider rotation and SLAs
- Production alerting playbooks on the reorg and lag metrics
Infrastructure That Tells You the Truth About the Chain
Explorer teams, infrastructure operators, and fintech platforms each get the hard parts handled.
For Explorer & Product Teams
For Infrastructure Teams
For Custody & Fintech Platforms
Ready to Run Serious Bitcoin Infrastructure?
Let's talk about indexing, broadcasting, and explorer infrastructure that stays correct through reorgs, outages, and everything the network throws at it.