Skip to content

Add EIP-2537 BLS12-381 precompiles for trustless Ethereum bridging#2895

Open
iownducks wants to merge 2 commits intosei-protocol:mainfrom
iownducks:main
Open

Add EIP-2537 BLS12-381 precompiles for trustless Ethereum bridging#2895
iownducks wants to merge 2 commits intosei-protocol:mainfrom
iownducks:main

Conversation

@iownducks
Copy link

Summary

Adds the seven EIP-2537 BLS12-381 precompiled contracts to Sei's
EVM at addresses 0x0b0x11, aligning Sei with Ethereum's
Pectra upgrade. This enables Sei smart contracts to natively
verify Beacon Chain validator BLS signatures, which is the
foundation for building a fully trustless light-client bridge
between Sei and Ethereum.

Motivation

Today, bridges between Sei and Ethereum rely on multisigs or
oracle committees — trusted intermediaries that introduce security
assumptions and attack surface. Ethereum's consensus layer signs
everything with BLS12-381. By adding native support for these
curve operations, Sei contracts can directly verify those
signatures on-chain, removing the need for trusted third parties.

What's included

  • 7 EIP-2537 precompiles — G1ADD, G1MSM, G2ADD, G2MSM,
    PAIRING_CHECK, MAP_FP_TO_G1, MAP_FP2_TO_G2
  • Wraps go-ethereum's native implementations using the audited
    gnark-crypto library — no custom curve math
  • Raw calldata interface per EIP-2537 spec (no ABI encoding)
  • Correct gas costs matching Ethereum's pricing model with MSM
    discount tables
  • Full input validation — field modulus checks, on-curve
    checks, subgroup membership enforcement
  • 15 unit tests covering all operations, invalid inputs, gas
    costs, and address verification
  • SIP proposal document with specification details
  • Solidity test contract (BLSCheck.sol) for on-chain
    verification

Files changed

File Change
precompiles/bls/bls.go Core precompile wrappers around
native go-ethereum BLS types
precompiles/bls/bls_test.go Unit tests for all 7 operations

|
| precompiles/bls/abi.json | Empty (raw precompiles don't use
ABI encoding) |
| precompiles/setup.go | Register BLS precompiles in Sei's
precompile system |
| contracts/BLSCheck.sol | Solidity contract to verify
precompiles work on-chain |
| SIP-EIP-2537-BLS.md | Proposal document |
| go.mod | Dependency cleanup |

Test plan

  • All 15 BLS unit tests pass (go test ./precompiles/bls/ -v)
  • precompiles package builds cleanly
  • gofmt compliant
  • Integration test with full node
  • Verify BLSCheck.sol on devnet

iownducks and others added 2 commits February 16, 2026 06:03
…ion, tests, documentation, and integration into the precompile setup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant