|
1 | 1 | package org.tron.core.vm; |
2 | 2 |
|
3 | 3 | import static java.util.Arrays.copyOfRange; |
| 4 | +import static org.tron.common.crypto.ckzg4844.CKZG4844JNI.BLS_MODULUS; |
| 5 | +import static org.tron.common.crypto.ckzg4844.CKZG4844JNI.FIELD_ELEMENTS_PER_BLOB; |
4 | 6 | import static org.tron.common.math.Maths.max; |
5 | 7 | import static org.tron.common.math.Maths.min; |
6 | 8 | import static org.tron.common.runtime.vm.DataWord.WORD_SIZE; |
|
40 | 42 | import org.apache.commons.lang3.ArrayUtils; |
41 | 43 | import org.apache.commons.lang3.tuple.Pair; |
42 | 44 | import org.apache.commons.lang3.tuple.Triple; |
43 | | -import org.bouncycastle.util.encoders.Hex; |
44 | 45 | import org.tron.common.crypto.Blake2bfMessageDigest; |
45 | 46 | import org.tron.common.crypto.Hash; |
46 | 47 | import org.tron.common.crypto.SignUtils; |
@@ -2204,9 +2205,9 @@ public static class KZGPointEvaluation extends PrecompiledContract { |
2204 | 2205 |
|
2205 | 2206 | private static final int BLOB_VERIFY_INPUT_LENGTH = 192; |
2206 | 2207 | private static final byte BLOB_COMMITMENT_VERSION_KZG = 0x01; |
2207 | | - private static final byte[] BLOB_PRECOMPILED_RETURN_VALUE = Hex.decode( |
2208 | | - "0000000000000000000000000000000000000000000000000000000000001000" + |
2209 | | - "73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001"); |
| 2208 | + private static final byte[] BLOB_PRECOMPILED_RETURN_VALUE = |
| 2209 | + ByteUtil.merge(ByteUtil.longTo32Bytes(FIELD_ELEMENTS_PER_BLOB), |
| 2210 | + ByteUtil.bigIntegerToBytes(BLS_MODULUS, 32)); |
2210 | 2211 |
|
2211 | 2212 | @Override |
2212 | 2213 | public long getEnergyForData(byte[] data) { |
|
0 commit comments