Skip to content

Adds initial prover code #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
16de2e9
Adds initial prover code
Feb 3, 2025
5cbdb39
Fixed wrong PoW strategy
Feb 3, 2025
3f0d216
Separated helper traits
Feb 3, 2025
af86780
Adds matrix multiplication prototype
Feb 5, 2025
ca06b3d
Attempting to commit to witness
Feb 6, 2025
e2f8729
Adds prover sumcheck
Feb 12, 2025
d5d7344
Cleanup
Feb 13, 2025
1af9559
Cleanup
Feb 14, 2025
477fa78
Moves toward using nimue
Feb 17, 2025
025bb1c
Adds initial sumcheck
Feb 17, 2025
4b47cf4
Adds nimue randomness to sumcheck
Feb 17, 2025
cb1d186
Merge branch 'add-prover' of github.com:reilabs/ProveKit into add-prover
Feb 17, 2025
0396cb6
Minor cleanup and documentation
batmendbar Feb 19, 2025
16f5857
Separated pcs prover and verifier
batmendbar Feb 20, 2025
e2cc792
Moves eq generation to sumcheck
batmendbar Feb 20, 2025
e4f20ba
Separated sumcheck and whir provers
batmendbar Feb 20, 2025
7d523ef
Changes some variable names
batmendbar Feb 20, 2025
da13662
Cleanup completed
batmendbar Feb 20, 2025
f7e1524
Sumcheck outputs alpha
batmendbar Feb 21, 2025
a926fcc
Adds external row calculator for matrices
batmendbar Feb 21, 2025
b42b1a0
Buggy, adds arbitrary row calculation
batmendbar Feb 21, 2025
7f272ee
Adds matrix external row interpolation
batmendbar Feb 25, 2025
1acc9d7
Cleanup
batmendbar Feb 25, 2025
3970353
prover serialization
veljkovranic Mar 3, 2025
51dc33b
Adds weighted whir
Mar 5, 2025
7971783
Adds weighted whir
Mar 5, 2025
4e7867c
Cleanup
batmendbar Mar 5, 2025
f04a86b
Merge
batmendbar Mar 5, 2025
ff6a7bc
Cleanup: Moves gnark generation
batmendbar Mar 5, 2025
7930280
Cleanup: moves proof byte writer code
batmendbar Mar 5, 2025
59390ab
Cleanup: moves gnark config write code
batmendbar Mar 5, 2025
5a17d93
Cleanup: declutters main
batmendbar Mar 5, 2025
a503d2e
Cleanup: removes numvariables and numevaluations
batmendbar Mar 5, 2025
63d34cb
Fixed json public input count
batmendbar Mar 6, 2025
554c9d1
Cleanup
batmendbar Mar 6, 2025
683a66f
Cleanup
batmendbar Mar 6, 2025
4638f00
Cleanup
batmendbar Mar 6, 2025
cb13049
Cleanup
batmendbar Mar 6, 2025
432d337
add statement_evaluations
veljkovranic Mar 7, 2025
5f585f1
Merge branch 'add-prover' of https://github.com/reilabs/ProveKit into…
veljkovranic Mar 7, 2025
e6e23d9
merge with Bats refactor
veljkovranic Mar 7, 2025
77150f1
Fixed local crate dependencies
batmendbar Mar 7, 2025
ddfdc22
reflect changes from WHIR
veljkovranic Mar 12, 2025
9080c5b
Fix log num constraint
batmendbar Mar 19, 2025
03296e3
Takes input file name as cli
batmendbar Mar 20, 2025
021b2ca
fix renaming of nimue errors
veljkovranic Mar 25, 2025
e25b340
Merge branch 'add-prover' of https://github.com/reilabs/ProveKit into…
veljkovranic Mar 25, 2025
fb2696d
refactor to catch whir/spongefish changes
veljkovranic Mar 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ Cargo.lock
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

prover/params
prover/proof
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
resolver = "2"
members = ["noir-r1cs", "delegated-spartan", "merkle-hash-bench"]
members = ["noir-r1cs", "delegated-spartan", "merkle-hash-bench", "prover"]

[workspace.package]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Zero-knowledge proof toolkit targeting mobile devices.
This project depends on the following libraries, which are developed in lockstep:

- [🌪️ WHIR](https://github.com/WizardOfMenlo/whir)
- [Nimue](https://github.com/arkworks-rs/nimue)
- [Spongefish](https://github.com/arkworks-rs/spongefish)
- [gnark-skyscraper](https://github.com/reilabs/gnark-skyscraper)
- [gnark-nimue](https://github.com/reilabs/gnark-nimue)
- [gnark-whir](https://github.com/reilabs/gnark-whir)
Expand Down
1 change: 1 addition & 0 deletions params
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"n_rounds":0,"n_vars":4,"rate":1,"folding_factor":[],"ood_samples":[],"num_queries":[],"pow_bits":[],"final_queries":98,"final_pow_bits":2,"final_folding_pow_bits":0,"domain_generator":"4419234939496763621076330863786513495701855246241724391626358375488475697872","io_pattern":"🌪️\u0000S3rand\u0000A4Sumcheck Polynomials\u0000S1Sumcheck Random\u0000A4Sumcheck Polynomials\u0000S1Sumcheck Random\u0000A4Sumcheck Polynomials\u0000S1Sumcheck Random\u0000A1merkle_digest\u0000S1ood_query\u0000A1ood_ans\u0000S1initial_combination_randomness\u0000A3sumcheck_poly\u0000S1folding_randomness\u0000A3sumcheck_poly\u0000S1folding_randomness\u0000A3sumcheck_poly\u0000S1folding_randomness\u0000A3sumcheck_poly\u0000S1folding_randomness\u0000A1final_coeffs\u0000S7final_queries\u0000S3pow_queries\u0000A8pow-nonce","transcript":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,167,39,73,70,53,17,77,26,201,207,235,111,136,199,218,152,94,24,78,40,133,249,208,19,61,219,123,174,105,131,189,9,169,222,25,132,50,160,168,68,215,203,225,208,56,157,168,7,240,207,165,223,104,96,177,94,83,214,106,228,155,12,177,36,177,249,156,37,44,68,236,228,240,212,235,56,135,131,176,135,14,112,141,121,200,235,205,69,153,238,74,78,109,190,245,1,70,48,198,190,72,223,121,195,247,199,59,10,38,160,106,56,144,244,226,158,8,20,34,113,115,127,85,230,123,50,77,24,153,195,40,48,4,62,147,146,12,96,10,86,124,31,137,70,34,191,240,142,35,88,48,166,144,99,138,234,178,176,200,29,189,154,74,84,21,166,0,214,191,191,48,83,186,194,152,33,169,186,20,62,54,24,93,17,234,172,24,223,250,175,174,36,32,199,231,80,188,106,5,9,47,238,234,84,118,108,68,109,2,119,91,84,51,164,95,235,150,233,60,27,11,253,110,19,197,36,64,35,233,254,175,152,215,11,107,250,51,52,252,97,113,73,239,46,223,108,41,21,111,133,240,239,219,76,141,33,200,59,132,181,201,164,31,14,29,247,204,149,113,38,104,72,91,168,175,129,182,252,3,22,181,72,8,242,109,84,68,3,104,58,70,194,94,13,53,155,225,17,144,0,200,135,88,74,140,235,99,223,204,21,87,9,71,179,36,217,240,206,179,36,198,54,86,159,159,73,14,247,144,181,91,36,155,101,202,143,108,25,198,129,66,93,47,126,89,230,255,12,71,81,149,30,228,122,201,167,56,105,223,48,17,9,191,50,40,38,7,4,132,155,197,52,24,244,20,115,152,142,208,7,99,208,76,35,64,102,7,156,122,95,143,88,94,201,244,102,145,49,172,215,120,211,198,4,69,197,157,112,207,158,38,106,114,98,75,24,70,140,165,3,175,70,228,116,219,166,179,101,248,157,31,87,199,2,199,132,71,24,68,81,249,75,2,237,54,234,19,28,175,97,83,171,164,161,92,45,118,195,148,3,97,20,158,151,132,90,99,55,48,41,235,191,103,214,249,105,134,26,92,25,156,58,169,48,135,130,67,9,74,229,120,39,253,194,49,177,187,207,71,3,109,63,47,161,68,39,227,252,147,244,48,36,173,33,24,234,51,187,142,55,133,216,185,12,155,89,244,40,71,196,226,118,225,17,31,115,162,115,69,59,239,139,214,29,162,239,163,153,112,63,194,165,64,182,133,163,2,221,131,87,66,54,200,195,219,29,82,10,17,177,150,226,27,173,102,40,161,24,93,114,156,32,14,78,187,59,89,228,224,169,173,86,48,172,217,166,62,21,128,6,152,243,216,126,233,233,252,11,63,233,14,204,166,97,178,164,212,3,18,74,18,152,23,212,38,23,133,64,226,214,133,209,190,126,148,103,56,130,38,8,49,156,112,14,170,142,36,59,75,176,69,231,225,9,232,143,167,30,15,226,68,202,77,214,194,138,124,169,38,43,74,38,128,123,194,88,218,187,189,46,20,153,228,250,145,135,206,29,206,200,161,73,82,86,73,1,51,23,206,48,95,67,183,39,24,2,134,58,16,86,169,153,105,17,30,174,233,59,182,206,158,128,204,145,220,25,75,183,3,146,27,9,71,184,46,24,30,84,173,67,205,167,192,202,154,94,137,252,147,79,131,82,194,103,100,238,81,244,188,245,196,0,200,210,212,187,56,34,55,129,192,242,198,41,178,180,112,236,63,70,67,54,192,196,13,199,135,195,146,122,29,129,246,243,124,159,90,103,245,30,52,47,173,34,191,187,193,135,76,82,137,213,57,165,231,224,207,198,164,29,124,168,241,151,84,86,244,102,242,142,104,11,0,0,0,0,0,0,0,1],"transcript_len":872}
32 changes: 32 additions & 0 deletions prover/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[package]
name = "prover"
version = "0.1.0"
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dependencies]
whir = { git = "https://github.com/WizardOfMenlo/whir"}
ruint = "1.12.3"
ruint-macro = "1.2.1"
spongefish = { git = "https://github.com/arkworks-rs/spongefish", features = ["arkworks-algebra"] }
ark-ff = { version = "0.5", features = ["asm", "std"] }
zeroize = "1.8.1"
ark-crypto-primitives = { version = "0.5", features = ["merkle_tree"] }
rand = "0.8"
spongefish-pow = { git = "https://github.com/arkworks-rs/spongefish"}
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
ark-poly = "0.5"
ark-std = { version = "0.5", features = ["std"] }
ark-serialize = "0.5"
clap = { version = "4.4.17", features = ["derive"] }
itertools = "0.13.0"



[lints]
workspace = true
Loading
Loading