Skip to main content

System Architecture and Component Boundaries

1. Scope

This appendix defines POC V2 logical layers, component responsibilities, state ownership, cross-layer contracts, and deployment isolation. It answers who owns authority, who performs work, and how failures converge safely; it does not freeze final ABI, database schema, or capacity values.

The system has six functional layers. The shared poc-protocol package defines versioned objects, encoding, domains, and limits, but is not a seventh layer.

2. Six-Layer Architecture

The POC V2 L5–L0 architecture: business applications, on-chain protocol and authority, result coordination and delivery, deterministic computation, data and persistence, and the POC network.

LayerQuestion answeredCore responsibility
L5 Business ApplicationsWhy is Power produced or consumed?DApp business logic, Staking, Voting, and downstream composition
L4 On-Chain Protocol and AuthorityWhich facts and transitions are globally valid?Contribution, period/policy, Committee, QC Admission, Candidate, PowerStore, duty, and reward
L3 Result Coordination and DeliveryHow do matching Votes form a QC and reach the chain?Aggregator, durable QcReady, Settlement Worker, Public fallback, and reward claims
L2 Period Input and Deterministic ComputeHow does one input produce one result?Range, input interpretation, Compute Core, Artifact, and Isolated Signer
L1 Data Access and PersistenceHow is off-chain work read, frozen, and recovered?Finalized Chain Adapter, Event Store, Input Snapshot, authenticated state, and Journal
L0 Communication FoundationHow do signed objects propagate reliably?Permissioned overlay, durable outbox, Validated Ingress, Ack, and repair

3. Authority Model

Authoritative subjectSole authorityNon-authoritative copies
Contribution, Policy, Boundary, CommitteeFinalized Topo state and eventsIndexers, event stores, Peer messages
Active base and covered cursorOn-chain ActivePowerMetaLocal checkpoints and task records
Result attestationStrictly-greater-than-two-thirds QC over one resultAggregator choice, Peer count, message majority
Consumable PowerActive root/version/cursor after Atomic ActivateLocalCandidate, Artifact, Staging or Sealed Candidate
Settlement Duty SeedFinalized seed generated by the previous Activate and held in current ActiveLocal ranking caches and submitter claims
Reward entitlementOn-chain bitmaps, Delivery Receipts, and frozen beneficiariesSettlement records and Aggregator signer selection

When a required fact is missing, conflicting, or unverifiable, a component returns NotReady, Abstain, or preserves the previous Active state. Runtime latest values, defaults, and manual database edits cannot fill the gap.

4. End-to-End Object Flow

FS(C,A,V)NQDXApow\mathcal{F} \longrightarrow \mathcal{S} \longrightarrow (\mathcal{C}, \mathcal{A}, \mathcal{V}) \longrightarrow \mathcal{N} \longrightarrow \mathcal{Q} \longrightarrow \mathcal{D} \longrightarrow \mathcal{X} \longrightarrow A_{\mathrm{pow}}

Here, F\mathcal{F} = L4 finalized facts; S\mathcal{S} = L1 snapshot; (C,A,V)(\mathcal{C}, \mathcal{A}, \mathcal{V}) = L2 compute / Artifact / Vote; N\mathcal{N} = L0 network; Q\mathcal{Q} = L3 aggregation + QcReady; D\mathcal{D} = L3 delivery; X\mathcal{X} = L4 admission + activation; and ApowA_{\mathrm{pow}} = L5 Activated Power.

There is no centralized result server in this path. Every Validator can compute independently, distribute Votes, aggregate QC, and deliver on-chain actions during its duty window.

5. L4 On-Chain Modules

ModuleResponsibilityExplicitly excluded
poc_contributionValidate trusted contribution transactions and emit finalized ContributionEventCompute final Power
Period / PolicySeal boundaries and expose recoverable Config, Registry, Price/Oracle, and Retention identitiesSelect an off-chain result
Compute Key RegistryValidate Validator Operator, proof of possession, and epoch authorization for an independent BLS compute keyCustody a private key or add voting power
QC VerifierValidate Committee, bitvec, multisignature, weighted threshold, object binding, replay protection, and base/cursor continuityRecompute Contribution, Price, Retention, or Power
Candidate StoreHold the hidden QC-bound result and Batch/Seal progressExpose provisional Power to L5
PowerStore / PowerReadModelAtomically switch Active root, version, and cursor and expose the only read interfaceAccept a normal account write that bypasses QC
Validator Relay Binding / DutyBind relay and reward identities and derive duty windows statelessly from Active seedCreate QC weight or store per-Batch rankings
POC RewardStore Vote-claim bitmap, Delivery Receipts, budget, and claim stateEnter the Power formula or block valid activation

6. Validator Sidecar

Each Validator Sidecar contains at least:

ComponentLayerRequired guarantee
Finalized Chain AdapterL1Read an explicit chain identity, continuous transactions, and finalized fences only
Event / Policy StoreL1Commit events and checkpoint atomically; recover historical periods by boundary
Input SnapshotL1Bind boundary, Active base, range, Committee, and per-period fact references
Compute CoreL2Remain a pure function without RPC, SQL, P2P, clock, randomness, or environment access
Authenticated State / Artifact StoreL1/L2Verify roots and proofs; publish and reread Artifact by content digest
Isolated Signer / JournalL2 security boundaryAccept structured requests, revalidate eligibility, and prevent equivocation durably
POC Network ServiceL0Provide direct push, semantic Ack, durable outbox, and repair
AggregatorL3Group only identical Context/Commitment results and weight the full Committee
QcReady StoreL1/L3Persist a self-verified QC before asynchronous delivery
Settlement WorkerL3Idempotently submit QC/Batch/Seal using an isolated relay account, queue, and RPC pool

7. Key and Identity Separation

IdentityPurposeQC weight?
Validator Operator accountAuthorize, rotate, and revoke compute keysNo
Topo consensus keyBase consensusNo; reuse is prohibited
BLS compute keySign POC VotesYes, with weight from the frozen Committee
PeerId keyAuthenticate POC Overlay connectionsNo
Relay accountPay gas and submit QC/Batch/SealNo
Reward addressReceive Vote and Delivery rewardsNo

The POC network never holds the compute private key. The Signer exposes no sign(bytes) endpoint. It operates the key only after validating a structured Context/Commitment request and durably reserving the exact Vote.

8. Cross-Layer Contracts

These names express stable responsibility boundaries rather than final language signatures:

PortCaller → implementationRequired guarantee
FinalizedContributionSourceL1 → Topo ChainFinalized, continuous, explicit chain identity
BoundaryAndActiveSourceL1/L2 → Topo ChainBoundary and Active from a verifiable fence
HistoricalPolicySourceL2 → L1Per-source-period recovery; no latest fallback
AuthenticatedStateRepositoryL2 → L1Consistent base, root, proof, and checkpoint
ArtifactRepositoryL2/L3 → L1Put-if-absent, read by digest, and reverify
ComputeSignerL2 → Isolated SignerTyped preimage, equivocation prevention, durable barriers
VotePublisherL2 → L0Accept durable Signed Votes only
DurableNetworkEventSourceL3 → L0Validated, replayable, monotonic cursor
DurableQcReadySourceSettlement → L1/L3Persistent QC task with at-least-once consumption
ChainPowerSubmissionL3 → L4Idempotent QC, Batch, Seal, confirmed by finalized state
ActivePowerReadL5 → L4Return Activated Power only

9. Data and Recovery Boundaries

Off-chain state falls into three classes:

  1. Chain-rebuildable: event projections, period facts, input snapshots, Committee, Candidate, and Settlement progress.
  2. Digest-verifiable or reconstructible: authenticated-state checkpoints, Artifact, and Vote/QC network caches.
  3. Not safely reconstructible: Signer Journal. Loss or suspected rollback requires the associated compute key to stop signing.

Inputs satisfying p>Lp > L, where pp denotes the input source period and LL denotes the Active cursor, Artifacts referenced by unfinished Candidates, and historical Retention needed for dormant users cannot be deleted by ordinary TTL policies.

10. Deployment and Resource Isolation

  • POC Sidecar and Topo consensus use separate runtimes, ports, identity keys, quotas, and readiness signals.
  • CPU/cryptographic work uses bounded worker pools; IO, queues, connections, pages, Artifacts, and Batches have hard limits.
  • Settlement uses an executor, RPC pool, and circuit breaker independent of Compute and Aggregator.
  • RPC, gas, nonce, database pressure, or a POC OOM can reduce POC liveness but cannot block Topo consensus readiness.
  • Artifacts may have multiple providers, but locators are not authoritative; content is verified by digest before use.

11. DApp Integration Boundary

A DApp owns its business state machine, maturity condition, equity-token issuance, and trusted ContributionEvent entry. It does not execute the POC Power formula, choose a Validator result, or write PowerStore directly. Frontends and backends may display projections, but must distinguish business completion, contribution issuance, Candidate processing, and Power activation.

12. Architecture Acceptance Criteria

  • Documentation and implementation use L5–L0 as the only functional layers.
  • L4 is independent of off-chain availability and is the sole authority for Contribution, Candidate, and Active Power.
  • Every Validator independently builds its snapshot and result from finalized facts.
  • L2 Compute Core has no IO or nondeterministic environment dependency.
  • Vote publication follows Artifact reread, eligibility revalidation, and Signer durable barriers.
  • Aggregators use the full Committee and the strictly-greater-than-two-thirds threshold.
  • Settlement backlog cannot backpressure Compute, Signer, L0, or base consensus.
  • Partial Batches, Expired/Rejected Candidates, and reward failures do not alter Active Power.
  • L5 reads Activated Power through PowerReadModel only.