FuelLabs / fuel-vm

Fuel v2 interpreter in Rust
Other
358 stars 88 forks source link

Support dry run mode in the FuelVM #691

Open xgreenx opened 8 months ago

xgreenx commented 8 months ago

Problem overview

The FuelVM has many rules regarding transaction validity and requirements for using specific opcodes. Each opcode that touches the contract requires this contract's existence in the transactions' inputs. Another example is the tro opcode that requires the existence of the Variable output.

All those rules make the usage harder and require dry-running transactions many times on the SDK side to fulfill all rules.

Solution

The FuelVM may support dry run mode, in which all validity rules will not abort the execution immediately. Instead, we will keep a record of what rules are failing and provide feedback at the end of the execution with all problems.

xgreenx commented 8 months ago

We don't have plans to work on it before mainnet since it may bring vulnerabilities.

MitchTurner commented 3 weeks ago

I think we need to be clearer about what the implementation would look like. And it also could be useful to get some feedback from SDK people about what features they would most like.