From b77ef35d5ab32e3efc65ccba9ca77adb1b48db88 Mon Sep 17 00:00:00 2001 From: NicolasRampoldi <58613770+NicolasRampoldi@users.noreply.github.com> Date: Fri, 31 May 2024 18:42:49 -0300 Subject: [PATCH 1/5] feat: add install_batcher_client to makefile --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index de2c2022af..0eb3fdff17 100644 --- a/Makefile +++ b/Makefile @@ -120,6 +120,8 @@ batcher_start: ./batcher/.env @echo "Starting Batcher..." @cargo +nightly-2024-04-17 run --manifest-path ./batcher/Cargo.toml --release -- --config ./config-files/config.yaml --env-file ./batcher/.env +install_batcher_client: + @cargo +nightly-2024-04-17 install --path batcher/client build_batcher_client: @cd batcher/client && cargo b --release From edc5fb871d0aece38ce0745f5e58fd1a0e9c1df1 Mon Sep 17 00:00:00 2001 From: NicolasRampoldi <58613770+NicolasRampoldi@users.noreply.github.com> Date: Fri, 31 May 2024 18:42:58 -0300 Subject: [PATCH 2/5] feat: add install_batcher_client to readme --- README.md | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 9c57adce08..26df206862 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,14 @@ Aligned works with EigenLayer to leverage ethereum consensus mechanism for ZK pr - [Rust](https://www.rust-lang.org/tools/install) +To install the batcher client to send proofs in the testnet, run: + +```bash +make install_batcher_client +``` + +This command will build and install the batcher-client binary to your local Cargo bin directory. It is commonly located at `~/.cargo/bin`. + ### Run #### SP1 proof @@ -34,8 +42,7 @@ Aligned works with EigenLayer to leverage ethereum consensus mechanism for ZK pr The SP1 proof needs the proof file and the vm program file. ```bash -pushd batcher/client/ ; \ -cargo run -- \ +~/.cargo/bin/batcher-client \ --proving_system \ --proof \ --vm_program \ @@ -46,25 +53,21 @@ cargo run -- \ **Example** ```bash -pushd batcher/client/ ; \ -cargo run -- \ +~/.cargo/bin/batcher-client \ --proving_system SP1 \ --proof test_files/sp1/sp1_fibonacci.proof \ --vm_program test_files/sp1/sp1_fibonacci-elf \ --conn batcher.alignedlayer.com \ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 ; -popd ``` ```bash -pushd batcher/client/ ; \ -cargo run -- \ +~/.cargo/bin/batcher-client \ --proving_system SP1 \ --proof test_files/sp1/sp1_fibonacci.proof \ --vm_program test_files/sp1/sp1_fibonacci-elf \ --conn batcher.alignedlayer.com \ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 ; -popd ``` #### GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254 @@ -72,53 +75,45 @@ popd The GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254 proofs need the proof file, the public input file and the verification key file. ```bash -pushd batcher/client/ ; \ -cargo run -- \ +~/.cargo/bin/batcher-client \ --proving_system \ --proof \ --public_input \ --vk \ --conn batcher.alignedlayer.com \ --proof_generator_addr ; -popd ``` **Examples** ```bash -pushd batcher/client/ ; \ -cargo run --release -- \ +~/.cargo/bin/batcher-client \ --proving_system GnarkPlonkBn254 \ --proof test_files/plonk_bn254/plonk.proof \ --public_input test_files/plonk_bn254/plonk_pub_input.pub \ --vk test_files/plonk_bn254/plonk.vk \ --conn batcher.alignedlayer.com \ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 ; -popd ``` ```bash -pushd batcher/client/ ; \ -cargo run -- \ +~/.cargo/bin/batcher-client \ --proving_system GnarkPlonkBls12_381 \ --proof test_files/plonk_bls12_381/plonk.proof \ --public_input test_files/plonk_bls12_381/plonk_pub_input.pub \ --vk test_files/plonk_bls12_381/plonk.vk \ --conn batcher.alignedlayer.com \ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 ; -popd ``` ```bash -pushd batcher/client/ ; \ -cargo run -- \ +~/.cargo/bin/batcher-client \ --proving_system Groth16Bn254 \ --proof test_files/groth16/ineq_1_groth16.proof \ --public_input test_files/groth16/ineq_1_groth16.pub \ --vk test_files/groth16/ineq_1_groth16.vk \ --conn batcher.alignedlayer.com \ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 ; -popd ``` ## Local Devnet Setup @@ -463,11 +458,19 @@ make batcher_send_burst_groth16 #### Send specific proof +To install the batcher client to send a specific proof, run: + +```bash +make install_batcher_client +``` + +This command will build and install the batcher-client binary to your local Cargo bin directory. It is commonly located at `~/.cargo/bin`. + The SP1 proof needs the proof file and the vm program file. The GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254 proofs need the proof file, the public input file and the verification key file. ```bash -cd batcher/client/ && cargo run --release -- \ +~/.cargo/bin/batcher-client \ --proving_system \ --proof \ --public-input \ From bab752cbf72faa7d4419ae5e057941236b9cd3ff Mon Sep 17 00:00:00 2001 From: NicolasRampoldi <58613770+NicolasRampoldi@users.noreply.github.com> Date: Mon, 3 Jun 2024 11:52:53 -0300 Subject: [PATCH 3/5] fix: change readme from ~/.cargo/bin/batcher-client to batcher-client --- README.md | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index aa00705c7b..ecec2d6578 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,6 @@ To install the batcher client to send proofs in the testnet, run: make install_batcher_client ``` -This command will build and install the batcher-client binary to your local Cargo bin directory. It is commonly located at `~/.cargo/bin`. - ### Run #### SP1 proof @@ -42,7 +40,7 @@ This command will build and install the batcher-client binary to your local Carg The SP1 proof needs the proof file and the vm program file. ```bash -~/.cargo/bin/batcher-client \ +batcher-client \ --proving_system \ --proof \ --vm_program \ @@ -53,7 +51,7 @@ The SP1 proof needs the proof file and the vm program file. **Example** ```bash -~/.cargo/bin/batcher-client \ +batcher-client \ --proving_system SP1 \ --proof test_files/sp1/sp1_fibonacci.proof \ --vm_program test_files/sp1/sp1_fibonacci-elf \ @@ -62,7 +60,7 @@ The SP1 proof needs the proof file and the vm program file. ``` ```bash -~/.cargo/bin/batcher-client \ +batcher-client \ --proving_system SP1 \ --proof test_files/sp1/sp1_fibonacci.proof \ --vm_program test_files/sp1/sp1_fibonacci-elf \ @@ -75,7 +73,7 @@ The SP1 proof needs the proof file and the vm program file. The GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254 proofs need the proof file, the public input file and the verification key file. ```bash -~/.cargo/bin/batcher-client \ +batcher-client \ --proving_system \ --proof \ --public_input \ @@ -87,7 +85,7 @@ The GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254 proofs need the proof **Examples** ```bash -~/.cargo/bin/batcher-client \ +batcher-client \ --proving_system GnarkPlonkBn254 \ --proof test_files/plonk_bn254/plonk.proof \ --public_input test_files/plonk_bn254/plonk_pub_input.pub \ @@ -97,7 +95,7 @@ The GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254 proofs need the proof ``` ```bash -~/.cargo/bin/batcher-client \ +batcher-client \ --proving_system GnarkPlonkBls12_381 \ --proof test_files/plonk_bls12_381/plonk.proof \ --public_input test_files/plonk_bls12_381/plonk_pub_input.pub \ @@ -107,7 +105,7 @@ The GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254 proofs need the proof ``` ```bash -~/.cargo/bin/batcher-client \ +batcher-client \ --proving_system Groth16Bn254 \ --proof test_files/groth16/ineq_1_groth16.proof \ --public_input test_files/groth16/ineq_1_groth16.pub \ @@ -464,13 +462,11 @@ To install the batcher client to send a specific proof, run: make install_batcher_client ``` -This command will build and install the batcher-client binary to your local Cargo bin directory. It is commonly located at `~/.cargo/bin`. - The SP1 proof needs the proof file and the vm program file. The GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254 proofs need the proof file, the public input file and the verification key file. ```bash -~/.cargo/bin/batcher-client \ +batcher-client \ --proving_system \ --proof \ --public-input \ From 65c32a01796d6544a5d88425b4b9bcc407902bc1 Mon Sep 17 00:00:00 2001 From: NicolasRampoldi <58613770+NicolasRampoldi@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:30:52 -0300 Subject: [PATCH 4/5] fix: readme --- README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.md b/README.md index 0ce9ebbf78..1b53991118 100644 --- a/README.md +++ b/README.md @@ -392,7 +392,6 @@ To start the operator with a custom configuration, run: make operator_start CONFIG_FILE= ``` - ### Batcher #### Config @@ -684,7 +683,6 @@ To build go binaries run: make build_binaries ``` - ## Metrics ### Aggregator Metrics @@ -707,7 +705,6 @@ To install Prometheus, you can follow the instructions on the [official website] To install Grafana, you can follow the instructions on the [official website](https://grafana.com/docs/grafana/latest/setup-grafana/installation/). - ## Explorer ### Minimum Requirements @@ -744,7 +741,6 @@ If you want to have some data to see on it, you can start our infinite task send make batcher_send_burst_groth16 ``` - ## Notes on project creation / devnet deployment Eigenlayer middleware was installed as a submodule with: @@ -772,7 +768,6 @@ The state is backuped on ```contracts/scripts/anvil/state```. Eigenlayer contract deployment is almost the same as the EigenLayer contract deployment on mainnet. Changes are described on the file. - ## Tests To run the go tests @@ -781,7 +776,6 @@ To run the go tests make test ``` - ## Verify Proofs ### SP1 @@ -826,7 +820,6 @@ cargo run --release -- \ --proof_generator_addr [proof_generator_addr] ``` - ## FAQ ### What is the objective of Aligned? From 35d267ed57b25b5b911bf383795b78726455fd1f Mon Sep 17 00:00:00 2001 From: NicolasRampoldi <58613770+NicolasRampoldi@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:34:16 -0300 Subject: [PATCH 5/5] fix: readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e31013d8fa..6e39b376df 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ batcher-client \ --proving_system SP1 \ --proof test_files/sp1/sp1_fibonacci.proof \ --vm_program test_files/sp1/sp1_fibonacci-elf \ ---conn wss://batcher.alignedlayer.com ; +--conn wss://batcher.alignedlayer.com ``` ```bash @@ -212,7 +212,7 @@ Send an individual Groth 16 proof: make batcher_send_groth16_task ``` -To send send an individual test SP1 proof: +To send an individual test SP1 proof: ```bash make batcher_send_sp1_task