Module bls12_381_const

Source

Constants§

FP_LENGTH
FP_LENGTH specifies the number of bytes needed to represent an Fp element. This is an element in the base field of BLS12-381.
FP_PAD_BY
FP_PAD_BY specifies the number of bytes that an FP_ELEMENT is padded by to make it 32 byte aligned.
G1_ADD_ADDRESS
G1_ADD_BASE_GAS_FEE
G1_ADD_BASE_GAS_FEE specifies the amount of gas needed to perform the G1_ADD precompile.
G1_ADD_INPUT_LENGTH
G1_ADD_INPUT_LENGTH specifies the number of bytes that the input to G1ADD must use.
G1_LENGTH
G1_LENGTH specifies the number of bytes needed to represent a G1 element.
G1_MSM_ADDRESS
G1_MSM_BASE_GAS_FEE
G1_MSM_BASE_GAS_FEE specifies the base amount of gas needed to perform the G1_MSM precompile.
G1_MSM_INPUT_LENGTH
G1_MSM_INPUT_LENGTH specifies the number of bytes that each MSM input pair should have.
G2_ADD_ADDRESS
G2_ADD_BASE_GAS_FEE
G2_ADD_BASE_GAS_FEE specifies the amount of gas needed to perform the G2_ADD precompile.
G2_ADD_INPUT_LENGTH
G2_ADD_INPUT_LENGTH specifies the number of bytes that the input to G2ADD must occupy.
G2_MSM_ADDRESS
G2_MSM_BASE_GAS_FEE
G2_MSM_BASE_GAS_FEE specifies the base amount of gas needed to perform the G2_MSM precompile.
G2_MSM_INPUT_LENGTH
G2_MSM_INPUT_LENGTH specifies the number of bytes that each MSM input pair should have.
MAP_FP2_TO_G2_ADDRESS
MAP_FP2_TO_G2_BASE_GAS_FEE
MAP_FP2_TO_G2_BASE_GAS_FEE specifies the amount of gas needed to perform the MAP_FP2_TO_G2 precompile.
MAP_FP_TO_G1_ADDRESS
MAP_FP_TO_G1_BASE_GAS_FEE
MAP_FP_TO_G1_BASE_GAS_FEE specifies the amount of gas needed to perform the MAP_FP_TO_G1 precompile.
MSM_MULTIPLIER
MSM_MULTIPLIER specifies the division constant that is used to determine the gas needed to compute an MSM.
PADDED_FP2_LENGTH
PADDED_FP2_LENGTH specifies the number of bytes that the EVM will use to represent a Fp^2 element according to the padding rules specified in EIP-2537.
PADDED_FP_LENGTH
PADDED_FP_LENGTH specifies the number of bytes that the EVM will use to represent an Fp element according to EIP-2537.
PADDED_G1_LENGTH
PADDED_G1_LENGTH specifies the number of bytes that the EVM will use to represent a G1 element according to padding rules specified in EIP-2537.
PADDED_G2_LENGTH
PADDED_G2_LENGTH specifies the number of bytes that the EVM will use to represent a G2 element.
PAIRING_ADDRESS
PAIRING_INPUT_LENGTH
PAIRING_INPUT_LENGTH specifies the number of bytes that each Pairing input pair should have.
PAIRING_MULTIPLIER_BASE
PAIRING_MULTIPLIER_BASE specifies the slope/gradient for the linear expression to determine the amount of gas needed to perform a pairing.
PAIRING_OFFSET_BASE
PAIRING_OFFSET_BASE specifies the y-intercept for the linear expression to determine the amount of gas needed to perform a pairing.
SCALAR_LENGTH
SCALAR_LENGTH specifies the number of bytes needed to represent an Fr element. This is an element in the scalar field of BLS12-381.
SCALAR_LENGTH_BITS
SCALAR_LENGTH_BITS specifies the number of bits needed to represent an Fr element. This is an element in the scalar field of BLS12-381.

Statics§

DISCOUNT_TABLE_G1_MSM
Discounts table for G1 MSM as a vector of pairs [k, discount].
DISCOUNT_TABLE_G2_MSM
Discounts table for G2 MSM as a vector of pairs [k, discount]: