@ethereumjs/evm
Version:
JavaScript Ethereum Virtual Machine (EVM) implementation
274 lines • 5.07 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BLS_GAS_DISCOUNT_PAIRS_G2 = exports.BLS_GAS_DISCOUNT_PAIRS_G1 = exports.BLS_ONE_BUFFER = exports.BLS_ZERO_BUFFER = exports.BLS_G2_INFINITY_POINT_BYTES = exports.BLS_G1_INFINITY_POINT_BYTES = exports.BLS_G2_POINT_BYTE_LENGTH = exports.BLS_G1_POINT_BYTE_LENGTH = exports.BLS_FIELD_MODULUS = void 0;
const util_1 = require("@ethereumjs/util");
// base field modulus as described in the EIP
exports.BLS_FIELD_MODULUS = BigInt('0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab');
exports.BLS_G1_POINT_BYTE_LENGTH = 128;
exports.BLS_G2_POINT_BYTE_LENGTH = 256;
exports.BLS_G1_INFINITY_POINT_BYTES = new Uint8Array(exports.BLS_G1_POINT_BYTE_LENGTH);
exports.BLS_G2_INFINITY_POINT_BYTES = new Uint8Array(exports.BLS_G2_POINT_BYTE_LENGTH);
exports.BLS_ZERO_BUFFER = new Uint8Array(32);
exports.BLS_ONE_BUFFER = (0, util_1.concatBytes)(new Uint8Array(31), (0, util_1.hexToBytes)('0x01'));
// G1/G2 MSM discount constants taken from EIP-2537
exports.BLS_GAS_DISCOUNT_PAIRS_G1 = [
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
];
exports.BLS_GAS_DISCOUNT_PAIRS_G2 = [
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
];
//# sourceMappingURL=constants.js.map