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

difftreelog

Merge pull request #1012 from UniqueNetwork/feature/lookahead-leftovers

Yaroslav Bolyukin2023-10-16parents: #0a49946 #700b0c8.patch.diff
in: master
Fix lookahead collator build

11 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6450,6 +6450,7 @@
  "cumulus-pallet-parachain-system",
  "cumulus-pallet-xcm",
  "cumulus-pallet-xcmp-queue",
+ "cumulus-primitives-aura",
  "cumulus-primitives-core",
  "cumulus-primitives-timestamp",
  "cumulus-primitives-utility",
@@ -8109,12 +8110,14 @@
  "pallet-evm-coder-substrate",
  "pallet-nonfungible",
  "pallet-refungible",
+ "pallet-structure",
  "parity-scale-codec",
  "scale-info",
  "sp-core",
  "sp-io",
  "sp-runtime",
  "sp-std",
+ "up-common",
  "up-data-structs",
 ]
 
@@ -14732,6 +14735,7 @@
  "cumulus-client-consensus-proposer",
  "cumulus-client-network",
  "cumulus-client-service",
+ "cumulus-primitives-aura",
  "cumulus-primitives-core",
  "cumulus-primitives-parachain-inherent",
  "cumulus-relay-chain-inprocess-interface",
modifiedCargo.tomldiffbeforeafterboth
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -100,6 +100,7 @@
 cumulus-pallet-parachain-system = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
 cumulus-pallet-xcm = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
 cumulus-pallet-xcmp-queue = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+cumulus-primitives-aura = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
 cumulus-primitives-core = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
 cumulus-primitives-parachain-inherent = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
 cumulus-primitives-timestamp = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
modifiednode/cli/Cargo.tomldiffbeforeafterboth
--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -36,6 +36,7 @@
 cumulus-client-consensus-proposer = { workspace = true }
 cumulus-client-network = { workspace = true }
 cumulus-client-service = { workspace = true }
+cumulus-primitives-aura = { workspace = true }
 cumulus-primitives-core = { workspace = true }
 cumulus-primitives-parachain-inherent = { features = ["std"], workspace = true }
 cumulus-relay-chain-inprocess-interface = { workspace = true }
@@ -113,7 +114,9 @@
 	'quartz-runtime?/gov-test-timings',
 	'unique-runtime?/gov-test-timings',
 ]
-lookahead = []
+lookahead = [
+	'opal-runtime/lookahead'
+]
 pov-estimate = [
 	'opal-runtime/pov-estimate',
 	'quartz-runtime?/pov-estimate',
modifiednode/cli/src/command.rsdiffbeforeafterboth
--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -396,6 +396,8 @@
 			}
 		}
 		#[cfg(feature = "try-runtime")]
+		// embedded try-runtime cli will be removed soon.
+		#[allow(deprecated)]
 		Some(Subcommand::TryRuntime(cmd)) => {
 			use std::{future::Future, pin::Pin};
 
modifiednode/cli/src/service.rsdiffbeforeafterboth
--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -221,6 +221,14 @@
 	{
 	}
 );
+#[cfg(not(feature = "lookahead"))]
+ez_bounds!(
+	pub trait LookaheadApiDep {}
+);
+#[cfg(feature = "lookahead")]
+ez_bounds!(
+	pub trait LookaheadApiDep: cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> {}
+);
 
 /// Starts a `ServiceBuilder` for a full service.
 ///
@@ -358,6 +366,7 @@
 		+ Sync
 		+ 'static,
 	RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,
+	RuntimeApi::RuntimeApi: LookaheadApiDep,
 	Runtime: RuntimeInstance,
 	ExecutorDispatch: NativeExecutionDispatch + 'static,
 {
@@ -687,6 +696,8 @@
 	announce_block: Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,
 }
 
+// Clones ignored for optional lookahead collator
+#[allow(clippy::redundant_clone)]
 pub fn start_consensus<ExecutorDispatch, RuntimeApi, Runtime>(
 	client: Arc<FullClient<RuntimeApi, ExecutorDispatch>>,
 	transaction_pool: Arc<
@@ -701,6 +712,7 @@
 		+ Sync
 		+ 'static,
 	RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,
+	RuntimeApi::RuntimeApi: LookaheadApiDep,
 	Runtime: RuntimeInstance,
 {
 	let StartConsensusParameters {
@@ -735,12 +747,12 @@
 		client.clone(),
 	);
 
-	let block_import = ParachainBlockImport::new(client.clone(), backend);
+	let block_import = ParachainBlockImport::new(client.clone(), backend.clone());
 
 	let params = BuildAuraConsensusParams {
 		create_inherent_data_providers: move |_, ()| async move { Ok(()) },
 		block_import,
-		para_client: client,
+		para_client: client.clone(),
 		#[cfg(feature = "lookahead")]
 		para_backend: backend,
 		para_id,
@@ -751,10 +763,19 @@
 		proposer,
 		collator_service,
 		// With async-baking, we allowed to be both slower (longer authoring) and faster (multiple para blocks per relay block)
+		#[cfg(not(feature = "lookahead"))]
 		authoring_duration: Duration::from_millis(500),
+		#[cfg(feature = "lookahead")]
+		authoring_duration: Duration::from_millis(1500),
 		overseer_handle,
 		#[cfg(feature = "lookahead")]
-		code_hash_provider: || {},
+		code_hash_provider: move |block_hash| {
+			client
+				.code_at(block_hash)
+				.ok()
+				.map(cumulus_primitives_core::relay_chain::ValidationCode)
+				.map(|c| c.hash())
+		},
 		collator_key,
 		relay_chain_slot_duration,
 	};
@@ -762,7 +783,10 @@
 	task_manager.spawn_essential_handle().spawn(
 		"aura",
 		None,
+		#[cfg(not(feature = "lookahead"))]
 		run_aura::<_, AuraAuthorityPair, _, _, _, _, _, _, _>(params),
+		#[cfg(feature = "lookahead")]
+		run_aura::<_, AuraAuthorityPair, _, _, _, _, _, _, _, _, _>(params),
 	);
 	Ok(())
 }
modifiedpallets/inflation/src/lib.rsdiffbeforeafterboth
--- a/pallets/inflation/src/lib.rs
+++ b/pallets/inflation/src/lib.rs
@@ -70,8 +70,10 @@
 			+ Mutate<Self::AccountId>;
 		type TreasuryAccountId: Get<Self::AccountId>;
 
-		// The block number provider
-		type BlockNumberProvider: BlockNumberProvider<BlockNumber = BlockNumberFor<Self>>;
+		// The block number provider, which should be callable from `on_initialize` hook.
+		type OnInitializeBlockNumberProvider: BlockNumberProvider<
+			BlockNumber = BlockNumberFor<Self>,
+		>;
 
 		/// Number of blocks that pass between treasury balance updates due to inflation
 		#[pallet::constant]
@@ -118,7 +120,7 @@
 			};
 
 			let block_interval: u32 = T::InflationBlockInterval::get().try_into().unwrap_or(0);
-			let current_relay_block = T::BlockNumberProvider::current_block_number();
+			let current_relay_block = T::OnInitializeBlockNumberProvider::current_block_number();
 			let next_inflation: BlockNumberFor<T> = <NextInflationBlock<T>>::get();
 			add_weight(1, 0, Weight::from_parts(5_000_000, 0));
 
modifiedprimitives/common/src/constants.rsdiffbeforeafterboth
--- a/primitives/common/src/constants.rs
+++ b/primitives/common/src/constants.rs
@@ -23,7 +23,10 @@
 
 use crate::types::{Balance, BlockNumber};
 
+#[cfg(not(feature = "lookahead"))]
 pub const MILLISECS_PER_BLOCK: u64 = 12000;
+#[cfg(feature = "lookahead")]
+pub const MILLISECS_PER_BLOCK: u64 = 3000;
 pub const MILLISECS_PER_RELAY_BLOCK: u64 = 6000;
 
 pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;
modifiedruntime/common/config/pallets/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -21,7 +21,7 @@
 	traits::{ConstU32, ConstU64, Currency},
 };
 use sp_arithmetic::Perbill;
-use sp_runtime::traits::AccountIdConversion;
+use sp_runtime::traits::{AccountIdConversion, BlockNumberProvider};
 use up_common::{
 	constants::*,
 	types::{AccountId, Balance, BlockNumber},
@@ -105,12 +105,34 @@
 	pub const InflationBlockInterval: BlockNumber = 100; // every time per how many blocks inflation is applied
 }
 
+/// Pallet-inflation needs block number in on_initialize, where there is no `validation_data` exists yet
+pub struct OnInitializeBlockNumberProvider;
+impl BlockNumberProvider for OnInitializeBlockNumberProvider {
+	type BlockNumber = BlockNumber;
+
+	fn current_block_number() -> Self::BlockNumber {
+		use hex_literal::hex;
+		use parity_scale_codec::Decode;
+		use sp_io::storage;
+		// TODO: Replace with the following code after https://github.com/paritytech/polkadot-sdk/commit/3ea497b5a0fdda252f9c5a3c257cfaf8685f02fd lands
+		// <cumulus_pallet_parachain_system::Pallet<Runtime>>::last_relay_block_number()
+
+		// ParachainSystem.LastRelayChainBlockNumber
+		let Some(encoded) = storage::get(&hex!("45323df7cc47150b3930e2666b0aa313a2bca190d36bd834cc73a38fc213ecbd")) else {
+			// First parachain block
+			return Default::default()
+		};
+		BlockNumber::decode(&mut encoded.as_ref())
+			.expect("typeof(RelayBlockNumber) == typeof(BlockNumber) == u32; qed")
+	}
+}
+
 /// Used for the pallet inflation
 impl pallet_inflation::Config for Runtime {
 	type Currency = Balances;
 	type TreasuryAccountId = TreasuryAccountId;
 	type InflationBlockInterval = InflationBlockInterval;
-	type BlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;
+	type OnInitializeBlockNumberProvider = OnInitializeBlockNumberProvider;
 }
 
 impl pallet_unique::Config for Runtime {
modifiedruntime/common/config/parachain.rsdiffbeforeafterboth
--- a/runtime/common/config/parachain.rs
+++ b/runtime/common/config/parachain.rs
@@ -38,9 +38,29 @@
 	type ReservedDmpWeight = ReservedDmpWeight;
 	type ReservedXcmpWeight = ReservedXcmpWeight;
 	type XcmpMessageHandler = XcmpQueue;
+	#[cfg(not(feature = "lookahead"))]
 	type CheckAssociatedRelayNumber = cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
+	#[cfg(feature = "lookahead")]
+	type CheckAssociatedRelayNumber =
+		cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases;
 }
 
 impl parachain_info::Config for Runtime {}
 
 impl cumulus_pallet_aura_ext::Config for Runtime {}
+
+/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included
+/// into the relay chain.
+#[cfg(feature = "lookahead")]
+const UNINCLUDED_SEGMENT_CAPACITY: u32 = 3;
+/// How many parachain blocks are processed by the relay chain per parent. Limits the
+/// number of blocks authored per slot.
+#[cfg(feature = "lookahead")]
+const BLOCK_PROCESSING_VELOCITY: u32 = 2;
+#[cfg(feature = "lookahead")]
+pub type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<
+	Runtime,
+	{ MILLISECS_PER_RELAY_BLOCK as u32 },
+	BLOCK_PROCESSING_VELOCITY,
+	UNINCLUDED_SEGMENT_CAPACITY,
+>;
modifiedruntime/common/runtime_apis.rsdiffbeforeafterboth
--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -679,6 +679,16 @@
 				}
 			}
 
+			#[cfg(feature = "lookahead")]
+			impl cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> for Runtime {
+				fn can_build_upon(
+					included_hash: <Block as BlockT>::Hash,
+					slot: cumulus_primitives_aura::Slot,
+				) -> bool {
+					$crate::config::parachain::ConsensusHook::can_build_upon(included_hash, slot)
+				}
+			}
+
 			/// Should never be used, yet still required because of https://github.com/paritytech/polkadot-sdk/issues/27
 			/// Not allowed to panic, because rpc may be called using native runtime, thus causing thread panic.
 			impl fp_rpc::ConvertTransactionRuntimeApi<Block> for Runtime {
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
before · runtime/opal/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Opal Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'opal-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version.workspace = true1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['opal-runtime', 'std']20limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']21opal-runtime = [22	'app-promotion',23	'collator-selection',24	'foreign-assets',25	'governance',26	'pallet-test-utils',27	'preimage',28	'refungible',29]30pov-estimate = []31runtime-benchmarks = [32	"pallet-preimage/runtime-benchmarks",33	'cumulus-pallet-parachain-system/runtime-benchmarks',34	'frame-benchmarking',35	'frame-support/runtime-benchmarks',36	'frame-system-benchmarking',37	'frame-system/runtime-benchmarks',38	'pallet-app-promotion/runtime-benchmarks',39	'pallet-balances/runtime-benchmarks',40	'pallet-collator-selection/runtime-benchmarks',41	'pallet-collective/runtime-benchmarks',42	'pallet-common/runtime-benchmarks',43	'pallet-configuration/runtime-benchmarks',44	'pallet-democracy/runtime-benchmarks',45	'pallet-ethereum/runtime-benchmarks',46	'pallet-evm-coder-substrate/runtime-benchmarks',47	'pallet-evm-migration/runtime-benchmarks',48	'pallet-foreign-assets/runtime-benchmarks',49	'pallet-fungible/runtime-benchmarks',50	'pallet-identity/runtime-benchmarks',51	'pallet-inflation/runtime-benchmarks',52	'pallet-maintenance/runtime-benchmarks',53	'pallet-membership/runtime-benchmarks',54	'pallet-nonfungible/runtime-benchmarks',55	'pallet-ranked-collective/runtime-benchmarks',56	'pallet-referenda/runtime-benchmarks',57	'pallet-refungible/runtime-benchmarks',58	'pallet-scheduler/runtime-benchmarks',59	'pallet-structure/runtime-benchmarks',60	'pallet-timestamp/runtime-benchmarks',61	'pallet-unique/runtime-benchmarks',62	'pallet-utility/runtime-benchmarks',63	'pallet-xcm/runtime-benchmarks',64	'sp-runtime/runtime-benchmarks',65	'staging-xcm-builder/runtime-benchmarks',66]67std = [68	'cumulus-pallet-aura-ext/std',69	'cumulus-pallet-parachain-system/std',70	'cumulus-pallet-xcm/std',71	'cumulus-pallet-xcmp-queue/std',72	'cumulus-primitives-core/std',73	'cumulus-primitives-utility/std',74	'frame-executive/std',75	'frame-support/std',76	'frame-system-rpc-runtime-api/std',77	'frame-system/std',78	'frame-try-runtime/std',79	'pallet-aura/std',80	'pallet-balances/std',81	'pallet-collective/std',82	'pallet-democracy/std',83	'pallet-gov-origins/std',84	'pallet-membership/std',85	'pallet-ranked-collective/std',86	'pallet-referenda/std',87	'pallet-scheduler/std',88	'parity-scale-codec/std',89	# 'pallet-contracts/std',90	# 'pallet-contracts-primitives/std',91	# 'pallet-contracts-rpc-runtime-api/std',92	# 'pallet-contract-helpers/std',93	"pallet-authorship/std",94	"pallet-preimage/std",95	"pallet-session/std",96	"pallet-state-trie-migration/std",97	"sp-consensus-aura/std",98	'app-promotion-rpc/std',99	'evm-coder/std',100	'fp-rpc/std',101	'fp-self-contained/std',102	'pallet-app-promotion/std',103	'pallet-balances-adapter/std',104	'pallet-base-fee/std',105	'pallet-charge-transaction/std',106	'pallet-collator-selection/std',107	'pallet-common/std',108	'pallet-configuration/std',109	'pallet-ethereum/std',110	'pallet-evm-coder-substrate/std',111	'pallet-evm-contract-helpers/std',112	'pallet-evm-migration/std',113	'pallet-evm-transaction-payment/std',114	'pallet-evm/std',115	'pallet-fungible/std',116	'pallet-identity/std',117	'pallet-inflation/std',118	'pallet-nonfungible/std',119	'pallet-refungible/std',120	'pallet-structure/std',121	'pallet-sudo/std',122	'pallet-timestamp/std',123	'pallet-transaction-payment-rpc-runtime-api/std',124	'pallet-transaction-payment/std',125	'pallet-treasury/std',126	'pallet-unique/std',127	'pallet-utility/std',128	'parachain-info/std',129	'serde',130	'sp-api/std',131	'sp-block-builder/std',132	'sp-core/std',133	'sp-inherents/std',134	'sp-io/std',135	'sp-offchain/std',136	'sp-runtime/std',137	'sp-session/std',138	'sp-std/std',139    'sp-storage/std',140	'sp-transaction-pool/std',141	'sp-version/std',142	'staging-xcm-builder/std',143	'staging-xcm-executor/std',144	'staging-xcm/std',145	'up-common/std',146	'up-data-structs/std',147	'up-pov-estimate-rpc/std',148	'up-rpc/std',149	'up-sponsorship/std',150151	"orml-tokens/std",152	"orml-traits/std",153	"orml-vesting/std",154	"orml-xcm-support/std",155	"orml-xtokens/std",156	"pallet-foreign-assets/std",157158	'pallet-maintenance/std',159	'pallet-test-utils?/std',160]161try-runtime = [162	"pallet-authorship/try-runtime",163	"pallet-collator-selection/try-runtime",164	"pallet-identity/try-runtime",165	"pallet-preimage/try-runtime",166	"pallet-session/try-runtime",167	"pallet-state-trie-migration/try-runtime",168	'cumulus-pallet-aura-ext/try-runtime',169	'cumulus-pallet-dmp-queue/try-runtime',170	'cumulus-pallet-parachain-system/try-runtime',171	'cumulus-pallet-xcm/try-runtime',172	'cumulus-pallet-xcmp-queue/try-runtime',173	'fp-self-contained/try-runtime',174	'frame-executive/try-runtime',175	'frame-support/try-runtime',176	'frame-system/try-runtime',177	'frame-try-runtime',178	'frame-try-runtime?/try-runtime',179	'orml-tokens/try-runtime',180	'orml-vesting/try-runtime',181	'orml-xtokens/try-runtime',182	'pallet-app-promotion/try-runtime',183	'pallet-aura/try-runtime',184	'pallet-balances-adapter/try-runtime',185	'pallet-balances/try-runtime',186	'pallet-base-fee/try-runtime',187	'pallet-charge-transaction/try-runtime',188	'pallet-collective/try-runtime',189	'pallet-collective/try-runtime',190	'pallet-common/try-runtime',191	'pallet-configuration/try-runtime',192	'pallet-democracy/try-runtime',193	'pallet-democracy/try-runtime',194	'pallet-ethereum/try-runtime',195	'pallet-evm-coder-substrate/try-runtime',196	'pallet-evm-contract-helpers/try-runtime',197	'pallet-evm-migration/try-runtime',198	'pallet-evm-transaction-payment/try-runtime',199	'pallet-evm/try-runtime',200	'pallet-foreign-assets/try-runtime',201	'pallet-fungible/try-runtime',202	'pallet-gov-origins/try-runtime',203	'pallet-inflation/try-runtime',204	'pallet-maintenance/try-runtime',205	'pallet-membership/try-runtime',206	'pallet-membership/try-runtime',207	'pallet-nonfungible/try-runtime',208	'pallet-ranked-collective/try-runtime',209	'pallet-referenda/try-runtime',210	'pallet-refungible/try-runtime',211	'pallet-scheduler/try-runtime',212	'pallet-scheduler/try-runtime',213	'pallet-structure/try-runtime',214	'pallet-sudo/try-runtime',215	'pallet-test-utils?/try-runtime',216	'pallet-timestamp/try-runtime',217	'pallet-transaction-payment/try-runtime',218	'pallet-treasury/try-runtime',219	'pallet-unique/try-runtime',220	'pallet-utility/try-runtime',221	'pallet-xcm/try-runtime',222	'parachain-info/try-runtime',223]224225app-promotion = []226collator-selection = []227foreign-assets = []228gov-test-timings = []229governance = []230preimage = []231refungible = []232session-test-timings = []233234################################################################################235# local dependencies236237[dependencies]238cumulus-pallet-aura-ext = { workspace = true }239cumulus-pallet-dmp-queue = { workspace = true }240cumulus-pallet-parachain-system = { workspace = true }241cumulus-pallet-xcm = { workspace = true }242cumulus-pallet-xcmp-queue = { workspace = true }243cumulus-primitives-core = { workspace = true }244cumulus-primitives-timestamp = { workspace = true }245cumulus-primitives-utility = { workspace = true }246frame-executive = { workspace = true }247frame-support = { workspace = true }248frame-system = { workspace = true }249frame-system-rpc-runtime-api = { workspace = true }250orml-tokens = { workspace = true }251orml-traits = { workspace = true }252orml-vesting = { workspace = true }253orml-xcm-support = { workspace = true }254orml-xtokens = { workspace = true }255pallet-aura = { workspace = true }256pallet-authorship = { workspace = true }257pallet-balances = { features = ["insecure_zero_ed"], workspace = true }258pallet-preimage = { workspace = true }259pallet-session = { workspace = true }260pallet-state-trie-migration = { workspace = true }261pallet-sudo = { workspace = true }262pallet-timestamp = { workspace = true }263pallet-transaction-payment = { workspace = true }264pallet-transaction-payment-rpc-runtime-api = { workspace = true }265pallet-treasury = { workspace = true }266pallet-utility = { workspace = true }267pallet-xcm = { workspace = true }268parachain-info = { workspace = true }269parity-scale-codec = { workspace = true }270polkadot-parachain-primitives = { workspace = true }271smallvec = { workspace = true }272sp-api = { workspace = true }273sp-arithmetic = { workspace = true }274sp-block-builder = { workspace = true }275sp-consensus-aura = { workspace = true }276sp-core = { workspace = true }277sp-inherents = { workspace = true }278sp-io = { workspace = true }279sp-offchain = { workspace = true }280sp-runtime = { workspace = true }281sp-session = { workspace = true }282sp-std = { workspace = true }283sp-storage = { workspace = true }284sp-transaction-pool = { workspace = true }285sp-version = { workspace = true }286staging-xcm = { workspace = true }287staging-xcm-builder = { workspace = true }288staging-xcm-executor = { workspace = true }289290app-promotion-rpc = { workspace = true }291derivative = { workspace = true }292evm-coder = { workspace = true }293fp-evm = { workspace = true }294fp-rpc = { workspace = true }295fp-self-contained = { workspace = true }296log = { workspace = true }297num_enum = { workspace = true }298pallet-app-promotion = { workspace = true }299pallet-balances-adapter = { workspace = true }300pallet-base-fee = { workspace = true }301pallet-charge-transaction = { workspace = true }302pallet-collator-selection = { workspace = true }303pallet-collective = { workspace = true }304pallet-common = { workspace = true }305pallet-configuration = { workspace = true }306pallet-democracy = { workspace = true }307pallet-ethereum = { workspace = true }308pallet-evm = { workspace = true }309pallet-evm-coder-substrate = { workspace = true }310pallet-evm-contract-helpers = { workspace = true }311pallet-evm-migration = { workspace = true }312pallet-evm-precompile-simple = { workspace = true }313pallet-evm-transaction-payment = { workspace = true }314pallet-foreign-assets = { workspace = true }315pallet-fungible = { workspace = true }316pallet-gov-origins = { workspace = true }317pallet-identity = { workspace = true }318pallet-inflation = { workspace = true }319pallet-maintenance = { workspace = true }320pallet-membership = { workspace = true }321pallet-nonfungible = { workspace = true }322pallet-ranked-collective = { workspace = true }323pallet-referenda = { workspace = true }324pallet-refungible = { workspace = true }325pallet-scheduler = { workspace = true }326pallet-structure = { workspace = true }327pallet-unique = { workspace = true }328precompile-utils-macro = { workspace = true }329scale-info = { workspace = true }330up-common = { workspace = true }331up-data-structs = { workspace = true }332up-pov-estimate-rpc = { workspace = true }333up-rpc = { workspace = true }334up-sponsorship = { workspace = true }335336################################################################################337# Optional dependencies338339frame-benchmarking = { workspace = true, optional = true }340frame-system-benchmarking = { workspace = true, optional = true }341frame-try-runtime = { workspace = true, optional = true }342serde = { workspace = true, optional = true }343344################################################################################345# Test dependencies346347pallet-test-utils = { workspace = true, optional = true }348349################################################################################350# Other Dependencies351352hex-literal = { workspace = true }353impl-trait-for-tuples = { workspace = true }354355[build-dependencies]356substrate-wasm-builder = { workspace = true }
after · runtime/opal/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Opal Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'opal-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version.workspace = true1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['opal-runtime', 'std']20limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']21opal-runtime = [22	'app-promotion',23	'collator-selection',24	'foreign-assets',25	'governance',26	'pallet-test-utils',27	'preimage',28	'refungible',29]30pov-estimate = []31runtime-benchmarks = [32	"pallet-preimage/runtime-benchmarks",33	'cumulus-pallet-parachain-system/runtime-benchmarks',34	'frame-benchmarking',35	'frame-support/runtime-benchmarks',36	'frame-system-benchmarking',37	'frame-system/runtime-benchmarks',38	'pallet-app-promotion/runtime-benchmarks',39	'pallet-balances/runtime-benchmarks',40	'pallet-collator-selection/runtime-benchmarks',41	'pallet-collective/runtime-benchmarks',42	'pallet-common/runtime-benchmarks',43	'pallet-configuration/runtime-benchmarks',44	'pallet-democracy/runtime-benchmarks',45	'pallet-ethereum/runtime-benchmarks',46	'pallet-evm-coder-substrate/runtime-benchmarks',47	'pallet-evm-migration/runtime-benchmarks',48	'pallet-foreign-assets/runtime-benchmarks',49	'pallet-fungible/runtime-benchmarks',50	'pallet-identity/runtime-benchmarks',51	'pallet-inflation/runtime-benchmarks',52	'pallet-maintenance/runtime-benchmarks',53	'pallet-membership/runtime-benchmarks',54	'pallet-nonfungible/runtime-benchmarks',55	'pallet-ranked-collective/runtime-benchmarks',56	'pallet-referenda/runtime-benchmarks',57	'pallet-refungible/runtime-benchmarks',58	'pallet-scheduler/runtime-benchmarks',59	'pallet-structure/runtime-benchmarks',60	'pallet-timestamp/runtime-benchmarks',61	'pallet-unique/runtime-benchmarks',62	'pallet-utility/runtime-benchmarks',63	'pallet-xcm/runtime-benchmarks',64	'sp-runtime/runtime-benchmarks',65	'staging-xcm-builder/runtime-benchmarks',66]67std = [68	'cumulus-pallet-aura-ext/std',69	'cumulus-pallet-parachain-system/std',70	'cumulus-pallet-xcm/std',71	'cumulus-pallet-xcmp-queue/std',72	'cumulus-primitives-aura/std',73	'cumulus-primitives-core/std',74	'cumulus-primitives-utility/std',75	'frame-executive/std',76	'frame-support/std',77	'frame-system-rpc-runtime-api/std',78	'frame-system/std',79	'frame-try-runtime/std',80	'pallet-aura/std',81	'pallet-balances/std',82	'pallet-collective/std',83	'pallet-democracy/std',84	'pallet-gov-origins/std',85	'pallet-membership/std',86	'pallet-ranked-collective/std',87	'pallet-referenda/std',88	'pallet-scheduler/std',89	'parity-scale-codec/std',90	# 'pallet-contracts/std',91	# 'pallet-contracts-primitives/std',92	# 'pallet-contracts-rpc-runtime-api/std',93	# 'pallet-contract-helpers/std',94	"pallet-authorship/std",95	"pallet-preimage/std",96	"pallet-session/std",97	"pallet-state-trie-migration/std",98	"sp-consensus-aura/std",99	'app-promotion-rpc/std',100	'evm-coder/std',101	'fp-rpc/std',102	'fp-self-contained/std',103	'pallet-app-promotion/std',104	'pallet-balances-adapter/std',105	'pallet-base-fee/std',106	'pallet-charge-transaction/std',107	'pallet-collator-selection/std',108	'pallet-common/std',109	'pallet-configuration/std',110	'pallet-ethereum/std',111	'pallet-evm-coder-substrate/std',112	'pallet-evm-contract-helpers/std',113	'pallet-evm-migration/std',114	'pallet-evm-transaction-payment/std',115	'pallet-evm/std',116	'pallet-fungible/std',117	'pallet-identity/std',118	'pallet-inflation/std',119	'pallet-nonfungible/std',120	'pallet-refungible/std',121	'pallet-structure/std',122	'pallet-sudo/std',123	'pallet-timestamp/std',124	'pallet-transaction-payment-rpc-runtime-api/std',125	'pallet-transaction-payment/std',126	'pallet-treasury/std',127	'pallet-unique/std',128	'pallet-utility/std',129	'parachain-info/std',130	'serde',131	'sp-api/std',132	'sp-block-builder/std',133	'sp-core/std',134	'sp-inherents/std',135	'sp-io/std',136	'sp-offchain/std',137	'sp-runtime/std',138	'sp-session/std',139	'sp-std/std',140    'sp-storage/std',141	'sp-transaction-pool/std',142	'sp-version/std',143	'staging-xcm-builder/std',144	'staging-xcm-executor/std',145	'staging-xcm/std',146	'up-common/std',147	'up-data-structs/std',148	'up-pov-estimate-rpc/std',149	'up-rpc/std',150	'up-sponsorship/std',151152	"orml-tokens/std",153	"orml-traits/std",154	"orml-vesting/std",155	"orml-xcm-support/std",156	"orml-xtokens/std",157	"pallet-foreign-assets/std",158159	'pallet-maintenance/std',160	'pallet-test-utils?/std',161]162try-runtime = [163	"pallet-authorship/try-runtime",164	"pallet-collator-selection/try-runtime",165	"pallet-identity/try-runtime",166	"pallet-preimage/try-runtime",167	"pallet-session/try-runtime",168	"pallet-state-trie-migration/try-runtime",169	'cumulus-pallet-aura-ext/try-runtime',170	'cumulus-pallet-dmp-queue/try-runtime',171	'cumulus-pallet-parachain-system/try-runtime',172	'cumulus-pallet-xcm/try-runtime',173	'cumulus-pallet-xcmp-queue/try-runtime',174	'fp-self-contained/try-runtime',175	'frame-executive/try-runtime',176	'frame-support/try-runtime',177	'frame-system/try-runtime',178	'frame-try-runtime',179	'frame-try-runtime?/try-runtime',180	'orml-tokens/try-runtime',181	'orml-vesting/try-runtime',182	'orml-xtokens/try-runtime',183	'pallet-app-promotion/try-runtime',184	'pallet-aura/try-runtime',185	'pallet-balances-adapter/try-runtime',186	'pallet-balances/try-runtime',187	'pallet-base-fee/try-runtime',188	'pallet-charge-transaction/try-runtime',189	'pallet-collective/try-runtime',190	'pallet-collective/try-runtime',191	'pallet-common/try-runtime',192	'pallet-configuration/try-runtime',193	'pallet-democracy/try-runtime',194	'pallet-democracy/try-runtime',195	'pallet-ethereum/try-runtime',196	'pallet-evm-coder-substrate/try-runtime',197	'pallet-evm-contract-helpers/try-runtime',198	'pallet-evm-migration/try-runtime',199	'pallet-evm-transaction-payment/try-runtime',200	'pallet-evm/try-runtime',201	'pallet-foreign-assets/try-runtime',202	'pallet-fungible/try-runtime',203	'pallet-gov-origins/try-runtime',204	'pallet-inflation/try-runtime',205	'pallet-maintenance/try-runtime',206	'pallet-membership/try-runtime',207	'pallet-membership/try-runtime',208	'pallet-nonfungible/try-runtime',209	'pallet-ranked-collective/try-runtime',210	'pallet-referenda/try-runtime',211	'pallet-refungible/try-runtime',212	'pallet-scheduler/try-runtime',213	'pallet-scheduler/try-runtime',214	'pallet-structure/try-runtime',215	'pallet-sudo/try-runtime',216	'pallet-test-utils?/try-runtime',217	'pallet-timestamp/try-runtime',218	'pallet-transaction-payment/try-runtime',219	'pallet-treasury/try-runtime',220	'pallet-unique/try-runtime',221	'pallet-utility/try-runtime',222	'pallet-xcm/try-runtime',223	'parachain-info/try-runtime',224]225226app-promotion = []227collator-selection = []228foreign-assets = []229gov-test-timings = []230governance = []231preimage = []232refungible = []233session-test-timings = []234lookahead = []235236################################################################################237# local dependencies238239[dependencies]240cumulus-pallet-aura-ext = { workspace = true }241cumulus-pallet-dmp-queue = { workspace = true }242cumulus-pallet-parachain-system = { workspace = true }243cumulus-pallet-xcm = { workspace = true }244cumulus-pallet-xcmp-queue = { workspace = true }245cumulus-primitives-aura = { workspace = true }246cumulus-primitives-core = { workspace = true }247cumulus-primitives-timestamp = { workspace = true }248cumulus-primitives-utility = { workspace = true }249frame-executive = { workspace = true }250frame-support = { workspace = true }251frame-system = { workspace = true }252frame-system-rpc-runtime-api = { workspace = true }253orml-tokens = { workspace = true }254orml-traits = { workspace = true }255orml-vesting = { workspace = true }256orml-xcm-support = { workspace = true }257orml-xtokens = { workspace = true }258pallet-aura = { workspace = true }259pallet-authorship = { workspace = true }260pallet-balances = { features = ["insecure_zero_ed"], workspace = true }261pallet-preimage = { workspace = true }262pallet-session = { workspace = true }263pallet-state-trie-migration = { workspace = true }264pallet-sudo = { workspace = true }265pallet-timestamp = { workspace = true }266pallet-transaction-payment = { workspace = true }267pallet-transaction-payment-rpc-runtime-api = { workspace = true }268pallet-treasury = { workspace = true }269pallet-utility = { workspace = true }270pallet-xcm = { workspace = true }271parachain-info = { workspace = true }272parity-scale-codec = { workspace = true }273polkadot-parachain-primitives = { workspace = true }274smallvec = { workspace = true }275sp-api = { workspace = true }276sp-arithmetic = { workspace = true }277sp-block-builder = { workspace = true }278sp-consensus-aura = { workspace = true }279sp-core = { workspace = true }280sp-inherents = { workspace = true }281sp-io = { workspace = true }282sp-offchain = { workspace = true }283sp-runtime = { workspace = true }284sp-session = { workspace = true }285sp-std = { workspace = true }286sp-storage = { workspace = true }287sp-transaction-pool = { workspace = true }288sp-version = { workspace = true }289staging-xcm = { workspace = true }290staging-xcm-builder = { workspace = true }291staging-xcm-executor = { workspace = true }292293app-promotion-rpc = { workspace = true }294derivative = { workspace = true }295evm-coder = { workspace = true }296fp-evm = { workspace = true }297fp-rpc = { workspace = true }298fp-self-contained = { workspace = true }299log = { workspace = true }300num_enum = { workspace = true }301pallet-app-promotion = { workspace = true }302pallet-balances-adapter = { workspace = true }303pallet-base-fee = { workspace = true }304pallet-charge-transaction = { workspace = true }305pallet-collator-selection = { workspace = true }306pallet-collective = { workspace = true }307pallet-common = { workspace = true }308pallet-configuration = { workspace = true }309pallet-democracy = { workspace = true }310pallet-ethereum = { workspace = true }311pallet-evm = { workspace = true }312pallet-evm-coder-substrate = { workspace = true }313pallet-evm-contract-helpers = { workspace = true }314pallet-evm-migration = { workspace = true }315pallet-evm-precompile-simple = { workspace = true }316pallet-evm-transaction-payment = { workspace = true }317pallet-foreign-assets = { workspace = true }318pallet-fungible = { workspace = true }319pallet-gov-origins = { workspace = true }320pallet-identity = { workspace = true }321pallet-inflation = { workspace = true }322pallet-maintenance = { workspace = true }323pallet-membership = { workspace = true }324pallet-nonfungible = { workspace = true }325pallet-ranked-collective = { workspace = true }326pallet-referenda = { workspace = true }327pallet-refungible = { workspace = true }328pallet-scheduler = { workspace = true }329pallet-structure = { workspace = true }330pallet-unique = { workspace = true }331precompile-utils-macro = { workspace = true }332scale-info = { workspace = true }333up-common = { workspace = true }334up-data-structs = { workspace = true }335up-pov-estimate-rpc = { workspace = true }336up-rpc = { workspace = true }337up-sponsorship = { workspace = true }338339################################################################################340# Optional dependencies341342frame-benchmarking = { workspace = true, optional = true }343frame-system-benchmarking = { workspace = true, optional = true }344frame-try-runtime = { workspace = true, optional = true }345serde = { workspace = true, optional = true }346347################################################################################348# Test dependencies349350pallet-test-utils = { workspace = true, optional = true }351352################################################################################353# Other Dependencies354355hex-literal = { workspace = true }356impl-trait-for-tuples = { workspace = true }357358[build-dependencies]359substrate-wasm-builder = { workspace = true }