BLS12_G2MSM
Elliptic curve
Multi-scalar multiplication in the BLS12-381 G2 group.
| Address | 0x000000000000000000000000000000000000000e |
|---|---|
| Name | BLS12_G2MSM |
| Minimum gas | 22,500 |
| Input | a multiple of 288 bytes |
| Output | 256 bytes |
| Available since | Prague |
Input
point256 B
scalar32 B
| Offset | Length | Field | Description |
|---|---|---|---|
| 0 | 256 | point | A G2 point. |
| 256 | 32 | scalar | The scalar for that point, big-endian. |
Output
The resulting 256-byte G2 point.
Gas
k × 22500 × discount(k) / 1000, where k is the number of (point, scalar) pairs
Failure behaviour
- Reverts on empty input or an input length that is not a positive multiple of 288.
- 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_G2MSM at 0x0e(bool ok, bytes memory out) = address(0x0e).staticcall(input);require(ok, "BLS12_G2MSM reverted");Specification
- EIP-2537: Precompile for BLS12-381 curve operations