Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run cannon-prestate if devnet cannon prestate files are missing #11399

Merged
merged 3 commits into from
Aug 9, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ reproducible-prestate: ## Builds reproducible-prestate binary
make -C ./op-program reproducible-prestate
.PHONY: reproducible-prestate

# Include any files required for the devnet to build and run. This appears to be the only one that's actually needed.
DEVNET_CANNON_PRESTATE_FILES := op-program/bin/prestate-proof.json
ajsutton marked this conversation as resolved.
Show resolved Hide resolved

$(DEVNET_CANNON_PRESTATE_FILES):
ajsutton marked this conversation as resolved.
Show resolved Hide resolved
make cannon-prestate

cannon-prestate: op-program cannon ## Generates prestate using cannon and op-program
./cannon/bin/cannon load-elf --path op-program/bin/op-program-client.elf --out op-program/bin/prestate.json --meta op-program/bin/meta.json
./cannon/bin/cannon run --proof-at '=0' --stop-at '=1' --input op-program/bin/prestate.json --meta op-program/bin/meta.json --proof-fmt 'op-program/bin/%d.json' --output ""
Expand All @@ -160,16 +166,14 @@ nuke: clean devnet-clean ## Completely clean the project directory
git clean -Xdf
.PHONY: nuke

pre-devnet: submodules ## Prepares for running a local devnet
## Prepares for running a local devnet
pre-devnet: submodules $(DEVNET_CANNON_PRESTATE_FILES)
ajsutton marked this conversation as resolved.
Show resolved Hide resolved
@if ! [ -x "$(command -v geth)" ]; then \
make install-geth; \
fi
@if ! [ -x "$(command -v eth2-testnet-genesis)" ]; then \
make install-eth2-testnet-genesis; \
fi
@if [ ! -e op-program/bin ]; then \
ajsutton marked this conversation as resolved.
Show resolved Hide resolved
make cannon-prestate; \
fi
.PHONY: pre-devnet

devnet-up: pre-devnet ## Starts the local devnet
Expand Down