Skip to content

refactor(fs): return named structs from fold APIs#251

Open
junbyjun1238 wants to merge 1 commit into
privacy-ethereum:devfrom
junbyjun1238:fold-output-structs-dev
Open

refactor(fs): return named structs from fold APIs#251
junbyjun1238 wants to merge 1 commit into
privacy-ethereum:devfrom
junbyjun1238:fold-output-structs-dev

Conversation

@junbyjun1238
Copy link
Copy Markdown

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:

  • The CycleFold path still passes large positional tuples like (RW, RU, Proof, Challenge) and (RU, Challenge) through some of its most complex code paths.
  • Naming those artifacts makes these call sites easier to read and review.

What changes:

  • change FoldingSchemeProver::prove(...) to return FoldStep
  • change FoldingSchemePartialVerifierGadget::verify_hinted(...) to return PartialVerifierStep
  • migrate the existing Nova, HyperNova, Mova, Ova, and ProtoGalaxy implementations to the new return types
  • update the relevant CycleFold call sites to consume the new named structs

Testing:

  • cargo test -p sonobe-fs
  • cargo test -p sonobe-ivc

References:

@winderica winderica self-assigned this Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants