Create a fuzzing tool for `Checked<Tx>` verification costing
@Dentosal is already working on this.
Since Oct 19, 2023.
- Dominant language
- Rust
- Stars
- 56.8k
- Forks
- 2.9k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 5
Description
Overview
After an analytic analysis of the codebase, we figured out the heaviest operation during transaction verification.
But it doesn't mean we found all potential places that should influence min_fee.
The purpose of this issue is to create a more accurate transaction costing model by identifying and addressing areas where costs are not adequately captured, thus minimizing risks such as liveness failures, unsynchronizable nodes, and unanticipated DA expenses.
Implementation details
The idea is to create a fuzzing test/util that fills random fields of the transaction and produces a valid Checked<Tx>.
The min_fee represents our expectation regarding how long it takes to validate the transaction. We can translate gas into execution time, and if the creation of Checked<Tx> takes more than expected time, then it means we undercharge for some fields.
Note
The creation of the fuzzing tool was started at https://github.com/FuelLabs/fuel-core/pull/1156. So it can be used as a good base.
Creating the fuzzing tool and identifying problematic fields are two different tasks. But because the correctness of the tool can be verified only during its usage this issue describes both tasks. But if we are confident enough in the tool, we can split this issue into two and start work on the usage of the fuzzing tool as a separate step/PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.