microsoft / Nova

Nova: High-speed recursive arguments from folding schemes
MIT License
673 stars 176 forks source link

feat: Refactor R1CS shape to split the commitment key generation #315

Open huitseeker opened 3 months ago

huitseeker commented 3 months ago

This is a fragment of #283

TL;DR:

Splits off one major source of diff lines from PR #283. Inherently, there are many R1CS shapes to consider when tailoring public parameter creation to non-uniform step-circuits. However, the commitment key generation should only be done once for all circuits (once a suitable size has been determined by looking at all R1CS shapes). This splits the relevant Nova functions into r1cs_shape_and_key, r1cs_shape and commitment_key to enable the flexibility deamnded by the above model.

In detail: