-
Notifications
You must be signed in to change notification settings - Fork 358
/
Makefile
1188 lines (944 loc) · 48.2 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.PHONY: help tests
SHELL := /bin/bash
OS := $(shell uname -s)
CONFIG_FILE?=config-files/config.yaml
export OPERATOR_ADDRESS ?= $(shell yq -r '.operator.address' $(CONFIG_FILE))
AGG_CONFIG_FILE?=config-files/config-aggregator.yaml
OPERATOR_VERSION=v0.12.2
ifeq ($(OS),Linux)
BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux
endif
ifeq ($(OS),Darwin)
BUILD_ALL_FFI = $(MAKE) build_all_ffi_macos
endif
ifeq ($(OS),Linux)
export LD_LIBRARY_PATH+=$(CURDIR)/operator/risc_zero_old/lib:$(CURDIR)/operator/risc_zero/lib
OPERATOR_FFIS=$(CURDIR)/operator/risc_zero_old/lib:$(CURDIR)/operator/risc_zero/lib
endif
ifeq ($(OS),Linux)
BUILD_OPERATOR = $(MAKE) build_operator_linux
endif
ifeq ($(OS),Darwin)
BUILD_OPERATOR = $(MAKE) build_operator_macos
endif
FFI_FOR_RELEASE ?= true
ifeq ($(FFI_FOR_RELEASE),true)
RELEASE_FLAG=--release
TARGET_REL_PATH=release
else
RELEASE_FLAG=
TARGET_REL_PATH=debug
endif
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
submodules:
git submodule update --init --recursive
@echo "Updated submodules"
deps: submodules go_deps build_all_ffi ## Install deps
go_deps:
@echo "Installing Go dependencies..."
go install github.com/maoueh/[email protected]
go install github.com/ethereum/go-ethereum/cmd/abigen@latest
go install github.com/Layr-Labs/eigenlayer-cli/cmd/eigenlayer@latest
install_foundry:
curl -L https://foundry.paradigm.xyz | bash
anvil_deploy_eigen_contracts:
@echo "Deploying Eigen Contracts..."
. contracts/scripts/anvil/deploy_eigen_contracts.sh
anvil_deploy_aligned_contracts:
@echo "Deploying Aligned Contracts..."
. contracts/scripts/anvil/deploy_aligned_contracts.sh
anvil_upgrade_aligned_contracts:
@echo "Upgrading Aligned Contracts..."
. contracts/scripts/anvil/upgrade_aligned_contracts.sh
anvil_upgrade_batcher_payment_service:
@echo "Upgrading BatcherPayments contract..."
. contracts/scripts/anvil/upgrade_batcher_payment_service.sh
anvil_upgrade_registry_coordinator:
@echo "Upgrading Registry Coordinator Contracts..."
. contracts/scripts/anvil/upgrade_registry_coordinator.sh
anvil_upgrade_bls_apk_registry:
@echo "Upgrading Bls Apk Registry Contract..."
. contracts/scripts/anvil/upgrade_bls_apk_registry.sh
anvil_upgrade_stake_registry:
@echo "Upgrading Stake Registry Contract..."
. contracts/scripts/anvil/upgrade_stake_registry.sh
anvil_upgrade_index_registry:
@echo "Upgrading Index Registry Contracts..."
. contracts/scripts/anvil/upgrade_index_registry.sh
anvil_upgrade_add_aggregator:
@echo "Adding Aggregator to Aligned Contracts..."
. contracts/scripts/anvil/upgrade_add_aggregator_to_service_manager.sh
pause_all_aligned_service_manager:
@echo "Pausing all contracts..."
. contracts/scripts/pause_aligned_service_manager.sh all
unpause_all_aligned_service_manager:
@echo "Pausing all contracts..."
. contracts/scripts/unpause_aligned_service_manager.sh all
get_paused_state_aligned_service_manager:
@echo "Getting paused state of Aligned Service Manager contract..."
. contracts/scripts/get_paused_state_aligned_service_manager.sh
pause_batcher_payment_service:
@echo "Pausing BatcherPayments contract..."
. contracts/scripts/pause_batcher_payment_service.sh
unpause_batcher_payment_service:
@echo "Unpausing BatcherPayments contract..."
. contracts/scripts/unpause_batcher_payment_service.sh
get_paused_state_batcher_payments_service:
@echo "Getting paused state of Batcher Payments Service contract..."
. contracts/scripts/get_paused_state_batcher_payments_service.sh
anvil_upgrade_initialize_disable_verifiers:
@echo "Initializing disabled verifiers..."
. contracts/scripts/anvil/upgrade_disabled_verifiers_in_service_manager.sh
lint_contracts:
@cd contracts && npm run lint:sol
anvil_start:
@echo "Starting Anvil..."
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json
anvil_start_with_block_time:
@echo "Starting Anvil..."
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7
anvil_start_with_block_time_with_more_prefunded_accounts:
@echo "Starting Anvil..."
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7 -a 2000
_AGGREGATOR_:
aggregator_start:
@echo "Starting Aggregator..."
@go run aggregator/cmd/main.go --config $(AGG_CONFIG_FILE) \
2>&1 | zap-pretty
aggregator_send_dummy_responses:
@echo "Sending dummy responses to Aggregator..."
@cd aggregator && go run dummy/submit_task_responses.go
test_go_retries:
@cd core/ && \
go test -v -timeout 15m
__OPERATOR__:
operator_start:
@echo "Starting Operator..."
go run operator/cmd/main.go start --config $(CONFIG_FILE) \
2>&1 | zap-pretty
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
operator_register_and_start: operator_full_registration operator_start
build_operator: deps
$(BUILD_OPERATOR)
build_operator_macos:
@echo "Building Operator..."
@go build -ldflags "-X main.Version=$(OPERATOR_VERSION)" -o ./operator/build/aligned-operator ./operator/cmd/main.go
@echo "Operator built into /operator/build/aligned-operator"
build_operator_linux:
@echo "Building Operator..."
@go build -ldflags "-X main.Version=$(OPERATOR_VERSION) -r $(OPERATOR_FFIS)" -o ./operator/build/aligned-operator ./operator/cmd/main.go
@echo "Operator built into /operator/build/aligned-operator"
update_operator:
@echo "Updating Operator..."
@./scripts/fetch_latest_release.sh
@make build_operator
@./operator/build/aligned-operator --version
operator_valid_marshall_fuzz_macos:
@cd operator/pkg && go test -fuzz=FuzzValidMarshall -ldflags=-extldflags=-Wl,-ld_classic
operator_valid_marshall_fuzz_linux:
@cd operator/pkg && \
go test -fuzz=FuzzValidMarshall
operator_marshall_unmarshall_fuzz_macos:
@cd operator/pkg && go test -fuzz=FuzzMarshalUnmarshal -ldflags=-extldflags=-Wl,-ld_classic
operator_marshall_unmarshall_fuzz_linux:
@cd operator/pkg && \
go test -fuzz=FuzzMarshalUnmarshal
bindings:
cd contracts && ./generate-go-bindings.sh
test:
go test ./... -timeout 15m
get_delegation_manager_address:
@sed -n 's/.*"delegationManager": "\([^"]*\)".*/\1/p' contracts/script/output/devnet/eigenlayer_deployment_output.json
operator_generate_keys:
@echo "Generating BLS keys"
eigenlayer operator keys create --key-type bls --insecure operator
@echo "Generating ECDSA keys"
eigenlayer operator keys create --key-type ecdsa --insecure operator
operator_generate_config:
@echo "Generating operator config"
eigenlayer operator config create
operator_get_eth:
@echo "Sending funds to operator address on devnet"
@. ./scripts/fund_operator_devnet.sh
operator_register_with_eigen_layer:
@echo "Registering operator with EigenLayer"
@echo "" | eigenlayer operator register $(CONFIG_FILE)
operator_mint_mock_tokens:
@echo "Minting tokens"
. ./scripts/mint_mock_token.sh $(CONFIG_FILE) 100000000000000000
operator_whitelist_devnet:
@echo "Whitelisting operator"
@echo "Operator address: $(OPERATOR_ADDRESS)"
RPC_URL="http://localhost:8545" PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" OUTPUT_PATH=./script/output/devnet/alignedlayer_deployment_output.json ./contracts/scripts/operator_whitelist.sh $(OPERATOR_ADDRESS)
operator_remove_from_whitelist_devnet:
@echo "Removing operator"
@echo "Operator address: $(OPERATOR_ADDRESS)"
RPC_URL="http://localhost:8545" PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" OUTPUT_PATH=./script/output/devnet/alignedlayer_deployment_output.json ./contracts/scripts/operator_remove_from_whitelist.sh $(OPERATOR_ADDRESS)
operator_whitelist:
@echo "Whitelisting operator $(OPERATOR_ADDRESS)"
@. contracts/scripts/.env && . contracts/scripts/operator_whitelist.sh $(OPERATOR_ADDRESS)
operator_remove_from_whitelist:
@echo "Removing operator $(OPERATOR_ADDRESS)"
@. contracts/scripts/.env && . contracts/scripts/operator_remove_from_whitelist.sh $(OPERATOR_ADDRESS)
operator_deposit_into_mock_strategy:
@echo "Depositing into mock strategy"
$(eval STRATEGY_ADDRESS = $(shell jq -r '.addresses.strategies.MOCK' contracts/script/output/devnet/eigenlayer_deployment_output.json))
@go run operator/cmd/main.go deposit-into-strategy \
--config $(CONFIG_FILE) \
--strategy-address $(STRATEGY_ADDRESS) \
--amount 100000000000000000
AMOUNT ?= 1000
operator_deposit_into_strategy:
@echo "Depositing into strategy"
@go run operator/cmd/main.go deposit-into-strategy \
--config $(CONFIG_FILE) \
--strategy-address $(STRATEGY_ADDRESS) \
--amount $(AMOUNT)
operator_register_with_aligned_layer:
@echo "Registering operator with AlignedLayer"
@go run operator/cmd/main.go register \
--config $(CONFIG_FILE)
operator_deposit_and_register: operator_deposit_into_strategy operator_register_with_aligned_layer
# The verifier ID to enable or disable corresponds to the index of the verifier in the `ProvingSystemID` enum.
verifier_enable_devnet:
@echo "Enabling verifier with id: $(VERIFIER_ID)"
PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 RPC_URL=http://localhost:8545 OUTPUT_PATH=./script/output/devnet/alignedlayer_deployment_output.json ./contracts/scripts/enable_verifier.sh $(VERIFIER_ID)
verifier_disable_devnet:
@echo "Disabling verifier with id: $(VERIFIER_ID)"
PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 RPC_URL=http://localhost:8545 OUTPUT_PATH=./script/output/devnet/alignedlayer_deployment_output.json ./contracts/scripts/disable_verifier.sh $(VERIFIER_ID)
verifier_enable:
@echo "Enabling verifier with ID: $(VERIFIER_ID)"
@. contracts/scripts/.env && . contracts/scripts/enable_verifier.sh $(VERIFIER_ID)
verifier_disable:
@echo "Disabling verifier with ID: $(VERIFIER_ID)"
@. contracts/scripts/.env && . contracts/scripts/disable_verifier.sh $(VERIFIER_ID)
__BATCHER__:
BURST_SIZE ?= 5
user_fund_payment_service:
@. ./scripts/user_fund_payment_service_devnet.sh
./batcher/aligned-batcher/.env:
@echo "To start the Batcher ./batcher/aligned-batcher/.env needs to be manually set"; false;
batcher_start: ./batcher/aligned-batcher/.env user_fund_payment_service
@echo "Starting Batcher..."
@cargo run --manifest-path ./batcher/aligned-batcher/Cargo.toml --release -- --config ./config-files/config-batcher.yaml --env-file ./batcher/aligned-batcher/.env
batcher_start_local: user_fund_payment_service
@echo "Starting Batcher..."
@$(MAKE) run_storage &
@cargo run --manifest-path ./batcher/aligned-batcher/Cargo.toml --release -- --config ./config-files/config-batcher.yaml --env-file ./batcher/aligned-batcher/.env.dev
batcher_start_local_no_fund:
@echo "Starting Batcher..."
@$(MAKE) run_storage &
@cargo run --manifest-path ./batcher/aligned-batcher/Cargo.toml --release -- --config ./config-files/config-batcher.yaml --env-file ./batcher/aligned-batcher/.env.dev
install_batcher:
@cargo install --path batcher/aligned-batcher
install_aligned:
@./batcher/aligned/install_aligned.sh
uninstall_aligned:
@rm -rf ~/.aligned && echo "Aligned uninstalled"
install_aligned_compiling:
@cargo install --path batcher/aligned
build_batcher_client:
@cd batcher/aligned && cargo b --release
batcher/target/release/aligned:
@cd batcher/aligned && cargo b --release
RPC_URL=http://localhost:8545
NETWORK=devnet # devnet | holesky-stage | holesky
batcher_send_sp1_task:
@echo "Sending SP1 fibonacci task to Batcher..."
@cd batcher/aligned/ && cargo run --release -- submit \
--proving_system SP1 \
--proof ../../scripts/test_files/sp1/sp1_fibonacci.proof \
--vm_program ../../scripts/test_files/sp1/sp1_fibonacci.elf \
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
--rpc_url $(RPC_URL) \
--network $(NETWORK)
batcher_send_sp1_burst:
@echo "Sending SP1 fibonacci task to Batcher..."
@cd batcher/aligned/ && cargo run --release -- submit \
--proving_system SP1 \
--proof ../../scripts/test_files/sp1/sp1_fibonacci.proof \
--vm_program ../../scripts/test_files/sp1/sp1_fibonacci.elf \
--repetitions $(BURST_SIZE) \
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
--rpc_url $(RPC_URL) \
--network $(NETWORK)
batcher_send_infinite_sp1:
@echo "Sending infinite SP1 fibonacci task to Batcher..."
@./batcher/aligned/send_infinite_sp1_tasks/send_infinite_sp1_tasks.sh
batcher_send_risc0_task:
@echo "Sending Risc0 fibonacci task to Batcher..."
@cd batcher/aligned/ && cargo run --release -- submit \
--proving_system Risc0 \
--proof ../../scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci.proof \
--vm_program ../../scripts/test_files/risc_zero/fibonacci_proof_generator/fibonacci_id.bin \
--public_input ../../scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci.pub \
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
--rpc_url $(RPC_URL) \
--network $(NETWORK)
batcher_send_risc0_task_no_pub_input:
@echo "Sending Risc0 fibonacci task to Batcher..."
@cd batcher/aligned/ && cargo run --release -- submit \
--proving_system Risc0 \
--proof ../../scripts/test_files/risc_zero/no_public_inputs/risc_zero_no_pub_input.proof \
--vm_program ../../scripts/test_files/risc_zero/no_public_inputs/no_pub_input_id.bin \
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
--rpc_url $(RPC_URL) \
--network $(NETWORK)
batcher_send_risc0_burst:
@echo "Sending Risc0 fibonacci task to Batcher..."
@cd batcher/aligned/ && cargo run --release -- submit \
--proving_system Risc0 \
--proof ../../scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci.proof \
--vm_program ../../scripts/test_files/risc_zero/fibonacci_proof_generator/fibonacci_id.bin \
--public_input ../../scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci.pub \
--repetitions $(BURST_SIZE) \
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
--rpc_url $(RPC_URL) \
--network $(NETWORK)
batcher_send_plonk_bn254_task: batcher/target/release/aligned
@echo "Sending Groth16Bn254 1!=0 task to Batcher..."
@cd batcher/aligned/ && cargo run --release -- submit \
--proving_system GnarkPlonkBn254 \
--proof ../../scripts/test_files/gnark_plonk_bn254_script/plonk.proof \
--public_input ../../scripts/test_files/gnark_plonk_bn254_script/plonk_pub_input.pub \
--vk ../../scripts/test_files/gnark_plonk_bn254_script/plonk.vk \
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
--rpc_url $(RPC_URL) \
--network $(NETWORK)
batcher_send_plonk_bn254_burst: batcher/target/release/aligned
@echo "Sending Groth16Bn254 1!=0 task to Batcher..."
@cd batcher/aligned/ && cargo run --release -- submit \
--proving_system GnarkPlonkBn254 \
--proof ../../scripts/test_files/gnark_plonk_bn254_script/plonk.proof \
--public_input ../../scripts/test_files/gnark_plonk_bn254_script/plonk_pub_input.pub \
--vk ../../scripts/test_files/gnark_plonk_bn254_script/plonk.vk \
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
--rpc_url $(RPC_URL) \
--repetitions $(BURST_SIZE) \
--network $(NETWORK)
batcher_send_plonk_bls12_381_task: batcher/target/release/aligned
@echo "Sending Groth16 BLS12-381 1!=0 task to Batcher..."
@cd batcher/aligned/ && cargo run --release -- submit \
--proving_system GnarkPlonkBls12_381 \
--proof ../../scripts/test_files/gnark_plonk_bls12_381_script/plonk.proof \
--public_input ../../scripts/test_files/gnark_plonk_bls12_381_script/plonk_pub_input.pub \
--vk ../../scripts/test_files/gnark_plonk_bls12_381_script/plonk.vk \
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
--rpc_url $(RPC_URL) \
--network $(NETWORK)
batcher_send_plonk_bls12_381_burst: batcher/target/release/aligned
@echo "Sending Groth16 BLS12-381 1!=0 task to Batcher..."
@cd batcher/aligned/ && cargo run --release -- submit \
--proving_system GnarkPlonkBls12_381 \
--proof ../../scripts/test_files/gnark_plonk_bls12_381_script/plonk.proof \
--public_input ../../scripts/test_files/gnark_plonk_bls12_381_script/plonk_pub_input.pub \
--vk ../../scripts/test_files/gnark_plonk_bls12_381_script/plonk.vk \
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
--repetitions 15 \
--rpc_url $(RPC_URL) \
--network $(NETWORK)
batcher_send_groth16_bn254_task: batcher/target/release/aligned
@echo "Sending Groth16Bn254 1!=0 task to Batcher..."
@cd batcher/aligned/ && cargo run --release -- submit \
--proving_system Groth16Bn254 \
--proof ../../scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_1_groth16.proof \
--public_input ../../scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_1_groth16.pub \
--vk ../../scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_1_groth16.vk \
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
--rpc_url $(RPC_URL) \
--network $(NETWORK)
batcher_send_infinite_groth16: batcher/target/release/aligned ## Send a different Groth16 BN254 proof using the client every 3 seconds
@mkdir -p scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs
@echo "Sending a different GROTH16 BN254 proof in a loop every n seconds..."
@./batcher/aligned/send_infinite_tasks.sh 4
batcher_send_burst_groth16: batcher/target/release/aligned
@echo "Sending a burst of tasks to Batcher..."
@mkdir -p scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs
@./batcher/aligned/send_burst_tasks.sh $(BURST_SIZE) $(START_COUNTER)
__TASK_SENDER__:
BURST_TIME_SECS ?= 3
task_sender_generate_groth16_proofs:
@cd batcher/aligned-task-sender && \
cargo run --release -- generate-proofs \
--number-of-proofs $(NUMBER_OF_PROOFS) --proof-type groth16 \
--dir-to-save-proofs $(CURDIR)/scripts/test_files/task_sender/proofs
# ===== DEVNET =====
task_sender_fund_wallets_devnet:
@cd batcher/aligned-task-sender && \
cargo run --release -- generate-and-fund-wallets \
--eth-rpc-url http://localhost:8545 \
--network devnet \
--amount-to-deposit 1 \
--amount-to-deposit-to-aligned 0.9999 \
--private-keys-filepath $(CURDIR)/batcher/aligned-task-sender/wallets/devnet
task_sender_send_infinite_proofs_devnet:
@cd batcher/aligned-task-sender && \
cargo run --release -- send-infinite-proofs \
--burst-size $(BURST_SIZE) --burst-time-secs $(BURST_TIME_SECS) \
--eth-rpc-url http://localhost:8545 \
--batcher-url ws://localhost:8080 \
--network devnet \
--proofs-dirpath $(CURDIR)/scripts/test_files/task_sender/proofs \
--private-keys-filepath $(CURDIR)/batcher/aligned-task-sender/wallets/devnet
task_sender_test_connections_devnet:
@cd batcher/aligned-task-sender && \
cargo run --release -- test-connections \
--batcher-url ws://localhost:8080 \
--num-senders $(NUM_SENDERS)
# ===== HOLESKY-STAGE =====
task_sender_generate_and_fund_wallets_holesky_stage:
@cd batcher/aligned-task-sender && \
cargo run --release -- generate-and-fund-wallets \
--eth-rpc-url https://ethereum-holesky-rpc.publicnode.com \
--network holesky-stage \
--funding-wallet-private-key $(FUNDING_WALLET_PRIVATE_KEY) \
--number-wallets $(NUM_WALLETS) \
--amount-to-deposit $(AMOUNT_TO_DEPOSIT) \
--amount-to-deposit-to-aligned $(AMOUNT_TO_DEPOSIT_TO_ALIGNED) \
--private-keys-filepath $(CURDIR)/batcher/aligned-task-sender/wallets/holesky-stage
task_sender_send_infinite_proofs_holesky_stage:
@cd batcher/aligned-task-sender && \
cargo run --release -- send-infinite-proofs \
--burst-size $(BURST_SIZE) --burst-time-secs $(BURST_TIME_SECS) \
--eth-rpc-url https://ethereum-holesky-rpc.publicnode.com \
--batcher-url wss://stage.batcher.alignedlayer.com \
--network holesky-stage \
--proofs-dirpath $(CURDIR)/scripts/test_files/task_sender/proofs \
--private-keys-filepath $(CURDIR)/batcher/aligned-task-sender/wallets/holesky-stage
task_sender_test_connections_holesky_stage:
@cd batcher/aligned-task-sender && \
cargo run --release -- test-connections \
--batcher-url wss://stage.batcher.alignedlayer.com \
--num-senders $(NUM_SENDERS)
__UTILS__:
aligned_get_user_balance_devnet:
@cd batcher/aligned/ && cargo run --release -- get-user-balance \
--user_addr $(USER_ADDR)
aligned_get_user_balance_holesky:
@cd batcher/aligned/ && cargo run --release -- get-user-balance \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--network holesky \
--user_addr $(USER_ADDR)
__GENERATE_PROOFS__:
# TODO add a default proving system
generate_plonk_bls12_381_proof: ## Run the gnark_plonk_bls12_381_script
@echo "Running gnark_plonk_bls12_381 script..."
@go run scripts/test_files/gnark_plonk_bls12_381_script/main.go
generate_plonk_bn254_proof: ## Run the gnark_plonk_bn254_script
@echo "Running gnark_plonk_bn254 script..."
@go run scripts/test_files/gnark_plonk_bn254_script/main.go
generate_groth16_proof: ## Run the gnark_plonk_bn254_script
@echo "Running gnark_groth_bn254 script..."
@go run scripts/test_files/gnark_groth16_bn254_script/main.go
generate_groth16_ineq_proof: ## Run the gnark_plonk_bn254_script
@echo "Running gnark_groth_bn254_ineq script..."
@go run scripts/test_files/gnark_groth16_bn254_infinite_script/cmd/main.go 1
__METRICS__:
# Prometheus and graphana
run_metrics: ## Run metrics using metrics-docker-compose.yaml
@echo "Running metrics..."
@docker compose -f metrics-docker-compose.yaml up
__STORAGE__:
run_storage: ## Run storage using storage-docker-compose.yaml
@echo "Running storage..."
@docker compose -f storage-docker-compose.yaml up
__DEPLOYMENT__: ## ____
deploy_aligned_contracts: ## Deploy Aligned Contracts. Parameters: NETWORK=<mainnet|holesky|sepolia>
@echo "Deploying Aligned Contracts on $(NETWORK) network..."
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_aligned_contracts.sh
deploy_pauser_registry: ## Deploy Pauser Registry
@echo "Deploying Pauser Registry..."
@. contracts/scripts/.env && . contracts/scripts/deploy_pauser_registry.sh
upgrade_aligned_contracts: ## Upgrade Aligned Contracts. Parameters: NETWORK=<mainnet|holesky|sepolia>
@echo "Upgrading Aligned Contracts on $(NETWORK) network..."
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/upgrade_aligned_contracts.sh
upgrade_pauser_aligned_contracts: ## Upgrade Aligned Contracts with Pauser initialization
@echo "Upgrading Aligned Contracts with Pauser initialization..."
@. contracts/scripts/.env && . contracts/scripts/upgrade_add_pausable_to_service_manager.sh
upgrade_registry_coordinator: ## Upgrade Registry Coordinator
@echo "Upgrading Registry Coordinator..."
@. contracts/scripts/.env && . contracts/scripts/upgrade_registry_coordinator.sh
upgrade_bls_apk_registry: ## Upgrade Registry Coordinator
@echo "Upgrading BLS Apk Registry Coordinator..."
@. contracts/scripts/.env && . contracts/scripts/upgrade_bls_apk_registry.sh
upgrade_index_registry: ## Upgrade Registry Coordinator
@echo "Upgrading Index Registry..."
@. contracts/scripts/.env && . contracts/scripts/upgrade_index_registry.sh
upgrade_stake_registry: ## Upgrade Stake Registry
@echo "Upgrading Stake Registry..."
@. contracts/scripts/.env && . contracts/scripts/upgrade_stake_registry.sh
upgrade_add_aggregator: ## Add Aggregator to Aligned Contracts
@echo "Adding Aggregator to Aligned Contracts..."
@. contracts/scripts/.env && . contracts/scripts/upgrade_add_aggregator_to_service_manager.sh
upgrade_initialize_disabled_verifiers:
@echo "Adding disabled verifiers to Aligned Service Manager..."
@. contracts/scripts/.env && . contracts/scripts/upgrade_disabled_verifiers_in_service_manager.sh
deploy_verify_batch_inclusion_caller:
@echo "Deploying VerifyBatchInclusionCaller contract..."
@. examples/verify/.env && . examples/verify/scripts/deploy_verify_batch_inclusion_caller.sh
deploy_batcher_payment_service: ## Deploy BatcherPayments contract. Parameters: NETWORK=<mainnet|holesky|sepolia>
@echo "Deploying BatcherPayments contract on $(NETWORK) network..."
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_batcher_payment_service.sh
upgrade_batcher_payment_service: ## Upgrade BatcherPayments contract. Parameters: NETWORK=<mainnet|holesky|sepolia
@echo "Upgrading BatcherPayments Contract on $(NETWORK) network..."
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/upgrade_batcher_payment_service.sh
build_aligned_contracts:
@cd contracts/src/core && forge build
show_aligned_error_codes:
@echo "\nAlignedLayerServiceManager errors:"
@cd contracts && forge inspect src/core/IAlignedLayerServiceManager.sol:IAlignedLayerServiceManager errors
@echo "\nBatcherPaymentService errors:"
@cd contracts && forge inspect src/core/BatcherPaymentService.sol:BatcherPaymentService errors
__BUILD__:
build_binaries:
@echo "Building aggregator..."
@go build -o ./aggregator/build/aligned-aggregator ./aggregator/cmd/main.go
@echo "Aggregator built into /aggregator/build/aligned-aggregator"
@echo "Building aligned layer operator..."
@go build -ldflags "-X main.Version=$(OPERATOR_VERSION)" -o ./operator/build/aligned-operator ./operator/cmd/main.go
@echo "Aligned layer operator built into /operator/build/aligned-operator"
__SP1_FFI__: ##
build_sp1_macos:
@cd operator/sp1/lib && cargo build $(RELEASE_FLAG)
@cp operator/sp1/lib/target/$(TARGET_REL_PATH)/libsp1_verifier_ffi.dylib operator/sp1/lib/libsp1_verifier_ffi.dylib
build_sp1_linux:
@cd operator/sp1/lib && cargo build $(RELEASE_FLAG)
@cp operator/sp1/lib/target/$(TARGET_REL_PATH)/libsp1_verifier_ffi.so operator/sp1/lib/libsp1_verifier_ffi.so
test_sp1_rust_ffi:
@echo "Testing SP1 Rust FFI source code..."
@cd operator/sp1/lib && RUST_MIN_STACK=83886080 cargo t --release
test_sp1_go_bindings_macos: build_sp1_macos
@echo "Testing SP1 Go bindings..."
go test ./operator/sp1/... -v
test_sp1_go_bindings_linux: build_sp1_linux
@echo "Testing SP1 Go bindings..."
go test ./operator/sp1/... -v
# @cp -r scripts/test_files/sp1/fibonacci_proof_generator/script/sp1_fibonacci.elf scripts/test_files/sp1/
generate_sp1_fibonacci_proof:
@cd scripts/test_files/sp1/fibonacci_proof_generator/script && RUST_LOG=info cargo run --release
@mv scripts/test_files/sp1/fibonacci_proof_generator/program/elf/riscv32im-succinct-zkvm-elf scripts/test_files/sp1/sp1_fibonacci.elf
@mv scripts/test_files/sp1/fibonacci_proof_generator/script/sp1_fibonacci.proof scripts/test_files/sp1/
@echo "Fibonacci proof and ELF generated in scripts/test_files/sp1 folder"
generate_risc_zero_empty_journal_proof:
@cd scripts/test_files/risc_zero/no_public_inputs && RUST_LOG=info cargo run --release
@echo "Fibonacci proof and ELF with empty journal generated in scripts/test_files/risc_zero/no_public_inputs folder"
build_sp1_macos_old:
@cd operator/sp1_old/lib && cargo build $(RELEASE_FLAG)
@cp operator/sp1_old/lib/target/$(TARGET_REL_PATH)/libsp1_verifier_old_ffi.dylib operator/sp1_old/lib/libsp1_verifier_old_ffi.dylib
build_sp1_linux_old:
@cd operator/sp1_old/lib && cargo build $(RELEASE_FLAG)
@cp operator/sp1_old/lib/target/$(TARGET_REL_PATH)/libsp1_verifier_old_ffi.so operator/sp1_old/lib/libsp1_verifier_old_ffi.so
test_sp1_rust_ffi_old:
@echo "Testing SP1 Rust FFI source code..."
@cd operator/sp1_old/lib && RUST_MIN_STACK=83886080 cargo t --release
test_sp1_go_bindings_macos_old: build_sp1_macos_old
@echo "Testing SP1 Go bindings..."
go test ./operator/sp1_old/... -v
test_sp1_go_bindings_linux_old: build_sp1_linux_old
@echo "Testing SP1 Go bindings..."
go test ./operator/sp1_old/... -v
__RISC_ZERO_FFI__: ##
build_risc_zero_macos:
@cd operator/risc_zero/lib && cargo build $(RELEASE_FLAG)
@cp operator/risc_zero/lib/target/$(TARGET_REL_PATH)/librisc_zero_verifier_ffi.dylib operator/risc_zero/lib/librisc_zero_verifier_ffi.dylib
build_risc_zero_linux:
@cd operator/risc_zero/lib && cargo build $(RELEASE_FLAG)
@cp operator/risc_zero/lib/target/$(TARGET_REL_PATH)/librisc_zero_verifier_ffi.so operator/risc_zero/lib/librisc_zero_verifier_ffi.so
test_risc_zero_rust_ffi:
@echo "Testing RISC Zero Rust FFI source code..."
@cd operator/risc_zero/lib && cargo test --release
test_risc_zero_go_bindings_macos: build_risc_zero_macos
@echo "Testing RISC Zero Go bindings..."
go test ./operator/risc_zero/... -v
test_risc_zero_go_bindings_linux: build_risc_zero_linux
@echo "Testing RISC Zero Go bindings..."
go test ./operator/risc_zero/... -v
generate_risc_zero_fibonacci_proof:
@cd scripts/test_files/risc_zero/fibonacci_proof_generator && \
RUST_LOG=info cargo run --release && \
echo "Fibonacci proof, pub input and image ID generated in scripts/test_files/risc_zero folder"
build_risc_zero_macos_old:
@cd operator/risc_zero_old/lib && cargo build $(RELEASE_FLAG)
@cp operator/risc_zero_old/lib/target/$(TARGET_REL_PATH)/librisc_zero_verifier_old_ffi.dylib operator/risc_zero_old/lib/librisc_zero_verifier_old_ffi.dylib
build_risc_zero_linux_old:
@cd operator/risc_zero_old/lib && cargo build $(RELEASE_FLAG)
@cp operator/risc_zero_old/lib/target/$(TARGET_REL_PATH)/librisc_zero_verifier_old_ffi.so operator/risc_zero_old/lib/librisc_zero_verifier_old_ffi.so
test_risc_zero_rust_ffi_old:
@echo "Testing RISC Zero Rust FFI source code..."
@cd operator/risc_zero_old/lib && cargo test --release
test_risc_zero_go_bindings_macos_old: build_risc_zero_macos_old
@echo "Testing RISC Zero Go bindings..."
go test ./operator/risc_zero_old/... -v
test_risc_zero_go_bindings_linux_old: build_risc_zero_linux_old
@echo "Testing RISC Zero Go bindings..."
go test ./operator/risc_zero_old/... -v
__MERKLE_TREE_FFI__: ##
build_merkle_tree_macos:
@cd operator/merkle_tree/lib && cargo build $(RELEASE_FLAG)
@cp operator/merkle_tree/lib/target/$(TARGET_REL_PATH)/libmerkle_tree.dylib operator/merkle_tree/lib/libmerkle_tree.dylib
@cp operator/merkle_tree/lib/target/$(TARGET_REL_PATH)/libmerkle_tree.a operator/merkle_tree/lib/libmerkle_tree.a
build_merkle_tree_linux:
@cd operator/merkle_tree/lib && cargo build $(RELEASE_FLAG)
@cp operator/merkle_tree/lib/target/$(TARGET_REL_PATH)/libmerkle_tree.so operator/merkle_tree/lib/libmerkle_tree.so
@cp operator/merkle_tree/lib/target/$(TARGET_REL_PATH)/libmerkle_tree.a operator/merkle_tree/lib/libmerkle_tree.a
test_merkle_tree_rust_ffi:
@echo "Testing Merkle Tree Rust FFI source code..."
@cd operator/merkle_tree/lib && RUST_MIN_STACK=83886080 cargo t --release
test_merkle_tree_go_bindings_macos: build_merkle_tree_macos
@echo "Testing Merkle Tree Go bindings..."
go test ./operator/merkle_tree/... -v
test_merkle_tree_go_bindings_linux: build_merkle_tree_linux
@echo "Testing Merkle Tree Go bindings..."
go test ./operator/merkle_tree/... -v
test_merkle_tree_old_go_bindings_macos: build_merkle_tree_macos_old
@echo "Testing Old Merkle Tree Go bindings..."
go test ./operator/merkle_tree_old/... -v
__BUILD_ALL_FFI__:
build_all_ffi: ## Build all FFIs
$(BUILD_ALL_FFI)
@echo "Created FFIs"
build_all_ffi_macos: ## Build all FFIs for macOS
@echo "Building all FFIs for macOS..."
@$(MAKE) build_sp1_macos
@$(MAKE) build_risc_zero_macos
@$(MAKE) build_sp1_macos_old
@$(MAKE) build_risc_zero_macos_old
@$(MAKE) build_merkle_tree_macos
@echo "All macOS FFIs built successfully."
build_all_ffi_linux: ## Build all FFIs for Linux
@echo "Building all FFIs for Linux..."
@$(MAKE) build_sp1_linux
@$(MAKE) build_risc_zero_linux
@$(MAKE) build_sp1_linux_old
@$(MAKE) build_risc_zero_linux_old
@$(MAKE) build_merkle_tree_linux
@echo "All Linux FFIs built successfully."
__EXPLORER__:
run_explorer_without_docker_db: explorer_ecto_setup_db
@cd explorer/ && \
pnpm install --prefix assets && \
mix setup && \
./start.sh
run_explorer: explorer_run_db explorer_ecto_setup_db
@cd explorer/ && \
pnpm install --prefix assets && \
mix setup && \
./start.sh
explorer_build_db:
@cd explorer && \
docker build -t explorer-postgres-image .
explorer_run_db: explorer_remove_db_container
@cd explorer && \
docker run -d --name explorer-postgres-container -p 5432:5432 -v explorer-postgres-data:/var/lib/postgresql/data explorer-postgres-image
explorer_ecto_setup_db:
@cd explorer/ && \
./ecto_setup_db.sh
explorer_remove_db_container:
@cd explorer && \
docker stop explorer-postgres-container || true && \
docker rm explorer-postgres-container || true
explorer_clean_db: explorer_remove_db_container
@cd explorer && \
docker volume rm explorer-postgres-data || true
explorer_dump_db:
@cd explorer && \
docker exec -t explorer-postgres-container pg_dumpall -c -U explorer_user > dump.$$(date +\%Y\%m\%d_\%H\%M\%S).sql
@echo "Dumped database successfully to /explorer"
explorer_recover_db: explorer_run_db
@read -p $$'\e[32mEnter the dump file to recover (e.g., dump.20230607_123456.sql): \e[0m' DUMP_FILE && \
cd explorer && \
docker cp $$DUMP_FILE explorer-postgres-container:/dump.sql && \
docker exec -t explorer-postgres-container psql -U explorer_user -d explorer_db -f /dump.sql && \
echo "Recovered database successfully from $$DUMP_FILE"
explorer_fetch_old_batches:
@cd explorer && \
./scripts/fetch_old_batches.sh $(FROM_BLOCK) $(TO_BLOCK)
explorer_fetch_old_operators_strategies_restakes: # recommended for prod: 19000000
@cd explorer && \
./scripts/fetch_old_operators_strategies_restakes.sh $(FROM_BLOCK)
explorer_create_env:
@cd explorer && \
cp .env.dev .env
DOCKER_RPC_URL=http://anvil:8545
PROOF_GENERATOR_ADDRESS=0x66f9664f97F2b50F62D13eA064982f936dE76657
docker_build_base_image:
docker compose -f docker-compose.yaml --profile aligned_base build
docker_build_aggregator:
docker compose -f docker-compose.yaml --profile aggregator build
docker_build_operator:
docker compose -f docker-compose.yaml --profile operator build
docker_build_batcher:
docker compose -f docker-compose.yaml --profile batcher build
docker_restart_aggregator:
docker compose -f docker-compose.yaml --profile aggregator down
docker compose -f docker-compose.yaml --profile aggregator up -d --remove-orphans --force-recreate
docker_restart_operator:
docker compose -f docker-compose.yaml --profile operator down
docker compose -f docker-compose.yaml --profile operator up -d --remove-orphans --force-recreate
docker_restart_batcher:
docker compose -f docker-compose.yaml --profile batcher down
docker compose -f docker-compose.yaml --profile batcher up -d --remove-orphans --force-recreate
docker_build:
docker compose -f docker-compose.yaml --profile aligned_base build
docker compose -f docker-compose.yaml --profile eigenlayer-cli build
docker compose -f docker-compose.yaml --profile foundry build
docker compose -f docker-compose.yaml --profile base build
docker compose -f docker-compose.yaml --profile operator build
docker compose -f docker-compose.yaml --profile batcher build
docker compose -f docker-compose.yaml --profile aggregator build
docker_up:
docker compose -f docker-compose.yaml --profile base up -d --remove-orphans --force-recreate
@until [ "$$(docker inspect $$(docker ps | grep anvil | awk '{print $$1}') | jq -r '.[0].State.Health.Status')" = "healthy" ]; do sleep .5; done; sleep 2
docker compose -f docker-compose.yaml --profile aggregator up -d --remove-orphans --force-recreate
docker compose -f docker-compose.yaml run --rm fund-operator
docker compose -f docker-compose.yaml run --rm register-operator-eigenlayer
docker compose -f docker-compose.yaml run --rm mint-mock-tokens
docker compose -f docker-compose.yaml run --rm operator-deposit-into-mock-strategy
docker compose -f docker-compose.yaml run --rm operator-whitelist-devnet
docker compose -f docker-compose.yaml run --rm operator-register-with-aligned-layer
docker compose -f docker-compose.yaml --profile operator up -d --remove-orphans --force-recreate
docker compose -f docker-compose.yaml run --rm user-fund-payment-service-devnet
docker compose -f docker-compose.yaml --profile batcher up -d --remove-orphans --force-recreate
@echo "Up and running"
docker_down:
docker compose -f docker-compose.yaml --profile batcher down
docker compose -f docker-compose.yaml --profile operator down
docker compose -f docker-compose.yaml --profile base down
@echo "Everything down"
docker ps
DOCKER_BURST_SIZE=2
DOCKER_PROOFS_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
docker_batcher_send_sp1_burst:
@echo "Sending SP1 fibonacci task to Batcher..."
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
--private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
--proving_system SP1 \
--proof ./scripts/test_files/sp1/sp1_fibonacci.proof \
--vm_program ./scripts/test_files/sp1/sp1_fibonacci.elf \
--repetitions $(DOCKER_BURST_SIZE) \
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
--rpc_url $(DOCKER_RPC_URL)
docker_batcher_send_risc0_burst:
@echo "Sending Risc0 fibonacci task to Batcher..."
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
--private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
--proving_system Risc0 \
--proof ./scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci.proof \
--vm_program ./scripts/test_files/risc_zero/fibonacci_proof_generator/fibonacci_id.bin \
--public_input ./scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci.pub \
--repetitions $(DOCKER_BURST_SIZE) \
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
--rpc_url $(DOCKER_RPC_URL)
docker_batcher_send_plonk_bn254_burst:
@echo "Sending Groth16Bn254 1!=0 task to Batcher..."
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
--private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
--proving_system GnarkPlonkBn254 \
--proof ./scripts/test_files/gnark_plonk_bn254_script/plonk.proof \
--public_input ./scripts/test_files/gnark_plonk_bn254_script/plonk_pub_input.pub \
--vk ./scripts/test_files/gnark_plonk_bn254_script/plonk.vk \
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
--rpc_url $(DOCKER_RPC_URL) \
--repetitions $(DOCKER_BURST_SIZE)
docker_batcher_send_plonk_bls12_381_burst:
@echo "Sending Groth16 BLS12-381 1!=0 task to Batcher..."
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
--private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
--proving_system GnarkPlonkBls12_381 \
--proof ./scripts/test_files/gnark_plonk_bls12_381_script/plonk.proof \
--public_input ./scripts/test_files/gnark_plonk_bls12_381_script/plonk_pub_input.pub \
--vk ./scripts/test_files/gnark_plonk_bls12_381_script/plonk.vk \
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
--repetitions $(DOCKER_BURST_SIZE) \
--rpc_url $(DOCKER_RPC_URL)
docker_batcher_send_groth16_burst:
@echo "Sending Groth16 BLS12-381 1!=0 task to Batcher..."
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
--private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
--proving_system Groth16Bn254 \
--proof ./scripts/test_files/gnark_groth16_bn254_script/groth16.proof \
--public_input ./scripts/test_files/gnark_groth16_bn254_script/plonk_pub_input.pub \
--vk ./scripts/test_files/gnark_groth16_bn254_script/groth16.vk \
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
--repetitions $(DOCKER_BURST_SIZE) \
--rpc_url $(DOCKER_RPC_URL)
# Update target as new proofs are supported.
docker_batcher_send_all_proofs_burst:
@$(MAKE) docker_batcher_send_sp1_burst
@$(MAKE) docker_batcher_send_risc0_burst
@$(MAKE) docker_batcher_send_plonk_bn254_burst
@$(MAKE) docker_batcher_send_plonk_bls12_381_burst
@$(MAKE) docker_batcher_send_groth16_burst
docker_batcher_send_infinite_groth16:
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') \
sh -c ' \
mkdir -p scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs; \
counter=1; \
timer=3; \
while true; do \
echo "Generating proof $${counter} != 0"; \
gnark_groth16_bn254_infinite_script $${counter}; \
aligned submit \
--rpc_url $(DOCKER_RPC_URL) \
--repetitions $(DOCKER_BURST_SIZE) \
--proving_system Groth16Bn254 \
--proof scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_$${counter}_groth16.proof \
--public_input scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_$${counter}_groth16.pub \
--vk scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_$${counter}_groth16.vk \
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS); \
sleep $${timer}; \
counter=$$((counter + 1)); \
done \
'