VTA Benchmark
Deep Technical Audit

Orphan Block + Orphan Transaction Handling

This audit examines how the reviewed VTA Core architecture handles blocks and transactions that arrive before their dependencies. The key distinction is between temporary storage, dependency tracking, reprocessing after the parent arrives, and eviction/cleanup.

Orphan Transactions

SOURCE EVIDENCE

mapOrphanTransactions stores transactions whose inputs are missing.

Parent Index

SOURCE EVIDENCE

mapOrphanTransactionsByPrev links missing parent txids to dependent orphan transactions.

Size Protection

SOURCE EVIDENCE

Large orphan transactions over 5,000 serialized bytes are rejected from orphan storage in the reviewed path.

Live Stress Test

NOT EXECUTED

No live orphan-flood or peer-behavior stress test has been run on the user's node.

Dependency Resolution Flow

Object Arrivestx or block Dependency Missingparent/input unavailable Temporary Storageorphan map / index Parent Arrivesreprocessing trigger Validate again before acceptanceTemporary orphan status is not an exemption from transaction or block validation.Invalid or insufficient-fee orphan transactions are removed instead of being permanently retained. Orphan TXmissing input → storeparent accepted → retry dependents Orphan Blockmissing previous blockseparate ProcessBlock/orphan path Evidence boundaryExact live limits and orphan-blockstress behavior require release tests.

Audit Matrix

AreaReviewed findingStatus
Orphan TX storageAddOrphanTx() stores a transaction by txid when missing inputs are reported.Verified source path
Missing-parent indexEach orphan input's previous transaction hash is indexed in mapOrphanTransactionsByPrev.Verified source path
Large orphan TXThe reviewed source rejects orphan transactions larger than 5,000 serialized bytes for orphan storage.Verified source path
Bounded orphan poolLimitOrphanTxSize() evicts random orphan entries when the configured maximum is exceeded.Verified source path
Parent arrivalWhen a missing parent transaction is accepted, dependent orphan transactions are retried from the parent index.Verified source path
Invalid orphan cleanupIf a dependent orphan remains invalid or has insufficient fee after retry, it is queued for removal.Verified source path
Successful orphan relayA successfully accepted orphan transaction is relayed and then removed from the orphan maps.Verified source path
Orphan block pathBlock reception enters the separate ProcessBlock() path; exact orphan-block storage/reprocessing behavior needs release-pinned source tracing.Needs deeper pin
Network-wide orphan rateNo current network-wide orphan transaction/block rate is measured.Not measured

Security / Resource Controls

Duplicate Protection

An orphan transaction already present by hash is not inserted again.

Memory Bound

The orphan transaction map is explicitly bounded through the configured maximum and eviction routine.

Large-Object Filter

The reviewed 5,000-byte orphan-size threshold limits the cost of retaining unusually large missing-parent transactions.

Revalidation

A previously orphaned transaction must pass the normal mempool acceptance path after its dependency becomes available.

Release-Pinned Test Plan

1. Pin exact VTA Core release / commit.
2. Create parent transaction P and child transaction C.
3. Deliver C before P to an isolated node.
4. Confirm C enters orphan storage.
5. Deliver P.
6. Observe C revalidation and relay.
7. Repeat with an invalid child.
8. Repeat with an oversized child.
9. Fill orphan storage to its configured limit and record eviction.
10. Create child-of-child chains and measure recursive resolution.
11. Create a block whose previous block is unavailable.
12. Trace orphan-block storage and later reprocessing.
13. Repeat across two nodes.
14. Record memory, CPU and peer-misbehavior effects separately.
Evidence rule: The source-backed orphan-transaction path is stronger than a generic statement that “orphan handling exists.” This page records the actual storage, indexing, retry and cleanup flow, while leaving orphan-block internals and live stress behavior as explicit evidence gaps where they were not fully release-pinned.
VTA Benchmark — Orphan Block + Orphan Transaction Handling Deep Audit. Source research was used to verify the orphan-transaction path; live network-wide orphan statistics were not inferred.