Overview
Address:0x000000000000000000000000000000000000000e
Introduced: Prague (EIP-2537)
EIP: EIP-2537
The BLS12-381 G2 Add precompile performs point addition on the BLS12-381 curve’s G2 group. It adds two G2 points together, computing point1 + point2. This operation is essential for BLS signature aggregation and advanced cryptographic protocols requiring operations over extension fields.
BLS12-381 provides 128 bits of security (compared to BN254’s 80 bits) and is used in Ethereum 2.0’s consensus layer for validator signature verification.
Gas Cost
Fixed:800 gas
G2 vs G1
G2 points are defined over the extension field Fp2 (quadratic extension of the base field):- G1 points: 128 bytes (64 bytes per coordinate, 2 coordinates)
- G2 points: 256 bytes (128 bytes per coordinate, 2 coordinates)
- Field representation: Each G2 coordinate is an Fp2 element (c0 + c1*u)
- Computational cost: G2 operations are more expensive than G1 due to extension field arithmetic
Input Format
c0 + c1*u where u is the extension field element.
Points must satisfy the G2 curve equation: y^2 = x^3 + 4(1 + u) over Fp2.
Output Format
Usage Example
TypeScript
Zig
Error Conditions
- Out of gas: gasLimit < 800
- Invalid input length: input.len != 512
- Point not on curve: coordinates don’t satisfy G2 curve equation
- Invalid field element: coordinate component >= field modulus
- Invalid encoding: malformed Fp2 element representation
Use Cases
- BLS signature aggregation: Combine multiple G2 signatures
- Multi-signature schemes: Aggregate public keys or signatures
- Threshold cryptography: Combine signature shares
- Proof aggregation: Combine multiple proofs efficiently
- Ethereum 2.0 consensus: Validator signature operations
Implementation Details
- Zig: Uses BLST library via crypto module
- TypeScript: Wraps @noble/curves bls12-381 G2 operations
- Algorithm: Projective coordinates for efficiency
- Security: 128-bit security level (vs BN254’s 80-bit)
- Constant-time: Implementation resistant to timing attacks
Special Cases
- Point at infinity: All zeros (256 bytes) represents identity element
- Identity + P: Returns P
- P + (-P): Returns point at infinity
- Identity + identity: Returns identity
Extension Field Arithmetic
G2 points use the quadratic extension field Fp2:- Field elements:
a = a.c0 + a.c1*uwhere u^2 + 1 = 0 - Addition:
(a + b) = (a.c0 + b.c0) + (a.c1 + b.c1)*u - Multiplication: More complex due to extension field rules
- Encoding: Each component (c0, c1) is 64 bytes big-endian
Gas Comparison
| Operation | G1 Gas | G2 Gas | Ratio |
|---|---|---|---|
| Addition | 500 | 800 | 1.6x |
| Multiplication | 12,000 | 45,000 | 3.75x |
| MSM (per point) | ~12,000 | ~45,000 | 3.75x |
- Extension field arithmetic (Fp2 vs Fp)
- Larger point representation (256 vs 128 bytes)
- More complex coordinate operations
Security Considerations
BLS12-381 advantages over BN254:- Security level: 128 bits vs 80 bits
- Future-proof: Resistant to known attacks on pairing curves
- Standardization: Used in Ethereum 2.0, Zcash, Filecoin
- Performance: Efficient pairing computation
Performance Notes
- G2 addition is ~60% more expensive than G1 addition (800 vs 500 gas)
- Prefer batching operations when possible
- Consider using MSM for multiple operations with same points
- G2 operations required for signature verification in BLS schemes

