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

Pallet Storage Migration List #26

Closed
20 of 25 tasks
boundless-forest opened this issue Nov 7, 2022 · 17 comments
Closed
20 of 25 tasks

Pallet Storage Migration List #26

boundless-forest opened this issue Nov 7, 2022 · 17 comments
Assignees

Comments

@boundless-forest
Copy link
Member

boundless-forest commented Nov 7, 2022

Migration needed

  • (System: frame_system::Pallet)
  • (Indices: pallet_indices::Pallet)
  • (Balances: darwinia_balances::::Pallet)
  • (Kton: darwinia_balances::::Pallet)
  • (Staking: darwinia_staking::Pallet)
  • (Identity: pallet_identity::Pallet)
  • (Vesting: pallet_vesting::Pallet)
  • (Proxy: pallet_proxy::Pallet)
  • (EVM: darwinia_evm::Pallet) How to deal with KtonERC20 precompile Approves storage? #14
  • (Ethereum: darwinia_ethereum::Pallet) Migrate the evm account balance #12
  • (Treasury: pallet_treasury::Pallet)
  • (Tips: pallet_tips::Pallet)
  • (Bounties: pallet_bounties::Pallet)
  • (Democracies: Democracy: pallet_democracy::Pallet)
  • (Society: pallet_society::Pallet)
  • (Recovery: pallet_recovery::Pallet)
  • (Multisig: pallet_multisig::Pallet)

No needed

  • (DarwiniaHeaderMmr: darwinia_header_mmr::Pallet)
  • (Council: pallet_collective::::Pallet)
  • (TechnicalCommittee: pallet_collective::::Pallet)
  • (PhragmenElection: pallet_elections_phragmen::Pallet)
  • (TechnicalMembership: pallet_membership::::Pallet)
  • (Scheduler: pallet_scheduler::Pallet)

Not sure

  • (DarwiniaFeeMarket: pallet_fee_market::::Pallet)
  • (CrabParachainFeeMarket::pallet_fee_market::::Pallet)
@jiguantong
Copy link
Member

jiguantong commented Nov 8, 2022

Storage with different structures between solo and para: (Feel free to edit)

PalletBalancesAccountData
DarwiniaCommonRuntimeImplsAccountData

System Pallet

  • account
// solo FrameSystemAccountInfo
{
	pub nonce: Index,
	pub consumers: RefCount,
	pub providers: RefCount,
	pub sufficients: RefCount,
        pub data: {
		pub free: Balance,
		pub reserved: Balance,
		pub free_kton: Balance,
		pub reserved_kton: Balance,
	}
}
// para FrameSystemAccountInfo
{
	pub nonce: Index,
	pub consumers: RefCount,
	pub providers: RefCount,
	pub sufficients: RefCount,
        pub data: {
		pub free: Balance,
		pub reserved: Balance,
		pub misc_frozen: Balance,
		pub fee_frozen: Balance,
	}
}

Balances Pallet

  • account
// solo DarwiniaCommonRuntimeImplsAccountData
{
	pub free: Balance,
	pub reserved: Balance,
	pub free_kton: Balance,
	pub reserved_kton: Balance,
}
// para PalletBalancesAccountData
{
	pub free: Balance,
	pub reserved: Balance,
	pub misc_frozen: Balance,
	pub fee_frozen: Balance,
}

@boundless-forest
Copy link
Member Author

boundless-forest commented Nov 8, 2022

Indices: pallet_indices::Pallet

No changes between polkadot-v0.9.16 and the polkadot-v0.9.30. No migration adaption needs.

https://github.com/AsceticBear/substrate/pull/43/files#diff-e49bba681e4bc724d3b659e04a55ba286d1a5e1bc93c75eced44a6062b7385ba

@boundless-forest
Copy link
Member Author

boundless-forest commented Nov 8, 2022

Identity: pallet_identity::Pallet

No changes between polkadot-v0.9.16 and the polkadot-v0.9.30. No migration adaption needs.
https://github.com/AsceticBear/substrate/pull/43/files#diff-1076d5bbdff91d92664edb1fbc1a7988edfd563721ce9c17aa4df89c9287c0b0

@boundless-forest
Copy link
Member Author

boundless-forest commented Nov 8, 2022

Proxy: pallet_proxy::Pallet

No changes between polkadot-v0.9.16 and the polkadot-v0.9.30. No migration adaption needs.

https://github.com/AsceticBear/substrate/pull/43/files#diff-b3c3faa7c55332581367dd8bfc6d43e23482720ff162fa595e4e5195043df0e0

@boundless-forest
Copy link
Member Author

Vesting: pallet_vesting::Pallet

No changes between polkadot-v0.9.16 and the polkadot-v0.9.30. No migration adaption needs.

https://github.com/AsceticBear/substrate/pull/43/files#diff-b951f7aa7b2dd08421d8cdd7a0c8f6364e9777f30c40a7eb9e8629cb03e90dd6

@boundless-forest
Copy link
Member Author

TechnicalMembership: pallet_membership::::Pallet

No changes between polkadot-v0.9.16 and the polkadot-v0.9.30. No migration adaption needs.

https://github.com/AsceticBear/substrate/pull/43/files#diff-f2c7fdf8b8cb3993d7fe73ba09c5ebb4444ba023af6837ac9ea677d1ce174742

@boundless-forest
Copy link
Member Author

PhragmenElection: pallet_elections_phragmen::Pallet

No changes between polkadot-v0.9.16 and the polkadot-v0.9.30. No migration adaption needs.

https://github.com/AsceticBear/substrate/pull/43/files#diff-194656be9ce9133b248a5b7cd18842eb5d3faacde3f1221b32e654419870136a

@boundless-forest
Copy link
Member Author

Council: pallet_collective::::Pallet And TechnicalCommittee: pallet_collective::::Pallet

No changes between polkadot-v0.9.16 and the polkadot-v0.9.30. No migration adaption needs.

https://github.com/AsceticBear/substrate/pull/43/files#diff-c9c139781d3a46e74bd99df5b95bfb6274b9c0deda846a5022971dfe155526bf

@boundless-forest
Copy link
Member Author

Treasury: pallet_treasury::Pallet

No changes between polkadot-v0.9.16 and the polkadot-v0.9.30. No migration adaption needs.

https://github.com/AsceticBear/substrate/pull/43/files#diff-21571fa193fececabaa733a8fea9e3c6478e1cdcb86f58e3f325418b2555e81a

@boundless-forest
Copy link
Member Author

Tips: pallet_tips::Pallet

No changes between polkadot-v0.9.16 and the polkadot-v0.9.30. No migration adaption needs.

https://github.com/AsceticBear/substrate/pull/43/files#diff-6aa2af6f083184cb0859b5e78f5e8fea0b9a8be4ce4d3794cf7683ca7bf4c3d9

@boundless-forest
Copy link
Member Author

Bounties: pallet_bounties::Pallet

No changes between polkadot-v0.9.16 and the polkadot-v0.9.30. No migration adaption needs.

https://github.com/AsceticBear/substrate/pull/43/files#diff-9fdeb836eb3095a41071ea9ee9c7ff071c85c32a84aceadd866834d7c58733e9

@boundless-forest
Copy link
Member Author

Democracies: Democracy: pallet_democracy::Pallet

The only storage difference between polkadot-v0.9.16 and the polkadot-v0.9.30 is that the Locks item is removed in the latest substrate version. No actual storage under the Locks in the Crab and Darwinia network, so not a big deal, just a reminder about this.

#[pallet::storage]
#[pallet::getter(fn locks)]
pub type Locks<T: Config> = StorageMap<_, Twox64Concat, T::AccountId, T::BlockNumber>;

https://github.com/AsceticBear/substrate/pull/43/files#diff-7d396d7ca3beeacb0775a3a5de148508e6d8f4640e0eacd728c00f71a2268a9f

@boundless-forest
Copy link
Member Author

Society: pallet_society::Pallet

No changes between polkadot-v0.9.16 and the polkadot-v0.9.30. No migration adaption needs.

https://github.com/AsceticBear/substrate/pull/43/files#diff-457a6f0d8550e66b3acb7af3d8a292f4181a73e48ed06d24f1e20eb19d1a28f6

@boundless-forest
Copy link
Member Author

Recovery: pallet_recovery::Pallet

No changes between polkadot-v0.9.16 and the polkadot-v0.9.30. No migration adaption needs.

https://github.com/AsceticBear/substrate/pull/43/files#diff-9401a718d8d32db4b53b806a42b673701b32d3e6301d3092c2b4357a4140fb80

@boundless-forest
Copy link
Member Author

Scheduler: pallet_scheduler::Pallet

No changes between polkadot-v0.9.16 and the polkadot-v0.9.30. No migration adaption needs.

https://github.com/AsceticBear/substrate/pull/43/files#diff-402ebe8b386bd8422131875c431704f41f17f30dd1cebe04b96082b561ef899b

@boundless-forest
Copy link
Member Author

Multisig: pallet_multisig::Pallet

No changes between polkadot-v0.9.16 and the polkadot-v0.9.30. No migration adaption needs.

https://github.com/AsceticBear/substrate/pull/43/files#diff-24d88dbb2cb8e8c19de1d235db557a306c189c2b0e90d40756776ba7261f2130

@hackfisher
Copy link
Contributor

		pub free_kton: Balance,
		pub reserved_kton: Balance,

kton in account data can be removed.

@AurevoirXavier AurevoirXavier pinned this issue Dec 14, 2022
@AurevoirXavier AurevoirXavier unpinned this issue Jan 5, 2023
@AurevoirXavier AurevoirXavier mentioned this issue Jan 18, 2023
38 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants