We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31e03ca commit 3afdc81Copy full SHA for 3afdc81
src/Nethermind/Nethermind.Evm/Precompiles/Bls/PairingCheckPrecompile.cs
@@ -46,6 +46,7 @@ private PairingCheckPrecompile() { }
46
var acc = GT.One(buf.AsSpan());
47
GT p = new(buf.AsSpan()[GT.Sz..]);
48
49
+ bool hasInf = false;
50
for (int i = 0; i < inputData.Length / PairSize; i++)
51
{
52
int offset = i * PairSize;
@@ -61,14 +62,15 @@ private PairingCheckPrecompile() { }
61
62
// x == inf || y == inf -> e(x, y) = 1
63
if (x.IsInf() || y.IsInf())
64
65
+ hasInf = true;
66
continue;
67
}
68
69
p.MillerLoop(y, x);
70
acc.Mul(p);
71
72
- bool verified = acc.FinalExp().IsOne();
73
+ bool verified = hasInf || acc.FinalExp().IsOne();
74
byte[] res = new byte[32];
75
if (verified)
76
0 commit comments