git.delta.rocks / unique-network / refs/commits / cf483e2c63f2

difftreelog

Merge pull request #808 from UniqueNetwork/fix/try-runtime-0.9.36

Yaroslav Bolyukin2022-12-23parents: #507b779 #13872be.patch.diff
in: master

9 files changed

modified.docker/Dockerfile-try-runtimediffbeforeafterboth
46 echo "Fork from: $REPLICA_FROM\n" && \46 echo "Fork from: $REPLICA_FROM\n" && \
47 cargo build --features=try-runtime,${NETWORK}-runtime --release47 cargo build --features=try-runtime,${NETWORK}-runtime --release
4848
49CMD cargo run --features=try-runtime,${NETWORK}-runtime --release -- try-runtime -ltry-runtime::cli=debug --no-spec-check-panic on-runtime-upgrade live --uri $REPLICA_FROM49CMD cargo run --release --features ${NETWORK}-runtime,try-runtime -- try-runtime --runtime target/release/wbuild/${NETWORK}-runtime/${NETWORK}_runtime.compact.compressed.wasm -lruntime=debug -ltry-runtime::cli=debug on-runtime-upgrade --checks live --uri $REPLICA_FROM
5050
modifiedCargo.lockdiffbeforeafterboth
2467[[package]]2467[[package]]
2468name = "fc-consensus"2468name = "fc-consensus"
2469version = "2.0.0-dev"2469version = "2.0.0-dev"
2470source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"2470source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
2471dependencies = [2471dependencies = [
2472 "async-trait",2472 "async-trait",
2473 "fc-db",2473 "fc-db",
2486[[package]]2486[[package]]
2487name = "fc-db"2487name = "fc-db"
2488version = "2.0.0-dev"2488version = "2.0.0-dev"
2489source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"2489source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
2490dependencies = [2490dependencies = [
2491 "fp-storage",2491 "fp-storage",
2492 "kvdb-rocksdb",2492 "kvdb-rocksdb",
2505[[package]]2505[[package]]
2506name = "fc-mapping-sync"2506name = "fc-mapping-sync"
2507version = "2.0.0-dev"2507version = "2.0.0-dev"
2508source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"2508source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
2509dependencies = [2509dependencies = [
2510 "fc-db",2510 "fc-db",
2511 "fp-consensus",2511 "fp-consensus",
2522[[package]]2522[[package]]
2523name = "fc-rpc"2523name = "fc-rpc"
2524version = "2.0.0-dev"2524version = "2.0.0-dev"
2525source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"2525source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
2526dependencies = [2526dependencies = [
2527 "ethereum 0.14.0",2527 "ethereum 0.14.0",
2528 "ethereum-types 0.14.1",2528 "ethereum-types 0.14.1",
2565[[package]]2565[[package]]
2566name = "fc-rpc-core"2566name = "fc-rpc-core"
2567version = "1.1.0-dev"2567version = "1.1.0-dev"
2568source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"2568source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
2569dependencies = [2569dependencies = [
2570 "ethereum 0.14.0",2570 "ethereum 0.14.0",
2571 "ethereum-types 0.14.1",2571 "ethereum-types 0.14.1",
2730[[package]]2730[[package]]
2731name = "fp-consensus"2731name = "fp-consensus"
2732version = "2.0.0-dev"2732version = "2.0.0-dev"
2733source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"2733source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
2734dependencies = [2734dependencies = [
2735 "ethereum 0.14.0",2735 "ethereum 0.14.0",
2736 "parity-scale-codec 3.2.1",2736 "parity-scale-codec 3.2.1",
2742[[package]]2742[[package]]
2743name = "fp-ethereum"2743name = "fp-ethereum"
2744version = "1.0.0-dev"2744version = "1.0.0-dev"
2745source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"2745source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
2746dependencies = [2746dependencies = [
2747 "ethereum 0.14.0",2747 "ethereum 0.14.0",
2748 "ethereum-types 0.14.1",2748 "ethereum-types 0.14.1",
2757[[package]]2757[[package]]
2758name = "fp-evm"2758name = "fp-evm"
2759version = "3.0.0-dev"2759version = "3.0.0-dev"
2760source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"2760source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
2761dependencies = [2761dependencies = [
2762 "evm",2762 "evm",
2763 "frame-support",2763 "frame-support",
2771[[package]]2771[[package]]
2772name = "fp-evm-mapping"2772name = "fp-evm-mapping"
2773version = "0.1.0"2773version = "0.1.0"
2774source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"2774source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
2775dependencies = [2775dependencies = [
2776 "frame-support",2776 "frame-support",
2777 "sp-core",2777 "sp-core",
2780[[package]]2780[[package]]
2781name = "fp-rpc"2781name = "fp-rpc"
2782version = "3.0.0-dev"2782version = "3.0.0-dev"
2783source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"2783source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
2784dependencies = [2784dependencies = [
2785 "ethereum 0.14.0",2785 "ethereum 0.14.0",
2786 "ethereum-types 0.14.1",2786 "ethereum-types 0.14.1",
2797[[package]]2797[[package]]
2798name = "fp-self-contained"2798name = "fp-self-contained"
2799version = "1.0.0-dev"2799version = "1.0.0-dev"
2800source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"2800source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
2801dependencies = [2801dependencies = [
2802 "ethereum 0.14.0",2802 "ethereum 0.14.0",
2803 "frame-support",2803 "frame-support",
2810[[package]]2810[[package]]
2811name = "fp-storage"2811name = "fp-storage"
2812version = "2.0.0"2812version = "2.0.0"
2813source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"2813source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
2814dependencies = [2814dependencies = [
2815 "parity-scale-codec 3.2.1",2815 "parity-scale-codec 3.2.1",
2816 "serde",2816 "serde",
5682[[package]]5682[[package]]
5683name = "pallet-base-fee"5683name = "pallet-base-fee"
5684version = "1.0.0"5684version = "1.0.0"
5685source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"5685source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
5686dependencies = [5686dependencies = [
5687 "fp-evm",5687 "fp-evm",
5688 "frame-support",5688 "frame-support",
5918[[package]]5918[[package]]
5919name = "pallet-ethereum"5919name = "pallet-ethereum"
5920version = "4.0.0-dev"5920version = "4.0.0-dev"
5921source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"5921source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
5922dependencies = [5922dependencies = [
5923 "ethereum 0.14.0",5923 "ethereum 0.14.0",
5924 "ethereum-types 0.14.1",5924 "ethereum-types 0.14.1",
5946[[package]]5946[[package]]
5947name = "pallet-evm"5947name = "pallet-evm"
5948version = "6.0.0-dev"5948version = "6.0.0-dev"
5949source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"5949source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
5950dependencies = [5950dependencies = [
5951 "environmental",5951 "environmental",
5952 "evm",5952 "evm",
6032[[package]]6032[[package]]
6033name = "pallet-evm-precompile-simple"6033name = "pallet-evm-precompile-simple"
6034version = "2.0.0-dev"6034version = "2.0.0-dev"
6035source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0"6035source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#cf1894629c7df1c4dafe58aa773627a3d940da14"
6036dependencies = [6036dependencies = [
6037 "fp-evm",6037 "fp-evm",
6038 "ripemd",6038 "ripemd",
12965 "sp-core",12965 "sp-core",
12966 "sp-finality-grandpa",12966 "sp-finality-grandpa",
12967 "sp-inherents",12967 "sp-inherents",
12968 "sp-io",
12968 "sp-keystore",12969 "sp-keystore",
12969 "sp-offchain",12970 "sp-offchain",
12970 "sp-runtime",12971 "sp-runtime",
modifiednode/cli/Cargo.tomldiffbeforeafterboth
122git = "https://github.com/paritytech/substrate"122git = "https://github.com/paritytech/substrate"
123branch = "polkadot-v0.9.36"123branch = "polkadot-v0.9.36"
124
125[dependencies.sp-io]
126git = "https://github.com/paritytech/substrate"
127branch = "polkadot-v0.9.36"
124128
125[dependencies.sp-finality-grandpa]129[dependencies.sp-finality-grandpa]
126git = "https://github.com/paritytech/substrate"130git = "https://github.com/paritytech/substrate"
modifiednode/cli/src/command.rsdiffbeforeafterboth
412 #[cfg(feature = "try-runtime")]412 #[cfg(feature = "try-runtime")]
413 Some(Subcommand::TryRuntime(cmd)) => {413 Some(Subcommand::TryRuntime(cmd)) => {
414 use std::{future::Future, pin::Pin};414 use std::{future::Future, pin::Pin};
415 use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch};
415416
416 let runner = cli.create_runner(cmd)?;417 let runner = cli.create_runner(cmd)?;
417418
429 Ok((430 Ok((
430 match config.chain_spec.runtime_id() {431 match config.chain_spec.runtime_id() {
431 #[cfg(feature = "unique-runtime")]432 #[cfg(feature = "unique-runtime")]
432 RuntimeId::Unique => Box::pin(cmd.run::<Block, UniqueRuntimeExecutor>(config)),433 RuntimeId::Unique => Box::pin(cmd.run::<Block, ExtendedHostFunctions<
434 sp_io::SubstrateHostFunctions,
435 <UniqueRuntimeExecutor as NativeExecutionDispatch>::ExtendHostFunctions,
436 >>()),
433437
434 #[cfg(feature = "quartz-runtime")]438 #[cfg(feature = "quartz-runtime")]
435 RuntimeId::Quartz => Box::pin(cmd.run::<Block, QuartzRuntimeExecutor>(config)),439 RuntimeId::Quartz => Box::pin(cmd.run::<Block, ExtendedHostFunctions<
440 sp_io::SubstrateHostFunctions,
441 <QuartzRuntimeExecutor as NativeExecutionDispatch>::ExtendHostFunctions,
442 >>()),
436443
437 RuntimeId::Opal => Box::pin(cmd.run::<Block, OpalRuntimeExecutor>(config)),444 RuntimeId::Opal => Box::pin(cmd.run::<Block, ExtendedHostFunctions<
445 sp_io::SubstrateHostFunctions,
446 <OpalRuntimeExecutor as NativeExecutionDispatch>::ExtendHostFunctions,
447 >>()),
438 RuntimeId::Unknown(chain) => return Err(no_runtime_err!(chain).into()),448 RuntimeId::Unknown(chain) => return Err(no_runtime_err!(chain).into()),
439 },449 },
440 task_manager,450 task_manager,
modifiednode/cli/src/service.rsdiffbeforeafterboth
106106
107#[cfg(feature = "unique-runtime")]107#[cfg(feature = "unique-runtime")]
108impl NativeExecutionDispatch for UniqueRuntimeExecutor {108impl NativeExecutionDispatch for UniqueRuntimeExecutor {
109 /// Only enable the benchmarking host functions when we actually want to benchmark.
110 #[cfg(feature = "runtime-benchmarks")]
109 type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;111 type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
112 /// Otherwise we only use the default Substrate host functions.
113 #[cfg(not(feature = "runtime-benchmarks"))]
114 type ExtendHostFunctions = ();
110115
111 fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {116 fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
112 unique_runtime::api::dispatch(method, data)117 unique_runtime::api::dispatch(method, data)
119124
120#[cfg(feature = "quartz-runtime")]125#[cfg(feature = "quartz-runtime")]
121impl NativeExecutionDispatch for QuartzRuntimeExecutor {126impl NativeExecutionDispatch for QuartzRuntimeExecutor {
127 /// Only enable the benchmarking host functions when we actually want to benchmark.
128 #[cfg(feature = "runtime-benchmarks")]
122 type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;129 type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
130 /// Otherwise we only use the default Substrate host functions.
131 #[cfg(not(feature = "runtime-benchmarks"))]
132 type ExtendHostFunctions = ();
123133
124 fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {134 fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
125 quartz_runtime::api::dispatch(method, data)135 quartz_runtime::api::dispatch(method, data)
131}141}
132142
133impl NativeExecutionDispatch for OpalRuntimeExecutor {143impl NativeExecutionDispatch for OpalRuntimeExecutor {
144 /// Only enable the benchmarking host functions when we actually want to benchmark.
145 #[cfg(feature = "runtime-benchmarks")]
134 type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;146 type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
147 /// Otherwise we only use the default Substrate host functions.
148 #[cfg(not(feature = "runtime-benchmarks"))]
149 type ExtendHostFunctions = ();
135150
136 fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {151 fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
137 opal_runtime::api::dispatch(method, data)152 opal_runtime::api::dispatch(method, data)
modifiedruntime/common/runtime_apis.rsdiffbeforeafterboth
780780
781 #[cfg(feature = "try-runtime")]781 #[cfg(feature = "try-runtime")]
782 impl frame_try_runtime::TryRuntime<Block> for Runtime {782 impl frame_try_runtime::TryRuntime<Block> for Runtime {
783 fn on_runtime_upgrade() -> (frame_support::pallet_prelude::Weight, frame_support::pallet_prelude::Weight) {783 fn on_runtime_upgrade(checks: bool) -> (frame_support::pallet_prelude::Weight, frame_support::pallet_prelude::Weight) {
784 log::info!("try-runtime::on_runtime_upgrade unique-chain.");784 log::info!("try-runtime::on_runtime_upgrade unique-chain.");
785 let weight = Executive::try_runtime_upgrade().unwrap();785 let weight = Executive::try_runtime_upgrade(checks).unwrap();
786 (weight, crate::config::substrate::RuntimeBlockWeights::get().max_block)786 (weight, crate::config::substrate::RuntimeBlockWeights::get().max_block)
787 }787 }
788788
789 fn execute_block(789 fn execute_block(
790 block: Block,790 block: Block,
791 state_root_check: bool,791 state_root_check: bool,
792 signature_check: bool,
792 select: frame_try_runtime::TryStateSelect793 select: frame_try_runtime::TryStateSelect
793 ) -> frame_support::pallet_prelude::Weight {794 ) -> frame_support::pallet_prelude::Weight {
794 log::info!(795 log::info!(
799 select,800 select,
800 );801 );
801802
802 Executive::try_execute_block(block, state_root_check, select).unwrap()803 Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap()
803 }804 }
804 }805 }
805 }806 }
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
91 'pallet-unique-scheduler-v2/try-runtime',91 'pallet-unique-scheduler-v2/try-runtime',
92 'pallet-maintenance/try-runtime',92 'pallet-maintenance/try-runtime',
93 'pallet-test-utils?/try-runtime',93 'pallet-test-utils?/try-runtime',
94 'fp-self-contained/try-runtime',
94]95]
95std = [96std = [
96 'codec/std',97 'codec/std',
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
86 'pallet-evm-transaction-payment/try-runtime',86 'pallet-evm-transaction-payment/try-runtime',
87 'pallet-evm-migration/try-runtime',87 'pallet-evm-migration/try-runtime',
88 'pallet-maintenance/try-runtime',88 'pallet-maintenance/try-runtime',
89 'fp-self-contained/try-runtime',
89]90]
90std = [91std = [
91 'codec/std',92 'codec/std',
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
87 'pallet-evm-transaction-payment/try-runtime',87 'pallet-evm-transaction-payment/try-runtime',
88 'pallet-evm-migration/try-runtime',88 'pallet-evm-migration/try-runtime',
89 'pallet-maintenance/try-runtime',89 'pallet-maintenance/try-runtime',
90 'fp-self-contained/try-runtime',
90]91]
91std = [92std = [
92 'codec/std',93 'codec/std',