Skip to main content

Module precompiles

Module precompiles 

Source

Structs§

G1
G2
Precompile
PrecompileCache
Per-block cache for precompile results shared between warmer and executor.

Constants§

BLAKE2F
BLAKE2F_ELEMENT_SIZE
BLS12_381_G1_MSM_PAIR_LENGTH
BLS12_381_G2_MSM_PAIR_LENGTH
BLS12_381_PAIRING_CHECK_PAIR_LENGTH
BLS12_G1ADD
BLS12_G1MSM
BLS12_G2ADD
BLS12_G2MSM
BLS12_MAP_FP2_TO_G2
BLS12_MAP_FP_TO_G1
BLS12_PAIRING_CHECK
ECADD
ECMUL
ECPAIRING
ECRECOVER
FIELD_ELEMENT_WITHOUT_PADDING_LENGTH
G1_POINT_AT_INFINITY
G2_POINT_AT_INFINITY
IDENTITY
MODEXP
P256VERIFY
PADDED_FIELD_ELEMENT_SIZE_IN_BYTES
POINT_EVALUATION
PRECOMPILES
RIPEMD_160
SHA2_256
SIZE_PRECOMPILES_CANCUN
SIZE_PRECOMPILES_PRAGUE
SIZE_PRECOMPILES_PRE_CANCUN

Functions§

blake2f
Returns the result of Blake2 hashing algorithm given a certain parameters from the calldata.
bls12_g1add
bls12_g1msm
bls12_g2add
bls12_g2msm
bls12_map_fp2_to_g2
bls12_map_fp_to_g1
bls12_pairing_check
ecadd
Makes a point addition on the elliptic curve ‘alt_bn128’
ecmul
Makes a scalar multiplication on the elliptic curve ‘alt_bn128’
ecpairing
Performs a bilinear pairing on points on the elliptic curve ‘alt_bn128’, returns 1 on success and 0 on failure
ecrecover
ECRECOVER precompile.
execute_precompile
identity
Returns the calldata received
increase_left_pad
If the result size is less than needed, pads left with zeros.
is_precompile
modexp
Returns the result of the module-exponentiation operation
p_256_verify
Signature verification in the “secp256r1” elliptic curve If the verification succeeds, returns 1 in a 32-bit big-endian format. If the verification fails, returns an empty Bytes object. Implemented following https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7951.md
precompiles_for_fork
ripemd_160
Returns the calldata hashed by ripemd-160 algorithm, padded by zeros at left
sha2_256
Returns the calldata hashed by sha2-256 algorithm