diff --git a/Makefile b/Makefile index 0fdfb07655ef..08842b6feae1 100644 --- a/Makefile +++ b/Makefile @@ -129,6 +129,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 op-program/bin/prestate.json + +$(DEVNET_CANNON_PRESTATE_FILES): + 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 "" @@ -152,16 +158,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) @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 \ - make cannon-prestate; \ - fi .PHONY: pre-devnet devnet-up: pre-devnet ## Starts the local devnet