Skip to content

Circuit flattening #396

@rpanic

Description

@rpanic

RAM usage on all-task workers is an issue.
There is a theoretical ram optimzation technique that we can use.
Instead of having having a pair of step and wrap circuits for every prover (block, transaction, state transition), we can take all step-methods and flatten them into a single ZkProgram.
However, the publicinput types differ on each of those, so how can we do this?
We create a common public input type containing only a field[] with size being the maximum of all input's fieldSize. And the in each method, we serialize it using the field array to what is needed, and assert all the other elements to be 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions