@solarity/zkit 0.3.0-rc.0 → 0.3.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/templates/verifier_groth16.vy.ejs +3 -3
- package/dist/core/templates/verifier_plonk.sol.ejs +534 -436
- package/dist/core/templates/verifier_plonk.vy.ejs +92 -92
- package/package.json +1 -1
- package/src/core/templates/verifier_groth16.vy.ejs +3 -3
- package/src/core/templates/verifier_plonk.sol.ejs +534 -436
- package/src/core/templates/verifier_plonk.vy.ejs +92 -92
|
@@ -22,7 +22,7 @@ DELTA_Y1: constant(uint256) = <%=vk_delta_2[1][1]%>
|
|
|
22
22
|
DELTA_Y2: constant(uint256) = <%=vk_delta_2[1][0] -%>
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
IC: constant(uint256[<%=IC.length%>]
|
|
25
|
+
IC: constant(uint256[2][<%=IC.length%>]) = [
|
|
26
26
|
<% IC.forEach(function(innerArray, index) { %> [
|
|
27
27
|
<%= innerArray[0] %>,
|
|
28
28
|
<%= innerArray[1] %>
|
|
@@ -36,7 +36,7 @@ EC_PAIRING_PRECOMPILED_ADDRESS: constant(address) = 0x00000000000000000000000000
|
|
|
36
36
|
|
|
37
37
|
@view
|
|
38
38
|
@external
|
|
39
|
-
def verifyProof(pointA: uint256[2], pointB: uint256[2][2], pointC: uint256[2], publicSignals: uint256[<%=IC.length-1%>]) -> bool:
|
|
39
|
+
def verifyProof(pointA: uint256[2], pointB: uint256[2][2], pointC: uint256[2], publicSignals: uint256[<%=IC.length - 1%>]) -> bool:
|
|
40
40
|
# @dev check that all public signals are in F
|
|
41
41
|
for signal: uint256 in publicSignals:
|
|
42
42
|
if signal >= BASE_FIELD_SIZE:
|
|
@@ -84,7 +84,7 @@ def _g1MulAdd(pR: uint256[2], pP: uint256[2], s: uint256) -> (bool, uint256[2]):
|
|
|
84
84
|
|
|
85
85
|
@view
|
|
86
86
|
@internal
|
|
87
|
-
def _checkPairing(pA: uint256[2], pB: uint256[2][2], pC: uint256[2], pubSignals: uint256[<%=IC.length-1%>]) -> bool:
|
|
87
|
+
def _checkPairing(pA: uint256[2], pB: uint256[2][2], pC: uint256[2], pubSignals: uint256[<%=IC.length - 1%>]) -> bool:
|
|
88
88
|
success: bool = True
|
|
89
89
|
mulAddResult: uint256[2] = IC[0]
|
|
90
90
|
|