-
Notifications
You must be signed in to change notification settings - Fork 132
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
Introduce recursive proofs from within ZkPrograms #1931
Merged
+659
−177
Merged
Changes from 17 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
7a2f19a
create program state by default (we'll need it)
mitschabaude c700b18
lift collection of declared proofs into its own global context
mitschabaude 907b202
revert unnecessary change and add comments
mitschabaude 5b6145b
add `Proof.declare()`
mitschabaude b576a40
scaffold internal recursive proving feature
mitschabaude 0f9b59e
implement recursive proving
mitschabaude 5292142
add tests
mitschabaude 9220094
simplify test
mitschabaude 2250126
add test for internal proofs
mitschabaude afbbf93
add test to CI
mitschabaude 258268e
move withThreadPool to common file
mitschabaude dbebf51
allow test to run in web
mitschabaude 2738b59
bindings
mitschabaude e6b4e54
changelog
mitschabaude 950dc43
Merge branch 'main' into feature/declare-proofs
mitschabaude 3289b6b
properly constrain public input, and map inner args to constants
mitschabaude 00a1c69
test witness arguments
mitschabaude 62beb20
extract declared proofs during analyze, and refactor how maxProofsVer…
mitschabaude 90c73af
change bindings API to expect proofs returned from js circuit and not…
mitschabaude cd3f73f
adapt to proofs returned from circuit
mitschabaude 5df3ca2
extend internal proving test
mitschabaude e4143c5
add adversarial test
mitschabaude 34208df
bindings
mitschabaude 1a410b1
fix unit test
mitschabaude 3eecacb
Merge branch 'main' into feature/declare-proofs
mitschabaude 4b07411
feedback: more explicit type names in DeclaredProof
mitschabaude 813a10e
feedback: add code comments
mitschabaude 5476ace
Merge branch 'main' into feature/declare-proofs
mitschabaude f591f02
zkprogram context fix
mitschabaude 46d2993
Merge branch 'main' into feature/declare-proofs
mitschabaude 67bdf86
remove recursive provers and expose regular provers instead
mitschabaude 484ff13
recursive provers in separate wapper
mitschabaude b1adf8e
export Recursive
mitschabaude d0ffd75
adapt changelog
mitschabaude 353f639
remove the need to export regular provers
mitschabaude 671685e
remove regular provers
mitschabaude 0d04ccc
adapt example
mitschabaude c9c81f7
changelog tweak
mitschabaude bf1e275
final fix: avoid mapping over the entire zkprogram
mitschabaude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,29 @@ | ||
import { Context } from '../util/global-context.js'; | ||
import type { Subclass } from '../util/types.js'; | ||
import type { ProofBase } from './proof.js'; | ||
|
||
export { ZkProgramContext, DeclaredProof }; | ||
|
||
type DeclaredProof = { | ||
Proof: Subclass<typeof ProofBase<any, any>>; | ||
mitschabaude marked this conversation as resolved.
Show resolved
Hide resolved
|
||
proof: ProofBase<any, any>; | ||
}; | ||
type ZkProgramContext = { | ||
proofs: DeclaredProof[]; | ||
}; | ||
let context = Context.create<ZkProgramContext>(); | ||
|
||
const ZkProgramContext = { | ||
enter() { | ||
return context.enter({ proofs: [] }); | ||
}, | ||
leave: context.leave, | ||
has: context.has, | ||
|
||
declareProof(proof: DeclaredProof) { | ||
context.get().proofs.push(proof); | ||
}, | ||
getDeclaredProofs() { | ||
return context.get().proofs; | ||
}, | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the added logic here comes from the bindings, see o1-labs/o1js-bindings#318