Closed skaller closed 1 year ago
Note: it would be better again if the same file exactly could be used, for this would allow Winterfell to be compiled to binary once and for all.
OK so to simplify things here's the plan:
AirType
.inputs
and outputs
This means the main.rs will be the same for all tests so there is no need (or possibility) of writing it by hand. It remains to confirm this works.
Public values that aren't the first and last rows are nonsense anyhow. For some VM some columns might be initialised to fixed values, so just use the right values. The public inputs will now be the same as the values required to initialise the VM, and the outputs will be the last row,
So "No RUST REQUIRED".
The actual subroutines are of course still generated so Winterfell still has to be recompiled at this point.
Done
Currently, Winterfell prover requires extracting the public data from the trace. For this to be possible, the map from public inputs to the first row, and map of outputs to the last row, must each be invertible.
The simplest case of this is probably the ONLY reasonable one: each public input must correspond to one trace column, similarly for outputs. Possible some input columns are not mapped to so they must be hard initialised. Some outputs columns may be of no interest.
The correspondences can be specified like this:
which says public input 0 goes to column 2, input1 goes to 3, and input 2 goes to 0. So we can use this information to completely automate
get_pub_inputs
which currently looks like this:Notice this code does not need to know the names of the variables in PublicInputs:
inputs
andoutputs
are local variables.This function:
is already invariant (i.e. the same function will work in all cases).
It remains to find any further variants such as the AirName, and then make the test harness generate this file.