Skip to content

BLS12_G1ADD

Elliptic curve

Point addition in the BLS12-381 G1 group.

Address0x000000000000000000000000000000000000000b
NameBLS12_G1ADD
Minimum gas375
Input256 bytes
Output128 bytes
Available sincePrague

Input

point_a128 B
point_b128 B
OffsetLengthFieldDescription
0128point_aFirst G1 point: x and y, each a 64-byte field element.
128128point_bSecond 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