Internals

Transaction priority

How custom transaction extensions determine extrinsic priority in subtensor.

View as Markdown

In Subtensor, transaction priority is determined by custom transaction extensions, which alter or override the default Substrate SDK behavior. Extensions affecting transaction priority are:

  • ChargeTransactionPaymentWrapper (wraps ChargeTransactionPayment)
  • DrandPriority

Substrate SDK combines priorities from all transaction extensions using addition.

ChargeTransactionPaymentWrapper

In the Substrate SDK, ChargeTransactionPayment normally calculates transaction priority based on:

  • Tip — an extra fee paid by the sender.
  • Weight — computational complexity of the transaction.
  • Dispatch class — category of the transaction (Normal, Operational, Mandatory).

However, in Subtensor, ChargeTransactionPaymentWrapper overrides this logic. It replaces the dynamic calculation with a flat priority scale based only on the dispatch class.

Current priority values

Dispatch ClassPriority ValueNotes
Normal1Standard transactions
Mandatory1Rarely used, same as Normal
Operational10_000_000_000Reserved for critical system extrinsics (e.g.: sudo calls)

DrandPriority

Special pallet_drand priority: 10_000 for write_pulse extrinsic.