Skip to content

Conversation

@muharem
Copy link
Contributor

@muharem muharem commented Jul 13, 2025

Address TODOs that were dependant on the sdk version and assigned the owners for all open TODOs.

Addressed TODOs:

  • xcm weights TODOs dependant on xcm v5;
  • weights for pallet indices;
  • replaces TODO error by actual errors;
  • replace mock for MessageQueue with in queue prioritisation mechanics;
  • conviction voting weights sanity check;
  • and more (=

/// Storage: UNKNOWN KEY `0x51f0fdd8976812ef2ac697eeb9d43dc58572feb1c375d7a518a751256473585f` (r:255 w:255)
/// Proof: UNKNOWN KEY `0x51f0fdd8976812ef2ac697eeb9d43dc58572feb1c375d7a518a751256473585f` (r:255 w:255)
/// Storage: UNKNOWN KEY `0x51f0fdd8976812ef2ac697eeb9d43dc578adc36325155ecc312db8d05535c572` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x51f0fdd8976812ef2ac697eeb9d43dc578adc36325155ecc312db8d05535c572` (r:1 w:1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe one TODO here to check why unknown key?

@muharem
Copy link
Contributor Author

muharem commented Jul 14, 2025

/cmd bench --runtime asset-hub-polkadot --pallet pallet_ah_migrator pallet_indices pallet_scheduler

@github-actions
Copy link

Command "bench --runtime asset-hub-polkadot --pallet pallet_ah_migrator pallet_indices pallet_scheduler" has started 🚀 See logs here

…ot --pallet pallet_ah_migrator pallet_indices pallet_scheduler'
@github-actions
Copy link

Command "bench --runtime asset-hub-polkadot --pallet pallet_ah_migrator pallet_indices pallet_scheduler" has finished ✅ See logs here

Subweight results:
File Extrinsic Old New Change [%]
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/polkadot_runtime_common_claims.rs prevalidate_attests 100ps Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/polkadot_runtime_common_claims.rs move_claim 825.00us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/polkadot_runtime_common_claims.rs mint_claim 439.00us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/polkadot_runtime_common_claims.rs claim_attest 999.00us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/polkadot_runtime_common_claims.rs claim 1.00ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/polkadot_runtime_common_claims.rs attest 1.06ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_whitelist.rs whitelist_call 298.82us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_whitelist.rs remove_whitelisted_call 298.95us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_whitelist.rs dispatch_whitelisted_call_with_preimage 318.33us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_whitelist.rs dispatch_whitelisted_call 5.17ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_treasury.rs void_spend 141.48us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_treasury.rs spend_local 365.27us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_treasury.rs spend 286.19us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_treasury.rs remove_approval 133.65us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_treasury.rs payout 824.45us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_treasury.rs on_initialize_proposals 28.07ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_treasury.rs check_status 143.15us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs set_retry_named 193.82us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs set_retry 159.86us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs service_task_periodic 5.22us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs service_task_named 106.97us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs service_task_fetched 6.07ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs service_task_base 5.17us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs service_agendas_base 134.43us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs service_agenda_base 159.44us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs schedule_retry 241.22us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs schedule_named 356.44us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs schedule 224.30us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs execute_dispatch_unsigned 3.43us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs execute_dispatch_signed 31.16us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs cancel_retry_named 191.46us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs cancel_retry 157.83us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs cancel_named 418.22us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_scheduler.rs cancel 389.22us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs submit 393.42us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs set_some_metadata 200.82us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs refund_submission_deposit 161.02us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs refund_decision_deposit 160.62us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs place_decision_deposit_queued 580.58us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs place_decision_deposit_preparing 531.71us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs place_decision_deposit_passing 669.53us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs place_decision_deposit_not_queued 591.59us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs place_decision_deposit_failing 667.41us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs one_fewer_deciding_queue_empty 163.83us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs one_fewer_deciding_passing 428.77us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs one_fewer_deciding_failing 425.76us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_timed_out 142.49us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_requeued_slide 176.98us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_requeued_insertion 177.30us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_rejected 280.25us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_queued 307.70us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_preparing 276.54us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_not_queued 307.60us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_no_deposit 277.24us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_end_confirming 281.44us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_continue_not_confirming 279.22us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_continue_confirming 278.04us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_begin_deciding_passing 414.24us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_begin_deciding_failing 409.77us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_begin_confirming 280.17us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs nudge_referendum_approved 542.26us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs kill 735.16us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs clear_metadata 171.07us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_referenda.rs cancel 515.40us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_preimage.rs unrequest_unnoted_preimage 164.68us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_preimage.rs unrequest_preimage 282.33us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_preimage.rs unrequest_multi_referenced_preimage 164.65us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_preimage.rs unnote_preimage 446.41us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_preimage.rs unnote_no_deposit_preimage 287.53us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_preimage.rs request_unnoted_preimage 169.44us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_preimage.rs request_requested_preimage 164.75us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_preimage.rs request_preimage 180.24us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_preimage.rs request_no_deposit_preimage 172.71us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_preimage.rs note_requested_preimage 7.39ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_preimage.rs note_preimage 7.58ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_preimage.rs note_no_deposit_preimage 7.40ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_preimage.rs ensure_updated 554.08ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_indices.rs transfer 299.04us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_indices.rs poke_deposit 156.15us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_indices.rs freeze 160.08us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_indices.rs free 155.70us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_indices.rs force_transfer 283.38us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_indices.rs claim 156.38us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_conviction_voting.rs vote_new 817.19us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_conviction_voting.rs vote_existing 1.09ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_conviction_voting.rs unlock 515.40us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_conviction_voting.rs undelegate 82.55ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_conviction_voting.rs remove_vote 775.39us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_conviction_voting.rs remove_other_vote 240.03us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_conviction_voting.rs delegate 82.86ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_child_bounties.rs unassign_curator 454.32us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_child_bounties.rs propose_curator 297.18us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_child_bounties.rs close_child_bounty_added 840.45us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_child_bounties.rs close_child_bounty_active 983.19us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_child_bounties.rs claim_child_bounty 854.50us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_child_bounties.rs award_child_bounty 173.53us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_child_bounties.rs add_child_bounty 815.98us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_child_bounties.rs accept_curator 313.92us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_bounties.rs unassign_curator 425.68us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_bounties.rs spend_funds 42.06ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_bounties.rs propose_curator 141.12us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_bounties.rs propose_bounty 499.21us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_bounties.rs extend_bounty_expiry 141.51us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_bounties.rs close_bounty_proposed 554.38us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_bounties.rs close_bounty_active 722.80us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_bounties.rs claim_bounty 867.87us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_bounties.rs award_bounty 171.05us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_bounties.rs approve_bounty_with_curator 264.54us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_bounties.rs approve_bounty 268.54us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_bounties.rs accept_curator 286.06us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_asset_rate.rs update 140.64us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_asset_rate.rs remove 141.81us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_asset_rate.rs create 139.98us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_ops.rs withdraw_crowdloan_contribution 645.00us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_ops.rs unreserve_lease_deposit 337.00us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_ops.rs unreserve_crowdloan_reserve 368.00us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs start_migration 508.84us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs set_dmp_queue_priority 136.34us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_vesting_schedules 33.91ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_treasury_messages 27.85ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_single_scheduler_agenda 17.39ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_single_active_referendums 17.43ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_scheduler_lookup 26.16ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_referenda_values 3.43ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_referenda_metadata 26.14ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_proxy_proxies 87.36ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_proxy_announcements 37.81ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_preimage_request_status 9.26ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_preimage_legacy_status 37.30ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_preimage_chunk 5.01ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_nom_pools_messages 34.46ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_multisigs 37.29ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_liquid_accounts 41.18ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_indices 33.09ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_fast_unstake_messages 33.37ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_delegated_staking_messages 33.59ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_crowdloan_messages 38.86ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_conviction_voting_messages 30.15ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_complete_referendums 26.25ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_claims 32.94ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_bounties_messages 26.18ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_bags_list_messages 33.63ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_asset_rates 26.95ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs receive_accounts 165.23ms Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs force_set_stage 148.38us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs force_dmp_queue_priority 166.36us Added
system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_ah_migrator.rs finish_migration 180.16us Added
relay/polkadot/src/weights/pallet_rc_migrator.rs withdraw_account 444.35us Added
relay/polkadot/src/weights/pallet_rc_migrator.rs update_ah_msg_processed_count 136.59us Added
relay/polkadot/src/weights/pallet_rc_migrator.rs start_data_migration 141.57us Added
relay/polkadot/src/weights/pallet_rc_migrator.rs set_unprocessed_msg_buffer 10.00us Added
relay/polkadot/src/weights/pallet_rc_migrator.rs set_ah_ump_queue_priority 1ps Added
relay/polkadot/src/weights/pallet_rc_migrator.rs send_chunked_xcm_and_track 768.00us Added
relay/polkadot/src/weights/pallet_rc_migrator.rs schedule_migration 142.42us Added
relay/polkadot/src/weights/pallet_rc_migrator.rs resend_xcm 10.00us Added
relay/polkadot/src/weights/pallet_rc_migrator.rs receive_query_response 10.00us Added
relay/polkadot/src/weights/pallet_rc_migrator.rs force_set_stage 143.29us Added
relay/polkadot/src/weights/pallet_rc_migrator.rs force_ah_ump_queue_priority 1ps Added
relay/polkadot/src/weights/pallet_ah_migrator.rs start_migration 507.00us Added
relay/polkadot/src/weights/pallet_ah_migrator.rs set_dmp_queue_priority 135.00us Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_vesting_schedules 32.88ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_treasury_messages 26.61ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_single_scheduler_agenda 13.21ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_single_active_referendums 11.31ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_scheduler_lookup 25.88ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_referenda_values 3.36ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_referenda_metadata 25.81ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_proxy_proxies 188.26ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_proxy_announcements 35.43ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_preimage_request_status 8.44ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_preimage_legacy_status 35.09ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_preimage_chunk 4.14ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_nom_pools_messages 33.21ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_multisigs 35.11ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_liquid_accounts 37.25ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_indices 32.51ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_fast_unstake_messages 32.76ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_delegated_staking_messages 32.83ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_crowdloan_messages 39.52ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_conviction_voting_messages 32.39ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_complete_referendums 25.87ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_claims 32.40ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_bounties_messages 25.82ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_bags_list_messages 32.93ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_asset_rates 26.30ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs receive_accounts 148.44ms Added
relay/polkadot/src/weights/pallet_ah_migrator.rs force_set_stage 146.00us Added
relay/polkadot/src/weights/pallet_ah_migrator.rs force_dmp_queue_priority 164.00us Added
relay/polkadot/src/weights/pallet_ah_migrator.rs finish_migration 176.00us Added

@muharem muharem marked this pull request as ready for review July 15, 2025 11:21
muharem and others added 3 commits July 15, 2025 16:31
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
@ggwpez ggwpez merged commit ebfe2d6 into polkadot-fellows:dev-asset-hub-migration Jul 15, 2025
29 of 45 checks passed
// NOTE that the DMP queue is probably not empty because the snapshot that we use
// contains some overweight ones.
// TODO compare with the number of messages before the migration
// TODO: @re-gius compare with the number of messages before the migration
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc: @re-gius

// the call of the preimage is mapped and a new preimage of the mapped call
// is noted. The unrequested preimage can be deletes since not needed
// anymore.
// TODO: @re-gius preimages that store referendums calls will be unrequested
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc: @re-gius

Source: https://github.com/paritytech/polkadot-sdk/blob/ace62f120fbc9ec617d6bab0a5180f0be4441537/substrate/frame/recovery/src/lib.rs#L610

- session (P/K/W): TODO session set keys moving to AH
- session (P/K/W): TODO: @Ank4n session set keys moving to AH
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc: @Ank4n

}

#[cfg(feature = "zombie-bite-sudo")] // FAIL-CI
#[cfg(feature = "zombie-bite-sudo")] // FAIL-CI @pepoviola
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fellowship-merge-bot bot added a commit that referenced this pull request Sep 24, 2025
A high-level look of the migration is this:

<img width="1204" height="745" alt="Screenshot 2025-09-17 at 18 23 57"
src="https://github.com/user-attachments/assets/1fb39ef8-5efa-4db2-81db-6dd775af3a39"
/>

You can see the main components being the `pallet_rc_migrator` and
`pallet_ah_migrator`. The RC migrator pallet takes data out of the RC
storage and enqueues it for AH through XCM::Transact calls to the AH
migrator pallet.
Each pallet on the RC side has a migrator module that handles the
removal of the old data and creation of the messages for AH. AH then
processes these messages through the MQ pallet and acknowledges back to
RC that they were processed (not shown in the graphic).

There is rate-limiting code in place to prevent it from overloading the
DMP queue or Asset Hub.

## For Reviewers

The review comments are being addressed in
#915.
We need eyes on the Core part that is described below.

## Core STM

The main stage transitions look like this. The only manual part is the
scheduling call by the fellowship that kicks off the procedure:

* `Pending` wait for Fellowship to call `schedule_migration(when)` ->
Scheduled
* `Scheduled` waiting for scheduled block -> `WaitingForAH`
* `WaitingForAH` AH replies that it is ready -> `WarmUp`
* `WarmUp`  waiting for warm-up end -> `Starting`
* `Starting` doing some startup initialization -> `DataMigration`
* `DataMigration` MAIN PART **all pallet migrations finish** ->
`CoolOff`
* `CoolOff` waiting for cool-off to end -> `SignalMigrationFinish`
* `SignalMigrationFinish` send signal to AH that we are done ->
`MigrationDone`
* `MigrationDone` finished, unlock all Pallets.

### State Machine

The core State Machine lives in the `RcMigrator` pallet in its
`on_initialize`:


https://github.com/polkadot-fellows/runtimes/blob/8ef1cc739d756b109dc93eaf3b9da00e3dcf1383/pallets/rc-migrator/src/lib.rs#L1338-L1342

On each block the Rc Migrator checks the current state and possibly
progresses to the next one. It will only do a single state transition
per block to reduce complexity of the code. Generally, there are three
states per pallet (called
[*stages*](https://github.com/polkadot-fellows/runtimes/blob/8ef1cc739d756b109dc93eaf3b9da00e3dcf1383/pallets/rc-migrator/src/lib.rs#L190-L389)
in the code). Some pallets have more then three, but it is generally
still a multiple of three and always follows the pattern of
`PalletInit`, `PalletOngoing { cursor }`, `PalletDone`:


https://github.com/polkadot-fellows/runtimes/blob/8ef1cc739d756b109dc93eaf3b9da00e3dcf1383/pallets/rc-migrator/src/lib.rs#L239-L244

Each pallet then has one migrator struct (eg. `MultisigMigrator<T>`)
that migrates the storage items from the Relay side. It lives in the
module of its name `rc-migrator/src/multisig.rs` respectively.
Taking Multisigs as an example; you can find two functions in the
migrator struct: `migrate_many` and `migrate_single`. The former one is
from the [`PalletMigration`
trait](https://github.com/polkadot-fellows/runtimes/blob/715dbb4455a127066d0118ce7a096c72200e1126/pallets/rc-migrator/src/types.rs#L209-L221).
The `migrate_single` function is done by convention to keep the code
readable. The `migrate_many` does the following:
- Weight accounting for the RC side: Normal weight tracking to not have
overtime RC blocks
- Weight accounting for the AH side: Ensuring to not send messages that
would take up too much weight on AH processing
- Ensure that DMP messages are sensibly sized by using the
`XcmBatchAndMeter`
- Taking the data out from the Relay chain (deleting it)
- Including the data into a DMP message and sending it towards AH

### AH Side

The main logic on Asset Hub lives in the `AhMigrator` pallet. It
contains at least one extrinsic per pallet to receive the incoming data
from the RC. We are using extrinsics since RC is wrapping the data into
XCM::Transacts:


https://github.com/polkadot-fellows/runtimes/blob/9a20b12e22b019c1c0b15b9af897567a559e424c/pallets/ah-migrator/src/lib.rs#L650-L653

This calls into the [`multisig`
module](https://github.com/polkadot-fellows/runtimes/blob/6b603ca47e5c49b3a898be3f8f6b078c424f42a0/pallets/ah-migrator/src/multisig.rs#L37)
to integrate the data into the storage. Per convention we are emitting
events for each item and the whole batch.
The main task of the AH side is to integrate the data. In the example of
the multisig it is special since we do not migrate the multisig, but
only the reserved account which will be unreserved on AH.

## Messaging Logic

The messaging is ACK based. The Relay sends message to Asset Hub up to a
specified limit (50). The limit can be adjusted on the fly through a
dedicated dispatchable call, restricted to Admin and Manager roles. The
limit may be overstepped by the configured batch-size (10), so in total
there should never be more than 60 DMPs queued. Each DMP is set to at
most
[50KB](https://github.com/polkadot-fellows/runtimes/blob/8ef1cc739d756b109dc93eaf3b9da00e3dcf1383/pallets/rc-migrator/src/lib.rs#L131).

The Relay Chain migrator creates a query for each XCM data message using
the XCM query–response primitives and attaches a response status request
from Asset Hub to the message. The XCM executor on Asset Hub then sends
back the response status for every message with such a request.

The Relay migrator stores each data message sent to Asset Hub until it
receives confirmation of successful processing. It also provides a
dispatchable call, available only to Admin and Manager roles, to resend
any unconfirmed messages.

A bug that prevented certain messages from being accounted for during a
particulat pallet migration caused the Westend AHM stall. The system was
queuing too many DMPs, which forced WAH to author an overweight block
while attempting to process them all at once.

## Call Filtering

Pallet calls are filtered during the migration for three reasons:
- prevent malicious users from spamming the chain with cheap TX and
slowing down the migration
- prevent users from sending many UMPs out of AH to clog up the UMP
queue
- prevent interference with pallets that are being migrated to avoid
messing up their storage invariants

Both RC and AH provide call filters for `Before`, `During` and `After`
the migration. As you can see, most things are disabled during the
migration on both chains. After the migration, Relay chain keeps pretty
much everything disabled since it was now enabled on AH:
- Before: RC everything enabled, AH all new pallets disabled (staking,
gov etc)
- During: RC mostly everything disabled, AH mostly everything disabled
- After: RC mostly everything disabled (staking, gov etc), AH everything
enabled (staking, gov etc)

This is implemented  by returning three bools, one for each phase:  

https://github.com/polkadot-fellows/runtimes/blob/88f4aaf62236fbee9cfb9183e44333bac45b1371/system-parachains/asset-hubs/asset-hub-polkadot/src/ah_migration/call_filter.rs#L81-L83

## Testing and Dry-Runs

https://github.com/paritytech/ahm-dryrun is the repository for testing
infrastructure for AHM. As of now, the following is being tested there
(as a part of "[AHM Flow (all
steps)](https://github.com/paritytech/ahm-dryrun/actions/workflows/zombie-bite.yml)"
nightly action):
* Dry-running a migration on a fork of Kusama
* Re-running the rust unit tests introduced in this branch
* Re-running a subset of the same tests, re-written in TS
* Re-running PET tests.

Each action produces a table with the summary of the test results: 

<img width="682" height="357" alt="Screenshot 2025-09-19 at 09 03 20"
src="https://github.com/user-attachments/assets/69c1e37d-6f8f-4b57-b97f-75781a1e1a3a"
/>

And 4 snapshot files (2 real databases, 2 try-runtime snapshots) which
can be used to re-run any of the tests, or run the pre/post migration
chain, locally.

<img width="1347" height="476" alt="Screenshot 2025-09-19 at 09 03 40"
src="https://github.com/user-attachments/assets/127cbf76-b2fb-467f-8fef-3e93a9a709f6"
/>


<details><summary>Full Changelog</summary>
<p>

- **[AHM] OpenGov for Kusama AH (#877)**
- **Relay Chain Accounts to Asset Hub Migration (#515)**
- **Test Relay<->AH migration through DMP messages (#528)**
- **[AHM] Improve account migration (#532)**
- **[AHM] Add multisig migration (#534)**
- **[AHM] Proxy migration (#542)**
- **[AHM] Cleanup and add Preimage doc (#543)**
- **[AHM] Improve accounts migration (#550)**
- **[AHM] Preimage migration (#545)**
- **[AHM] Add Polkadot call filtering (#559)**
- **[AHM] Nomination pools (#562)**
- **[AHM] referenda pallet (#558)**
- **[AHM] Cleanup (#565)**
- **[AHM] Scheduler Pallet (#569)**
- **[AHM] Fast unstake and Bags list (#563)**
- **[AHM] Pallet claims (#570)**
- **[AHM] Conviction Voting Pallet (#578)**
- **[AHM] Pallet Indices (#577)**
- **[AHM] pause scheduler during migration (#580)**
- **[AHM] Asset rate pallet migration (#581)**
- **[AHM] Bounties data migration (#585)**
- **[AHM] Vesting (#575)**
- **[AHM] fix the rc-migrator call filter (#598)**
- **[AHM] Sovereign Account Translation (#594)**
- **[AHM] Crowdloans (#592)**
- **[AHM] Set up AH migration testing framework for single pallets
(#597)**
- **[AHM] Stage management (#584)**
- **[AHM] Do not pause inherents 🙈 (#609)**
- **[AHM] Relay Chain accounts' reserves (#602)**
- **[AHM] Benchmarks (#589)**
- **[AHM] Pallet testing framework (#612)**
- **[AHM] fix xcm weight at most (#617)**
- **[AHM] Improve weight accounting for accounts migration  (#618)**
- **[AHM] AH acks messages from RC (#620)**
- **[AHM] Pure Proxy Investigation (#621)**
- **[AHM] Remove migrated items for pallet preimage and improve testing
(#619)**
- **[AHM] Referenda metadata (#633)**
- **[AHM] Fix accounts migration failures (#628)**
- **[AHM] refactor events and enable scheduled migration start (#634)**
- **[AHM] Migrating DOT total issuance tracking from RC to AH (#607)**
- **[AHM] Comment faulty checks out (#640)**
- **Account migrator refactor (#639)**
- **[AHM] Rebase (#641)**
- **[AHM] Run AHM test in CI (#642)**
- **[AHM] Vesting test (#615)**
- **[AHM] bags_list and conviction_voting tests  (#632)**
- **[AHM] Treasury pallet migration (#624)**
- **[AHM] Fix tests for pallet preimage (#643)**
- **[AHM] Test Coverage Report (#650)**
- **[AHM] deactivate/reactivate total issuance & weights (#648)**
- **[AHM] add sudo behind feature flag (#657)**
- **[AHM] fast_unstake tests (#658)**
- **[AHM] asset_rate test (#660)**
- **[AHM] Pallet treasury tests (#664)**
- **[AHM] Improve account balances integration tests (#655)**
- **[AHM] Integrate AH migrator weights to RC (#665)**
- **Testing for bounties migration (#669)**
- **[AHM] Westend port adapters (#652)**
- **[AHM] fix checking account and total issuance migration (#636)**
- **[AHM] Bump polkadot relay and AH versions (#667)**
- **[AHM] Fix tests for pallet treasury (#671)**
- **[AHM] Claims and Crowdloan tests (#622)**
- **[AHM] Benchmarks (#663)**
- **[AHM] Add Asset Hub CallFilter (#670)**
- **[AHM] Westend staking migration (#689)**
- **[AHM] Referenda migration storage checks (#672)**
- **[AHM] AH benchmarks cleanup (#690)**
- **[AHM] Westend Async Staking Migration (#691)**
- **[AHM] Relay Chain migrator benchmarks (#692)**
- **[AHM] Asset Hub ops pallet benchmarks (#693)**
- **[AHM] Xcm send weights and Batch helper types (#694)**
- **Finish staking Westend (#695)**
- **[AHM] Account provider/consumer references (#702)**
- **[AHM] Fix westend builds (#704)**
- **[AHM] Generate weights (#706)**
- **[AHM] Proxy fixes and more tests (#707)**
- **[AHM] Docs and simpler events (#699)**
- **[AHM] Test call decoding (#710)**
- **[AHM] Emulated test for migration with async backing (#717)**
- **[AHM] Increase test coverage (#720)**
- **[AHM] Add referenda checks to Westend migration (#713)**
- **[AHM] Nom_pools test (#677)**
- **[AHM] Scheduler storage item checks (#680)**
- **[AHM] Update Polkadot Snapshot (#725)**
- **[AHM] Pallet multisig tests (#666)**
- **[AHM] Adapt XCM configuration to account for changes before and
after migration (#722)**
- **[AHM] document checking account migration (#716)**
- **[AHM] Dependency fixes for integration tests and the Polkadot
runtime (#751)**
- **[AHM] Remove empty conviction voting filter (#750)**
- **[AHM] Missing TODOs and `AccountState` type update (#742)**
- **[AHM] DMP prioritization on AH (#772)**
- **[AHM] Disable #[pallet::hooks] for migrating pallets during
migration (#784)**
- **[AHM] AH messages prioritization on RC (#787)**
- **[AHM] Cache test snapshots and include more tests into CI job
(#788)**
- **[AHM] Cleanup Westend feature (#789)**
- **[AHM] Introducing the Cool-Off stage (#786)**
- **[AHM]  Flow Control System (#780)**
- **[AHM] Migrate pallet delegated-staking to AH (#791)**
- **[AHM] Merge master into dev branch (#793)**
- **[AHM] Disable indirect XCMs from RC to AH and vice versa during
migration (#774)**
- **Rebase**
- **bring back RelayTreasuryLocation to make old tests compiole**
- **[AHM] Missing `RootLocation` for WaivedLocation for AHP (#798)**
- **[AHM] Missing `SecretaryEntities` for AHP (#797)**
- **[AHM] Migration idempotency (#808)**
- **[AHM] Block number providers for migrating pallets (#809)**
- **[AHM] Copy latest ah-ops pallet from the SDK (#810)**
- **[AHM / ah-migrator]: Implement RC->AH account translation `mocked`
migration across all involved pallets (#807)**
- **[AHM] Complete account balances tests (#674)**
- **[AHM] Address TODOs (#815)**
- **[AHM] Async staking config (#812)**
- **[AHM] Optional migration manager account id (#818)**
- **[AHM] Type safe Hold and Freeze-Reason translation (#819)**
- **[AHM] Create new response query on resend and tests (#816)**
- **PolkadotAssetHub: Enable Async Backing (#763)**
- **Ensure no era planned when migration starts (#728)**
- **[AHM] with async backing (#822)**
- **[AHM] Staking migration (#821)**
- **identify with only validator account**
- **[AHM] Tests work for Paseo (#827)**
- **[AHM] Child bounties (#613)**
- **[AHM] Cleanup and linter fixes (#828)**
- **[AHM] Fix snowbridge test - wrong import of
`RelayTreasuryPalletAccount` (instead of AH, it should be BH) (#831)**
- **[AHM] Account Translation mapping (#829)**
- **Fast unstake: remove alias**
- **fmt**
- **[AHM] Max migrated items per block (#834)**
- **[AHM] Record migration timings (#835)**
- **[AHM] Remove storage aliases and cleanup (#832)**
- **[AHM] fix Kusama bags list pallet benchmarks (#836)**
- **[AHM] Unprocessed msg buffer size 50 (#839)**
- **[AHM] Post migration cool off stage (#841)**
- **[AHM] Multisig test and storage_alias cleanup (#842)**
- **[AHM] Remove fast-unstake and test fixes (#846)**
- **Run try-state check for all pallets post AHM rust tests (#833)**
- **[AHM] Preserve on RC manager' account (#843)**
- **[AHM] Filter staking calls before migration starts (#847)**
- **[AHM] State Decode Tests (#848)**
- **[AHM] Send xcm extrinsic within migrator pallets (#851)**
- **Merge and cleanup merge commit**
- #845
- #852
- #862
- #875
- #872
- #877
- #626
- #879
- #885
- #886
- #882
- #883
- #854
- #888
- #895
- #892
- #896
- #889

</p>
</details> 

// only to let all CIs to execute for now
- [ ] Does not require a CHANGELOG entry

---------

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Adrian Catangiu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Co-authored-by: Muharem <[email protected]>
Co-authored-by: Dónal Murray <[email protected]>
Co-authored-by: Adrian Catangiu <[email protected]>
Co-authored-by: Giuseppe Re <[email protected]>
Co-authored-by: Andrii <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Yuri Volkov <[email protected]>
Co-authored-by: s0me0ne-unkn0wn <[email protected]>
Co-authored-by: Kian Paimani <[email protected]>
Co-authored-by: Branislav Kontur <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Francisco Aguirre <[email protected]>
Co-authored-by: fellowship-merge-bot[bot] <151052383+fellowship-merge-bot[bot]@users.noreply.github.com>
Co-authored-by: Pablo Andrés Dorado Suárez <[email protected]>
Co-authored-by: ordian <[email protected]>
Co-authored-by: Alistair Singh <[email protected]>
Co-authored-by: Sergej Sakac <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Serban Iorga <[email protected]>
Co-authored-by: Xiliang Chen <[email protected]>
Co-authored-by: Nikolai Kozlov <[email protected]>
Co-authored-by: nkprt <[email protected]>
Co-authored-by: Eugenio Paluello <[email protected]>
Co-authored-by: Javier Viola <[email protected]>
Co-authored-by: polka.dom <[email protected]>
Co-authored-by: Dónal Murray <[email protected]>
Co-authored-by: Karol Kokoszka <[email protected]>
Co-authored-by: joe petrowski <[email protected]>
Co-authored-by: Clara van Staden <[email protected]>
Co-authored-by: Ankan <[email protected]>
Co-authored-by: clangenb <[email protected]>
Co-authored-by: Andrei Sandu <[email protected]>
Co-authored-by: Andrei Sandu <[email protected]>
Co-authored-by: Alexandre Baldé <[email protected]>
Co-authored-by: Maksym H <[email protected]>
Co-authored-by: Alin Dima <[email protected]>
Co-authored-by: Alexander Theißen <[email protected]>
Co-authored-by: Christian Langenbacher <[email protected]>
Co-authored-by: Ankan <[email protected]>
Co-authored-by: Karol Kokoszka <[email protected]>
Co-authored-by: brenzi <[email protected]>
Co-authored-by: Doordashcon <[email protected]>
Co-authored-by: eskimor <[email protected]>
Co-authored-by: Robert <[email protected]>
Co-authored-by: Raymond Cheung <[email protected]>
Co-authored-by: Maciej <[email protected]>
Co-authored-by: Paolo La Camera <[email protected]>
Co-authored-by: kianenigma <[email protected]>
Co-authored-by: Alexandru Vasile <[email protected]>
Co-authored-by: Alexander Cyon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants