Skip to content

Commit 742d55a

Browse files
xqftilitteri
andauthored
chore(l2): use SP1 patch for ecpairing precompile (#4809)
**Motivation** Elliptic Curve pairing is one of the most expensive operations in a zkVM .We are using lambdaworks for implementing the ecpairing precompile, which is not optimized for zkVMs. We must use each zkVM pairing patch/precompile instead. This is true for other operations as well, like ecmul or ecadd, which can be optimized the same way in future PRs **Flamegraphs** for block 23385900 Mainnet ecpairing cycles are reduced from 135k to 6k, which is a 10% improvement in the total cycles. before: <img width="3024" height="1326" alt="image" src="https://github.com/user-attachments/assets/7cdfa17d-2c91-4c12-9b42-fe1755bfa8d9" /> after: <img width="3024" height="1326" alt="image" src="https://github.com/user-attachments/assets/da5228db-32a8-4cb4-8b85-2f5bc6124fc0" /> --------- Co-authored-by: ilitteri <[email protected]>
1 parent 656d028 commit 742d55a

File tree

6 files changed

+457
-370
lines changed

6 files changed

+457
-370
lines changed

Cargo.lock

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)