11.PHONY : help tests
22
3+ SHELL := /bin/bash
34OS := $(shell uname -s)
45
56CONFIG_FILE? =config-files/config.yaml
67AGG_CONFIG_FILE? =config-files/config-aggregator.yaml
78
8- OPERATOR_VERSION =v0.8.0
9+ OPERATOR_VERSION =v0.9.2
910
1011ifeq ($(OS ) ,Linux)
1112 BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux
@@ -15,6 +16,19 @@ ifeq ($(OS),Darwin)
1516 BUILD_ALL_FFI = $(MAKE) build_all_ffi_macos
1617endif
1718
19+ ifeq ($(OS ) ,Linux)
20+ export LD_LIBRARY_PATH += $(CURDIR)/operator/risc_zero/lib
21+ endif
22+
23+ ifeq ($(OS ) ,Linux)
24+ BUILD_OPERATOR = $(MAKE) build_operator_linux
25+ endif
26+
27+ ifeq ($(OS ) ,Darwin)
28+ BUILD_OPERATOR = $(MAKE) build_operator_macos
29+ endif
30+
31+
1832FFI_FOR_RELEASE ?= true
1933
2034ifeq ($(FFI_FOR_RELEASE ) ,true)
@@ -32,7 +46,7 @@ submodules:
3246 git submodule update --init --recursive
3347 @echo " Updated submodules"
3448
35- deps : submodules build_all_ffi # # Install deps
49+ deps : submodules go_deps build_all_ffi # # Install deps
3650
3751go_deps :
3852 @echo " Installing Go dependencies..."
@@ -79,10 +93,6 @@ anvil_upgrade_add_aggregator:
7993 @echo " Adding Aggregator to Aligned Contracts..."
8094 . contracts/scripts/anvil/upgrade_add_aggregator_to_service_manager.sh
8195
82- anvil_add_type_hash_to_batcher_payment_service :
83- @echo " Adding Type Hash to Batcher Payment Service..."
84- . contracts/scripts/anvil/upgrade_add_type_hash_to_batcher_payment_service.sh
85-
8696lint_contracts :
8797 @cd contracts && npm run lint:sol
8898
@@ -94,6 +104,8 @@ anvil_start_with_block_time:
94104 @echo " Starting Anvil..."
95105 anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7
96106
107+ _AGGREGATOR_ :
108+
97109aggregator_start :
98110 @echo " Starting Aggregator..."
99111 @go run aggregator/cmd/main.go --config $(AGG_CONFIG_FILE ) \
@@ -103,16 +115,29 @@ aggregator_send_dummy_responses:
103115 @echo " Sending dummy responses to Aggregator..."
104116 @cd aggregator && go run dummy/submit_task_responses.go
105117
118+
119+ __OPERATOR__ :
120+
106121operator_start :
107122 @echo " Starting Operator..."
108123 go run operator/cmd/main.go start --config $(CONFIG_FILE ) \
109124 2>&1 | zap-pretty
110125
126+ operator_full_registration : operator_get_eth operator_register_with_eigen_layer operator_mint_mock_tokens operator_deposit_into_mock_strategy operator_whitelist_devnet operator_register_with_aligned_layer
127+
111128operator_register_and_start : operator_full_registration operator_start
112129
113130build_operator : deps
131+ $(BUILD_OPERATOR )
132+
133+ build_operator_macos :
134+ @echo " Building Operator..."
135+ @go build -ldflags " -X main.Version=$( OPERATOR_VERSION) " -o ./operator/build/aligned-operator ./operator/cmd/main.go
136+ @echo " Operator built into /operator/build/aligned-operator"
137+
138+ build_operator_linux :
114139 @echo " Building Operator..."
115- @go build -ldflags " -X main.Version=$( OPERATOR_VERSION) -r $( LD_LIBRARY_PATH) : $( CURDIR ) /operator/risc_zero/lib " -o ./operator/build/aligned-operator ./operator/cmd/main.go
140+ @go build -ldflags " -X main.Version=$( OPERATOR_VERSION) -r $( LD_LIBRARY_PATH) " -o ./operator/build/aligned-operator ./operator/cmd/main.go
116141 @echo " Operator built into /operator/build/aligned-operator"
117142
118143update_operator :
@@ -126,15 +151,13 @@ operator_valid_marshall_fuzz_macos:
126151
127152operator_valid_marshall_fuzz_linux :
128153 @cd operator/pkg && \
129- LD_LIBRARY_PATH=$(LD_LIBRARY_PATH ) :$(CURDIR ) /operator/risc_zero/lib \
130154 go test -fuzz=FuzzValidMarshall
131155
132156operator_marshall_unmarshall_fuzz_macos :
133157 @cd operator/pkg && go test -fuzz=FuzzMarshalUnmarshal -ldflags=-extldflags=-Wl,-ld_classic
134158
135159operator_marshall_unmarshall_fuzz_linux :
136160 @cd operator/pkg && \
137- LD_LIBRARY_PATH=$(LD_LIBRARY_PATH ) :$(CURDIR ) /operator/risc_zero/lib \
138161 go test -fuzz=FuzzMarshalUnmarshal
139162
140163bindings :
@@ -186,9 +209,8 @@ operator_whitelist:
186209 @. contracts/scripts/.env && . contracts/scripts/whitelist_operator.sh $(OPERATOR_ADDRESS )
187210
188211operator_deposit_into_mock_strategy :
189- @echo " Depositing into strategy"
212+ @echo " Depositing into mock strategy"
190213 $(eval STRATEGY_ADDRESS = $(shell jq -r '.addresses.strategies.MOCK' contracts/script/output/devnet/eigenlayer_deployment_output.json) )
191-
192214 @go run operator/cmd/main.go deposit-into-strategy \
193215 --config $(CONFIG_FILE ) \
194216 --strategy-address $(STRATEGY_ADDRESS ) \
@@ -207,7 +229,6 @@ operator_register_with_aligned_layer:
207229
208230operator_deposit_and_register : operator_deposit_into_strategy operator_register_with_aligned_layer
209231
210- operator_full_registration : operator_get_eth operator_register_with_eigen_layer operator_mint_mock_tokens operator_deposit_into_mock_strategy operator_whitelist_devnet operator_register_with_aligned_layer
211232
212233__BATCHER__ :
213234
@@ -286,6 +307,16 @@ batcher_send_risc0_task:
286307 --rpc_url $(RPC_URL) \
287308 --network $(NETWORK)
288309
310+ batcher_send_risc0_task_no_pub_input :
311+ @echo " Sending Risc0 fibonacci task to Batcher..."
312+ @cd batcher/aligned/ && cargo run --release -- submit \
313+ --proving_system Risc0 \
314+ --proof ../../scripts/test_files/risc_zero/no_public_inputs/risc_zero_no_pub_input.proof \
315+ --vm_program ../../scripts/test_files/risc_zero/no_public_inputs/no_pub_input_id.bin \
316+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
317+ --rpc_url $(RPC_URL) \
318+ --payment_service_addr $(BATCHER_PAYMENTS_CONTRACT_ADDRESS)
319+
289320batcher_send_risc0_burst :
290321 @echo " Sending Risc0 fibonacci task to Batcher..."
291322 @cd batcher/aligned/ && cargo run --release -- submit \
@@ -435,10 +466,6 @@ upgrade_add_aggregator: ## Add Aggregator to Aligned Contracts
435466 @echo " Adding Aggregator to Aligned Contracts..."
436467 @. contracts/scripts/.env && . contracts/scripts/upgrade_add_aggregator_to_service_manager.sh
437468
438- upgrade_batcher_payments_add_type_hash : # # Add Type Hash to Batcher Payment Service
439- @echo " Adding Type Hash to Batcher Payment Service..."
440- @. contracts/scripts/.env && . contracts/scripts/upgrade_add_type_hash_to_batcher_payment_service.sh
441-
442469deploy_verify_batch_inclusion_caller :
443470 @echo " Deploying VerifyBatchInclusionCaller contract..."
444471 @. examples/verify/.env && . examples/verify/scripts/deploy_verify_batch_inclusion_caller.sh
@@ -497,6 +524,11 @@ generate_sp1_fibonacci_proof:
497524 @mv scripts/test_files/sp1/fibonacci_proof_generator/script/sp1_fibonacci.proof scripts/test_files/sp1/
498525 @echo " Fibonacci proof and ELF generated in scripts/test_files/sp1 folder"
499526
527+ generate_risc_zero_empty_journal_proof :
528+ @cd scripts/test_files/risc_zero/no_public_inputs && RUST_LOG=info cargo run --release
529+ @echo " Fibonacci proof and ELF with empty journal generated in scripts/test_files/risc_zero/no_public_inputs folder"
530+
531+
500532__RISC_ZERO_FFI__ : # #
501533build_risc_zero_macos :
502534 @cd operator/risc_zero/lib && cargo build $(RELEASE_FLAG )
@@ -516,7 +548,6 @@ test_risc_zero_go_bindings_macos: build_risc_zero_macos
516548
517549test_risc_zero_go_bindings_linux : build_risc_zero_linux
518550 @echo " Testing RISC Zero Go bindings..."
519- LD_LIBRARY_PATH=$(LD_LIBRARY_PATH ) :$(CURDIR ) /operator/risc_zero/lib \
520551 go test ./operator/risc_zero/... -v
521552
522553generate_risc_zero_fibonacci_proof :
@@ -530,29 +561,15 @@ build_merkle_tree_macos:
530561 @cp operator/merkle_tree/lib/target/$(TARGET_REL_PATH ) /libmerkle_tree.dylib operator/merkle_tree/lib/libmerkle_tree.dylib
531562 @cp operator/merkle_tree/lib/target/$(TARGET_REL_PATH ) /libmerkle_tree.a operator/merkle_tree/lib/libmerkle_tree.a
532563
533- build_merkle_tree_macos_old :
534- @cd operator/merkle_tree_old/lib && cargo build $(RELEASE_FLAG )
535- @cp operator/merkle_tree_old/lib/target/$(TARGET_REL_PATH ) /libmerkle_tree.dylib operator/merkle_tree_old/lib/libmerkle_tree.dylib
536- @cp operator/merkle_tree_old/lib/target/$(TARGET_REL_PATH ) /libmerkle_tree.a operator/merkle_tree_old/lib/libmerkle_tree.a
537-
538564build_merkle_tree_linux :
539565 @cd operator/merkle_tree/lib && cargo build $(RELEASE_FLAG )
540566 @cp operator/merkle_tree/lib/target/$(TARGET_REL_PATH ) /libmerkle_tree.so operator/merkle_tree/lib/libmerkle_tree.so
541567 @cp operator/merkle_tree/lib/target/$(TARGET_REL_PATH ) /libmerkle_tree.a operator/merkle_tree/lib/libmerkle_tree.a
542568
543- build_merkle_tree_linux_old :
544- @cd operator/merkle_tree_old/lib && cargo build $(RELEASE_FLAG )
545- @cp operator/merkle_tree_old/lib/target/$(TARGET_REL_PATH ) /libmerkle_tree.so operator/merkle_tree_old/lib/libmerkle_tree.so
546- @cp operator/merkle_tree_old/lib/target/$(TARGET_REL_PATH ) /libmerkle_tree.a operator/merkle_tree_old/lib/libmerkle_tree.a
547-
548569test_merkle_tree_rust_ffi :
549570 @echo " Testing Merkle Tree Rust FFI source code..."
550571 @cd operator/merkle_tree/lib && RUST_MIN_STACK=83886080 cargo t --release
551572
552- test_merkle_tree_rust_ffi_old :
553- @echo " Testing Old Merkle Tree Rust FFI source code..."
554- @cd operator/merkle_tree_old/lib && RUST_MIN_STACK=83886080 cargo t --release
555-
556573test_merkle_tree_go_bindings_macos : build_merkle_tree_macos
557574 @echo " Testing Merkle Tree Go bindings..."
558575 go test ./operator/merkle_tree/... -v
@@ -565,9 +582,6 @@ test_merkle_tree_old_go_bindings_macos: build_merkle_tree_macos_old
565582 @echo " Testing Old Merkle Tree Go bindings..."
566583 go test ./operator/merkle_tree_old/... -v
567584
568- test_merkle_tree_go_bindings_linux_old : build_merkle_tree_linux_old
569- @echo " Testing Merkle Tree Go bindings..."
570- go test ./operator/merkle_tree_old/... -v
571585
572586__BUILD_ALL_FFI__ :
573587
@@ -580,18 +594,15 @@ build_all_ffi_macos: ## Build all FFIs for macOS
580594 @$(MAKE ) build_sp1_macos
581595 @$(MAKE ) build_risc_zero_macos
582596 @$(MAKE ) build_merkle_tree_macos
583- @$(MAKE ) build_merkle_tree_macos_old
584597 @echo " All macOS FFIs built successfully."
585598
586599build_all_ffi_linux : # # Build all FFIs for Linux
587600 @echo " Building all FFIs for Linux..."
588601 @$(MAKE ) build_sp1_linux
589602 @$(MAKE ) build_risc_zero_linux
590603 @$(MAKE ) build_merkle_tree_linux
591- @$(MAKE ) build_merkle_tree_linux_old
592604 @echo " All Linux FFIs built successfully."
593605
594-
595606__EXPLORER__ :
596607run_explorer : explorer_run_db explorer_ecto_setup_db
597608 @cd explorer/ && \
@@ -675,10 +686,13 @@ tracker_dump_db:
675686
676687__TELEMETRY__ :
677688open_telemetry_start : # # Run open telemetry services using telemetry-docker-compose.yaml
678- # # TODO(juarce) ADD DOCKER COMPOSE
679689 @echo " Running telemetry..."
680690 @docker compose -f telemetry-docker-compose.yaml up -d
681691
692+ open_telemetry_prod_start : # # Run open telemetry services with Cassandra using telemetry-prod-docker-compose.yaml
693+ @echo " Running telemetry for Prod..."
694+ @docker compose -f telemetry-prod-docker-compose.yaml up -d
695+
682696telemetry_start : telemetry_run_db telemetry_ecto_migrate # # Run Telemetry API
683697 @cd telemetry_api && \
684698 ./start.sh
0 commit comments