Skip to content

Commit 426b987

Browse files
feat: readme batcher cli simplify sending proofs process by using cargo install (#280)
1 parent 8a5c7cf commit 426b987

2 files changed

Lines changed: 30 additions & 37 deletions

File tree

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ batcher_start: ./batcher/.env
134134
@echo "Starting Batcher..."
135135
@cargo +nightly-2024-04-17 run --manifest-path ./batcher/Cargo.toml --release -- --config ./config-files/config.yaml --env-file ./batcher/.env
136136

137+
install_batcher_client:
138+
@cargo +nightly-2024-04-17 install --path batcher/client
137139

138140
build_batcher_client:
139141
@cd batcher/client && cargo b --release

README.md

Lines changed: 28 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -28,94 +28,86 @@ Aligned works with EigenLayer to leverage ethereum consensus mechanism for ZK pr
2828

2929
- [Rust](https://www.rust-lang.org/tools/install)
3030

31+
To install the batcher client to send proofs in the testnet, run:
32+
33+
```bash
34+
make install_batcher_client
35+
```
36+
3137
### Run
3238

3339
#### SP1 proof
3440

3541
The SP1 proof needs the proof file and the vm program file.
3642

3743
```bash
38-
pushd batcher/client/ ; \
39-
cargo run -- \
44+
batcher-client \
4045
--proving_system <SP1|GnarkPlonkBn254|GnarkPlonkBls12_381|Groth16Bn254> \
4146
--proof <proof_file> \
4247
--vm_program <vm_program_file> \
4348
--conn wss://batcher.alignedlayer.com \
44-
--proof_generator_addr [proof_generator_addr] ;
45-
popd
49+
--proof_generator_addr [proof_generator_addr]
4650
```
4751

4852
**Example**
4953

5054
```bash
51-
pushd batcher/client/ ; \
52-
cargo run -- \
55+
batcher-client \
5356
--proving_system SP1 \
5457
--proof test_files/sp1/sp1_fibonacci.proof \
5558
--vm_program test_files/sp1/sp1_fibonacci-elf \
56-
--conn wss://batcher.alignedlayer.com ;
57-
popd
59+
--conn wss://batcher.alignedlayer.com
5860
```
5961

6062
```bash
61-
pushd batcher/client/ ; \
62-
cargo run -- \
63+
batcher-client \
6364
--proving_system SP1 \
6465
--proof test_files/sp1/sp1_fibonacci.proof \
6566
--vm_program test_files/sp1/sp1_fibonacci-elf \
66-
--conn wss://batcher.alignedlayer.com ;
67-
popd
67+
--conn wss://batcher.alignedlayer.com
6868
```
6969

7070
#### GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254
7171

7272
The GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254 proofs need the proof file, the public input file and the verification key file.
7373

7474
```bash
75-
pushd batcher/client/ ; \
76-
cargo run -- \
75+
batcher-client \
7776
--proving_system <SP1|GnarkPlonkBn254|GnarkPlonkBls12_381|Groth16Bn254> \
7877
--proof <proof_file> \
7978
--public_input <public_input_file> \
8079
--vk <verification_key_file> \
8180
--conn wss://batcher.alignedlayer.com \
82-
--proof_generator_addr [proof_generator_addr] ;
83-
popd
81+
--proof_generator_addr [proof_generator_addr]
8482
```
8583

8684
**Examples**
8785

8886
```bash
89-
pushd batcher/client/ ; \
90-
cargo run --release -- \
87+
batcher-client \
9188
--proving_system GnarkPlonkBn254 \
9289
--proof test_files/plonk_bn254/plonk.proof \
9390
--public_input test_files/plonk_bn254/plonk_pub_input.pub \
9491
--vk test_files/plonk_bn254/plonk.vk \
95-
--conn wss://batcher.alignedlayer.com ;
96-
popd
92+
--conn wss://batcher.alignedlayer.com
9793
```
9894

9995
```bash
100-
pushd batcher/client/ ; \
101-
cargo run -- \
96+
batcher-client \
10297
--proving_system GnarkPlonkBls12_381 \
10398
--proof test_files/plonk_bls12_381/plonk.proof \
10499
--public_input test_files/plonk_bls12_381/plonk_pub_input.pub \
105100
--vk test_files/plonk_bls12_381/plonk.vk \
106-
--conn wss://batcher.alignedlayer.com ;
107-
popd
101+
--conn wss://batcher.alignedlayer.com
108102
```
109103

110104
```bash
111-
pushd batcher/client/ ; \
112-
cargo run -- \
105+
batcher-client \
113106
--proving_system Groth16Bn254 \
114107
--proof test_files/groth16/ineq_1_groth16.proof \
115108
--public_input test_files/groth16/ineq_1_groth16.pub \
116109
--vk test_files/groth16/ineq_1_groth16.vk \
117-
--conn wss://batcher.alignedlayer.com ;
118-
popd
110+
--conn wss://batcher.alignedlayer.com
119111
```
120112

121113
## Local Devnet Setup
@@ -164,7 +156,6 @@ make build_all_ffi
164156

165157
Before starting you need to setup an S3 bucket. More data storage will be tested in the future.
166158

167-
168159
You need to fill the data in:
169160

170161
```batcher/.env```
@@ -221,7 +212,7 @@ Send an individual Groth 16 proof:
221212
make batcher_send_groth16_task
222213
```
223214

224-
To send send an individual test SP1 proof:
215+
To send an individual test SP1 proof:
225216

226217
```bash
227218
make batcher_send_sp1_task
@@ -468,11 +459,17 @@ make batcher_send_burst_groth16
468459

469460
#### Send specific proof
470461

462+
To install the batcher client to send a specific proof, run:
463+
464+
```bash
465+
make install_batcher_client
466+
```
467+
471468
The SP1 proof needs the proof file and the vm program file.
472469
The GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254 proofs need the proof file, the public input file and the verification key file.
473470

474471
```bash
475-
cd batcher/client/ && cargo run --release -- \
472+
batcher-client \
476473
--proving_system <SP1|GnarkPlonkBn254|GnarkPlonkBls12_381|Groth16Bn254> \
477474
--proof <proof_file> \
478475
--public-input <public_input_file> \
@@ -680,7 +677,6 @@ To build go binaries run:
680677
make build_binaries
681678
```
682679

683-
684680
## Metrics
685681

686682
### Aggregator Metrics
@@ -703,7 +699,6 @@ To install Prometheus, you can follow the instructions on the [official website]
703699

704700
To install Grafana, you can follow the instructions on the [official website](https://grafana.com/docs/grafana/latest/setup-grafana/installation/).
705701

706-
707702
## Explorer
708703

709704
### Minimum Requirements
@@ -740,7 +735,6 @@ If you want to have some data to see on it, you can start our infinite task send
740735
make batcher_send_burst_groth16
741736
```
742737

743-
744738
## Notes on project creation / devnet deployment
745739

746740
Eigenlayer middleware was installed as a submodule with:
@@ -768,7 +762,6 @@ The state is backuped on ```contracts/scripts/anvil/state```.
768762

769763
Eigenlayer contract deployment is almost the same as the EigenLayer contract deployment on mainnet. Changes are described on the file.
770764

771-
772765
## Tests
773766

774767
To run the go tests
@@ -777,7 +770,6 @@ To run the go tests
777770
make test
778771
```
779772

780-
781773
## Verify Proofs
782774

783775
### SP1
@@ -822,7 +814,6 @@ cargo run --release -- \
822814
--proof_generator_addr [proof_generator_addr]
823815
```
824816

825-
826817
## FAQ
827818

828819
### What is the objective of Aligned?

0 commit comments

Comments
 (0)