-
Notifications
You must be signed in to change notification settings - Fork 81
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
Charge for the fields of transaction as part of min_fee
#415
Labels
Comments
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 Oct 12, 2023
min_fee
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: