A tiny register-based zkVM written using Plonky3.
The VM contains 4 registers: r1
, r2
and r3
.
There are 4 opcodes:
LOAD
ADD
SUB
MUL
More opcodes can be added.
The trace looks like this:
r1 r2 r3 opcode destination_register input_register_1 input_register_2 value
The constraints are as follows:
- first row: all zero.
- if in next row:
opcode == LOAD
:- next row: destination_register must contain value, the other registers must be equal to current values
- if in next row
opcode == ADD
:- next row: destination_register must contain addition of 2 input register values
- next row: other registers than destination_register should be equal to current values