BLS12_PAIRING_CHECK
Elliptic curve
Pairing check on BLS12-381.
| Address | 0x000000000000000000000000000000000000000f |
|---|---|
| Name | BLS12_PAIRING_CHECK |
| Minimum gas | 37,700 |
| Input | a multiple of 384 bytes |
| Output | 32 bytes |
| Available since | Prague |
Input
g1_point128 B
g2_point256 B
| Offset | Length | Field | Description |
|---|---|---|---|
| 0 | 128 | g1_point | A G1 point. |
| 128 | 256 | g2_point | The paired G2 point. |
Output
A 32-byte word: 1 if the pairing product equals one, 0 otherwise.
Gas
37700 + 32600 × (len(input) / 384)
Failure behaviour
- Reverts on empty input or an input length that is not a positive multiple of 384.
- Reverts if any point is not on the curve or not in the correct subgroup.
Calling it
Precompiles have no ABI and no function selector: the input is raw bytes at the exact offsets above. Call with staticcall.
// BLS12_PAIRING_CHECK at 0x0f(bool ok, bytes memory out) = address(0x0f).staticcall(input);require(ok, "BLS12_PAIRING_CHECK reverted");Specification
- EIP-2537: Precompile for BLS12-381 curve operations