Commit c0222d33 authored by Mark Tyneway's avatar Mark Tyneway

op-migrate: rename and add docker public to ci

parent 2480cf85
...@@ -1101,6 +1101,18 @@ workflows: ...@@ -1101,6 +1101,18 @@ workflows:
- gcr - gcr
requires: requires:
- op-proposer-docker-build - op-proposer-docker-build
- docker-build:
name: op-migrate-docker-build
docker_file: op-chain-ops/Dockerfile
docker_name: op-migrate
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_context: .
- docker-publish:
name: op-migrate-docker-publish
docker_name: op-migrate
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- gcr
- docker-tag-op-stack-release: - docker-tag-op-stack-release:
name: docker-tag-op-stack-release name: docker-tag-op-stack-release
filters: filters:
......
...@@ -8,10 +8,10 @@ COPY ./op-bindings /app/op-bindings ...@@ -8,10 +8,10 @@ COPY ./op-bindings /app/op-bindings
WORKDIR /app/op-chain-ops WORKDIR /app/op-chain-ops
RUN make migrate RUN make op-migrate
FROM alpine:3.15 FROM alpine:3.15
COPY --from=builder /app/op-chain-ops/bin/migrate /usr/local/bin COPY --from=builder /app/op-chain-ops/bin/op-migrate /usr/local/bin
ENTRYPOINT ["migrate"] ENTRYPOINT ["op-migrate"]
migrate: op-migrate:
go build -o ./bin/migrate ./cmd/migrate/main.go go build -o ./bin/op-migrate ./cmd/op-migrate/main.go
test: test:
go test ./... go test ./...
.PHONY: migrate test .PHONY: op-migrate test
...@@ -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
GLOBAL OPTIONS:
--data-dir value, -d value data directory to read
--help, -h show help (default: false)
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment