-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Allow adjusting priority coming from Signed Extensions #9596
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code looks great, but I am still struggling to wrap my head around the 'why' of this.
Now, the priority is fee/weight
ratio returned from TransactionPayment
, which is some large-ish value. It seems like the range is too small to have any effect next to that, so we might as well make the priority of CheckWeight be 0
. To rephrase, I am not sure where the range [0..10]
comes from and why it is chosen. I presume each chain can choose their own range, but it would be good if we can give a guideline of what rationale they should use to choose the range.
Not large enough currently on some chains. The required
The range is indeed arbitrary, just to have some differentiation between transactions. We can easily scale down by
Indeed. Basically in case the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but needs a companion to apply sensible values to polkadot runtimes as well.
@kianenigma added the companion: paritytech/polkadot#3743 |
…om Signed Extensions (paritytech#9596)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. We're excited to get this one on Moonriver.
Co-authored-by: Joshy Orndorff <[email protected]>
…om Signed Extensions (paritytech#9596) (cherry picked from commit 2af6e2c)
Closing in favour of #9834 |
…om Signed Extensions (paritytech#9596) (cherry picked from commit 2af6e2c)
Closes #5672
The PR introduces
AdjustPriority
wrapper forSignedExtension
. The motivation for introducing this is defined in the original issue. Basically we want to make sure that the priorities we add (coming from different Signed Extensions) are in reasonable order of magnitude.The idea is to divide the priority of theCheckWeight
so that instead of being in[0..MAX_BLOCK_WEIGHT]
(forNormal
transactions) range it's in[0..10]
range.The idea is to reduce the priority of the
CheckWeight
extension down to0
.