Skip to content

Conversation

@avilagaston9
Copy link
Contributor

@avilagaston9 avilagaston9 commented Jun 13, 2025

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

@github-actions
Copy link

github-actions bot commented Jun 13, 2025

Lines of code report

Total lines added: 30
Total lines removed: 16
Total lines changed: 46

Detailed view
+--------------------------------------------------+-------+------+
| File                                             | Lines | Diff |
+--------------------------------------------------+-------+------+
| ethrex/crates/l2/contracts/bin/deployer/main.rs  | 780   | -6   |
+--------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/backends/sp1.rs      | 95    | -1   |
+--------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/zkvm/interface/build.rs  | 57    | +7   |
+--------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/errors.rs             | 265   | -2   |
+--------------------------------------------------+-------+------+
| ethrex/crates/l2/utils/prover/proving_systems.rs | 104   | -7   |
+--------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/clients/eth/mod.rs  | 1246  | +23  |
+--------------------------------------------------+-------+------+

@avilagaston9 avilagaston9 self-assigned this Jun 18, 2025
@avilagaston9 avilagaston9 changed the base branch from main to l2/fix/use_aligned_sdk_release June 18, 2025 20:19
@avilagaston9 avilagaston9 marked this pull request as ready for review June 19, 2025 13:45
@avilagaston9 avilagaston9 requested review from a team, ManuelBilbao and jrchatruc as code owners June 19, 2025 13:45
> Save the addresses of the deployed proxy contracts, as you will need them to run the L2 node.
### 2. Deposit funds to the `AlignedBatchePaymentService` contract from the proof sender
### 3. Deposit funds to the `AlignedBatchePaymentService` contract from the proof sender
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean AlignedBatcherPaymentService?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed 397e0c7!


if aligned_mode == "true" {
let vk = vk.vk.hash_bytes();
dbg!(&vk);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed or replaced with a print.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed 39425e1!

@ManuelBilbao ManuelBilbao added the L2 Rollup client label Jun 24, 2025
Base automatically changed from l2/fix/use_aligned_sdk_release to main June 24, 2025 15:12
@ManuelBilbao ManuelBilbao added this pull request to the merge queue Jun 24, 2025
Merged via the queue into main with commit d671a80 Jun 24, 2025
31 checks passed
@ManuelBilbao ManuelBilbao deleted the l2/refactor/aligned_use_hardcoded_vk branch June 24, 2025 19:17
pedrobergamini pushed a commit to pedrobergamini/ethrex that referenced this pull request Aug 24, 2025
**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 lambdaclass#3030

---------

Co-authored-by: Ivan Litteri <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L2 Rollup client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

L2: Hardcode Aligned SP1 Verification Key

5 participants