FuelLabs / fuel-core

Rust full node implementation of the Fuel v2 protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve dry-run API to validate all possible issues at once

arboleya opened this issue · comments

The idea is that the VM would ignore some rules and just dry-run the TX as best it can to completion. Each time some asset amount, contract, or variable UTXO is missing, it adds that to a log of missing data and continues the estimation run. All the missing data pieces encountered during the estimation call are discovered and returned in a single request to the API.

Implementing this solution would significantly reduce the number of total dry runs, relieving the burden on the SDK and node and allowing them to operate much faster, thereby enhancing execution efficiency for the users.

Note

One alternative is to run the VM via WASM to calculate everything. Still, since the WASM can be heavy in the MBs ballpark, it's currently not a feasible solution for front-end environments, so a change in the API could be a realistic solution.

cc @Voxelot @luizstacio

Closing as a duplicate of the FuelLabs/fuel-vm#691