ethereum-optimism / mocktimism

[WIP!] Coordinates two anvil process (L1 and L2) for testing / forking op-stack chains (mocktimism placeholder name)
MIT License
21 stars 7 forks source link

[Blocked] [P2] Implement State Dumps with Anvil #7

Open roninjin10 opened 1 year ago

roninjin10 commented 1 year ago

Description

State dumps are critical for various debugging, migration, and backup purposes. We need a feature within Anvil that allows users to request and manage state dumps, possibly on-demand or at periodic intervals. The state dumps should be in line with the TOML configurations provided and should include relevant information for both L1 and L2 chains.

Mocktimism TOML Configuration

# Global Configuration
[global]
state = '/path/to/my/persisted-state'
silent = false

# L1 Chain Configuration
[L1]
name = 'mainnet'

[[fork-config]]
fork_chain_id = 1
fork_url = "https://mainnet.alchemy.infura"
block_base_fee_per_gas = 420

[[environment]]
block_base_fee_per_gas = 420
chain_id = 10
gas_limit = 420

[[evm]]
accounts = 10
balance = 1000
steps-tracing = true

[[server]]
allow-origin = "*"
port = 8545
host = "127.0.0.1"
block_time = 12
prune_history = false

# L2 Chain Configuration
[L2]
name = "L2_Chain_1"

[[fork-config]]
fork_chain_id = 10
fork_url = "https://op.alchemy.infura"
block_base_fee_per_gas = 420

[[environment]]
# Optionally override the l1 or set it if not running an l1
l1_block_base_per_gas = 420
block_base_fee_per_gas = 420
chain_id = 10
gas_limit = 420

[[evm]]
accounts = 10
balance = 1000
steps-tracing = true

[[server]]
allow-origin = "*"
port = 8546
host = "127.0.0.1"
block_time = 2
prune_history = false

Tasks

nickbalestra commented 11 months ago

Blocked by #9