Skip to content

Commit 548a796

Browse files
Docs 25 6 (#487)
Co-authored-by: Mariano Nicolini <[email protected]>
1 parent 09050c0 commit 548a796

File tree

8 files changed

+374
-83
lines changed

8 files changed

+374
-83
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ require(callWasSuccessfull, "static_call failed");
163163
164164
## Operator Guide
165165
166-
If you want to run an operator, check our [Operator Guide](./README_OPERATOR.md)
166+
If you want to run an operator, check our [Operator Guide](./docs/guides/1_operator_guide.md)
167167
168168
## Aligned Infrastructure Guide
169169

docs/README.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/SUMMARY.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1-
# Summary
1+
# Introduction
22

3-
* [Aligned](README.md)
3+
* [What is Aligned?](introduction/0_what_is_aligned.md)
4+
* [Getting started](introduction/1_getting_started.md)
5+
* [FAQ](introduction/2_fq.md)
6+
* Core concepts
7+
* Use cases
48

5-
## About Aligned
9+
# Guides
610

7-
* [Features](about_aligned/features.md)
8-
* [Use cases](about_aligned/use_cases.md)
9-
* [Modular approach](about_aligned/modular_approach.md)
10-
* [Role of EigenLayer](about_aligned/role_of_eigenlayer.md)
11-
* [How does Aligned work?](about_aligned/how_does_aligned_work.md)
12-
* [Learning Resources](about_aligned/learning_resources.md)
13-
* [FAQ](about_aligned/FAQ.md)
11+
* [Submitting with every proving system](guides/0_proving_systems.md)
12+
* [Operators guide](guides/1_operator_guide.md)
13+
* Making your own app with Aligned
1414

15-
## Links
15+
# Architecture
16+
17+
* Fast mode
18+
* Aggregation mode
19+
20+
# Useful links
21+
22+
* [All the proof aggregation solutions will use RISC-V zkvms](https://blog.alignedlayer.com/all-the-proof-aggregation-solutions-will-use-risc-v-zkvms/)
23+
* [Manifesto](https://blog.alignedlayer.com/aligned_manifesto/)
24+
25+
# Contacts
1626

1727
* [Telegram Group](https://t.me/aligned_layer)
1828
* [Twitter/X](https://twitter.com/alignedlayer)

docs/guides/0_proving_systems.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Supported Proving Systems
2+
3+
Currently, Aligned supports:
4+
5+
:white_check_mark: Gnark - Groth16 (with BN254)
6+
:white_check_mark: Gnark - Plonk (with BN254 and BLS12-381)
7+
:white_check_mark: SP1
8+
:white_check_mark: Halo2 - Plonk/KZG
9+
:white_check_mark: Halo2 - Plonk/IPA
10+
11+
The following proving systems are going to be added soon:
12+
:black_square_button: Risc0
13+
:black_square_button: Kimchi
14+
15+
## SP1 proof
16+
17+
The SP1 proving system needs the proof file and the vm program file,
18+
19+
```bash
20+
rm -rf ./aligned_verification_data/ &&
21+
aligned submit \
22+
--proving_system <SP1|GnarkPlonkBn254|GnarkPlonkBls12_381|Groth16Bn254> \
23+
--proof <proof_file> \
24+
--vm_program <vm_program_file> \
25+
--conn wss://batcher.alignedlayer.com \
26+
--proof_generator_addr [proof_generator_addr] \
27+
--batch_inclusion_data_directory_path [batch_inclusion_data_directory_path]
28+
```
29+
30+
**Example**
31+
32+
```bash
33+
rm -rf ./aligned_verification_data/ &&
34+
aligned submit \
35+
--proving_system SP1 \
36+
--proof ./batcher/aligned/test_files/sp1/sp1_fibonacci.proof \
37+
--vm_program ./batcher/aligned/test_files/sp1/sp1_fibonacci-elf \
38+
--conn wss://batcher.alignedlayer.com
39+
```
40+
41+
## GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254
42+
43+
GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254 proving systems need the proof file, the public input file and the verification key file.
44+
45+
```bash
46+
rm -rf ./aligned_verification_data/ &&
47+
aligned submit \
48+
--proving_system <SP1|GnarkPlonkBn254|GnarkPlonkBls12_381|Groth16Bn254> \
49+
--proof <proof_file> \
50+
--public_input <public_input_file> \
51+
--vk <verification_key_file> \
52+
--conn wss://batcher.alignedlayer.com \
53+
--proof_generator_addr [proof_generator_addr] \
54+
--batch_inclusion_data_directory_path [batch_inclusion_data_directory_path]
55+
```
56+
57+
**Plonk BN254 example**:
58+
59+
```bash
60+
rm -rf ./aligned_verification_data/ &&
61+
aligned submit \
62+
--proving_system GnarkPlonkBn254 \
63+
--proof ./batcher/aligned/test_files/plonk_bn254/plonk.proof \
64+
--public_input ./batcher/aligned/test_files/plonk_bn254/plonk_pub_input.pub \
65+
--vk ./batcher/aligned/test_files/plonk_bn254/plonk.vk \
66+
--conn wss://batcher.alignedlayer.com
67+
```
68+
69+
70+
**Plonk BLS12-381 example**:
71+
72+
```bash
73+
rm -rf ./aligned_verification_data/ &&
74+
aligned submit \
75+
--proving_system GnarkPlonkBls12_381 \
76+
--proof ./batcher/aligned/test_files/plonk_bls12_381/plonk.proof \
77+
--public_input ./batcher/aligned/test_files/plonk_bls12_381/plonk_pub_input.pub \
78+
--vk ./batcher/aligned/test_files/plonk_bls12_381/plonk.vk \
79+
--conn wss://batcher.alignedlayer.com
80+
```
81+
82+
**Groth16 BN254 example**:
83+
84+
```bash
85+
rm -rf ./aligned_verification_data/ &&
86+
aligned submit \
87+
--proving_system Groth16Bn254 \
88+
--proof ./batcher/aligned/test_files/groth16/ineq_1_groth16.proof \
89+
--public_input ./batcher/aligned/test_files/groth16/ineq_1_groth16.pub \
90+
--vk ./batcher/aligned/test_files/groth16/ineq_1_groth16.vk \
91+
--conn wss://batcher.alignedlayer.com
92+
```
Lines changed: 19 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
# Register as an Aligned operator in testnet
33

4-
## Requirements
5-
64
> [!NOTE]
75
> You must be whitelisted to become an Aligned operator.
86
7+
## Requirements
8+
99
This guide assumes you are already [registered as an operator with EigenLayer](https://docs.eigenlayer.xyz/eigenlayer/operator-guides/operator-installation).
1010

1111
## Hardware Requirements
@@ -19,7 +19,16 @@ Minimum hardware requirements:
1919
| **Bandwidth** | 1 Gbps |
2020
| **Storage** | 256 GB disk space |
2121

22-
## Building from Source (Recommended)
22+
23+
## Step 1 - Clone the repo
24+
To start with, clone the Aligned repository and move inside it
25+
26+
```bash
27+
git clone https://github.com/yetanotherco/aligned_layer.git
28+
cd aligned_layer
29+
```
30+
31+
## Step 2 - Building the Operator
2332

2433
We recommend building from source whenever possible. If using the docker image, these steps can be skipped.
2534

@@ -64,9 +73,7 @@ To see the operator version, run:
6473

6574
This will display the current version of the operator binary.
6675

67-
## Configuration
68-
69-
## When building from source
76+
## Step 3 - Update the configuration for your specific Operator
7077

7178
Update the following placeholders in `./config-files/config-operator.yaml`:
7279

@@ -80,42 +87,18 @@ Update the following placeholders in `./config-files/config-operator.yaml`:
8087
`"<ecdsa_key_store_location_path>"` and `"<bls_key_store_location_path>"` are the paths to your keys generated with the EigenLayer CLI, `"<operator_address>"` and `"<earnings_receiver_address>"` can be found in the `operator.yaml` file created in the EigenLayer registration process.
8188
The keys are stored by default in the `~/.eigenlayer/operator_keys/` directory, so for example `<ecdsa_key_store_location_path>` could be `/path/to/home/.eigenlayer/operator_keys/some_key.ecdsa.key.json` and for `<bls_key_store_location_path>` it could be `/path/to/home/.eigenlayer/operator_keys/some_key.bls.key.json`.
8289

83-
84-
## When using docker
85-
86-
Update the following placeholders in `./config-files/config-operator.docker.yaml`:
87-
88-
- `"<operator_address>"`
89-
- `"<earnings_receiver_address>"`
90-
- `"<ecdsa_key_store_password>"`
91-
- `"<bls_key_store_password>"`
92-
93-
Make sure not to update the `ecdsa_key_store_location_path` and `bls_key_store_location_path`
94-
as they are already set to the correct path.
95-
96-
Then create a .env file in `operator/docker/.env`.
97-
An example of the file can be found in `operator/docker/.env.example`.
98-
99-
The file should contain the following variables:
100-
101-
| Variable Name | Description |
102-
|-----------------------------|---------------------------------------------------------------------------------------------------------------|
103-
| `ECDSA_KEY_FILE_HOST` | Absolute path to the ECDSA key file. If generated from Eigen cli it should be in ~/.eigenlayer/operator_keys/ |
104-
| `BLS_KEY_FILE_HOST` | Absolute path to the BLS key file. If generated from Eigen cli it should be in ~/.eigenlayer/operator_keys/ |
105-
| `OPERATOR_CONFIG_FILE_HOST` | Absolute path to the operator config file. It should be path to config-files/config-operator.docker.yaml |
106-
107-
## Deposit Strategy Tokens
90+
## Step 4: Deposit Strategy Tokens
10891

10992
We are using [WETH](https://holesky.eigenlayer.xyz/restake/WETH) as the strategy token.
11093

11194
To do so there are 2 options, either doing it through EigenLayer's website, and following their guide, or running the commands specified by us below.
11295

11396
You will need to stake a minimum of a 1000 Wei in WETH. We recommend to stake a maximum amount of 10 WETH. If you are staking more than 10 WETH please unstake any surplus over 10.
11497

115-
## Option 1:
98+
### Option 1:
11699
EigenLayer's guide can be found [here](https://docs.eigenlayer.xyz/eigenlayer/restaking-guides/restaking-user-guide/liquid-restaking/restake-lsts).
117100

118-
## Option 2:
101+
### Option 2:
119102
If you have ETH and need to convert it to WETH you can use the following command, that will convert 1 Eth to WETH.
120103
Make sure to have [foundry](https://book.getfoundry.sh/getting-started/installation) installed.
121104
Change the parameter in ```---value``` if you want to wrap a different amount:
@@ -145,33 +128,17 @@ If you don't have Holesky Eth, these are some useful faucets:
145128
- [Google Cloud for Web3 Holesky Faucet](https://cloud.google.com/application/web3/faucet/ethereum/holesky)
146129
- [Holesky PoW Faucet](https://holesky-faucet.pk910.de/)
147130

148-
## Start the operator
149-
150-
## From Source (Recommended)
151-
131+
## Step 5 - Start the operator
152132
```
153133
./operator/build/aligned-operator start --config ./config-files/config-operator.yaml
154134
```
155135

156-
## Using Docker
157-
158-
Ensure you have the following installed:
159-
160-
- [Docker](https://docs.docker.com/get-docker/)
161-
- [Docker Compose](https://docs.docker.com/compose/install/)
162-
163-
Then run:
164-
165-
```bash
166-
make operator_start_docker
167-
```
168-
169-
## Unregister the operator from Aligned
136+
## Unregistering the operator
170137

171138
To unregister the Aligned operator, run:
172139

173140
```bash
174141
cast send --rpc-url https://ethereum-holesky-rpc.publicnode.com --private-key <private_key> 0x3aD77134c986193c9ef98e55e800B71e72835b62 'deregisterOperator(bytes)' 0x00
175142
```
176143

177-
`<private_key>` is the one specified in the output when generating your keys with the EigenLayer CLI.
144+
`<private_key>` is the one specified in the output when generating your keys with the EigenLayer CLI.

docs/introduction/0_what_is_aligned.md

Whitespace-only changes.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Getting started!
2+
3+
## Quickstart
4+
We will download a proviously generated SP1 proof, send it to Aligned, and retrieve the results from Ethereum Holesky testnet.
5+
6+
1. Download and install Aligned to send proofs in the testnet:
7+
8+
```bash
9+
curl -L https://raw.githubusercontent.com/yetanotherco/aligned_layer/main/batcher/aligned/install_aligned.sh | bash
10+
```
11+
12+
2. Run the ```source``` command that should appear in the shell
13+
14+
3. Download the example SP1 proof file together with the ELF file of the proved program using:
15+
16+
```bash
17+
curl -L https://raw.githubusercontent.com/yetanotherco/aligned_layer/main/batcher/aligned/get_proof_test_files.sh | bash
18+
```
19+
20+
4. Send the proof to be verified in Aligned with
21+
22+
```bash
23+
rm -rf ~/.aligned/aligned_verification_data/ &&
24+
aligned submit \
25+
--proving_system SP1 \
26+
--proof ~/.aligned/test_files/sp1_fibonacci.proof \
27+
--vm_program ~/.aligned/test_files/sp1_fibonacci-elf \
28+
--aligned_verification_data_path ~/.aligned/aligned_verification_data \
29+
--conn wss://batcher.alignedlayer.com
30+
```
31+
32+
5. You should get a response like this:
33+
34+
```bash
35+
[2024-06-17T22:06:03Z INFO aligned] Proof submitted to aligned. See the batch in the explorer:
36+
https://explorer.alignedlayer.com/batches/0x8ea98526e48f72d4b49ad39902fb320020d3cf02e6506c444300eb3619db4c13
37+
[2024-06-17T22:06:03Z INFO aligned] Batch inclusion data written into /Users/maurofab/aligned_verification_data/8ea98526e48f72d4b49ad39902fb320020d3cf02e6506c444300eb3619db4c13_225.json
38+
[2024-06-17T22:06:03Z INFO aligned] All messages responded. Closing connection...
39+
https://explorer.alignedlayer.com/batches/0x8ea98526e48f72d4b49ad39902fb320020d3cf02e6506c444300eb3619db4c13```
40+
```
41+
42+
Use the link in the response to check the status of your transaction in the Aligned explorer.
43+
44+
6. After three Ethereum blocks, you should be able to check if it has been verified with the CLI using
45+
46+
```bash
47+
aligned verify-proof-onchain \
48+
--aligned-verification-data ~/.aligned/aligned_verification_data/*.json \
49+
--rpc https://ethereum-holesky-rpc.publicnode.com \
50+
--chain holesky
51+
```
52+
53+
This is reading the result of the verification of the proof in Ethereum.
54+
55+
7. You should get this result:
56+
57+
```bash
58+
[2024-06-17T21:58:43Z INFO aligned] Your proof was verified in Aligned and included in the batch!
59+
```
60+
61+
If the proof wasn't verified you should get this result:
62+
63+
```bash
64+
[2024-06-17T21:59:09Z INFO aligned] Your proof was not included in the batch.
65+
```
66+
67+
Aligned works in:
68+
- MacOS Arm64 (M1 or higher)
69+
- Linux x86 with GLIBC_2.32 or superior (For example, Ubuntu 22.04 or higher)
70+
71+
If you don't meet these requirements, you can compile the binaries yourself following the [README](https://github.com/yetanotherco/aligned_layer)
72+
73+
To try Aligned with other proving systems, check the [this]() guide

0 commit comments

Comments
 (0)