Beta

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.

Kotlin Spring Boot React Bitcoin Indexing Cassandra
๐Ÿ—„๏ธ
2 Stores
Cassandra Truth + PostgreSQL Query View
๐Ÿ”„
โ‰ค5s
UTXO View Convergence After Indexing
๐Ÿ”€
0 Deleted
Orphaned Blocks Marked, Never Erased
The Challenge

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.

The Solution

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.

4
Layer 4
๐Ÿ–ฅ๏ธ

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.

โš›๏ธReact 18 + TypeScript ๐Ÿ“ŠD3 Visualizations ๐Ÿ”ŽOpenFeign + Caching ๐Ÿ’ปPicocli CLI
โ†‘
Derived From Chain Truth
3
Layer 3
๐Ÿ“ฃ

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.

๐Ÿ“ฃEvent-Sourced Broadcasts ๐ŸงพFee Histogram + RBF ๐Ÿ””HMAC Webhooks โฑ๏ธExponential Rebroadcast
โ†‘
Derived From Chain Truth
2
Layer 2
๐Ÿ—„๏ธ

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.

๐Ÿ—„๏ธCassandra Source of Truth ๐Ÿ˜PostgreSQL UTXO View ๐Ÿ”€Reorg Rollback ๐Ÿ“ˆPrometheus Metrics
โ†‘
Derived From Chain Truth
1
Foundation
โ‚ฟ

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.

โ‚ฟCore 27.0 Signet Fleet ๐Ÿ”RPC Failover ๐Ÿ”BIP341 Taproot ๐ŸงฌGolden-Vector Locked

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.

01

Ingest

Node โ†’ Cassandra

What 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
Checkpoint: Chain truth captured once, immutably
02

Derive

Cassandra โ†’ PostgreSQL

What 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
Checkpoint: A fast query view that can always be rebuilt from truth
03

Survive Reorgs

When the Chain Rewrites

What 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
Checkpoint: State corrected, history preserved, ops notified
04

Serve & Notify

APIs, Analytics, Webhooks

What 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
Checkpoint: Downstream systems react to events, not polls

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. View

Controls

  • 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
Guarantee: the view can be wrong for seconds, the truth never
๐Ÿ“ฃ

Resilient Broadcasting

Delivery Until Confirmed

Controls

  • 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
Guarantee: a transaction is tracked until it confirms, not until the process restarts
๐Ÿ”

Verified Cryptography

Golden-Vector Locked

Controls

  • 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
Guarantee: signatures match the reference implementations, byte for byte
๐Ÿงช

Deterministic Testing

Adversarial by Default

Controls

  • 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
Guarantee: failure modes are rehearsed, not discovered

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.

Now

Beta

Live Today

Delivered

  • 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
Milestone: Complete stack, fail-closed on test networks
Next

Real-Time Delivery

In Design

Planned 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
Milestone: From polling and webhooks to live push
Planned

Wallet Tooling

Planned

Planned 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
Milestone: From verified primitives to full wallet workflows
Planned

Mainnet Operation

Planned

Planned 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
Milestone: The same guarantees, on the real network

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

โœ“ React 18 explorer SPA shipped inside the jar โ€” deploy one artifact
โœ“ Mempool analytics: fee histograms, recommendations, RBF detection
โœ“ Next-block template simulation for fee UX
โœ“ Network switcher across environments
๐Ÿ› ๏ธ

For Infrastructure Teams

โœ“ Truth store keeps ingesting through PostgreSQL downtime
โœ“ Fail-closed multi-provider failover โ€” never the wrong chain
โœ“ Metrics for tip height, lag, reorgs, provider errors, watched addresses
โœ“ Grafana + Prometheus stack included
๐Ÿฆ

For Custody & Fintech Platforms

โœ“ HMAC-signed webhooks push address events into your backend
โœ“ Event-sourced tracking with 1/3/6-confirmation milestones
โœ“ Orphaned history preserved for audit โ€” reorgs leave a trail
โœ“ Taproot and segwit signing locked to Core and rust-bitcoin vectors

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.

2 Stores
Truth + Query View
โ‰ค5s
UTXO Convergence
0 Deleted
Reorg-Safe History