Upcoming Changes: Deprecation of Celo Precompiles and UsingPrecompilesContract Functions in L2 Migration

As part of Celo’s transition to an L2 network, the Celo precompiles will be deprecated, impacting all functions from the UsingPrecompiles contract. If you’ve been using this contract to query historical data related to elected validators or epochs, be advised that these functions will soon be deprecated.

The following functions will no longer be available after the migration:

  • fractionMulExp(uint256,uint256,uint256,uint256,uint256,uint256)

  • getEpochSize()

  • validatorSignerAddressFromSet(uint256,uint256)

  • numberValidatorsInSet(uint256)

  • checkProofOfPossession(address,bytes,bytes)

  • getBlockNumberFromHeader(bytes)

  • hashHeader(bytes)

  • getParentSealBitmap(uint256)

  • getVerifiedSealBitmapFromHeader(bytes)

  • minQuorumSize(uint256)

  • minQuorumSizeInCurrentSet()

  • getUint256FromBytes(bytes,uint256)

  • getBytes32FromBytes(bytes,uint256)

Note: Going forward, historical epoch data will be accessible only via RPC calls to archive nodes.

To keep costs for processing epochs low, only the following key functions—used for querying the current epoch or elected validators—have been ported over to the new EpochManager contract:

  • getEpochNumberOfBlock(uint256)

  • getEpochNumber()

  • validatorSignerAddressFromCurrentSet()

  • numberValidatorsInCurrentSet()

For more information on deprecated contracts and other changes during the migration, check out our full documentation here.

1 Like

Worth noting that several contracts like Governance and Validators exposed these methods too.