-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With this PR, if a block machine never receives a call *and* has dynamic size, it is skipped entirely in the proof (for all backends that support dynamically-sized machines, Plonky3 and the Composite backend). This is sound if we treat a missing machine as not interacting at all with the bus. As a result, we can remove the "dummy calls" in the RISC-V machine, which ensure that each block machine is called at least once. In slightly more detail: - If a block machine never receives a call, witgen returns columns of length 0. - When proving, we detect that and remove the machine entirely. - The verifier is relaxed in that it no longer asserts that all machines are being proven. As mentioned, this assumes that the bus argument (which is not fully implemented) handles this accordingly, using a bus accumulator of zero for the missing machine. To test: ``` $ cargo run pil test_data/asm/block_to_block_empty_submachine.asm -o output -f --export-witness-csv --prove-with plonky3 ... Running main machine for 8 rows [00:00:00 (ETA: 00:00:00)] ████████████████████ 100% - Starting... Machine Secondary machine 0: main_arith (BlockMachine) is never used at runtime, so we remove it. Witness generation took 0.002950166s Writing output/commits.bin. Writing output/block_to_block_empty_submachine_witness.csv. Backend setup for plonky3... Setup took 0.023712292s Proof generation took 0.083828546s Proof size: 80517 bytes Writing output/block_to_block_empty_submachine_proof.bin. ```
- Loading branch information
1 parent
9037386
commit ed6e4f7
Showing
8 changed files
with
210 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.