Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

pallet_transaction_payment's TransactionByteFee is completely inflexible #10784

@notlesh

Description

@notlesh

pallet_transaction_payment provides only one input for scaling length fees, namely type TransactionByteFee: Get<BalanceOf<Self>>. In fee calculation, this value is used strictly as a multiplier on a transaction's length in bytes. The result is basically a compile-time constant modifier.

I believe this lacks the flexibility needed to create a fee structure that is both reasonably cheap for most txns and also expensive enough to prevent txn spam with large transactions (e.g. runtime upgrades).

In addition, this does not provide any mechanism for the cost of such a fee to respond to market pricing/demand, although this is potentially a distinct problem.

There are many ways this problem could be approached. I have introduced a small PR (#10785 ) which uses the same Vec<WeightToFeeCoefficient> mechanism used by the pallet's weight fee system. I include this mostly because I was able to solve the small-vs-large txn dilemma above using it, but I'm more interested in feedback about the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    J2-unconfirmedIssue might be valid, but it’s not yet known.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions