Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing try runtime install #1883

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

add missing try runtime install #1883

wants to merge 14 commits into from

Conversation

gpmayorga
Copy link
Contributor

@gpmayorga gpmayorga commented Jun 23, 2024

Description

This PR tries to fix try-runtime build since it was reporting try-runtime command not found
Downloading the blob before executing try-runtime seems to fix it, inspired by https://github.com/paritytech/try-runtime-gha/blob/main/action.yml

Note: the try-runtime command still fails but is now running as expected

@gpmayorga gpmayorga added the D8-migration Pull request touches storage and needs migration code. label Jun 23, 2024
@gpmayorga gpmayorga added D8-migration Pull request touches storage and needs migration code. and removed D8-migration Pull request touches storage and needs migration code. labels Jun 23, 2024
@gpmayorga
Copy link
Contributor Author

/try-runtime

@gpmayorga gpmayorga requested a review from wischli as a code owner June 23, 2024 12:17
@gpmayorga
Copy link
Contributor Author

/try-runtime

1 similar comment
@gpmayorga
Copy link
Contributor Author

/try-runtime

Copy link

codecov bot commented Jun 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.66%. Comparing base (de2886f) to head (adb53fe).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1883      +/-   ##
==========================================
+ Coverage   47.63%   47.66%   +0.03%     
==========================================
  Files         171      171              
  Lines       13233    13233              
==========================================
+ Hits         6304     6308       +4     
+ Misses       6929     6925       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gpmayorga
Copy link
Contributor Author

gpmayorga commented Jun 23, 2024

There was an error where try-runtime was not found but after fixing that there command is still failing with

[2024-06-23T15:00:29Z DEBUG runtime::try-decode-state] trying to decode storage: Swaps::SwapIdToOrderId < T >
[2024-06-23T15:00:29Z DEBUG runtime::try-decode-state] trying to decode pallet: TokenMux
[2024-06-23T15:00:29Z ERROR runtime::executive] `try_decode_entire_state` failed with 1 errors
[2024-06-23T15:00:29Z ERROR runtime::executive] - 0. error: `ParachainSystem::HostConfiguration` key `0x45323df7cc47150b3930e2666b0aa313c522231880238a0c56021b8744a00743` is undecodable
[2024-06-23T15:00:29Z DEBUG runtime::executive] - 0. error: key: 0x45323df7cc47150b3930e2666b0aa313c522231880238a0c56021b8744a00743 value: 0x0000300000500000aaaa020000001000fbff0000100000000a0000004038000058020000 info: StorageInfo { pallet_name: [80, 97, 114, 97, 99, 104, 97, 105, 110, 83, 121, 115, 116, 101, 109], storage_name: [72, 111, 115, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110], prefix: [69, 50, 61, 247, 204, 71, 21, 11, 57, 48, 226, 102, 107, 10, 163, 19, 197, 34, 35, 24, 128, 35, 138, 12, 86, 2, 27, 135, 68, 160, 7, 67], max_values: Some(1), max_size: None }
[2024-06-23T15:00:29Z ERROR runtime] panicked at /home/runner/work/centrifuge-chain/centrifuge-chain/runtime/centrifuge/src/lib.rs:2703:65:
    called `Result::unwrap()` on an `Err` value: Other("`try_decode_entire_state` failed")
thread 'main' panicked at cli/main.rs:320:10:
called `Result::unwrap()` on an `Err` value: Input("failed to execute TryRuntime_on_runtime_upgrade: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0x8f0f5e - <unknown>!rust_begin_unwind\n    1: 0x8068ca - <unknown>!core::panicking::panic_fmt::he43ca0de8f5e7709\n    2: 0x80786e - <unknown>!core::result::unwrap_failed::h6d58162c4956720b\n    3: 0x2de90 - <unknown>!<centrifuge_runtime::Runtime as frame_try_runtime::runtime_decl_for_try_runtime::TryRuntimeV1<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u32,sp_runtime::traits::BlakeTwo256>,fp_self_contained::unchecked_extrinsic::UncheckedExtrinsic<sp_runtime::multiaddress::MultiAddress<<<sp_runtime::MultiSignature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId,()>,centrifuge_runtime::RuntimeCall,sp_runtime::MultiSignature,(frame_system::extensions::check_non_zero_sender::CheckNonZeroSender<centrifuge_runtime::Runtime>,frame_system::extensions::check_spec_version::CheckSpecVersion<centrifuge_runtime::Runtime>,frame_system::extensions::check_tx_version::CheckTxVersion<centrifuge_runtime::Runtime>,frame_system::extensions::check_genesis::CheckGenesis<centrifuge_runtime::Runtime>,frame_system::extensions::check_mortality::CheckMortality<centrifuge_runtime::Runtime>,frame_system::extensions::check_nonce::CheckNonce<centrifuge_runtime::Runtime>,frame_system::extensions::check_weight::CheckWeight<centrifuge_runtime::Runtime>,pallet_transaction_payment::ChargeTransactionPayment<centrifuge_runtime::Runtime>,runtime_common::transfer_filter::PreBalanceTransferExtension<centrifuge_runtime::Runtime>)>>>>::on_runtime_upgrade::hf9ed6661de6363dd\n    4: 0x56ede0 - <unknown>!TryRuntime_on_runtime_upgrade")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: Process completed with exit code 101.

If that's expected we could merge this PR but otherwise it might be interesting to try and fix it
Ref: https://github.com/centrifuge/centrifuge-chain/actions/runs/9633992830/job/26569097472

@lemunozm
Copy link
Contributor

Yes, it is expected: paritytech/polkadot-sdk#4603

@lemunozm
Copy link
Contributor

BTW, why we're not checking try-runtime for demo?

ci/run-check.sh Outdated Show resolved Hide resolved
wischli
wischli previously approved these changes Jun 25, 2024
Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would love if we used the newest version of try-runtime CLI.

ci/run-check.sh Outdated Show resolved Hide resolved
@wischli
Copy link
Contributor

wischli commented Jun 25, 2024

There was an error where try-runtime was not found but after fixing that there command is still failing with

[2024-06-23T15:00:29Z DEBUG runtime::try-decode-state] trying to decode storage: Swaps::SwapIdToOrderId < T >
[2024-06-23T15:00:29Z DEBUG runtime::try-decode-state] trying to decode pallet: TokenMux
[2024-06-23T15:00:29Z ERROR runtime::executive] `try_decode_entire_state` failed with 1 errors
[2024-06-23T15:00:29Z ERROR runtime::executive] - 0. error: `ParachainSystem::HostConfiguration` key `0x45323df7cc47150b3930e2666b0aa313c522231880238a0c56021b8744a00743` is undecodable
[2024-06-23T15:00:29Z DEBUG runtime::executive] - 0. error: key: 0x45323df7cc47150b3930e2666b0aa313c522231880238a0c56021b8744a00743 value: 0x0000300000500000aaaa020000001000fbff0000100000000a0000004038000058020000 info: StorageInfo { pallet_name: [80, 97, 114, 97, 99, 104, 97, 105, 110, 83, 121, 115, 116, 101, 109], storage_name: [72, 111, 115, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110], prefix: [69, 50, 61, 247, 204, 71, 21, 11, 57, 48, 226, 102, 107, 10, 163, 19, 197, 34, 35, 24, 128, 35, 138, 12, 86, 2, 27, 135, 68, 160, 7, 67], max_values: Some(1), max_size: None }
[2024-06-23T15:00:29Z ERROR runtime] panicked at /home/runner/work/centrifuge-chain/centrifuge-chain/runtime/centrifuge/src/lib.rs:2703:65:
    called `Result::unwrap()` on an `Err` value: Other("`try_decode_entire_state` failed")
thread 'main' panicked at cli/main.rs:320:10:
called `Result::unwrap()` on an `Err` value: Input("failed to execute TryRuntime_on_runtime_upgrade: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0x8f0f5e - <unknown>!rust_begin_unwind\n    1: 0x8068ca - <unknown>!core::panicking::panic_fmt::he43ca0de8f5e7709\n    2: 0x80786e - <unknown>!core::result::unwrap_failed::h6d58162c4956720b\n    3: 0x2de90 - <unknown>!<centrifuge_runtime::Runtime as frame_try_runtime::runtime_decl_for_try_runtime::TryRuntimeV1<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u32,sp_runtime::traits::BlakeTwo256>,fp_self_contained::unchecked_extrinsic::UncheckedExtrinsic<sp_runtime::multiaddress::MultiAddress<<<sp_runtime::MultiSignature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId,()>,centrifuge_runtime::RuntimeCall,sp_runtime::MultiSignature,(frame_system::extensions::check_non_zero_sender::CheckNonZeroSender<centrifuge_runtime::Runtime>,frame_system::extensions::check_spec_version::CheckSpecVersion<centrifuge_runtime::Runtime>,frame_system::extensions::check_tx_version::CheckTxVersion<centrifuge_runtime::Runtime>,frame_system::extensions::check_genesis::CheckGenesis<centrifuge_runtime::Runtime>,frame_system::extensions::check_mortality::CheckMortality<centrifuge_runtime::Runtime>,frame_system::extensions::check_nonce::CheckNonce<centrifuge_runtime::Runtime>,frame_system::extensions::check_weight::CheckWeight<centrifuge_runtime::Runtime>,pallet_transaction_payment::ChargeTransactionPayment<centrifuge_runtime::Runtime>,runtime_common::transfer_filter::PreBalanceTransferExtension<centrifuge_runtime::Runtime>)>>>>::on_runtime_upgrade::hf9ed6661de6363dd\n    4: 0x56ede0 - <unknown>!TryRuntime_on_runtime_upgrade")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: Process completed with exit code 101.

If that's expected we could merge this PR but otherwise it might be interesting to try and fix it Ref: https://github.com/centrifuge/centrifuge-chain/actions/runs/9633992830/job/26569097472

Unfortunately, this error is expected on Centrifuge and Altair, until we upgrade both Chains to SDK v1.7.2.

More context can be found in #1849 or this conversation.

Co-authored-by: William Freudenberger <[email protected]>
@gpmayorga
Copy link
Contributor Author

This should be ready to merge, demo seems to be running as expected since the following error is due to the runtime being the same?

✅ Inserted keys into DB (0.10s)
[2024-06-25T15:12:18Z INFO  try-runtime::cli] Original runtime [Name: RuntimeString::Owned("centrifuge-devel")] [Version: 1101] [Code hash: 0x6a88...1362]
[2024-06-25T15:12:18Z DEBUG try-runtime::cli] Original runtime full code hash: 0x"6a88718f03d47354bae25ddba7c497f420cebb2f4856ea02f3084363e4401362"
[2024-06-25T15:12:18Z INFO  try-runtime::cli] New runtime      [Name: RuntimeString::Owned("centrifuge-devel")] [Version: 1100] [Code hash: 0x5f4b...9e5c]
[2024-06-25T15:12:18Z DEBUG try-runtime::cli] New runtime code hash: 0x"5f4b6e759642c9806a64614e5b9d1b0beba69b132b369a74bdb966d60f7c9e5c"
thread 'main' panicked at cli/main.rs:324:10:
called `Result::unwrap()` on an `Err` value: Input("New runtime spec version must be greater than the on-chain runtime spec version. Use `--disable-spec-version-check` to disable this check.")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Should we add the --disable-spec-version-check to make it "pass"?

@wischli
Copy link
Contributor

wischli commented Jun 26, 2024

Should we add the --disable-spec-version-check to make it "pass"?

Sure sounds good!

@gpmayorga gpmayorga removed the D8-migration Pull request touches storage and needs migration code. label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants