Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.84 KB

cip-62.md

File metadata and controls

44 lines (28 loc) · 1.84 KB
CIP No. Title Author Status Type Created
62
Enable EC-Related Builtin Contracts
Chenxing Li (@ChenxingLi)
Final
Spec Breaking
2020-11-17

Simple Summary

Enable big integer modular exponentiation and alt-bn128 related builtin contract.

Abstract

EVM has the following four builtin contract: modexp alt_bn128_add, alt_bn128_mul and alt_bn128_pairing, which have not been enabled in Conflux. It's the time to enable them!

Motivation

These builtin contract can support some crypto-related usage, e.g., verifying proof of zk-snark.

Specification

We define the following parameters cip-62-activation-block.

During executing transactions, if current block number < cip-62-activation-block, the addresses 0x5, 0x6, 0x7 and 0x8 are regarded as normal contracts. If current block number >= cip-62-activation-block, the addresses 0x5, 0x6, 0x7, 0x8 implements builtin contracts modexp alt_bn128_add, alt_bn128_mul and alt_bn128_pairing respectively. The behavior and gas plan of these contracts inherits Ethereum's settings. (EIP-196, EIP-197, EIP-198).

Backwards Compatibility

This CIP is spec breaking.

Test Cases

TBA.

Implementation

TBA.

Security Considerations

No security considerations.

Copyright

Copyright and related rights waived via CC0.