You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(l2): use hardcoded vk in Aligned mode (#3175)
**Motivation**
We are passing the verification key every time we call
`verifyBatchAligned()`.
**Description**
- Initializes `SP1_VERIFICATION_KEY` in the `OnChainProposer` contract
with the Aligned vk and reuses it in `verifyBatchAligned()`.
- Since `l1_proof_verifier` needs the vk for
`aligned_sdk:check_proof_verification()`, it retrieves it from the
contract as well.
Closes#3030
---------
Co-authored-by: Ivan Litteri <[email protected]>
> In this step we are initiallizing the `OnChainProposer` contract with the `ALIGNED_PROOF_AGGREGATOR_SERVICE_ADDRESS` and skipping the rest of verifiers.
33
48
> Save the addresses of the deployed proxy contracts, as you will need them to run the L2 node.
34
49
35
-
### 2. Deposit funds to the `AlignedBatchePaymentService` contract from the proof sender
50
+
### 3. Deposit funds to the `AlignedBatcherPaymentService` contract from the proof sender
36
51
37
52
```bash
38
53
aligned \
@@ -44,7 +59,7 @@ aligned \
44
59
> [!IMPORTANT]
45
60
> Using the [Aligned CLI](https://docs.alignedlayer.com/guides/9_aligned_cli)
46
61
47
-
### 3. Running a node
62
+
### 4. Running a node
48
63
49
64
In a console with `ethrex/crates/l2` as the current directory, run the following command:
50
65
@@ -90,6 +105,10 @@ SP1_PROVER=cuda make init-prover PROVER=sp1 PROVER_CLIENT_ALIGNED=true
90
105
91
106
## How to Run Using an Aligned Dev Environment
92
107
108
+
> [!IMPORTANT]
109
+
> This guide asumes you have already generated the SP1 ELF Program and Verification Key. See: [Generate the SP1 ELF Program and Verification Key](#1-generate-the-sp1-elf-program-and-verification-key)
110
+
111
+
93
112
### Set Up the Aligned Environment
94
113
95
114
1. Clone the Aligned repository and checkout the currently supported release:
@@ -207,12 +226,24 @@ SP1_PROVER=cuda make init-prover PROVER=sp1 PROVER_CLIENT_ALIGNED=true
207
226
208
227
### Aggregate proofs:
209
228
210
-
After some time, you will see that the `l1_proof_verifier` is waiting for Aligned to aggregate the proofs. You can aggregate them by running:
229
+
After some time, you will see that the `l1_proof_verifier` is waiting for Aligned to aggregate the proofs:
230
+
```
231
+
2025-06-18T22:03:53.470356Z INFO ethrex_l2::sequencer::l1_proof_verifier: Batch 1 has not yet been aggregated by Aligned. Waiting for 5 seconds
232
+
```
233
+
234
+
You can aggregate them by running:
211
235
```
212
236
cd aligned_layer
213
237
make start_proof_aggregator AGGREGATOR=sp1
214
238
```
215
239
240
+
If successful, the `l1_proof_verifier` will print the following logs:
241
+
242
+
```
243
+
INFO ethrex_l2::sequencer::l1_proof_verifier: Proof for batch 1 aggregated by Aligned with commitment 0xa9a0da5a70098b00f97d96cee43867c7aa8f5812ca5388da7378454580af2fb7 and Merkle root 0xa9a0da5a70098b00f97d96cee43867c7aa8f5812ca5388da7378454580af2fb7
244
+
INFO ethrex_l2::sequencer::l1_proof_verifier: Batch 1 verified in AlignedProofAggregatorService, with transaction hash 0x731d27d81b2e0f1bfc0f124fb2dd3f1a67110b7b69473cacb6a61dea95e63321
0 commit comments