Skip to content

Commit eb516b6

Browse files
committed
Improve env.json bn254 documentation
1 parent e677a81 commit eb516b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

soroban-env-common/env.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2367,7 +2367,7 @@
23672367
{ "name": "point2", "type": "BytesObject" }
23682368
],
23692369
"return": "BytesObject",
2370-
"docs": "Adds two BN254 G1 points; encoding is 64-byte be_bytes(X)||be_bytes(Y); infinity is all-zeroes. No subgroup check.",
2370+
"docs": "Adds two BN254 G1 points. G1 encoding: 64-byte uncompressed format: be_bytes(X)||be_bytes(Y), where X and Y are 32-byte big-endian Fp field elements. The two flag bits (bit 0 and 1) of the first byte must be unset -- infinity is represented as 64 zero bytes. Points must be on curve.",
23712371
"min_supported_protocol": 25
23722372
},
23732373
{
@@ -2378,7 +2378,7 @@
23782378
{ "name": "scalar", "type": "U256Val" }
23792379
],
23802380
"return": "BytesObject",
2381-
"docs": "Multiplies a BN254 G1 point by a scalar (Fr); same encoding as bn254_g1_add.",
2381+
"docs": "Multiplies a BN254 G1 point by a scalar from the scalar field Fr. The point uses the same 64-byte encoding as bn254_g1_add. The scalar is a U256Val representing a 256-bit integer that is reduced modulo the Fr field order.",
23822382
"min_supported_protocol": 25
23832383
},
23842384
{
@@ -2389,7 +2389,7 @@
23892389
{ "name": "vp2", "type": "VecObject" }
23902390
],
23912391
"return": "Bool",
2392-
"docs": "Performs BN254 pairings over vectors of G1 and G2 points; returns true iff product equals 1 in Fq12.",
2392+
"docs": "Performs BN254 multi-pairing check over equal-length non-empty vectors of G1 and G2 points. Returns true iff the product of pairings e(G1[0],G2[0])*...*e(G1[n-1],G2[n-1]) equals 1 in Fq12. G1 encoding: 64 bytes as in bn254_g1_add. G2 encoding: 128-byte uncompressed format: be_bytes(X)||be_bytes(Y), where X and Y are Fp2 elements (64 bytes each). Fp2 element encoding: be_bytes(c1)||be_bytes(c0) where c0 is the real part and c1 is the imaginary part (each 32-byte big-endian Fp). The two flag bits (bit 0 and 1) of the first byte must be unset -- G2 infinity is 128 zero bytes. G2 points must be on curve AND in the correct subgroup.",
23932393
"min_supported_protocol": 25
23942394
},
23952395
{

0 commit comments

Comments
 (0)