-
Notifications
You must be signed in to change notification settings - Fork 745
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
Transaction priority should take into account the inclusion fee #257
Comments
I agree with this. Should be |
Two further comments:
|
Possibly a more up to date approach toward next-gen priority is #277 |
Unassigning this from myself since I won't be able to pick this up for next few weeks at minimum. I will keep an eye and pick it later if no one else has and when I have more bandwidth. |
Assign it to me @Ank4n |
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.The text was updated successfully, but these errors were encountered: