Skip to Content
The StagenetMainnet Replay

Mainnet Replay

A Stagenet replicates a real blockchain’s continously changing state by replaying its blocks. Starting at a fork block, it runs its subsequent blocks one after another, just like a live chain.

Block Replay

Mainnet block replay involves two steps. First, the Stagenet executes any pending user transactions it has in its own mempool. Then, it updates its state to match the target chain’s EVM state (ETH balances, contract codes, storage slots, etc.) at the end of the replayed block.

If the total supply of WETH increased from 1M to 2M on Ethereum in block 1000, that change would be applied to an Ethereum-replicating Stagenet’s WETH contract when it replays block 1000.

This process makes the Stagenet follow the target chain’s historical state progression. This allows you to run your contracts with authentic on-chain data — such as oracle values, DeFi protocol states, and token balances — that evolve realistically over time, providing true-to-life testing conditions. For example, Uniswap pools reflect their real historical liquidity, reserves, and tick movements, allowing you to execute swaps against live and authentic liquidity conditions.

State Updates

The Stagenet continuously updates its state every replayed block to match the target chain — but only for data that hasn’t been modified by user transactions.

If a user transaction changes a particular bit of Stagenet state — e.g. a wallet’s balance or a contract’s storage slot — that state is frozen at the new user-set value and stops receiving updates from the target chain. All other, untouched state continues to sync as normal.

If you send 100 USDC to Alice’s account on your Ethereum-replicating Stagenet at block 2000, and on Ethereum she later receives another 200 USDC at block 2005, then, as your Stagenet replays block 2005, it will not apply that 200 USDC update.

The Stagenet preserves user-modified state over mainnet updates. This lets you set specific pieces of state within a blockchain environment that uses authentic on-chain data and evolves exactly as it did historically.

Last updated on