stellar / rs-soroban-env

Rust environment for Soroban contracts.
Apache License 2.0
61 stars 42 forks source link

BLS12-381 host functions #1456

Closed jayz22 closed 2 weeks ago

jayz22 commented 1 month ago

What

This PR adds support for BLS12-381 in Soroban, by adding host functions for the field and curve operations, new metering cost types, and their calibration.

Why

Please refer to the CAP for motivation and design rationale.

Known limitations

The unit tests currently covers the low-level operations: G1/G2 operations, hashing to curve, pairing. More test coverage will be added before the PR merged, at the integration level such as BLS signature and the Ethereum test vectors.