You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are several areas of transaction verification that do not have accurate costing. While we have a good framework for pricing opcodes now, our costing of the transaction min fee leaves more to be desired.
Currently the min fee of a transaction is solely based on the amount of chargeable serialized bytes. However, this is likely insufficient for accurate transaction metering. The risks of inaccurate metering are:
Liveness failures (i.e. skipped consensus rounds)
Unsynchronizable nodes
Unanticipated DA expenses, leaving the L1 committer to pick up the tab.
There's likely more hot spots in transaction validation that aren't captured by our current byte pricing structure. We should investigate this further by building a fuzzing framework FuelLabs/fuel-core#1402 that detects any discrepancies between transaction base cost vs validation time in gas units (i.e. IntoChecked::into_checked) + disk space delta after execution #601. This should help capture subtle differences in disk footprint & I/O requirements such as contract bytecode being duplicated into two tables instead unlike the rest of the transaction bytes.
The action list is:
Create benchmarks to track the impact of each field on execution time.
Initial benchmarking shows we need to increase minimum fee based on predicates & per signature recovery, potentially adjust gas_per_byte / how bytes are metered.
Voxelot
changed the title
Accurate Transaction Verification Costing
Accurate CheckedTransaction Verification Costing
Sep 13, 2023
xgreenx
changed the title
Accurate CheckedTransaction Verification Costing
Charge transaction for fields that slows down its verification
Oct 5, 2023
xgreenx
changed the title
Charge transaction for fields that slows down its verification
Charge transaction for fields that slow down its verification
Oct 5, 2023
xgreenx
changed the title
Charge transaction for fields that slow down its verification
Charge for the fields of transaction as part of min_feeOct 12, 2023
Problem overview
There are several areas of transaction verification that do not have accurate costing. While we have a good framework for pricing opcodes now, our costing of the transaction min fee leaves more to be desired.
Currently the min fee of a transaction is solely based on the amount of chargeable serialized bytes. However, this is likely insufficient for accurate transaction metering. The risks of inaccurate metering are:
Solution
We've already found several places where we undercharge users FuelLabs/fuel-core#1418.
There's likely more hot spots in transaction validation that aren't captured by our current byte pricing structure. We should investigate this further by building a fuzzing framework FuelLabs/fuel-core#1402 that detects any discrepancies between transaction base cost vs validation time in gas units (i.e.
IntoChecked::into_checked
) + disk space delta after execution #601. This should help capture subtle differences in disk footprint & I/O requirements such as contract bytecode being duplicated into two tables instead unlike the rest of the transaction bytes.The action list is:
min_fee
gas prices by executing the block with pre-defined gas limit fuel-core#1387Checked<Tx>
verification costing fuel-core#1402min_fee
of the transaction.The text was updated successfully, but these errors were encountered: