refactor(fs): return named structs from fold APIs#251
Open
junbyjun1238 wants to merge 1 commit into
Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR replaces tuple-returning fold outputs with named structs and updates the relevant CycleFold call sites to use the new named results.
This is a breaking API cleanup that makes fold artifacts explicit by name across the folding-scheme interfaces.
Note to reviewers: Because this replaces the signatures of the canonical folding traits, the migration necessarily updates the current fs implementations (Nova, HyperNova, Mova, Ova, and ProtoGalaxy) and the downstream CycleFold consumers. Most of the resulting churn is mechanical.
Why:
(RW, RU, Proof, Challenge)and(RU, Challenge)through some of its most complex code paths.What changes:
FoldingSchemeProver::prove(...)to returnFoldStepFoldingSchemePartialVerifierGadget::verify_hinted(...)to returnPartialVerifierStepTesting:
cargo test -p sonobe-fscargo test -p sonobe-ivcReferences:
provereturns the challenge explicitly for CycleFold:crates/fs/src/definitions/algorithms.rs#L33-L59
verify_hintedis intentionally a partial verifier:crates/fs/src/definitions/circuits.rs#L9-L35
crates/ivc/src/compilers/cyclefold/mod.rs#L248-L312
crates/ivc/src/compilers/cyclefold/circuits.rs#L118-L145