Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Prototype] Dynamic vadcop #1558

Draft
wants to merge 7 commits into
base: variable-fixed-column-size
Choose a base branch
from

Conversation

georgwiese
Copy link
Collaborator

@georgwiese georgwiese commented Jul 11, 2024

Builds on #1542
Fixes #1496

To test:

cargo run -r pil test_data/std/binary_test_dynamic.asm -o output -f --prove-with estark-starky-composite

Steps:

  • 8906795:
    • The linker keeps degrees of None
    • When the degree is None, the constant evaluate computes all degrees from $2^5$ to $2^{10}$ (these are constants that can be changed)
    • CompositeBackend implements variable-length by:
      • Instantiating a Backend for each machine and possible size
      • Storing a verification key for each machine and possible size
      • When creating a proof, it picks the backend of the right size and stores the choice in the proof
      • When validating a proof, it selects the verification key given the proof size
    • Automatic witness generation always "choses" the largest available size
  • Following commits: Adjust witgen:
    • Each machine already knows its size (prior to this PR), so the current size is explicitly passed whenever a fixed column value is read.
    • The size of each machine is still initialized to the maximum.
    • In BlockMachine::take_witness_col_values, we down-size the machine as needed

Current blockers:

  • It seems like columns need to have a size when the PIL is analyzed. We unwrap here because RepeatedArray needs to know the size.
    • So any dynamic machine with an array like col fixed foo = [1, 2, 3]* fails
    • This is causing some test failures and blocks making the main VM dynamic

@georgwiese georgwiese changed the title [WIP] Dynamic vadcop [Prototype] Dynamic vadcop Jul 11, 2024
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.

None yet

1 participant