Skip to content

Commit 8702349

Browse files
committed
better makefiles
1 parent a75d8ab commit 8702349

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

tests/prover-e2e/Makefile

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
.PHONY: clean setup_db test_tool all
1+
.PHONY: clean setup_db test_tool all check_vars
22

33
GOOSE_CMD?=goose
4-
BEGIN_BLOCK?=10405848
5-
END_BLOCK?=10405858
4+
65

76
all: setup_db test_tool import_data
87

98
clean:
109
docker compose down
1110

11+
check_vars:
12+
@if [ -z "$(BEGIN_BLOCK)" ] || [ -z "$(END_BLOCK)" ]; then \
13+
echo "Error: BEGIN_BLOCK and END_BLOCK must be defined"; \
14+
echo "Usage: make import_data BEGIN_BLOCK=<start_block> END_BLOCK=<end_block>"; \
15+
exit 1; \
16+
fi
17+
1218
setup_db: clean
1319
docker compose up --detach
1420
@echo "Waiting for PostgreSQL to be ready..."
@@ -31,5 +37,10 @@ setup_db: clean
3137
test_tool:
3238
go build -o $(PWD)/build/bin/e2e_tool ../../rollup/tests/integration_tool
3339

34-
import_data: test_tool
35-
build/bin/e2e_tool --config ./config.json --codec 7 ${BEGIN_BLOCK} ${END_BLOCK}
40+
build/bin/e2e_tool: test_tool
41+
42+
import_data_euclid: build/bin/e2e_tool check_vars
43+
build/bin/e2e_tool --config ./config.json --codec 7 ${BEGIN_BLOCK} ${END_BLOCK}
44+
45+
import_data: build/bin/e2e_tool check_vars
46+
build/bin/e2e_tool --config ./config.json --codec 8 ${BEGIN_BLOCK} ${END_BLOCK}

zkvm-prover/Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
RUST_MIN_STACK ?= 16777216
44
export RUST_MIN_STACK
55

6-
CIRCUIT_STUFF = .work/chunk/app.vmexe .work/batch/app.vmexe .work/bundle/app.vmexe
6+
CIRCUIT_STUFF = .work/euclid/chunk/app.vmexe .work/feynman/chunk/app.vmexe
77

88
ifeq (4.3,$(firstword $(sort $(MAKE_VERSION) 4.3)))
99
PLONKY3_VERSION=$(shell grep -m 1 "Plonky3.git" ../Cargo.lock | cut -d "#" -f2 | cut -c-7)
@@ -41,6 +41,8 @@ ZK_VERSION=${ZKVM_COMMIT}-${PLONKY3_VERSION}
4141
# ZK_VERSION=${ZKVM_COMMIT}-${PLONKY3_GPU_VERSION}
4242
#endif
4343

44+
E2E_HANDLE_SET = ../tests/prover-e2e/testset.json
45+
4446
prover_gpu:
4547
cd ../crates/gpu_override && cargo tree >/dev/null
4648
$(eval PLONKY3_GPU_VERSION:=$(shell ./print_plonky3gpu_version.sh | sed -n '2p'))
@@ -64,7 +66,11 @@ lint:
6466
cargo fmt --all
6567

6668
$(CIRCUIT_STUFF):
67-
bash .work/download-release.sh
69+
@echo "Download stuff with download-release.sh, and put them into correct directory";
70+
@exit 1;
6871

6972
test_run: $(CIRCUIT_STUFF)
70-
GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cargo run --release -p prover -- --config ./config.json
73+
GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cargo run --release -p prover -- --config ./config.json
74+
75+
test_e2e_run: $(CIRCUIT_STUFF) ${E2E_HANDLE_SET}
76+
GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cargo run --release -p prover -- --config ./config.json handle ${E2E_HANDLE_SET}

0 commit comments

Comments
 (0)