Commit dbe6001c authored by Yann Hodique's avatar Yann Hodique Committed by GitHub

feat(kurtosis-devnet): cut build time for prestate (#13577)

For the purpose of seeding op-challenger, we need only the proof files.

This change adds a separate target that outputs only these.

Unfortunately, docker outputs can be pretty slow, so avoiding dumping
the heavier binaries makes a significant differente performance-wise.
parent d784a98b
...@@ -9,8 +9,7 @@ _contracts-build BUNDLE='contracts-bundle.tar.gz': ...@@ -9,8 +9,7 @@ _contracts-build BUNDLE='contracts-bundle.tar.gz':
tar -czf {{BUNDLE}} -C ../packages/contracts-bedrock artifacts forge-artifacts cache tar -czf {{BUNDLE}} -C ../packages/contracts-bedrock artifacts forge-artifacts cache
_prestate-build PATH='.': _prestate-build PATH='.':
make -C ../op-program reproducible-prestate docker buildx build --output {{PATH}} --target export-stage-proofs --progress plain -f ../op-program/Dockerfile.repro ../
cp ../op-program/bin/prestate-proof*.json {{PATH}}
_docker_build TAG TARGET='' CONTEXT='.' DOCKERFILE='Dockerfile': _docker_build TAG TARGET='' CONTEXT='.' DOCKERFILE='Dockerfile':
docker buildx build -t {{TAG}} \ docker buildx build -t {{TAG}} \
......
...@@ -50,6 +50,11 @@ RUN mv /app/op-program/bin/0-mt64.json /app/op-program/bin/prestate-proof-mt64.j ...@@ -50,6 +50,11 @@ RUN mv /app/op-program/bin/0-mt64.json /app/op-program/bin/prestate-proof-mt64.j
# Exports files to the specified output location. # Exports files to the specified output location.
# Writing files to host requires buildkit to be enabled. # Writing files to host requires buildkit to be enabled.
# e.g. `BUILDKIT=1 docker build ...` # e.g. `BUILDKIT=1 docker build ...`
FROM scratch AS export-stage-proofs
COPY --from=builder /app/op-program/bin/prestate-proof.json .
COPY --from=builder /app/op-program/bin/prestate-proof-mt.json .
COPY --from=builder /app/op-program/bin/prestate-proof-mt64.json .
FROM scratch AS export-stage FROM scratch AS export-stage
COPY --from=builder /app/op-program/bin/op-program-client.elf . COPY --from=builder /app/op-program/bin/op-program-client.elf .
COPY --from=builder /app/op-program/bin/op-program-client64.elf . COPY --from=builder /app/op-program/bin/op-program-client64.elf .
......
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