Skip to content

Commit 9ccf12c

Browse files
authored
Update EIP-2537: rename PAIRING to PAIRING_CHECK; introduce PAIRING_PRODUCT precomiple
Merged by EIP-Bot.
1 parent 4fb310b commit 9ccf12c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

EIPS/eip-2537.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The motivation of this precompile is to add a cryptographic primitive that allow
3333
| BLS12_G2ADD | 0x0e | precompile address |
3434
| BLS12_G2MUL | 0x0f | precompile address |
3535
| BLS12_G2MSM | 0x10 | precompile address |
36-
| BLS12_PAIRING | 0x11 | precompile address |
36+
| BLS12_PAIRING_CHECK | 0x11 | precompile address |
3737
| BLS12_MAP_FP_TO_G1 | 0x12 | precompile address |
3838
| BLS12_MAP_FP2_TO_G2 | 0x13 | precompile address |
3939

@@ -45,7 +45,7 @@ If `block.timestamp >= FORK_TIMESTAMP` we introduce *nine* separate precompiles
4545
- BLS12_G2ADD - to perform point addition in G2 (curve over quadratic extension of the base prime field) with a gas cost of `800` gas
4646
- BLS12_G2MUL - to perform point multiplication in G2 (curve over quadratic extension of the base prime field) with a gas cost of `45000` gas
4747
- BLS12_G2MSM - to perform multi-scalar-multiplication (MSM) in G2 (curve over quadratic extension of the base prime field) with a gas cost formula defined in the corresponding section
48-
- BLS12_PAIRING - to perform a pairing operations between a set of *pairs* of (G1, G2) points a gas cost formula defined in the corresponding section
48+
- BLS12_PAIRING_CHECK - to perform a pairing operations between a set of *pairs* of (G1, G2) points a gas cost formula defined in the corresponding section
4949
- BLS12_MAP_FP_TO_G1 - maps base field element into the G1 point with a gas cost of `5500` gas
5050
- BLS12_MAP_FP2_TO_G2 - maps extension field element into the G2 point with a gas cost of `75000` gas
5151

@@ -115,7 +115,7 @@ On inputs that can not be a valid encodings of field elements the precompile *mu
115115

116116
#### Encoding of points in G1/G2:
117117

118-
Points of G1 and G2 are encoded as byte concatenation of the respective encodings of the `x` and `y` coordinates. Total encoding length for a G1 point is thus `128` bytes and for a G2 point is `256` bytes.
118+
Points of G1 and G2 are encoded as byte concatenation of the respective encodings of the `x` and `y` coordinates. Total encoding length for a G1 point is thus `128` bytes and for a G2 point is `256` bytes.
119119

120120
#### Point of infinity encoding:
121121

@@ -203,9 +203,9 @@ Error cases:
203203
- An input is on the G2 elliptic curve but not in the correct subgroup
204204
- Input has invalid length
205205

206-
#### ABI for pairing
206+
#### ABI for pairing check
207207

208-
Pairing call expects `384*k` (`k` being a **positive** integer) bytes as an inputs that is interpreted as byte concatenation of `k` slices. Each slice has the following structure:
208+
Pairing check call expects `384*k` (`k` being a **positive** integer) bytes as an inputs that is interpreted as byte concatenation of `k` slices. Each slice has the following structure:
209209

210210
- `128` bytes of G1 point encoding
211211
- `256` bytes of G2 point encoding
@@ -285,9 +285,9 @@ Discounts table as a vector of pairs `[k, discount]`:
285285

286286
`max_discount = 174`
287287

288-
#### Pairing operation
288+
#### Pairing check operation
289289

290-
The cost of the pairing operation is `43000*k + 65000` where `k` is a number of pairs.
290+
The cost of the pairing check operation is `43000*k + 65000` where `k` is a number of pairs.
291291

292292
#### Fp-to-G1 mapping operation
293293

0 commit comments

Comments
 (0)