BLS12_G2ADD
Elliptic curve
Point addition in the BLS12-381 G2 group.
| Address | 0x000000000000000000000000000000000000000d |
|---|---|
| Name | BLS12_G2ADD |
| Minimum gas | 600 |
| Input | 512 bytes |
| Output | 256 bytes |
| Available since | Prague |
Input
point_a256 B
point_b256 B
| Offset | Length | Field | Description |
|---|---|---|---|
| 0 | 256 | point_a | First G2 point: x and y, each a pair of 64-byte field elements. |
| 256 | 256 | point_b | Second G2 point. |
Output
The sum, a 256-byte G2 point.
Gas
600
Failure behaviour
- Reverts if the input is not exactly 512 bytes.
- Reverts on non-canonical field elements or points 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_G2ADD at 0x0d(bool ok, bytes memory out) = address(0x0d).staticcall(input);require(ok, "BLS12_G2ADD reverted");Specification
- EIP-2537: Precompile for BLS12-381 curve operations