@@ -27,34 +27,7 @@ Unlike previous iterations of our state surgery scripts, this one does not write
...
@@ -27,34 +27,7 @@ Unlike previous iterations of our state surgery scripts, this one does not write
1.**Performance**. It's much faster to write binary to LevelDB than it is to write strings to a JSON file.
1.**Performance**. It's much faster to write binary to LevelDB than it is to write strings to a JSON file.
2.**State Size**. There are nearly 1MM accounts on mainnet, which would create a genesis file several gigabytes in size. This is impossible for Geth to import without a large amount of memory, since the entire JSON gets buffered into memory. Importing the entire state database will be much faster, and can be done with fewer resources.
2.**State Size**. There are nearly 1MM accounts on mainnet, which would create a genesis file several gigabytes in size. This is impossible for Geth to import without a large amount of memory, since the entire JSON gets buffered into memory. Importing the entire state database will be much faster, and can be done with fewer resources.
## Data Files
The following data files are used for mainnet:
1.`mainnet-ovm-4-addresses.csv`: Contains all addresses that used OVM ETH during regenesis 4. Calculated by parsing Mint, Burn, and Transfer events from that network's OVM ETH contract.
2.`mainnet-ovm-4-allowances.csv`: Contains all addresses that performed an approval on OVM ETH during regenesis 4 and who they approved. Calculated by parsing Approve events on that network's OVM ETH contract.
These files are used to build the list of OVM ETH storage slots.
## Compilation
## Compilation
Run `make surgery`.
Run `make op-migrate`.
## Usage
```
NAME:
surgery - migrates data from v0 to Bedrock
USAGE:
surgery [global options] command [command options] [arguments...]
COMMANDS:
dump-addresses dumps addresses from OVM ETH
migrate migrates state in OVM ETH
help, h Shows a list of commands or help for one command