vyperlang/vyper

VIP: Add support for Alt_Bn128 precompile curve operations

Open

#1,650 建立於 2019年10月24日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)Python (849 fork)batch import
VIP: Approvedenhancementhelp wanted

倉庫指標

Star
 (4,710 star)
PR 合併指標
 (平均合併 10天 21小時) (30 天內合併 34 個 PR)

描述

Simple Summary

Add support for precompiled opcode for alt_bn128 pairing calculation

Motivation

We already have support for ecadd and ecmul which perform the corresponding alt_bn128 curve operations (and which should perhaps be renamed to bn128_ecadd and bn128_ecmul), but we do not have support for bn128 pairing operations, which allows the verification of Zero-Knowledge proofs using the alt-bn128 curve, such as in zk-SNARK implementations. This would allow ZKP verifier contracts to be created in Vyper (such as the ones ZoKrates can create).

Specification

alt-bn128 elliptic curve pairing operations were already added as of Byzantium via EIP-197 (with gas costs to be updated in Istanbul via EIP-1108). A reference implementation is provided here: https://github.com/ethereum/py-evm/blob/master/eth/precompiles/ecpairing.py

Backwards Compatibility

No backwards incompatibilities

Dependencies

No dependencies

Copyright

Copyright and related rights waived via CC0

貢獻者指南