[go: up one dir, main page]

RISC-V: Move proof generation functionality to `ProofLayout` trait

Closes RV-391.

What

This MR changes the way in which a proof is obtained from a ProofGen-bound PVM state by moving this functionality from the Merkleisable trait to the ProofLayout trait.

Why

The Merkleisable trait is implemented on a combination of backend-specific types (Cells, DynCells, EnrichedCell) and generic layout types (tuples, arrays, vectors). This refactoring brings proof generation in line with proof verification and state hashing by making it a function of the layout.

How

The ProofLayout trait is extended with to_proof. For more details about the signature of this function see RV-391.

The Merkleisable trait is removed in a follow-up MR !16379 (merged).

Manually Testing

make -C src/riscv all

Benchmarking

No impact on performance.

Tasks for the Author

  • Link all Linear issues related to this MR using magic words (e.g. part of, relates to, closes).
  • Eliminate dead code and other spurious artefacts introduced in your changes.
  • Document new public functions, methods and types.
  • Make sure the documentation for updated functions, methods, and types is correct.
  • Add tests for bugs that have been fixed.
  • Put in reasonable effort to ensure that CI will pass.
    • make -C src/riscv
    • dune build src/lib_riscv
    • dune build src/rust_deps
  • Benchmark performance and populate the table above if needed.
  • Explain changes to regression test captures when applicable.
  • Write commit messages to reflect the changes they're about.
  • Self-review your changes to ensure they are high-quality.
  • Complete all of the above before assigning this MR to reviewers.
Edited by Victor Dumitrescu

Merge request reports

Loading