Core Feature LOC and Audit-Scope Inventory¶
Repository: postfiatl1v2
Counted revision: 1f478e0c (main, 2026-08-28)
Core production total: 225,070 nonblank source lines
Dated inventory
These counts are for 1f478e0c (28 August 2026). They were not recounted
for main of 25 November 2026, which has changed since (for example the
Solana withdrawal code of 23 and 24 November).
Counting boundary¶
This inventory measures the core protocol implementation that an auditor could reasonably treat as the product and trust boundary. It excludes:
- explicit test files and Rust
#[cfg(test)]blocks; - benchmarks, fuzzers, evidence campaigns, and generated reports;
- documentation, configuration, deployment scripts, and operator tooling;
- Python, JavaScript, web applications, wallets, and client SDKs;
- vendored FIPS-204 and Halo2 source; and
- development-only benchmark, simulation, drill, rehearsal, payload-generator, shadow-service, and CLI binaries.
The count includes nonblank Rust source in the owning L1 crates, production Solidity contracts, and NAV proof guest programs. Nonblank comment lines remain included. Files are assigned to exactly one bucket, so the feature totals do not double-count shared code.
Several canonical type, execution, RPC, and node files serve more than one feature. Those files are assigned to a shared-core bucket rather than being arbitrarily charged to every consumer. Consequently, a feature's dedicated LOC is not its complete transitive audit scope.
Feature inventory¶
| Feature | Core LOC | Description | Primary repository locations | Audit complexity |
|---|---|---|---|---|
| NAV markets, reserves, issuance, and external settlement | 37,174 | Floating-NAV issued assets, reserve packets and profiles, supply/backing checks, mint and redeem rules, market policy, vault-bridge conservation, SP1-bound reserve verification, PFTL/PFUSDC proof guests, and production external-settlement contracts. | NAV types, reserve public values, NAV execution, market policy, SP1 verifier, reserve protocol, market bridge, vault workflows, vault conservation, PFUSDC proofs, PFTL Uniswap proofs, proof guest programs, Ethereum contracts | Extreme — financial conservation, valuation, proof, freshness, issuance, redemption, and cross-system boundaries. |
| Consensus v2, ordering, mempool, and transport | 34,542 | Deterministic proposal ordering, prepare/precommit finality, quorum certificates, timeout/view changes, durable signer safety, mempool admission, peer transport, and state-commitment bindings. | ordering_fast, mempool_dag, network, block finality, consensus artifacts, v2 finality, v2 store, mempool proposals, transport protocol, transport runtime, state commitment | Extreme — consensus safety, determinism, quorum identity, persistence-before-signing, replay, and untrusted network input. |
| Shared node runtime, RPC, and orchestration | 36,803 | The executable node composition layer: protocol wiring, runtime state, RPC dispatch, CLI-to-runtime routing, lifecycle queries, certified operations, and shared execution orchestration. | node crate, node types, RPC dispatch, RPC CLI, lifecycle queries, main runtime, runtime parts | Extreme — largest cross-feature attack surface and the principal place where otherwise sound components can be composed incorrectly. |
| Asset-Orchard privacy and proof verification | 29,420 | Orchard/Halo2 adapter, action circuits, proof and authorization verification, note encryption, anchors, commitments, nullifiers, private transfer/swap actions, and transparent/private value turnstiles. | privacy interface, Orchard adapter, Asset-Orchard, circuit, verification, Orchard policy actions, Orchard state application, shielded batch actions | Specialist/extreme — circuit/public-input agreement, nullifier safety, conservation, verifier bounds, upstream dependency, and privacy leakage. |
| Storage, snapshots, migration, and replay | 22,485 | Transactional finalized-state persistence, expected-parent atomic commits, integrity checks, ordered-history accumulation, snapshots, replay, retained history, migration, backend activation, and verify-only behavior. | storage crate, transactional store, ordered history, storage commit, storage migration, batch snapshots, history, replay wallet | Extreme/current release blocker — crash atomicity, corruption, exact replay, migration, rollback, retained-history equality, and read-only verification. |
| Cobalt validator governance | 19,713 | Validator trust-graph evaluation, RBC/ABBA/MVBA/DABC agreement, admission policy, registry transition rules, authority certificates, governance ordering, handoff, shadow comparison, and recovery boundaries. | consensus_cobalt, trust-graph governance, DABC registry, node governance, authority certificate, Cobalt handoff, Cobalt shadow | Very high — old/new-registry authorization, linkedness, proposal lineage, ratification scope, rollback, and separation from block finality. |
| Base ledger, issued assets, fees, NFTs, and execution | 11,793 | Transparent accounts and balances, issued-asset state, deterministic transaction entrypoints, fee burning, offers, NFTs/escrows, general ledger helpers, and shared state-transition behavior. | core chain types, owned asset types, execution entrypoints, issued-asset helpers, fees and offers, NFT/escrow execution | Very high — conservation, authorization, arithmetic, fees, replay protection, and rejection without partial mutation. |
| FastSwap DvP and recovery | 8,674 | Dual-owner prefunded-asset DvP, atomic reservation, prepare/decision/effects certificates, confirm-or-cancel finality, bridge/checkpoint controls, durable storage, catch-up, and restart recovery. | FastSwap types, execution modules, FastSwap service, FastSwap store, FastSwap model | Very high — two-party authorization, both-or-neither effects, late certificates, cancellation, terminal fencing, and recovery. |
| Generic bridge and Ethereum verification | 6,687 | Generic checkpoint and receipt verification, Ethereum proof processing, bridge policy types, and node-side checkpoint signing and receipt construction. Feature-specific NAV settlement contracts are counted in the NAV row. | bridge crate, Ethereum checkpoint, receipt verifier, bridge types, checkpoint signing, receipt proof builder | Very high — finality translation, proof validation, replay, chain identity, custody, and cross-ledger conservation. |
| Shared canonical types and ML-DSA authorization | 6,123 | Cross-feature signed transaction envelopes, receipts, validation helpers, canonical bytes, identifiers, domain separation, ML-DSA signing, and verification. | transaction and receipt types, validation helpers, types crate, crypto provider | Critical — every feature depends on canonical encoding, domain binding, signature verification, bounds, and receipt semantics. |
| DGA/model governance | 6,254 | Deterministic model-generated governance rules, ruleset hashing, guarded-apply drills, evidence lineage, and verifier receipts. This is decision support and is not live mutation authority. | governance agent, agent parts | High but deferrable — model output must remain outside consensus and cannot bypass typed policy, operator authorization, or Cobalt ratification. |
| FastPay object payments and recovery | 4,665 | Single-owner prefunded-object payments, owner authorization, certified apply, consume-or-cancel recovery, version fencing, and durable indexes. | FastPay types, FastPay model, primary-lane execution, owned transfer, recovery, node recovery, transactional index | High — owner authorization, certificate uniqueness, durable application, cancellation, and late-certificate safety. |
| W6 consensus atomic swap | 737 | Dedicated RPC and server handling for a two-owner atomic swap executed as one ordinary consensus transaction. Canonical intent and execution code shared with the ledger remain in shared/base buckets. | atomic-swap RPC, RPC server, transaction lifecycle | High — exact dual authorization, quote/freshness binding, conservation, and both-or-neither mutation. |
Core totals and proposed audit packages¶
| Scope | Included surfaces | LOC |
|---|---|---|
| All counted core production code | Every row above | 225,070 |
| Transparent NAV core | NAV + consensus + shared node + shared canonical types/ML-DSA + base ledger + storage | 148,920 |
| Transparent NAV plus active Cobalt governance | Transparent NAV core + Cobalt | 168,633 |
| Private NAV | Transparent NAV plus Cobalt + Asset-Orchard | 198,053 |
| Private NAV plus generic bridge verification | Private NAV + generic bridge | 204,740 |
DGA/model governance, FastPay, FastSwap, and W6 can be separately disabled or scoped unless they are part of the release configuration under audit.
Auditor interpretation¶
The 37,174-line NAV surface is the largest dedicated product feature. It is not optional in a PostFiat NAV audit. Its transitive trust boundary includes canonical types and ML-DSA authorization, consensus, shared node execution, base-ledger accounting, and storage.
The full 225,070-line core should not be confused with the earlier 628,151-line first-party repository count. The larger number includes tests, clients, wallets, web applications, audit/evidence tooling, and operational automation that this inventory deliberately excludes.
LOC is a scoping measure, not a security result. Final audit scope must pin the release binary, enabled feature configuration, protocol/activation versions, reachable RPC methods, storage backend, proof profiles, contract addresses, and deployed source lineage.