Conversation
| values_list, | ||
| salts_list, | ||
| version_keys, | ||
| }) => { |
There was a problem hiding this comment.
This could possibly be two extensions with one checking for the coldkey swap to invalidate. The other one handles just this priority logic
There was a problem hiding this comment.
@shamil-gadelshin In fact, coldkey swap check should be done in validation, not in transaction extension (in a separate PR)
There was a problem hiding this comment.
I removed the second (priority) extension after the discussion with @ppolewicz
| } | ||
| DispatchClass::Operational => { | ||
| // System calls | ||
| 10_000_000_000u64 |
There was a problem hiding this comment.
I added a special transaction extension for write_pulse priority. Other extrinsics from drand pallet have sudo origin check.
|
Drand pulse submission has to have a check in validation (when inserting into mempool) to see if it's signed by the designated offline worker - if we don't do that then someone can spam these and flood out weight setting, staking, transfers etc |
|
After a discussion with Shamil, we found out that it should be made slightly simpler and the transaction priority for setting weights should be removed until further notice (due to newly found attack vectors) EDIT: after an even longer discussion with Vune, it was agreed to remove the priority for setting weights |
|
Last updates:
|
This PR changes Subtensor transaction priority algorithm. Here is the current algorithm description.
Transaction Priority
Overview
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(wrapsChargeTransactionPayment)SubtensorTransactionExtensionSubstrate SDK combines priorities from all transaction extensions using addition.
1.
ChargeTransactionPaymentWrapperIn the Substrate SDK,
ChargeTransactionPaymentnormally calculates transaction priority based on:Normal,Operational,Mandatory).However, in Subtensor,
ChargeTransactionPaymentWrapperoverrides this logic.It replaces the dynamic calculation with a flat priority scale based only on the dispatch class.
Current priority values:
Normal1Mandatory1NormalOperational10_000_000_000sudocalls,drandpulses)2.
SubtensorTransactionExtensionThis extension introduces special priority rules for certain extrinsics, such as:
commit_weightsreveal_weightsFor these, priority is boosted using a time-sensitive factor:
LastUpdate.Additional changes
DispatchClass::OperationalDispatchClass::Normaleven if they contain extrinsics with other dispatch classesOperationaltoNormal:The absolute majority of the remaining extrinsics with
DispatchClass::Operationalhaveensure_rootor similar origin verification now.