Type Alias MIPSWitness

Source
pub type MIPSWitness<T> = Witness<N_MIPS_COLS, T>;
Expand description

Represents one line of the execution trace of the virtual machine It contains

  • SCRATCH_SIZE columns
  • 1 column to keep track of the instruction index
  • 1 column for the system error code
  • N_MIPS_SEL_COLS columns for the instruction selectors. The columns are, in order,
  • the 32 general purpose registers
  • the low and hi registers used by some arithmetic instructions
  • the current instruction pointer
  • the next instruction pointer
  • the heap pointer
  • the preimage key, split in 8 consecutive columns representing 4 bytes of the 32 bytes long preimage key
  • the preimage offset, i.e. the number of bytes that have been read for the currently processing preimage
  • [SCRATCH_SIZE] - 46 intermediate columns that can be used by the instruction set
  • the hash counter
  • the flag to indicate if the current instruction is a preimage syscall
  • the flag to indicate if the current instruction is reading a preimage
  • the number of bytes read so far for the current preimage
  • how many bytes are left to be read for the current preimage
  • the (at most) 4 bytes of the preimage key that are currently being processed
  • 4 helpers to check if at least n bytes were read in the current row

Aliased Type§

pub struct MIPSWitness<T> {
    pub cols: Box<[T; 149]>,
}

Fields§

§cols: Box<[T; 149]>

A witness row is represented by an array of N witness columns When T is a vector, then the witness describes the rows of the circuit.

Trait Implementations§

Source§

impl<T: Clone> Index<ColumnAlias> for MIPSWitness<T>

Source§

fn index(&self, index: ColumnAlias) -> &Self::Output

Map the column alias to the actual column index.

Source§

type Output = T

The returned type after indexing.
Source§

impl<T: Clone> Index<Instruction> for MIPSWitness<T>

Source§

fn index(&self, index: Instruction) -> &Self::Output

Map the column alias to the actual column index.

Source§

type Output = T

The returned type after indexing.
Source§

impl<T: Clone> IndexMut<ColumnAlias> for MIPSWitness<T>

Source§

fn index_mut(&mut self, index: ColumnAlias) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<T: Clone> IndexMut<Instruction> for MIPSWitness<T>

Source§

fn index_mut(&mut self, index: Instruction) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more