Skip to content

Transaction priority should take into account the inclusion fee #257

Open
paritytech/substrate
#14717
@IkerAlus

Description

The concept of transaction priority is used to prioritize transactions in the transaction pool for block inclusion. At the moment, this concept of priority is defined in the get_priority function here.

If we look at this function, the transaction priority for "normal" class extrinsics is a function of the tip added by extrinsic author together with the weight and the length of the extrinsic. But it is not function of the inclusion fee of the extrinsic. As a practical example, this implies that extrinsics with a small and simple call (f.e., Remark call) paying a very small tip are prioritized over complex and big extrinsics (f.e., batchAll) paying no tip.

If we assume that transaction priority tries to maximize the profit for block producers, and knowing that block producers get 20% of the inclusion fee of every extrinsic, I believe that get_priority function should take into account the inclusion fee in its definition of transaction priority for "normal" class extrinsics. Something like :

priority = m * inclusion_fee + tip / bounded_{weight|length}.

where m is a multiplier to be defined depending on how much weight we would like to give to the inclusion fee in the priority computation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

I5-enhancementAn additional feature request.T1-FRAMEThis PR/Issue is related to core FRAME, the framework.

Type

No type

Projects

  • Status

    To Do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions