fuel-specs
fuel-specs copied to clipboard
VM Opcode
VM
FuelVM Opcode
The FuelVM should have an opcode which runs the current implementation of the FuelVM. It would take a pre-state containing the configuration and inputs in memory and execute an output post state in memory. This opcode would be used for Fuel L3 fraud proving.
VM
: FuelVM Opcode
Description | Runs the FuelVM given a pre-state $rA and outputs a post-state $rB in memory with ECALL operations specified in RiscV bytecode at $rC . |
Operation | $rB = vm($rA); |
Syntax | VM $rA, $rB, $rC |
Encoding | 0x00 rA rB $rC - |
Notes |
$rA memory layout
[ vm initialization configuration ]
[ transaction data ]
[ storage keys and values ]
$rB memory layout
[ outputs ]
[ receipts ]
[ balances ]
Panic if:
- The VM encounters a
VM
opcode during execution of$rA
- Panic if RiscV
ECALL
operations panic.
$of
and $err
are cleared.