Skip to Content
FeaturesMainnet ReplayState Behaviour

State Behaviour

Mainnet Replay separates Stagenet state into two categories:

  • Untouched state — state that has not been changed by a transaction on your Stagenet.
  • Modified state — state that has been changed by a transaction on your Stagenet.

Untouched state continues to follow the chain your Stagenet is replaying as replay advances. Modified state is preserved locally and is no longer overwritten by replay.

This is what lets your Stagenet keep following production state while preserving the effects of your own transactions.

Untouched state

Untouched state is read from the target chain as your Stagenet replays new blocks.

This means data your Stagenet has not changed can continue updating over time, such as:

  • Oracle prices
  • DeFi protocol state
  • Account balances
  • Contract storage
  • Contract code
  • Account balances and nonces

If a Chainlink price feed updates on Ethereum, that updated value is applied to an Ethereum Stagenet when it replays the corresponding block, unless the feed state has already been modified on the Stagenet.

Modified state

Modified state is state that has been changed on your Stagenet.

If a Stagenet transaction changes chain state — account fields, code, and storage — that change is preserved locally. Replay updates from the target chain will no longer overwrite the modified state.

Everything else continues to follow the target chain.

What happensResult
An account balance is never touched on the StagenetIt continues updating from replayed blocks
A contract storage slot is never touched on the StagenetIt continues updating from replayed blocks
A Stagenet transaction changes a wallet or token balanceThat balance is persisted and no longer overwritten by replay
A Stagenet transaction writes to a storage slotThat slot is persisted and no longer overwritten by replay
Other unrelated state is untouchedIt continues following the target chain

Other untouched chain state continues following the target chain as replay advances.

If you swap against a Uniswap pool on your Stagenet, the pool state changed by that swap is persisted locally. From then on, that modified pool state no longer syncs to its live mainnet value.

Last updated on