Skip to content

Support for BLS signatures #16038

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
0xTimepunk opened this issue May 7, 2025 · 2 comments
Open

Support for BLS signatures #16038

0xTimepunk opened this issue May 7, 2025 · 2 comments
Labels

Comments

@0xTimepunk
Copy link

Hello, this document is to stir up discussion around BLS signature support in solidity and what needs to be done to have the precompile available for developers given pectra update today

Abstract

Create support for BLS signatures in solidity just like ecrecover precompile

Motivation

The need to support BLS as a precompile given Pectra update

Specification

Backwards Compatibility

Thank you

@nikola-matic
Copy link
Collaborator

Hi @0xTimepunk,

Just to preface - we're not technically against introducing another builtin (obviously there is already precedent in terms of ripemd160, ecrecover, sha256), but I'm just curious as to why do you think this should be supported by the compiler rather than being implemented in a library?

The compiler implementation is fairly trivial in terms of codegen, but would introduce annoying shadowing warnings for people who already have whatever name we choose for the BLS builtin in their code base (example below is for sha256 shadowing):

4 | 	function sha256(bytes memory data) public pure returns (bytes32) {
  | 	^ (Relevant source part starts here and spans across multiple lines).

In summary, why do you think this should be a compiler builtin vs a library function?

@0xTimepunk
Copy link
Author

0xTimepunk commented May 20, 2025

Just think it would be more straightforward for developers, just like ecrecover is available, to quickly selects bls. Maybe a clever naming can be found so that there is less chances of shadowing

@nikola-matic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants