barretenberg
barretenberg copied to clipboard
Dynamic structured trace
Its inconvenient both for development and in practice to have a single set of fixed block sizes for the structuring. It would be nice for the structuring to be more dynamic. It could be possible to implement something dynamic that would roughly work as follows.
- Set a structuring based on the initial circuit
- When accumulating the next circuit, determine a structuring that accommodates both the accumulator and the incoming circuit
- If necessary, "expand" the accumulator instance to match the new structuring
- Repeat
We need to think through the cost of "expanding" an existing instance. I think it should be relatively cheap since it should amount to simply adding more buffering between blocks in the polynomials. Naively inserting elements into polynomials could be expensive. Having a StructuredPolynomial would make this trivial since it would amount to incrementing a few constants describing the "dead" ranges of certain polynomials. The main issue here is this would eliminate the ability to precomputed VKs which might cancel out any gains..