Skip to Content
The StagenetMainnet Replay

Mainnet Replay

Stagenets provide a mainnet-like experience by replaying a target chain’s historical blocks in sequence. Starting from a specific historical block, the Stagenet reruns its subsequent blocks one after another, just like a live chain.

This means that, just like a real chain, you have to wait for a transaction to be mined. Its not instant, like Hardhat network. The stagenet will always mined tx in the next block. It mines blocks with the frequency of its target chain, e.g. 12s for Ethereum mainnet.

This 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 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.

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