From b047e1fd3b16d76c820d6e8cfc3cac4ede09d847 Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Thu, 8 Aug 2024 09:08:11 +1000 Subject: [PATCH] Revert "Fix devnet-up when op-program/bin is missing prestate-proof.json (#11383)" (#11393) This reverts commit 2491a3732fe97c9eec9baf615a010e8f7a42f738. make cannon-prestate doesn't declare all transitive dependencies properly so can fail to build when there are changes. --- Makefile | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 2f9620ee9273..51d0d1397b33 100644 --- a/Makefile +++ b/Makefile @@ -137,18 +137,11 @@ reproducible-prestate: ## Builds reproducible-prestate binary make -C ./op-program reproducible-prestate .PHONY: reproducible-prestate -# Checks if prestate outputs are missing -cannon-prestate: op-program/bin/prestate-proof.json -.PHONY: cannon-prestate - -op-program/bin/prestate-proof.json: - make generate-cannon-prestates - -generate-cannon-prestates: op-program cannon ## Generates prestate using cannon and op-program +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 "" mv op-program/bin/0.json op-program/bin/prestate-proof.json -.PHONY: generate-cannon-prestates +.PHONY: cannon-prestate mod-tidy: ## Cleans up unused dependencies in Go modules # Below GOPRIVATE line allows mod-tidy to be run immediately after @@ -167,14 +160,16 @@ nuke: clean devnet-clean ## Completely clean the project directory git clean -Xdf .PHONY: nuke -## Prepares for running a local devnet -pre-devnet: submodules cannon-prestate +pre-devnet: submodules ## Prepares for running a local devnet @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