11.PHONY : help tests
22
3+ SHELL := /bin/bash
34OS := $(shell uname -s)
45
56CONFIG_FILE? =config-files/config.yaml
@@ -15,6 +16,11 @@ 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+
1824FFI_FOR_RELEASE ?= true
1925
2026ifeq ($(FFI_FOR_RELEASE ) ,true)
@@ -32,7 +38,7 @@ submodules:
3238 git submodule update --init --recursive
3339 @echo " Updated submodules"
3440
35- deps : submodules build_all_ffi # # Install deps
41+ deps : submodules go_deps build_all_ffi # # Install deps
3642
3743go_deps :
3844 @echo " Installing Go dependencies..."
@@ -94,6 +100,8 @@ anvil_start_with_block_time:
94100 @echo " Starting Anvil..."
95101 anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7
96102
103+ _AGGREGATOR_ :
104+
97105aggregator_start :
98106 @echo " Starting Aggregator..."
99107 @go run aggregator/cmd/main.go --config $(AGG_CONFIG_FILE ) \
@@ -103,16 +111,21 @@ aggregator_send_dummy_responses:
103111 @echo " Sending dummy responses to Aggregator..."
104112 @cd aggregator && go run dummy/submit_task_responses.go
105113
114+
115+ __OPERATOR__ :
116+
106117operator_start :
107118 @echo " Starting Operator..."
108119 go run operator/cmd/main.go start --config $(CONFIG_FILE ) \
109120 2>&1 | zap-pretty
110121
122+ 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
123+
111124operator_register_and_start : operator_full_registration operator_start
112125
113126build_operator : deps
114127 @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
128+ @go build -ldflags " -X main.Version=$( OPERATOR_VERSION) -r $( LD_LIBRARY_PATH) " -o ./operator/build/aligned-operator ./operator/cmd/main.go
116129 @echo " Operator built into /operator/build/aligned-operator"
117130
118131update_operator :
@@ -126,15 +139,13 @@ operator_valid_marshall_fuzz_macos:
126139
127140operator_valid_marshall_fuzz_linux :
128141 @cd operator/pkg && \
129- LD_LIBRARY_PATH=$(LD_LIBRARY_PATH ) :$(CURDIR ) /operator/risc_zero/lib \
130142 go test -fuzz=FuzzValidMarshall
131143
132144operator_marshall_unmarshall_fuzz_macos :
133145 @cd operator/pkg && go test -fuzz=FuzzMarshalUnmarshal -ldflags=-extldflags=-Wl,-ld_classic
134146
135147operator_marshall_unmarshall_fuzz_linux :
136148 @cd operator/pkg && \
137- LD_LIBRARY_PATH=$(LD_LIBRARY_PATH ) :$(CURDIR ) /operator/risc_zero/lib \
138149 go test -fuzz=FuzzMarshalUnmarshal
139150
140151bindings :
@@ -186,9 +197,8 @@ operator_whitelist:
186197 @. contracts/scripts/.env && . contracts/scripts/whitelist_operator.sh $(OPERATOR_ADDRESS )
187198
188199operator_deposit_into_mock_strategy :
189- @echo " Depositing into strategy"
200+ @echo " Depositing into mock strategy"
190201 $(eval STRATEGY_ADDRESS = $(shell jq -r '.addresses.strategies.MOCK' contracts/script/output/devnet/eigenlayer_deployment_output.json) )
191-
192202 @go run operator/cmd/main.go deposit-into-strategy \
193203 --config $(CONFIG_FILE ) \
194204 --strategy-address $(STRATEGY_ADDRESS ) \
@@ -207,7 +217,6 @@ operator_register_with_aligned_layer:
207217
208218operator_deposit_and_register : operator_deposit_into_strategy operator_register_with_aligned_layer
209219
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
211220
212221__BATCHER__ :
213222
@@ -504,7 +513,6 @@ test_risc_zero_go_bindings_macos: build_risc_zero_macos
504513
505514test_risc_zero_go_bindings_linux : build_risc_zero_linux
506515 @echo " Testing RISC Zero Go bindings..."
507- LD_LIBRARY_PATH=$(LD_LIBRARY_PATH ) :$(CURDIR ) /operator/risc_zero/lib \
508516 go test ./operator/risc_zero/... -v
509517
510518generate_risc_zero_fibonacci_proof :
0 commit comments