BLS12_G1MSM
Elliptic curve
Multi-scalar multiplication in the BLS12-381 G1 group.
| Address | 0x000000000000000000000000000000000000000c |
|---|---|
| Name | BLS12_G1MSM |
| Minimum gas | 12,000 |
| Input | a multiple of 160 bytes |
| Output | 128 bytes |
| Available since | Prague |
Input
point128 B
scalar32 B
| Offset | Length | Field | Description |
|---|---|---|---|
| 0 | 128 | point | A G1 point. |
| 128 | 32 | scalar | The scalar for that point, big-endian. |
Output
The resulting 128-byte G1 point.
Gas
k × 12000 × discount(k) / 1000, where k is the number of (point, scalar) pairs
The discount table rewards batching: a single pair pays full price, and the per-pair price falls as k grows, bottoming out for large batches.
Failure behaviour
- Reverts on empty input or an input length that is not a positive multiple of 160.
- 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_G1MSM at 0x0c(bool ok, bytes memory out) = address(0x0c).staticcall(input);require(ok, "BLS12_G1MSM reverted");Specification
- EIP-2537: Precompile for BLS12-381 curve operations