Skip to content

Commit

Permalink
Pull fixes from testnet (#1164)
Browse files Browse the repository at this point in the history
  • Loading branch information
uri-99 authored Oct 3, 2024
2 parents d551bf7 + 55023bf commit 34fb21e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 46 deletions.
8 changes: 3 additions & 5 deletions docs/1_introduction/1_getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ aligned submit \
--vm_program ~/.aligned/test_files/sp1_fibonacci.elf \
--aligned_verification_data_path ~/.aligned/aligned_verification_data \
--batcher_url wss://batcher.alignedlayer.com \
--chain holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
--network holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com
```

5. You should get a response like this:
Expand All @@ -53,8 +52,7 @@ Use the link in the response to check the status of your transaction in the Alig
aligned verify-proof-onchain \
--aligned-verification-data ~/.aligned/aligned_verification_data/*.json \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--chain holesky \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
--network holesky
```
This is reading the result of the proof verification in Ethereum.
Expand Down
58 changes: 24 additions & 34 deletions docs/3_guides/0_submitting_proofs.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ To be able to send proofs to Aligned using the Batcher, the user must fund its t
To use it, you can use the `aligned` CLI, as shown with the following example:

```bash
aligned deposit-to-batcher \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003 \
aligned deposit-to-batcher \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--chain holesky \
--network holesky \
--keystore_path <keystore_path> \
--amount 0.1ether
```
Expand All @@ -77,16 +76,15 @@ These commands allow the usage of the following flags:

- `--payment_service_addr` to specify the address of the Batcher Payment Service smart contract.
- `--rpc_url` to specify the rpc url to be used.
- `--chain` to specify the chain id to be used. Could be holesky or devnet.
- `--network` to specify the chain id to be used. Could be holesky or devnet.
- `--keystore_path` the path to the keystore.
- `--amount` the number of ethers to transfer to the Batcher.
- Note: `--amount` flag parameter must be with the shown format. The amount followed by the `ether` keyword to specify how many ethers you wish to deposit to the Batcher.

After depositing funds, you can verify the Service has correctly received them by executing the following command:

```bash
aligned get-user-balance \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003 \
aligned get-user-balance \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--user_addr <user_addr>
```
Expand Down Expand Up @@ -130,9 +128,8 @@ aligned submit \
--proof_generator_addr [proof_generator_addr] \
--batch_inclusion_data_directory_path [batch_inclusion_data_directory_path] \
--keystore_path <path_to_ecdsa_keystore> \
--chain holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
--network holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com
```

**Example**
Expand All @@ -145,9 +142,8 @@ aligned submit \
--vm_program ./scripts/test_files/sp1/sp1_fibonacci.elf \
--batcher_url wss://batcher.alignedlayer.com \
--keystore_path ~/.aligned_keystore/keystore0 \
--chain holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
--network holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com
```

### Risc0 proof
Expand All @@ -167,9 +163,8 @@ aligned submit \
--proof_generator_addr [proof_generator_addr] \
--batch_inclusion_data_directory_path [batch_inclusion_data_directory_path] \
--keystore_path <path_to_ecdsa_keystore> \
--chain holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
--network holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com
```

**NOTE**: As said above, Aligned currently supports Risc0 proofs from `risc0-zkvm` version `v1.0.1`. For generating proofs using `cargo risc-zero` please ensure you are using `v1.0.1` or your proof will not be verified.
Expand All @@ -194,9 +189,8 @@ aligned submit \
--batcher_url wss://batcher.alignedlayer.com \
--aligned_verification_data_path ~/.aligned/aligned_verification_data \
--keystore_path ~/.aligned_keystore/keystore0 \
--chain holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
--network holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com
```
### GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254
Expand All @@ -214,9 +208,8 @@ aligned submit \
--proof_generator_addr [proof_generator_addr] \
--batch_inclusion_data_directory_path [batch_inclusion_data_directory_path] \
--keystore_path <path_to_ecdsa_keystore> \
--chain holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
--network holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com
```
**Examples**:
Expand All @@ -230,9 +223,8 @@ aligned submit \
--vk ./scripts/test_files/gnark_plonk_bn254_script/plonk.vk \
--batcher_url wss://batcher.alignedlayer.com \
--keystore_path ~/.aligned_keystore/keystore0 \
--chain holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
--network holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com
```
```bash
Expand All @@ -244,9 +236,8 @@ aligned submit \
--vk ./scripts/test_files/gnark_plonk_bls12_381_script/plonk.vk \
--batcher_url wss://batcher.alignedlayer.com \
--keystore_path ~/.aligned_keystore/keystore0 \
--chain holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
--network holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com
```
```bash
Expand All @@ -258,9 +249,8 @@ aligned submit \
--vk ./scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_1_groth16.vk \
--batcher_url wss://batcher.alignedlayer.com \
--keystore_path ~/.aligned_keystore/keystore0 \
--chain holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
--network holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com
```
### Halo2 KZG and Halo2 IPA
Expand All @@ -279,7 +269,7 @@ aligned submit \
--batcher_url wss://batcher.alignedlayer.com \
--keystore_path <path_to_ecdsa_keystore> \
--proof_generator_addr <proof_generator_addr> \
--chain holesky \
--network holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003 \
```
Expand All @@ -296,7 +286,7 @@ aligned submit \
--batcher_url wss://batcher.alignedlayer.com \
--keystore_path <path_to_ecdsa_keystore> \
--proof_generator_addr <proof_generator_addr> \
--chain holesky \
--network holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
```
Expand All @@ -313,7 +303,7 @@ aligned submit \
--batcher_url wss://batcher.alignedlayer.com \
--keystore_path ~/.aligned_keystore/keystore0 \
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
--chain holesky \
--network holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
```
Expand All @@ -328,7 +318,7 @@ aligned submit \
--batcher_url wss://batcher.alignedlayer.com \
--keystore_path ~/.aligned_keystore/keystore0 \
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
--chain holesky \
--network holesky \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
```
8 changes: 3 additions & 5 deletions docs/3_guides/4_generating_proofs.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ aligned submit \
--vm_program <vm_program_path> \
--batcher_url wss://batcher.alignedlayer.com \
--proof_generator_addr <proof_generator_addr> \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
--rpc_url https://ethereum-holesky-rpc.publicnode.com
```

Where `proof_path` is the path to the proof file, `vm_program_path` is the path to the ELF file. `proof_generator_addr` is an optional parameter that works as a helper for some applications where you can be frontrunned.
Expand Down Expand Up @@ -91,8 +90,7 @@ aligned submit \
--vk <verification_key_path> \
--batcher_url wss://batcher.alignedlayer.com \
--proof_generator_addr <proof_generator_addr> \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
--rpc_url https://ethereum-holesky-rpc.publicnode.com
```

Where proof path is the path to the proof file, `public_input_path` is the path to the public input file,
Expand Down Expand Up @@ -276,7 +274,7 @@ aligned submit \
--public_input <pub_input_file_path> \
--conn wss://batcher.alignedlayer.com \
--proof_generator_addr <proof_generator_addr> \
--chain holesky \
--network holesky \
--rpc https://ethereum-holesky-rpc.publicnode.com \
--batcher_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
```
Expand Down
3 changes: 1 addition & 2 deletions docs/3_guides/6_setup_aligned.md
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,7 @@ aligned submit \
--batch_inclusion_data_directory_path [batch_inclusion_data_directory_path] \
--keystore_path [path_to_ecdsa_keystore] \
--batcher_url wss://batcher.alignedlayer.com \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--payment_service_addr 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
--rpc_url https://ethereum-holesky-rpc.publicnode.com
```

</details>
Expand Down

0 comments on commit 34fb21e

Please sign in to comment.