Architecture

Architecture Overview

Two Chains, One Thread

stealthCORE and stealthPRIVATE are two independent blockchains that converge into a single shared processing thread — ensuring deterministic timekeeping and enabling near-instant cross-chain swaps.

stealthCORE
+
stealthPRIVATE
=
1 Shared Thread

Why Single-Threaded?

Network timekeeping demands both chains share the exact same clock. A single combined thread for messaging + production + validation eliminates clock drift and deadlock risks. Compute-heavy operations (ZK proofs, signatures, feework) are parallelized in worker threads, then fed synchronously back into the main loop.

CHAIN 1 stealthCORE Block Arrival MULTITHREADED WORKERS fw 1 fw 2 fw 3 Feework + Signature Validation CHAIN 2 stealthPRIVATE Block Arrival MULTITHREADED WORKERS ZK₁ ZK₂ ZK₃ ZK Proof Validation ▼ CONVERGE ▼ synchronous arrival synchronous arrival 1 SHARED THREAD Production · Validation P2P Messaging ⏱ SHARED CLOCK Produce CORE Block → Broadcast Produce PRIVATE Block → Broadcast NEAR-INSTANT CROSS-CHAIN SWAPS
Chain 1 — stealthCORE

Public Consensus Layer

Independent blockchain handling public transactions with feework-based validation. Has its own block format, QPRegistry coupling, and signature scheme. Blocks arrive into the shared thread synchronously.

FeeworkBlock SignaturesQPRegistryPublic Tx
Chain 2 — stealthPRIVATE

Privacy-Preserving Layer

Independent blockchain processing zero-knowledge proofs for confidential transactions. Separate protocol, separate block format — but shares the same processing thread and clock as stealthCORE.

ZK ProofsConfidential TxSeparate Protocol
The Bridge — Combined Thread

One Thread, Both Chains, Same Clock

The key architectural decision: a single thread handles P2P messaging, block production, and validation for both stealthCORE and stealthPRIVATE. This is not a merged chain — they are two separate protocols running on one shared execution loop. This eliminates deadlocks, ensures deterministic timekeeping, and makes cross-chain swaps nearly instant. Compute-heavy operations (ZK proofs, signature checks, feework) are dispatched to parallel worker threads, with results fed synchronously back into the main loop.

P2P MessagesProductionValidationShared ClockNo DeadlocksNear-instant Swaps

Processing Flow

1

Block Arrives from Either Chain

A new stealthCORE or stealthPRIVATE block is received via P2P. Both chains feed into the same combined thread synchronously — two separate protocols, one entry point.

2

Dispatch Heavy Validation to Workers

The main thread dispatches compute-intensive work to parallel workers: ZK proof verification for PRIVATE blocks, feework and signature checks for CORE blocks.

3

Synchronous Result Collection

Workers complete and results are fed back synchronously into the combined thread, preserving deterministic ordering and the shared clock across both chains.

4

Update Registry & State

QPRegistry updates, staker records, and block confirmations are processed in-thread. Single-threaded access means no locking or deadlocks for either chain's registry.

5

Produce & Broadcast (Per Chain)

The shared thread produces a new block for whichever chain's turn it is and broadcasts it. Both chains tick on the same clock, enabling near-instant cross-chain swaps without cross-process coordination.