@@ -404,10 +404,6 @@ pub fn rate_limited_calls() -> Vec<RateLimitedCall> {
404404 subtensor_identifier( 3 ) , // remove_stake
405405 subtensor_identifier( 89 ) , // remove_stake_limit
406406 subtensor_identifier( 103 ) , // remove_stake_full_limit
407- subtensor_identifier( 86 ) , // transfer_stake
408- subtensor_identifier( 85 ) , // move_stake
409- subtensor_identifier( 87 ) , // swap_stake
410- subtensor_identifier( 90 ) , // swap_stake_limit
411407 ] ,
412408 legacy: sources( & [ "TxRateLimit" ] , & [ ] ) ,
413409 } ,
@@ -423,7 +419,10 @@ pub fn rate_limited_calls() -> Vec<RateLimitedCall> {
423419 scope: LimitScopeKind :: Global ,
424420 usage: UsageKind :: AccountSubnet ,
425421 read_only: Vec :: new( ) ,
426- legacy: sources( & [ "TxChildkeyTakeRateLimit" ] , & [ "TransactionKeyLastBlock::SetChildkeyTake" ] ) ,
422+ legacy: sources(
423+ & [ "TxChildkeyTakeRateLimit" ] ,
424+ & [ "TransactionKeyLastBlock::SetChildkeyTake" ] ,
425+ ) ,
427426 } ,
428427 RateLimitedCall {
429428 target: TargetKind :: Standalone ( subtensor_identifier( 67 ) ) , // set_children
@@ -462,10 +461,7 @@ pub fn rate_limited_calls() -> Vec<RateLimitedCall> {
462461 scope: LimitScopeKind :: Global ,
463462 usage: UsageKind :: SubnetNeuron ,
464463 read_only: Vec :: new( ) ,
465- legacy: sources(
466- & [ "EvmKeyAssociateRateLimit" ] ,
467- & [ "AssociatedEvmAddress" ] ,
468- ) ,
464+ legacy: sources( & [ "EvmKeyAssociateRateLimit" ] , & [ "AssociatedEvmAddress" ] ) ,
469465 } ,
470466 RateLimitedCall {
471467 target: TargetKind :: Standalone ( admin_utils_identifier( 76 ) ) , // sudo_set_mechanism_count
@@ -548,10 +544,10 @@ type LimitImporter<T> = fn(&Grouping, &mut LimitEntries<T>) -> u64;
548544
549545fn limit_importers < T : SubtensorConfig > ( ) -> [ LimitImporter < T > ; 4 ] {
550546 [
551- import_simple_limits :: < T > , // Tx/childkey/delegate/staking lock, register, sudo, evm, children
547+ import_simple_limits :: < T > , // Tx/childkey/delegate/staking lock, register, sudo, evm, children
552548 import_owner_hparam_limits :: < T > , // Owner hyperparams
553- import_serving_limits :: < T > , // Axon/prometheus serving rate limit per subnet
554- import_weight_limits :: < T > , // Weight/commit/reveal per subnet and mechanism
549+ import_serving_limits :: < T > , // Axon/prometheus serving rate limit per subnet
550+ import_weight_limits :: < T > , // Weight/commit/reveal per subnet and mechanism
555551 ]
556552}
557553
@@ -581,9 +577,9 @@ fn import_simple_limits<T: SubtensorConfig>(
581577 ) ;
582578 }
583579
584- // Share the TxRateLimit span across staking operations; add_* are marker-only via span tweaks .
585- if let Some ( span ) = block_number :: < T > ( TxRateLimit :: < T > :: get ( ) ) {
586- if let Some ( members ) = grouping . members ( GROUP_STAKING_OPS ) {
580+ // Staking ops are gated to one operation per block in legacy ( marker cleared each block) .
581+ if let Some ( members ) = grouping . members ( GROUP_STAKING_OPS ) {
582+ if let Some ( span ) = block_number :: < T > ( 1 ) {
587583 for call in members {
588584 set_global_limit :: < T > ( limits, grouping. config_target ( * call) , span) ;
589585 }
@@ -761,9 +757,9 @@ fn last_seen_importers<T: SubtensorConfig>() -> [LastSeenImporter<T>; 5] {
761757 [
762758 import_last_rate_limited_blocks :: < T > , // LastRateLimitedBlock (tx, delegate, owner hyperparams, sn owner)
763759 import_transaction_key_last_blocks :: < T > , // TransactionKeyLastBlock (children, version key, mechanisms)
764- import_last_update_entries :: < T > , // LastUpdate (weights/mechanism weights)
765- import_serving_entries :: < T > , // Axons/Prometheus
766- import_evm_entries :: < T > , // AssociatedEvmAddress
760+ import_last_update_entries :: < T > , // LastUpdate (weights/mechanism weights)
761+ import_serving_entries :: < T > , // Axons/Prometheus
762+ import_evm_entries :: < T > , // AssociatedEvmAddress
767763 ]
768764}
769765
@@ -866,8 +862,8 @@ fn import_last_update_entries<T: SubtensorConfig>(
866862 let mut reads: u64 = 0 ;
867863 for ( index, blocks) in LastUpdate :: < T > :: iter ( ) {
868864 reads += 1 ;
869- let ( netuid, mecid) = Pallet :: < T > :: get_netuid_and_subid ( index )
870- . unwrap_or ( ( NetUid :: ROOT , 0 . into ( ) ) ) ;
865+ let ( netuid, mecid) =
866+ Pallet :: < T > :: get_netuid_and_subid ( index ) . unwrap_or ( ( NetUid :: ROOT , 0 . into ( ) ) ) ;
871867 let subnet_calls = if mecid == 0 . into ( ) {
872868 weight_calls_subnet ( grouping)
873869 } else {
@@ -882,7 +878,10 @@ fn import_last_update_entries<T: SubtensorConfig>(
882878 continue ;
883879 } ;
884880 let usage = if mecid == 0 . into ( ) {
885- RateLimitUsageKey :: SubnetNeuron { netuid, uid : uid_u16 }
881+ RateLimitUsageKey :: SubnetNeuron {
882+ netuid,
883+ uid : uid_u16,
884+ }
886885 } else {
887886 RateLimitUsageKey :: SubnetMechanismNeuron {
888887 netuid,
0 commit comments