Skip to content
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

Open
Voxelot opened this issue Mar 30, 2023 · 1 comment
Open

Charge for the fields of transaction as part of min_fee #415

Voxelot opened this issue Mar 30, 2023 · 1 comment
Assignees

Comments

@Voxelot
Copy link
Member

Voxelot commented Mar 30, 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:

  • Liveness failures (i.e. skipped consensus rounds)
  • Unsynchronizable nodes
  • Unanticipated DA expenses, leaving the L1 committer to pick up the tab.

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:

@Voxelot
Copy link
Member Author

Voxelot commented Jun 5, 2023

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 Voxelot changed the title Accurate Transaction Verification Costing Accurate CheckedTransaction Verification Costing Sep 13, 2023
@xgreenx xgreenx changed the title Accurate CheckedTransaction Verification Costing Charge transaction for fields that slows down its verification Oct 5, 2023
@xgreenx 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 xgreenx self-assigned this Oct 5, 2023
@xgreenx xgreenx changed the title Charge transaction for fields that slow down its verification Charge for the fields of transaction as part of min_fee Oct 12, 2023
@xgreenx xgreenx removed their assignment Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants