solidity icon indicating copy to clipboard operation
solidity copied to clipboard

Support for BLS signatures

Open 0xTimepunk opened this issue 7 months ago • 2 comments

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

0xTimepunk avatar May 07 '25 12:05 0xTimepunk

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?

nikola-matic avatar May 07 '25 13:05 nikola-matic

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

0xTimepunk avatar May 20 '25 10:05 0xTimepunk