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

difftreelog

fix try-runtime for polkadot-v0.9.29

Daniel Shiposha2022-10-04parent: #c57a8f4.patch.diff
in: master

20 files changed

modifiedCargo.lockdiffbeforeafterboth
before · Cargo.lock
977 packageslockfile v3
after · Cargo.lock
977 packageslockfile v3
modifiedpallets/app-promotion/Cargo.tomldiffbeforeafterboth
--- a/pallets/app-promotion/Cargo.toml
+++ b/pallets/app-promotion/Cargo.toml
@@ -38,6 +38,8 @@
     'serde/std',
 
 ]
+try-runtime = ["frame-support/try-runtime"]
+
 [dependencies]
 scale-info = { version = "2.0.1", default-features = false, features = [
     "derive",
modifiedpallets/common/Cargo.tomldiffbeforeafterboth
--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -44,3 +44,4 @@
     "frame-benchmarking/runtime-benchmarks",
     "up-data-structs/runtime-benchmarks",
 ]
+try-runtime = ["frame-support/try-runtime"]
modifiedpallets/configuration/Cargo.tomldiffbeforeafterboth
--- a/pallets/configuration/Cargo.toml
+++ b/pallets/configuration/Cargo.toml
@@ -31,3 +31,4 @@
 	"sp-arithmetic/std",
 	"fp-evm/std",
 ]
+try-runtime = ["frame-support/try-runtime"]
modifiedpallets/evm-coder-substrate/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-coder-substrate/Cargo.toml
+++ b/pallets/evm-coder-substrate/Cargo.toml
@@ -39,3 +39,4 @@
     'frame-benchmarking/std',
 ]
 runtime-benchmarks = ['frame-benchmarking']
+try-runtime = ["frame-support/try-runtime"]
modifiedpallets/evm-coder-substrate/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-coder-substrate/src/lib.rs
+++ b/pallets/evm-coder-substrate/src/lib.rs
@@ -40,7 +40,7 @@
 
 use evm_coder::{
 	abi::{AbiReader, AbiWrite, AbiWriter},
-	execution::{self, Result},
+	execution,
 	types::{Msg, value},
 };
 
@@ -147,13 +147,13 @@
 		Ok(())
 	}
 
-	pub fn consume_sload(&self) -> Result<()> {
+	pub fn consume_sload(&self) -> execution::Result<()> {
 		self.consume_gas(G_SLOAD_WORD)
 	}
-	pub fn consume_sstore(&self) -> Result<()> {
+	pub fn consume_sstore(&self) -> execution::Result<()> {
 		self.consume_gas(G_SSTORE_WORD)
 	}
-	pub fn consume_gas(&self, gas: u64) -> Result<()> {
+	pub fn consume_gas(&self, gas: u64) -> execution::Result<()> {
 		if gas == u64::MAX {
 			return Err(execution::Error::Error(ExitError::OutOfGas));
 		}
@@ -172,7 +172,7 @@
 	pub fn evm_to_precompile_output(
 		self,
 		handle: &mut impl PrecompileHandle,
-		result: evm_coder::execution::Result<Option<AbiWriter>>,
+		result: execution::Result<Option<AbiWriter>>,
 	) -> Option<PrecompileResult> {
 		use evm_coder::execution::Error;
 		// We ignore error here, as it should not occur, as we have our own bookkeeping of gas
@@ -198,7 +198,7 @@
 	}
 }
 
-pub fn dispatch_to_evm<T: Config>(err: DispatchError) -> evm_coder::execution::Error {
+pub fn dispatch_to_evm<T: Config>(err: DispatchError) -> execution::Error {
 	use evm_coder::execution::Error as ExError;
 	match err {
 		DispatchError::Module(ModuleError { index, error, .. })
@@ -257,7 +257,7 @@
 	e: &mut E,
 	value: value,
 	input: &[u8],
-) -> evm_coder::execution::Result<Option<AbiWriter>> {
+) -> execution::Result<Option<AbiWriter>> {
 	let (selector, mut reader) = AbiReader::new_call(input)?;
 	let call = C::parse(selector, &mut reader)?;
 	if call.is_none() {
modifiedpallets/evm-contract-helpers/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-contract-helpers/Cargo.toml
+++ b/pallets/evm-contract-helpers/Cargo.toml
@@ -51,3 +51,4 @@
     "pallet-evm/std",
     "up-sponsorship/std",
 ]
+try-runtime = ["frame-support/try-runtime"]
modifiedpallets/evm-migration/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-migration/Cargo.toml
+++ b/pallets/evm-migration/Cargo.toml
@@ -38,3 +38,4 @@
     "fp-evm/std",
 ]
 runtime-benchmarks = ["frame-benchmarking"]
+try-runtime = ["frame-support/try-runtime"]
modifiedpallets/evm-transaction-payment/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-transaction-payment/Cargo.toml
+++ b/pallets/evm-transaction-payment/Cargo.toml
@@ -41,3 +41,4 @@
     "up-sponsorship/std",
     "fp-evm-mapping/std",
 ]
+try-runtime = ["frame-support/try-runtime"]
modifiedpallets/fungible/Cargo.tomldiffbeforeafterboth
--- a/pallets/fungible/Cargo.toml
+++ b/pallets/fungible/Cargo.toml
@@ -45,3 +45,4 @@
     "pallet-evm/std",
 ]
 runtime-benchmarks = ['frame-benchmarking', 'pallet-common/runtime-benchmarks']
+try-runtime = ["frame-support/try-runtime"]
modifiedpallets/inflation/Cargo.tomldiffbeforeafterboth
--- a/pallets/inflation/Cargo.toml
+++ b/pallets/inflation/Cargo.toml
@@ -29,6 +29,7 @@
     'sp-runtime/std',
     'frame-benchmarking/std',
 ]
+try-runtime = ["frame-support/try-runtime"]
 
 ################################################################################
 # Substrate Dependencies
modifiedpallets/nonfungible/Cargo.tomldiffbeforeafterboth
--- a/pallets/nonfungible/Cargo.toml
+++ b/pallets/nonfungible/Cargo.toml
@@ -51,3 +51,4 @@
     'frame-system/runtime-benchmarks',
     'up-data-structs/runtime-benchmarks',
 ]
+try-runtime = ["frame-support/try-runtime"]
modifiedpallets/proxy-rmrk-core/Cargo.tomldiffbeforeafterboth
--- a/pallets/proxy-rmrk-core/Cargo.toml
+++ b/pallets/proxy-rmrk-core/Cargo.toml
@@ -48,3 +48,4 @@
     'frame-support/runtime-benchmarks',
     'frame-system/runtime-benchmarks',
 ]
+try-runtime = ["frame-support/try-runtime"]
modifiedpallets/proxy-rmrk-equip/Cargo.tomldiffbeforeafterboth
--- a/pallets/proxy-rmrk-equip/Cargo.toml
+++ b/pallets/proxy-rmrk-equip/Cargo.toml
@@ -47,3 +47,4 @@
     'frame-support/runtime-benchmarks',
     'frame-system/runtime-benchmarks',
 ]
+try-runtime = ["frame-support/try-runtime"]
modifiedpallets/refungible/Cargo.tomldiffbeforeafterboth
--- a/pallets/refungible/Cargo.toml
+++ b/pallets/refungible/Cargo.toml
@@ -51,3 +51,4 @@
     'frame-system/runtime-benchmarks',
     'up-data-structs/runtime-benchmarks',
 ]
+try-runtime = ["frame-support/try-runtime"]
modifiedpallets/scheduler/Cargo.tomldiffbeforeafterboth
--- a/pallets/scheduler/Cargo.toml
+++ b/pallets/scheduler/Cargo.toml
@@ -50,4 +50,4 @@
 	"frame-support/runtime-benchmarks",
 	"frame-system/runtime-benchmarks",
 ]
-#try-runtime = ["frame-support/try-runtime"]
+try-runtime = ["frame-support/try-runtime"]
modifiedpallets/structure/Cargo.tomldiffbeforeafterboth
--- a/pallets/structure/Cargo.toml
+++ b/pallets/structure/Cargo.toml
@@ -32,3 +32,4 @@
 	"pallet-evm/std",
 ]
 runtime-benchmarks = ['frame-benchmarking', 'pallet-common/runtime-benchmarks']
+try-runtime = ["frame-support/try-runtime"]
modifiedpallets/unique/Cargo.tomldiffbeforeafterboth
--- a/pallets/unique/Cargo.toml
+++ b/pallets/unique/Cargo.toml
@@ -32,6 +32,7 @@
     'pallet-evm-coder-substrate/std',
     'pallet-nonfungible/std',
 ]
+try-runtime = ["frame-support/try-runtime"]
 limit-testing = ["up-data-structs/limit-testing"]
 
 ################################################################################
modifiedruntime/common/runtime_apis.rsdiffbeforeafterboth
--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -770,8 +770,20 @@
                     (weight, crate::config::substrate::RuntimeBlockWeights::get().max_block)
                 }
 
-                fn execute_block_no_check(block: Block) -> frame_support::pallet_prelude::Weight {
-                    Executive::execute_block_no_check(block)
+                fn execute_block(
+                    block: Block,
+                    state_root_check: bool,
+                    select: frame_try_runtime::TryStateSelect
+                ) -> frame_support::pallet_prelude::Weight {
+                    log::info!(
+                        target: "node-runtime",
+                        "try-runtime: executing block {:?} / root checks: {:?} / try-state-select: {:?}",
+                        block.header.hash(),
+                        state_root_check,
+                        select,
+                    );
+
+                    Executive::try_execute_block(block, state_root_check, select).unwrap()
                 }
             }
         }
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -47,7 +47,45 @@
 try-runtime = [
     'frame-try-runtime',
     'frame-executive/try-runtime',
+    'frame-support/try-runtime',
     'frame-system/try-runtime',
+    'cumulus-pallet-parachain-system/try-runtime',
+    'parachain-info/try-runtime',
+    'pallet-aura/try-runtime',
+    'cumulus-pallet-aura-ext/try-runtime',
+    'pallet-balances/try-runtime',
+    'pallet-randomness-collective-flip/try-runtime',
+    'pallet-timestamp/try-runtime',
+    'pallet-transaction-payment/try-runtime',
+    'pallet-treasury/try-runtime',
+    'pallet-sudo/try-runtime',
+    'orml-vesting/try-runtime',
+    'orml-xtokens/try-runtime',
+    'orml-tokens/try-runtime',
+    'cumulus-pallet-xcmp-queue/try-runtime',
+    'pallet-xcm/try-runtime',
+    'cumulus-pallet-xcm/try-runtime',
+    'cumulus-pallet-dmp-queue/try-runtime',
+    'pallet-inflation/try-runtime',
+    'pallet-unique/try-runtime',
+    'pallet-unique-scheduler/try-runtime',
+    'pallet-configuration/try-runtime',
+    'pallet-charge-transaction/try-runtime',
+    'pallet-common/try-runtime',
+    'pallet-fungible/try-runtime',
+    'pallet-refungible/try-runtime',
+    'pallet-nonfungible/try-runtime',
+    'pallet-structure/try-runtime',
+    'pallet-proxy-rmrk-core/try-runtime',
+    'pallet-proxy-rmrk-equip/try-runtime',
+    'pallet-app-promotion/try-runtime',
+    'pallet-foreign-assets/try-runtime',
+    'pallet-evm/try-runtime',
+    'pallet-ethereum/try-runtime',
+    'pallet-evm-coder-substrate/try-runtime',
+    'pallet-evm-contract-helpers/try-runtime',
+    'pallet-evm-transaction-payment/try-runtime',
+    'pallet-evm-migration/try-runtime',
 ]
 std = [
     'codec/std',