> ## Documentation Index
> Fetch the complete documentation index at: https://prism-ddf93e61.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Tier 2: Execution Replay

> Reconstructing history to trace execution.

When Tier 1 isn't enough, Tier 2 escalation provides a full execution trace of the transaction.

## State Reconstruction

To replay a transaction accurately, Prism must reconstruct the exact ledger state that existed at the moment of execution.

* **Recent Transactions**: Fetched via Soroban RPC `getLedgerEntries`.
* **Historical Transactions**: Fetched from **Stellar History Archives** (S3/GCS) and replayed up to the target ledger sequence using Captive Core.

## The Tracing Sandbox

Prism executes the transaction in a modified Soroban sandbox.

* It intercepts every host function call.
* It records every storage read/write.
* It tracks CPU and memory consumption at every step.

## Hierarchical Timelines

The output is a structured timeline showing exactly which contract call triggered which host function, and where the resources were spent.
