Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VM Opcode #573

Open
SilentCicero opened this issue Apr 16, 2024 · 0 comments
Open

VM Opcode #573

SilentCicero opened this issue Apr 16, 2024 · 0 comments

Comments

@SilentCicero
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant