Skip to content

[Anvil] Snapshot/restore (chain reversion) #49

@smiasojed

Description

@smiasojed

Implement:

  • evm_snapshot: Takes a snapshot of the current state of the EVM (blockchain state, contracts, balances, etc.) at a given point in time and returns a snapshot id.
  • evm_revert: Reverts the EVM's state to a previously taken snapshot, undoing all state changes made after that point.
  • anvil_rollback: Revert the state to a previous block height.

What's important is that once we revert the blockchain, we no longer can undo the revert (we cannot go back to the future), which is a key simplification.

Let's try using substrate chain reversion: https://paritytech.github.io/polkadot-sdk/master/sc_client_api/backend/trait.Backend.html#tymethod.revert

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions