When integrating pallet-contracts v10 storage migration in pub type Migrations
use pallet_contracts::migration::{v10, v11, v12};
pub type Migrations = (
v10::Migration<Runtime>,
)
I get an error about trait bounds not satisfied
= note: the following trait bounds were not satisfied:
(pallet_contracts::migration::v10::Migration<Runtime>,): OnRuntimeUpgrade
First I thought this was a [duplicate][1] but my Cargo.toml [try-runtime]
section already included the pallet-contracts/try-runtime
clause.
The first in a series of similar errors is:
error[E0599]: the function or associated item `execute_block` exists for struct `Executive<Runtime, Block<Header<u32, BlakeTwo256>, ...>, ..., ..., ..., ...>`, but its trait bounds were not satisfied
--> /home/simson/nodle/chain/runtimes/eden/src/lib.rs:237:15
|
237 | Executive::execute_block(block)
| ^^^^^^^^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds
|
= note: the full type name has been written to '/home/simson/nodle/chain/target/release/wbuild/runtime-eden/target/wasm32-unknown-unknown/release/deps/runtime_eden-709135493b42bf5f.long-type-12564475873963747691.txt'
= note: the following trait bounds were not satisfied:
`(pallet_contracts::migration::v10::Migration<Runtime>,): OnRuntimeUpgrade`
The long type from the file above:
frame_executive::Executive<Runtime,
sp_runtime::generic::Block<sp_runtime::generic::Header<u32,
polkadot_primitives::BlakeTwo256>, sp_runtime::generic::UncheckedExtrinsic<MultiAddress<sp_runtime::AccountId32, ()>,
RuntimeCall,
MultiSignature,
(CheckSpecVersion<Runtime>,
CheckTxVersion<Runtime>,
CheckGenesis<Runtime>,
CheckEra<Runtime>,
CheckNonce<Runtime>,
CheckWeight<Runtime>,
ChargeTransactionPayment<Runtime>,
ChargeSponsor<Runtime>)>>,
ChainContext<Runtime>,
Runtime,
(frame_system::Pallet<Runtime>,
pallet_timestamp::Pallet<Runtime>,
pallet_balances::Pallet<Runtime>,
pallet_transaction_payment::Pallet<Runtime>,
pallet_insecure_randomness_collective_flip::Pallet<Runtime>,
pallet_scheduler::Pallet<Runtime>,
pallet_reserve::Pallet<Runtime, Instance1>,
pallet_reserve::Pallet<Runtime, Instance2>,
pallet_reserve::Pallet<Runtime, Instance3>,
pallet_grants::Pallet<Runtime>,
pallet_mandate::Pallet<Runtime>,
pallet_collective::Pallet<Runtime, Instance1>,
pallet_membership::Pallet<Runtime, Instance3>,
pallet_collator_selection::Pallet<Runtime>,
pallet_authorship::Pallet<Runtime>,
pallet_session::Pallet<Runtime>,
pallet_aura::Pallet<Runtime>,
cumulus_pallet_aura_ext::Pallet<Runtime>,
cumulus_pallet_parachain_system::Pallet<Runtime>,
parachain_info::Pallet<Runtime>,
cumulus_pallet_xcm::Pallet<Runtime>,
cumulus_pallet_dmp_queue::Pallet<Runtime>,
cumulus_pallet_xcmp_queue::Pallet<Runtime>,
pallet_xcm::Pallet<Runtime>,
orml_xtokens::Pallet<Runtime>,
pallet_utility::Pallet<Runtime>,
pallet_multisig::Pallet<Runtime>,
pallet_uniques::Pallet<Runtime>,
pallet_preimage::Pallet<Runtime>,
pallet_nodle_uniques::Pallet<Runtime>,
pallet_sponsorship::Pallet<Runtime>,
pallet_identity::Pallet<Runtime>,
pallet_allocations::Pallet<Runtime>,
pallet_membership::Pallet<Runtime, Instance2>,
pallet_reserve::Pallet<Runtime, Instance4>,
pallet_contracts::Pallet<Runtime>),
(pallet_contracts::migration::v10::Migration<Runtime>,)>
What is the compiler trying to tell me here? What flag could be missing?
update:
const TEST_ALL_STEPS: bool = cfg!(feature = "try-runtime");
pub type Migrations = (pallet_contracts::Migration<Runtime,TEST_ALL_STEPS>);
will not work as my migration is from 9 to 12