3
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<Vec<u8>, &'static str> {
    log::info!("Pre-check account: {ERROR_ACCOUNT}");

    let a = array_bytes::hex_n_into_unchecked::<_, sp_runtime::AccountId32, 32>(ERROR_ACCOUNT);

    assert_eq!(
        AccountMigration::ledger_of(&a).unwrap().staked_ring,
        52_500_000_000_000_000_000_u128
    );

    Ok(Vec::new())
}

I can't see my log.

I think this is different from try-runtime no output.

I can see other logs.

RUST_LOG=runtime=trace target/release/darwinia try-runtime --detailed-log-output --chain pangoro-dev --runtime target/release/wbuild/pangoro-runtime/pangoro_runtime.compact.compressed.wasm on-runtime-upgrade live --uri ws://g1.pangoro2.darwinia.network:9944

2023-03-07 13:59:35.716  INFO main remote-ext: since no at is provided, setting it to latest finalized head, 0x962da9ed1763b7abaebba7f5edc3325ce35155b6f08a13a29acf92455568598a    
2023-03-07 13:59:35.716  INFO main remote-ext: since no prefix is filtered, the data for all pallets will be downloaded    
2023-03-07 13:59:35.799  INFO main remote-ext: scraping key-pairs from remote at block height 0x962da9ed1763b7abaebba7f5edc3325ce35155b6f08a13a29acf92455568598a    
2023-03-07 13:59:37.172  INFO main remote-ext: Querying a total of 9941 keys from prefix , splitting among 32 threads, 311 keys per thread    
2023-03-07 13:59:37.919  INFO main remote-ext: adding data for hashed prefix: , took 2s    
2023-03-07 13:59:37.919  INFO main remote-ext: adding data for hashed key: 3a636f6465    
2023-03-07 13:59:38.057  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8    
2023-03-07 13:59:38.141  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac    
2023-03-07 13:59:38.235  INFO main remote-ext: initialized state externalities with storage root 0x723c7d5815c574d717b7cb4328696a3899fad5ccfa825e61331e62b4556404a6 and state_version V0    
2023-03-07 13:59:38.286  INFO main try-runtime::cli: original spec: RuntimeString::Owned("Pangoro2")-6003, code hash: 1798310c6a11942c8152d0efc419c80bf9898cc582e0e8158a38c1beba9b75df    
2023-03-07 13:59:38.347  INFO main try-runtime::cli: new spec: RuntimeString::Owned("Pangoro2")-6004, code hash: acac32f457ef7640209a66460e0d58b12c93746bfe4995dc7e7199a2a046722c    
2023-03-07 13:59:38.560  INFO main pangoro_runtime: try-runtime::on_runtime_upgrade    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for System    
2023-03-07 13:59:38.560  INFO main runtime::frame-support: ⚠️ ParachainSystem declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(2)`    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Timestamp    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for ParachainInfo    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Balances    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for TransactionPayment    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Assets    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Vesting    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Deposit    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for AccountMigration    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Authorship    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for DarwiniaStaking    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Session    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Aura    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for AuraExt    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for MessageGadget    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for EcdsaAuthority    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Democracy    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Council    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for TechnicalCommittee    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for PhragmenElection    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for TechnicalMembership    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Treasury    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Tips    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Sudo    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Utility    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Identity    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Scheduler    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Preimage    
2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Proxy    
2023-03-07 13:59:38.561  INFO main runtime::frame-support: ⚠️ XcmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(2)`    
2023-03-07 13:59:38.561  INFO main runtime::frame-support: ⚠️ PolkadotXcm declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    
2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for CumulusXcm    
2023-03-07 13:59:38.561  INFO main runtime::frame-support: ⚠️ DmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(1)`    
2023-03-07 13:59:38.561  INFO main runtime::frame-support: ⚠️ Ethereum declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    
2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for EVM    
2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for MessageTransact    
2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for BridgeRococoGrandpa    
2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for BridgeRococoParachain    
2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for BridgePangolinMessages    
2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for BridgePangolinDispatch    
2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for PangolinFeeMarket    
2023-03-07 13:59:38.562  INFO main try-runtime::cli: TryRuntime_on_runtime_upgrade executed without errors. Consumed weight = (500300000000 ps, 5242880 byte), total weight = (500000000000 ps, 5242880 byte) (100.06 %, 100.00 %).

1 Answer 1

4

I missed the --checks for the subcommand on-runtime-upgrade.

So, there were no checks running.

In the past, the checks were run by default. Now they don't.

The command should be:

RUST_LOG=runtime=trace target/release/darwinia try-runtime --detailed-log-output --chain pangoro-dev --runtime target/release/wbuild/pangoro-runtime/pangoro_runtime.compact.compressed.wasm on-runtime-upgrade --checks live --uri ws://g1.pangoro2.darwinia.network:9944

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.