BLS12-381 operations
Question
How are the new BLS12-381 precompiles being used since Pectra went live?
Background
EIP-2537 added nine BLS12-381 precompiles at addresses 0x0b through 0x13, activated with the Pectra hard fork. These enable native BLS signature verification and other pairing-based cryptography on the BLS12-381 curve (the curve used by Ethereum's consensus layer).
| Address | Name | Function |
|---|---|---|
0x0b | g1add | G1 point addition |
0x0c | g1mul | G1 scalar multiplication |
0x0d | g1multiexp | G1 multi-scalar multiplication |
0x0e | g2add | G2 point addition |
0x0f | g2mul | G2 scalar multiplication |
0x10 | g2multiexp | G2 multi-scalar multiplication |
0x11 | pairing | BLS12-381 pairing check |
0x12 | map_fp_to_g1 | Map field element to G1 |
0x13 | map_fp2_to_g2 | Map field element to G2 |
Despite Pectra being live for the entire analysis window, BLS12-381 usage is extremely sparse — only 63 calls total.
Investigation
Gas distribution
Gas costs vary by operation type and input size.
View Query: precompile_bls12_gas_dist
No callers chart for BLS12-381. The self-join query needed for caller resolution uses a reduced ~6,000 block window, and that window contained zero BLS12-381 calls. All 63 calls landed in blocks 24,393,600 to 24,422,400, well before the callers sample window.
Takeaways
- Only 63 BLS12-381 calls total across the entire 426K-block analysis window, all concentrated in blocks 24,393,600 to 24,422,400
- g2multiexp accounts for 48 of those 63 calls, consuming 292M gas
- g1mul, pairing, g1multiexp, g2mul, and g2add have single-digit usage each
- g1add, map_fp_to_g1, and map_fp2_to_g2 have zero calls in this window