Skip to content

Commit 63aa33c

Browse files
authored
Merge branch 'main' into 480-chore-implement-pausable-in-servicemanager
2 parents 965371b + 09050c0 commit 63aa33c

File tree

1 file changed

+49
-50
lines changed

1 file changed

+49
-50
lines changed

README.md

Lines changed: 49 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -16,59 +16,30 @@
1616

1717
## The Project
1818

19-
Aligned works with EigenLayer to leverage Ethereum consensus mechanism for ZK proof verification. Working outside the EVM, this allows for cheap verification of any proving system. This enables the usage of cutting edge algorithms, that may use new techniques to prove even faster. Even more, proving systems that reduce the proving overhead and add verifier overhead, now become economically feasible to verify thanks to Aligned.
19+
Aligned is a decentralized network of nodes that verifies Zero-Knowledge and Validity proofs and post the results in Ethereum.
2020

21-
## Operator Guide
22-
23-
If you want to run an operator, check our [Operator Guide](./README_OPERATOR.md)
24-
25-
## Aligned Infrastructure Guide
26-
27-
If you are developing in Aligned, or want to run your own devnet, check our [Infrastructure Guide](./README_INFRASTRUCTURE.md)
21+
These proofs can be generated and used for a tenth of the price and very low latency, allowing novel types of applications that weren't possible before in Ethereum.
2822

2923
## How to use the testnet
3024

31-
### Contract Information
32-
33-
Testnet contract is deployed on Holesky on the address:
34-
35-
```0x58F280BeBE9B34c9939C3C39e0890C81f163B623```
36-
37-
### How to use the testnet
38-
39-
Download and install Aligned to send proofs in the testnet:
25+
1. Download and install Aligned to send proofs in the testnet:
4026

4127
```bash
4228
curl -L https://raw.githubusercontent.com/yetanotherco/aligned_layer/main/batcher/aligned/install_aligned.sh | bash
4329
```
4430

45-
Then run the ```source``` command that should appear in the shell
46-
47-
If you are experiencing issues, upgrade by running the same command.
48-
49-
The downloaded binaries require:
50-
51-
- MacOS Arm64 (M1 or higher)
52-
- Linux x86 with GLIBC_2.32 or superior (For example, Ubuntu 22.04 or higher)
53-
54-
If you don't meet these requirements, clone the repository, install rust, and then run:
55-
56-
```bash
57-
make uninstall_aligned
58-
make install_aligned_compiling
59-
```
60-
61-
### Try it!
31+
2. Then run the ```source``` command that should appear in the shell
6232

63-
We are going to download a proof previously generated, send it to Aligned, and retrieve the results from Ethereum Holesky testnet. Aligned is using EigenLayer to do a fast and cheap verification of more than one thousand proofs per second.
6433

65-
Download an example SP1 proof file with it's ELF file using:
34+
3. Download an example SP1 proof file with it's ELF file using:
6635

6736
```bash
6837
curl -L https://raw.githubusercontent.com/yetanotherco/aligned_layer/main/batcher/aligned/get_proof_test_files.sh | bash
6938
```
7039

71-
Send the proof with:
40+
We are downloading a proof previously generated, sending it to Aligned, and retrieving the results from Ethereum Holesky testnet. Aligned is using EigenLayer to do a fast and cheap verification of more than one thousand proofs per second.
41+
42+
4. Let's send the proof to be verified in Aligned:
7243

7344
```bash
7445
rm -rf ~/.aligned/aligned_verification_data/ &&
@@ -80,7 +51,7 @@ aligned submit \
8051
--conn wss://batcher.alignedlayer.com
8152
```
8253

83-
You should get a response like this:
54+
5. You should get a response like this:
8455

8556
```bash
8657
[2024-06-17T22:06:03Z INFO aligned] Proof submitted to aligned. See the batch in the explorer:
@@ -90,7 +61,9 @@ You should get a response like this:
9061
https://explorer.alignedlayer.com/batches/0x8ea98526e48f72d4b49ad39902fb320020d3cf02e6506c444300eb3619db4c13```
9162
```
9263

93-
You can use the link to the explorer to check the status of your transaction. Then after three blocks, you can check if it has been verified with:
64+
You can use the link to the explorer to check the status of your transaction.
65+
66+
6. After three Ethereum blocks, you can check if it has been verified with:
9467

9568
```bash
9669
aligned verify-proof-onchain \
@@ -99,7 +72,9 @@ aligned verify-proof-onchain \
9972
--chain holesky
10073
```
10174

102-
You should get this result:
75+
This is reading the result of the verification of the proof in Ethereum.
76+
77+
7. You should get this result:
10378

10479
```bash
10580
[2024-06-17T21:58:43Z INFO aligned] Your proof was verified in Aligned and included in the batch!
@@ -111,15 +86,33 @@ If the proof wasn't verified you should get this result:
11186
[2024-06-17T21:59:09Z INFO aligned] Your proof was not included in the batch.
11287
```
11388
114-
This is the same as running the following curl, with the proper CALL_DATA.
89+
Aligned works in:
90+
- MacOS Arm64 (M1 or higher)
91+
- Linux x86 with GLIBC_2.32 or superior (For example, Ubuntu 22.04 or higher)
92+
If you don't meet these requirements, clone the repository, install rust, and then run:
93+
94+
```bash
95+
make uninstall_aligned
96+
make install_aligned_compiling
97+
```
98+
99+
### Reading the results of proof verification in Ethereum
100+
101+
102+
#### Using CURL and an Ethereum RPC
103+
In step 6 of the previous section, we used the `aligned verify-proof-onchain` to check that our proof was verified in Aligned.
104+
105+
Internally, this is making a call to our Aligned contract, verifying commitments are right, and that the proof is included in the batch.
106+
107+
That command is doing the same as the following `curl` to an Ethereum node.
115108

116109
```bash
117110
curl -H "Content-Type: application/json" \
118111
--data '{"jsonrpc":"2.0","method":"eth_call","id":1, "params":[{"to": "0x58F280BeBE9B34c9939C3C39e0890C81f163B623", "data": "<CALL_DATA>"}]}' \
119112
-X POST https://ethereum-holesky-rpc.publicnode.com
120113
```
121114

122-
This returns a 0x1 if the proof and it's associated data is correct and verified in Aligned, and 0x0 if not.
115+
This will return 0x1 if the proof and it's associated data is correct and verified in Aligned, and 0x0 if not.
123116
124117
For example, this a correct calldata for a verified proof:
125118
@@ -129,23 +122,28 @@ curl -H "Content-Type: application/json" \
129122
-X POST https://ethereum-holesky-rpc.publicnode.com
130123
```
131124
132-
To get the call data for yours, you can use the ```encode_verification_data.py```:
125+
To generate the calldata yourself, follow these steps:
133126
134-
To use it, first clone then repository, then move to the repository folder, and install the dependencies with a python venv:
127+
1. Clone the repository and move into it
128+
2. Create a Python virtual environment and install the dependencies with
135129
136130
```bash
137131
python3 -m venv .aligned_venv
138132
source .aligned_venv/bin/activate
139133
python3 -m pip install -r examples/verify/requirements.txt
140134
```
141135
142-
Then:
136+
3. Encode your proof verification data with
143137
144138
```bash
145139
python3 examples/verify/encode_verification_data.py --aligned-verification-data ~/.aligned/aligned_verification_data/*.json
146140
```
141+
142+
If your verification data is in another path, just change the `--aligned-verification-data` parameter.
143+
144+
#### Using a caller contract
147145
148-
If you want to verify your proof in your own contract, use a static call to the Aligned contract. You can use the following [Caller Contract](examples/verify/src/VerifyBatchInclusionCaller.sol) as an example. The code will look like this:
146+
To verify a proof in your own contract, use a static call to the Aligned contract. You can use the following [Caller Contract](examples/verify/src/VerifyBatchInclusionCaller.sol) as an example. The code will look like this:
149147
150148
```solidity
151149
(bool callWasSuccessfull, bytes memory proofIsIncluded) = targetContract.staticcall(
@@ -163,12 +161,13 @@ If you want to verify your proof in your own contract, use a static call to the
163161
require(callWasSuccessfull, "static_call failed");
164162
```
165163
166-
If you want to learn more about how to check if your proof was verified in aligned,
167-
check the [Guide](./examples/verify/README.md).
164+
## Operator Guide
168165
169-
If you want to send more types of proofs, read our [send proofs guide](./README_SEND_PROOFS.md).
166+
If you want to run an operator, check our [Operator Guide](./README_OPERATOR.md)
170167
171-
If you want to know more about Aligned, read our [docs](docs/README.md).
168+
## Aligned Infrastructure Guide
169+
170+
If you are developing in Aligned, or want to run your own devnet, check our [Infrastructure Guide](./README_INFRASTRUCTURE.md)
172171
173172
## FAQ
174173

0 commit comments

Comments
 (0)