Skip to content

Support for compile-time folding: deprecate? #1164

Closed

Description

@codygunton

The original design for the Noir folding interface (iirc by @kevaundray) was that functions could be tagged by the developer and then this signal would be sent to the backend. I call this "compile-time folding". At present, Aztec's architecture does not support using this, rather, Aztec uses "run-time folding". The reason for this is that Aztec's prover must detect which kernels are to be constructed, and then interleave those kernels with the "app functions". The code that does this is written in Typescript code which is downstream of Noir. To handle this, Barretenberg got functions to process a "stack of circuits" assembled in typescript, rather than a single ACIR/witness pair that represents the stack.

Moreover, Aztec's Client IVC scheme requires that additional work be done outside of proving the kernel logic written in Noir. More specifically, the ClientIVC class must: detect which circuits are kernels; append folding verifiers to these; append databus (memory) consistency checks; handle recursive merge verification for correct execution of the Goblin subprotocol. To continue to test the old compile-time folding, it was necessary to either maintain a separate class just to test that functionality which currently has no use case; or continue to support compile-time folding via some hacks. We chose the latter.

We need to assess the future of compile-time folding, and either make a plan for supporting and properly testing it or deprecate it.

Activity

  1. changed the title [-]Support for compile-time folding[/-] [+]Support for compile-time folding: deprecate?[/+] on Dec 2, 2024
  2. added a commit that references this issue on Dec 3, 2024
  3. added a commit that references this issue on Dec 4, 2024
  4. codygunton commented on Mar 6, 2025

    @codygunton
    Author

    @vezenovm for visibility

  5. ledwards2225 commented on May 27, 2025

    @ledwards2225

    this has been effectively deprecated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions