Crate contracts_mbm

Source
Expand description

§Contracts MBM

Multi block migrations decommissioning pallet-contracts (ink!/Wasm smart contracts) from the Astar, Shiden & Shibuya runtimes. Staged over two runtime upgrades:

  1. (shipped) ReleaseContractsDeposits - settled every balance the pallet still held. It had to complete before the pallet index was dropped, otherwise those holds would have become undecodable and the funds frozen for good. Removed here, along with the pallet: without the RuntimeHoldReason::Contracts variant there is nothing left for it to match on.
  2. PurgeContractsChildTries then RemovePalletStepped - purge the contract child tries and the leftover pallet prefixes, in that order.

Both are size aware: every value is measured before it is deleted and charged through benchmarked, size dependent weights, so a run of large values (Contracts::PristineCode blobs, up to 123 KiB each) cannot produce a PoV oversized block.

Re-exports§

pub use weights::WeightInfo;
pub use pallet::*;

Modules§

pallet
The pallet module in each FRAME pallet hosts the most important items needed to construct this pallet.
weights
Autogenerated weights for contracts_mbm

Structs§

PurgeContractsChildTries
Purges the child tries owned by the decommissioned pallet-contracts, and hands back the consumer references it took on contract accounts.
RemovePalletStepped
Multi block variant of frame_support::migrations::RemovePallet.

Constants§

CONTRACT_INFO_OF
pallet-contracts storage holding the info (starting with the trie_id) of live contracts.
DELETION_QUEUE
pallet-contracts storage holding the trie_ids of contracts pending lazy deletion.
MAX_KEYS_PER_STEP
Hard cap on the number of storage keys touched in a single step.
TRIE_ID_LEN
Exact length of a pallet-contracts trie_id.

Type Aliases§

MaxKeyLen
Upper bound on the length of a storage key handed around as a migration cursor.
TrieId
pallet-contractsTrieId, i.e. BoundedVec<u8, ConstU32<128>>.