BLS12_G1ADD
Elliptic curve
Point addition in the BLS12-381 G1 group.
| Address | 0x000000000000000000000000000000000000000b |
|---|---|
| Name | BLS12_G1ADD |
| Minimum gas | 375 |
| Input | 256 bytes |
| Output | 128 bytes |
| Available since | Prague |
Input
point_a128 B
point_b128 B
| Offset | Length | Field | Description |
|---|---|---|---|
| 0 | 128 | point_a | First G1 point: x and y, each a 64-byte field element. |
| 128 | 128 | point_b | Second G1 point. |
Output
The sum, a 128-byte G1 point.
Gas
375
Failure behaviour
- Reverts if the input is not exactly 256 bytes.
- Reverts if any field element is not canonically encoded — the top 16 bytes of each 64-byte element must be zero.
- Reverts if a point is not on the curve.
Calling it
Precompiles have no ABI and no function selector: the input is raw bytes at the exact offsets above. Call with staticcall.
// BLS12_G1ADD at 0x0b(bool ok, bytes memory out) = address(0x0b).staticcall(input);require(ok, "BLS12_G1ADD reverted");Specification
- EIP-2537: Precompile for BLS12-381 curve operations