prestwich / b12-sol

BLS 12-381 and 12-377 precompile access in solidity
11 stars 5 forks source link

Map to G1 and G2 #3

Open mehrafarin-k opened 1 year ago

mehrafarin-k commented 1 year ago

I have a problem with using map to g1 and map to g2 functions. I've tried to call mapToG1 function with this input:

[26919105267321020734406576177800653871,44705956066366415409607097651358312499203321806734079377348087001704912294736]

which is correspond to the first element of the test vector at test/12381/blsMapG1.json:

{
    "Input": "0000000000000000000000000000000014406e5bfb9209256a3820879a29ac2f62d6aca82324bf3ae2aa7d3c54792043bd8c791fccdb080c1a52dc68b8b69350",
    "Expected": "000000000000000000000000000000000d7721bcdb7ce1047557776eb2659a444166dc6dd55c7ca6e240e21ae9aa18f529f04ac31d861b54faf3307692545db700000000000000000000000000000000108286acbdf4384f67659a8abe89e712a504cb3ce1cba07a716869025d60d499a00d1da8cdc92958918c222ea93d87f0",
    "Name": "matter_fp_to_g1_0",
    "Gas": 5500,
    "NoBenchmark": false
  }

but the transaction was reverted by error "gas uint64 overflow". this is the txid of the transaction: https://celoscan.io/tx/0xfadb5ef471db20c33a89fa43b4b6401dcdf53993978f73521d7335ab7f746ca4

I couldn't find any test for these two functions in your code. can you help me with this problem?