@@ -353,11 +353,11 @@ private static boolean validateV(byte[] v) {
353
353
354
354
/**
355
355
* Computes modular exponentiation on big numbers
356
- *
356
+ * <p>
357
357
* format of data[] array: [length_of_BASE] [length_of_EXPONENT] [length_of_MODULUS] [BASE]
358
358
* [EXPONENT] [MODULUS] where every length is a 32-byte left-padded integer representing the
359
359
* number of bytes. Call data is assumed to be infinitely right-padded with zero bytes.
360
- *
360
+ * <p>
361
361
* Returns an output as a byte array with the same length as the modulus
362
362
*/
363
363
public static class ModExp extends PrecompiledContract {
@@ -470,11 +470,11 @@ private BigInteger parseArg(byte[] data, int offset, int len) {
470
470
471
471
/**
472
472
* Computes point addition on Barreto–Naehrig curve. See {@link BN128Fp} for details<br/> <br/>
473
- *
473
+ * <p>
474
474
* input data[]:<br/> two points encoded as (x, y), where x and y are 32-byte left-padded
475
475
* integers,<br/> if input is shorter than expected, it's assumed to be right-padded with zero
476
476
* bytes<br/> <br/>
477
- *
477
+ * <p>
478
478
* output:<br/> resulting point (x', y'), where x and y encoded as 32-byte left-padded
479
479
* integers<br/>
480
480
*/
@@ -517,11 +517,11 @@ public Pair<Boolean, byte[]> execute(byte[] data) {
517
517
/**
518
518
* Computes multiplication of scalar value on a point belonging to Barreto–Naehrig curve. See
519
519
* {@link BN128Fp} for details<br/> <br/>
520
- *
520
+ * <p>
521
521
* input data[]:<br/> point encoded as (x, y) is followed by scalar s, where x, y and s are
522
522
* 32-byte left-padded integers,<br/> if input is shorter than expected, it's assumed to be
523
523
* right-padded with zero bytes<br/> <br/>
524
- *
524
+ * <p>
525
525
* output:<br/> resulting point (x', y'), where x and y encoded as 32-byte left-padded
526
526
* integers<br/>
527
527
*/
@@ -557,15 +557,15 @@ public Pair<Boolean, byte[]> execute(byte[] data) {
557
557
558
558
/**
559
559
* Computes pairing check. <br/> See {@link PairingCheck} for details.<br/> <br/>
560
- *
560
+ * <p>
561
561
* Input data[]: <br/> an array of points (a1, b1, ... , ak, bk), <br/> where "ai" is a point of
562
562
* {@link BN128Fp} curve and encoded as two 32-byte left-padded integers (x; y) <br/> "bi" is a
563
563
* point of {@link BN128G2} curve and encoded as four 32-byte left-padded integers {@code (ai + b;
564
564
* ci + d)}, each coordinate of the point is a big-endian {@link } number, so {@code b} precedes
565
565
* {@code a} in the encoding: {@code (b, a; d, c)} <br/> thus each pair (ai, bi) has 192 bytes
566
566
* length, if 192 is not a multiple of {@code data.length} then execution fails <br/> the number
567
567
* of pairs is derived from input length by dividing it by 192 (the length of a pair) <br/> <br/>
568
- *
568
+ * <p>
569
569
* output: <br/> pairing product which is either 0 or 1, encoded as 32-byte left-padded integer
570
570
* <br/>
571
571
*/
@@ -648,7 +648,6 @@ private Pair<BN128G1, BN128G2> decodePair(byte[] in, int offset) {
648
648
}
649
649
650
650
651
-
652
651
public static class ValidateMultiSign extends PrecompiledContract {
653
652
654
653
private static final int ENGERYPERSIGN = 1500 ;
@@ -716,6 +715,7 @@ public Pair<Boolean, byte[]> execute(byte[] rawData) {
716
715
717
716
718
717
public static class BatchValidateSign extends PrecompiledContract {
718
+
719
719
private static final ExecutorService workers ;
720
720
private static final int ENGERYPERSIGN = 1500 ;
721
721
private static final int MAX_SIZE = 16 ;
@@ -779,7 +779,7 @@ private Pair<Boolean, byte[]> doExecute(byte[] data)
779
779
}
780
780
byte [] res = new byte [WORD_SIZE ];
781
781
if (isConstantCall ()) {
782
- //for static call not use thread pool to avoid potential effect
782
+ //for constant call not use thread pool to avoid potential effect
783
783
for (int i = 0 ; i < cnt ; i ++) {
784
784
if (DataWord
785
785
.equalAddressByteArray (addresses [i ], recoverAddrBySign (signatures [i ], hash ))) {
@@ -816,7 +816,6 @@ private Pair<Boolean, byte[]> doExecute(byte[] data)
816
816
}
817
817
818
818
819
-
820
819
}
821
820
822
821
private static byte [] recoverAddrBySign (byte [] sign , byte [] hash ) {
0 commit comments