Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Companion for substrate#9878 #3949

Merged
merged 11 commits into from
Nov 17, 2021
Merged

Companion for substrate#9878 #3949

merged 11 commits into from
Nov 17, 2021

Conversation

koushiro
Copy link
Contributor

Companion for paritytech/substrate#9878

migrate the pallet-session-historical storage prefix (Session ==> Historical).

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
@gui1117 gui1117 added A4-companion A PR that needs a companion PR to merge in parallel for one of its downstream dependencies. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Oct 28, 2021
Copy link
Contributor

@gui1117 gui1117 left a 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,

@koushiro
Copy link
Contributor Author

koushiro commented Nov 16, 2021

Tested with try-runtime:

RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=trace
  ./polkadot try-runtime
  -d database --execution Native --chain polkadot-dev
  on-runtime-upgrade
  live --uri ws://localhost:29944

Output:

RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=trace ./polkadot try-runtime -d database --execution Native --chain polkadot-dev on-runtime-upgrade live --uri ws://localhost:29944
2021-11-16 14:15:20.144 TRACE main runtime::staking: [0] 💸 inserting genesis staker: be5ddb1579b72e84524fc29e78609e3caf42e85aa118ebfe0b0ad404b5bdd25f (15Jbynf3...) => 1000000000000 => StakerStatus::Validator    
2021-11-16 14:15:20.144 TRACE main runtime::staking: [0] 💸 planning new session 0 at genesis    
2021-11-16 14:15:20.144 DEBUG main runtime::staking: [0] 💸 Starting the first era.    
2021-11-16 14:15:20.144  INFO main runtime::staking: [0] 💸 generated 1 npos voters, 1 from validators and 0 nominators    
2021-11-16 14:15:20.144 TRACE main runtime::staking: [0] 💸 planning new session 1 at genesis    
2021-11-16 14:15:20.144  WARN main runtime::parachains: Took active validators from set with wrong size    
2021-11-16 14:15:20.144  WARN main runtime::parachains: Took active validators from set with wrong size.    
2021-11-16 14:15:20.144  WARN main runtime::parachains: Took active validators from set with wrong size    
2021-11-16 14:15:20.144 TRACE main runtime::staking: [0] 💸 starting session 0    
2021-11-16 14:15:20.149  INFO main remote-ext: scraping key-pairs from remote @ 0x83c1812face22aa9d31f6d0033874a88bf5731d88a9ab8ed44cc727a165ea20b    
2021-11-16 14:15:20.149  INFO main remote-ext: downloading data for all pallets.    
2021-11-16 14:38:37.697  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8    
2021-11-16 14:38:37.703  INFO main remote-ext: injecting a total of 1000844 keys    
2021-11-16 14:38:59.425 TRACE main executor: Request for native execution succeeded (native: polkadot-9130 (parity-polkadot-0.tx8.au0), chain: polkadot-9130 (parity-polkadot-0.tx8.au0))    
2021-11-16 14:38:59.428  INFO main try-runtime::cli: found matching spec name: "polkadot"    
2021-11-16 14:38:59.428  WARN main try-runtime::cli: spec version mismatch (local 9130 != remote 9122). This could cause some issues.    
2021-11-16 14:38:59.429 TRACE main executor: Request for native execution succeeded (native: polkadot-9130 (parity-polkadot-0.tx8.au0), chain: polkadot-9130 (parity-polkadot-0.tx8.au0))    
2021-11-16 14:38:59.429  INFO main polkadot_runtime: try-runtime::on_runtime_upgrade polkadot.    
2021-11-16 14:38:59.430  INFO main runtime::staking: [7723909] 💸 👜 staking bags-list migration passes PRE migrate checks ✅    
2021-11-16 14:38:59.430  INFO main runtime::session_historical: pre-migration prefix of storage 'HistoricalSessions': 'Session' ==> 'Historical'    
2021-11-16 14:38:59.430  INFO main runtime::session_historical: pre-migration prefix of storage 'StoredRange': 'Session' ==> 'Historical'    
2021-11-16 14:38:59.431  INFO main runtime::staking: [7723909] 💸 migrating staking to Releases::V8_0_0    
2021-11-16 14:38:59.431 DEBUG main runtime::bags_list: [7723909] 👜inserted 28ee403d79d6fb7a1d3eb608ba1655ae12913e478176167307ee5bf81310e485 (1vfh4Wtf...) with weight 6298017085253 into bag 6923202753807, new count is 1    
2021-11-16 14:38:59.431 DEBUG main runtime::bags_list: [7723909] 👜inserted 0facb5c3d191e7e1fcbf8888bf0fb988dd1ae17668eb4025aba0855ec8d11f23 (1MZ2PGw1...) with weight 5847987313763 into bag 6219344874498, new count is 2    
...
2021-11-16 14:38:59.907 DEBUG main runtime::bags_list: [7723909] 👜inserted e2da85b263b3f4811447581cf490a3fef11846d74dad93c108c48e014e664b3e (168Sjixn...) with weight 7231860434377 into bag 7706717883882, new count is 17527    
2021-11-16 14:38:59.907 DEBUG main runtime::bags_list: [7723909] 👜inserted f82c5feaec094d6edb3cdea5ecc99164635fe51b850247ffd9e6cb446fd6da60 (16cQ4LEA...) with weight 1352412490875 into bag 1386343627960, new count is 17528    
2021-11-16 14:38:59.907 DEBUG main runtime::bags_list: [7723909] 👜inserted 1b2d25fb29f7e1424e938cfad6bf0b644430676955c055d18b33f7f589617936 (1cdhsnff...) with weight 1704107319053 into bag 1717891425287, new count is 17529    
2021-11-16 14:38:59.907  INFO main runtime::staking: [7723909] 💸 👜 completed staking migration to Releases::V8_0_0 with 17529 voters migrated    
2021-11-16 14:38:59.907  INFO main runtime::session_historical: Running migration to v1 for session_historical with storage version StorageVersion(0)    
2021-11-16 14:38:59.908  INFO main runtime::session_historical: migration prefix of storage 'HistoricalSessions': 'Session' ==> 'Historical'    
2021-11-16 14:38:59.908  INFO main runtime::session_historical: migration prefix of storage 'StoredRange': 'Session' ==> 'Historical'    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ⚠️ System declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Crowdloan    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Auctions    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Slots    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Registrar    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for ParaSessionInfo    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Hrmp    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Ump    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Dmp    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Initializer    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Paras    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for ParaScheduler    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for ParaInherent    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for ParaInclusion    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for ParasShared    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ⚠️ Configuration declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(1)`    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for ParachainsOrigin    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for BagsList    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for ElectionProviderMultiPhase    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Tips    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Bounties    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Multisig    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Proxy    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Identity    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Utility    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ⚠️ Vesting declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Claims    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Treasury    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for TechnicalMembership    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for PhragmenElection    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for TechnicalCommittee    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Council    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Democracy    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for AuthorityDiscovery    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for ImOnline    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Grandpa    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Session    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Historical    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ⚠️ Offences declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    
2021-11-16 14:38:59.908  INFO main runtime::offences: have 0 deferred offences, applying.    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ⚠️ Staking declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Authorship    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for TransactionPayment    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Balances    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Indices    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Timestamp    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Babe    
2021-11-16 14:38:59.908  INFO main runtime::frame-support: ✅ no migration for Scheduler    
2021-11-16 14:38:59.992 DEBUG main runtime::bags_list: [7723909] 👜count of nodes: 17529    
2021-11-16 14:39:00.023 DEBUG main runtime::bags_list: [7723909] 👜count of active bags 117    
2021-11-16 14:39:03.957  INFO main runtime::staking: [7723909] 💸 👜 staking bags-list migration passes POST migrate checks ✅    
2021-11-16 14:39:03.957  INFO main runtime::session_historical: post-migration prefix of storage 'HistoricalSessions': 'Session' ==> 'Historical'    
2021-11-16 14:39:03.957  INFO main runtime::session_historical: post-migration prefix of storage 'StoredRange': 'Session' ==> 'Historical'    
2021-11-16 14:39:03.959  INFO main try-runtime::cli: TryRuntime_on_runtime_upgrade executed without errors. Consumed weight = 4000175000000, total weight = 2000000000000 (2.0000875)

cc @thiolliere

@gui1117
Copy link
Contributor

gui1117 commented Nov 17, 2021

bot merge

@paritytech-processbot
Copy link

Error: Response error (status 404 Not Found):

{"documentation_url":"https://docs.github.com/rest/reference/pulls#get-a-pull-request","message":"Not Found"}

@gui1117 gui1117 merged commit e0295ed into paritytech:master Nov 17, 2021
@koushiro koushiro deleted the migrate-session-historical branch November 17, 2021 08:30
ordian added a commit that referenced this pull request Nov 20, 2021
* master: (38 commits)
  Replicate Rob's PR (#4337)
  Companion for Taskmanager: Remove `clean_shutdown` (#4336)
  prefer code upgrades in inherent filtering (#4334)
  remove provisioner checks (#4254)
  Log para inherent inputs (#4331)
  Dispute spam protection (#4134)
  Dependabot: Ignore sub-tokens (#4328)
  export hrmp config (#4324)
  Add missing license header (#4321)
  Use non-empty validation code (#4322)
  fix pallet-xcm extrinsic doc comments (#4317)
  prepare worker: Catch unexpected unwinds (#4304)
  Enable BEEFY explicitly (#4320)
  Bump serde_json from 1.0.70 to 1.0.71 (#4316)
  Bump strum from 0.22.0 to 0.23.0 (#4308)
  Remove sort_unstable_by (#4314)
  Bump tokio from 1.13.0 to 1.14.0 (#4298)
  Substrate companion: Authority discovery multiple peer ids (#4295)
  Companion for substrate#9878 (#3949)
  move paras inherent filtering to runtime (#4028)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A4-companion A PR that needs a companion PR to merge in parallel for one of its downstream dependencies. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants