-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added more primes, calldata export todos (#61)
- Loading branch information
Showing
11 changed files
with
98 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{ | ||
"version": "2.1.4", | ||
"verbose": true | ||
"verbose": true, | ||
"prime": "bn128", | ||
"protocol": "groth16" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// auto-generated by circomkit | ||
pragma circom 2.1.4; | ||
|
||
include "../someArrays.circom"; | ||
|
||
component main {public[in1D, in2D]} = SomeArrays(2, 3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
pragma circom 2.0.0; | ||
|
||
template SomeArrays(N, M) { | ||
signal input in; | ||
signal input in1D[N]; | ||
signal input in2D[N][M]; | ||
|
||
in === 1; | ||
for (var i = 1; i < N; i++) { | ||
in1D[i-1] + 1 === in1D[i]; | ||
} | ||
|
||
for (var i = 0; i < N; i++) { | ||
for (var j = 1; j < M; j++) { | ||
in2D[i][j-1] + 1 === in2D[i][j]; | ||
} | ||
} | ||
|
||
log(1, N, N + M); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"in": 1, | ||
"in1D": [2, 3], | ||
"in2D": [ | ||
[4, 5], | ||
[6, 7], | ||
[8, 9] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// import {CircomkitProtocol} from '../types'; | ||
|
||
// /** | ||
// * Prettifies the calldata. | ||
// * | ||
// * Since calldata always has the public signals at the end, and no matter the dimensions of those signals | ||
// * they always get flattened to a 1D array, we can find the start of public signals at the last `[`. | ||
// * | ||
// * @param protocol protocol | ||
// * @param calldata exported calldata string | ||
// */ | ||
// export function prettyCalldata(protocol: CircomkitProtocol, calldata: string) { | ||
// // TODO: implement | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters