The Fastest Distributed Settlement
Engine on Earth
A production-grade, Rust-native distributed transaction system targeting 1–10k+ TPS per shard and scaling to millions of TPS via horizontal sharding, pipelined BFT consensus, off-chain channels, and aggregated Merkle settlement. Byzantine fault-tolerant up to ⌊(n−1)/3⌋ failures. Sub-2s finality. No JSON. No REST. No blocking I/O.
Performance Targets
Per-Shard TPS
5k – 15k
TPS
100-Shard Fleet
500k – 1.5M
TPS
Finality Target
< 2s
goal
Block Time
100 – 300
ms
BFT Fault Tol.
⌊(n-1)/3⌋
nodes
Batch Window
50 – 100
ms
Global Architecture
Users / Clients
QUIC · WebSocket · Ed25519
Edge Layer (L0)
Local state · off-chain first
Transaction Router (L1)
Consistent hash · geo-aware
HCP Shards (L2)
Pipelined BFT · parallel exec
Off-Chain Channels (L3)
Instant · dispute-safe
Aggregated Settlement (L4)
Merkle root · 1000:1 batching
Layer Deep Dives
Edge / Client
Reference Implementation
// QUIC client transport (zero-copy recv)
async fn connect(endpoint: &str) -> QuicStream {
let cfg = QuicClientConfig::new()
.keep_alive_interval(Duration::from_secs(5))
.max_idle_timeout(Duration::from_secs(30));
QuicStream::connect(endpoint, cfg).await.unwrap()
}
fn sign_tx(tx: &Transaction, sk: &SigningKey) -> Signature {
sk.sign(&bincode::serialize(tx).unwrap())
}Pipelined BFT Consensus
Four blocks in-flight simultaneously. Throughput is limited by execution speed, not consensus rounds.
Binary P2P Message Types
| Type | Direction | Description |
|---|---|---|
| Proposal | Leader → All | New block proposal with tx batch, prev_hash, proposer sig |
| PreVote | All → All | First-round vote after proposal validation |
| Vote | All → All | Second-round commit vote once 2f+1 prevotes seen |
| Commit | Leader → All | Final commit message; block is irreversible |
| Ping | All → All | Health probe — latency measurement, liveness signal |
Core Data Structures
Transaction
| id | TxId | Blake3 hash of payload |
| payload | Bytes | Opaque binary payload (bincode) |
| from | AccountId | Source account (32-byte pubkey) |
| to | AccountId | Destination account |
| amount | u64 | Fixed-point amount (no floats) |
| nonce | u64 | Replay protection |
| signature | Signature | Ed25519 over id + payload |
| timestamp | u64 | Unix ms — for batching window |
Block
| block_id | BlockId | Hash of header fields |
| transactions | Vec<TxId> | Ordered tx references |
| proposer | NodeId | Leader node pubkey |
| previous_hash | BlockId | Parent block ID |
| state_root | Hash | Merkle root after execution |
| timestamp | u64 | Proposal time Unix ms |
| height | u64 | Monotonic block height |
ConsensusMsg
| type | MsgType | Proposal | PreVote | Vote | Commit |
| block_id | BlockId | Block this message refers to |
| height | u64 | Block height |
| round | u32 | View/round number |
| node_id | NodeId | Sender identity |
| signature | Signature | Ed25519 over (type, block_id, height) |
What This System Explicitly Avoids
Every decision below represents a hard performance or safety constraint — not a preference.
HTTP/REST per-call
TCP handshake + HTTP overhead per message — 5-50ms penalty
JSON in hot path
Allocating, UTF-8 encoding, schema-less — 10× slower than bincode
Blocking I/O
Stalls the async executor — cascades into latency spikes
Single-tx consensus
Wastes pipeline capacity — always batch 100–1000 transactions
Await full round
Serial throughput only — must pipeline N, N+1, N+2 concurrently
Large validator sets
>7 validators exponentially increases O(n²) message complexity
Float arithmetic
Non-deterministic across CPU models — use u64 fixed-point only
Sync Mutex in exec
Serialises parallel execution — use lock-free structures or RwLock
Horizontal Scaling Model
Per-Shard Throughput
4–7 validators, same-region. 5,000–15,000 TPS per shard with 100–300ms block time and 50–1000 tx batches. Pipelining keeps all cores busy.
100-Shard Fleet
Linear scale: 100 shards × 10,000 TPS = 1,000,000 TPS fleet-wide. Cross-shard is minimised by consistent-hash routing of related accounts.
Off-Chain Multiplier
State channels bypass consensus entirely. For recurring payment pairs, 99%+ of volume never hits L2. Effective throughput: unbounded.
| Shards | Per-Shard TPS | Fleet TPS | Validators | Finality |
|---|---|---|---|---|
| 1 | 10,000 | 10,000 | 7 | < 1s |
| 10 | 10,000 | 100,000 | 70 | < 1.5s |
| 100 | 10,000 | 1,000,000 | 700 | < 2s |
| 1000 | 10,000 | 10,000,000 | 7,000 | < 2s |
Rust Workspace Layout
hcp-net
hcp-consensus
hcp-exec
hcp-router