Enum arrabiata::interpreter::Instruction
source · pub enum Instruction {
Poseidon(usize),
EllipticCurveScaling(usize, u64),
EllipticCurveAddition(usize),
NoOp,
}
Expand description
A list of instruction/gadget implemented in the interpreter.
The control flow can be managed by implementing a function
fetch_next_instruction
and fetch_instruction
on a witness environnement.
See the Witness environment for more details.
Mostly, the instructions will be used to build the IVC circuit, but it can be generalized.
When the circuit is predefined, the instructions can be accompanied by a public selector. When implementing a virtual machine, where instructions are unknown at compile time, other methods can be used. We leave this for future work.
For the moment, the type is not parametrized, on purpose, to keep it simple (KISS method). However, IO could be encoded in the type, and encode a typed control-flow. We leave this for future work.
Variants§
Poseidon(usize)
This gadget implement the Poseidon hash instance described in the top-level documentation. Compared to the previous one (that might be deprecated in the future), this implementation does use the “next row” to allow the computation of one additional round per row. In the current setup, with NUMBER_OF_COLUMNS columns, we can compute 5 full rounds per row.
EllipticCurveScaling(usize, u64)
EllipticCurveAddition(usize)
NoOp
Trait Implementations§
source§impl Clone for Instruction
impl Clone for Instruction
source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more