Skip to content

Commit 09050c0

Browse files
docs: update readme (#486)
Co-authored-by: Mauro Toscano <[email protected]>
1 parent f8a055d commit 09050c0

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

README.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
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.
20+
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.
2022

2123
## How to use the testnet
2224

@@ -94,17 +96,23 @@ make uninstall_aligned
9496
make install_aligned_compiling
9597
```
9698

97-
### Explanation of how the results of the proof verification in Ethereum
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.
98106

99-
This is the same as running the following curl, with the proper CALL_DATA.
107+
That command is doing the same as the following `curl` to an Ethereum node.
100108

101109
```bash
102110
curl -H "Content-Type: application/json" \
103111
--data '{"jsonrpc":"2.0","method":"eth_call","id":1, "params":[{"to": "0x58F280BeBE9B34c9939C3C39e0890C81f163B623", "data": "<CALL_DATA>"}]}' \
104112
-X POST https://ethereum-holesky-rpc.publicnode.com
105113
```
106114

107-
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.
108116
109117
For example, this a correct calldata for a verified proof:
110118
@@ -114,23 +122,28 @@ curl -H "Content-Type: application/json" \
114122
-X POST https://ethereum-holesky-rpc.publicnode.com
115123
```
116124
117-
To get the call data for yours, you can use the ```encode_verification_data.py```:
125+
To generate the calldata yourself, follow these steps:
118126
119-
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
120129
121130
```bash
122131
python3 -m venv .aligned_venv
123132
source .aligned_venv/bin/activate
124133
python3 -m pip install -r examples/verify/requirements.txt
125134
```
126135
127-
Then:
136+
3. Encode your proof verification data with
128137
129138
```bash
130139
python3 examples/verify/encode_verification_data.py --aligned-verification-data ~/.aligned/aligned_verification_data/*.json
131140
```
141+
142+
If your verification data is in another path, just change the `--aligned-verification-data` parameter.
132143
133-
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:
144+
#### Using a caller contract
145+
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:
134147
135148
```solidity
136149
(bool callWasSuccessfull, bytes memory proofIsIncluded) = targetContract.staticcall(
@@ -148,13 +161,6 @@ If you want to verify your proof in your own contract, use a static call to the
148161
require(callWasSuccessfull, "static_call failed");
149162
```
150163
151-
If you want to learn more about how to check if your proof was verified in aligned,
152-
check the [Guide](./examples/verify/README.md).
153-
154-
If you want to send more types of proofs, read our [send proofs guide](./README_SEND_PROOFS.md).
155-
156-
If you want to know more about Aligned, read our [docs](docs/README.md).
157-
158164
## Operator Guide
159165
160166
If you want to run an operator, check our [Operator Guide](./README_OPERATOR.md)

0 commit comments

Comments
 (0)