difftreelog
Adjust node to new runtimes
in: master
6 files changed
node/cli/Cargo.tomldiffbeforeafterboth1################################################################################2# Build Dependencies34[build-dependencies.substrate-build-script-utils]5git = 'https://github.com/paritytech/substrate.git'6branch = 'polkadot-v0.9.17'78################################################################################9# Substrate Dependecies1011[dependencies.codec]12default-features = false13features = ['derive']14package = 'parity-scale-codec'15version = '2.3.0'1617[dependencies.frame-benchmarking]18git = 'https://github.com/paritytech/substrate.git'19branch = 'polkadot-v0.9.17'2021[dependencies.frame-benchmarking-cli]22git = 'https://github.com/paritytech/substrate.git'23branch = 'polkadot-v0.9.17'2425[dependencies.pallet-transaction-payment-rpc]26git = 'https://github.com/paritytech/substrate.git'27branch = 'polkadot-v0.9.17'2829[dependencies.substrate-prometheus-endpoint]30git = 'https://github.com/paritytech/substrate.git'31branch = 'polkadot-v0.9.17'3233[dependencies.sc-basic-authorship]34git = 'https://github.com/paritytech/substrate.git'35branch = 'polkadot-v0.9.17'3637[dependencies.sc-chain-spec]38git = 'https://github.com/paritytech/substrate.git'39branch = 'polkadot-v0.9.17'4041[dependencies.sc-cli]42features = ['wasmtime']43git = 'https://github.com/paritytech/substrate.git'44branch = 'polkadot-v0.9.17'4546[dependencies.sc-client-api]47git = 'https://github.com/paritytech/substrate.git'48branch = 'polkadot-v0.9.17'4950[dependencies.sc-consensus]51git = 'https://github.com/paritytech/substrate.git'52branch = 'polkadot-v0.9.17'5354[dependencies.sc-consensus-aura]55git = 'https://github.com/paritytech/substrate.git'56branch = 'polkadot-v0.9.17'5758[dependencies.sc-executor]59features = ['wasmtime']60git = 'https://github.com/paritytech/substrate.git'61branch = 'polkadot-v0.9.17'6263[dependencies.sc-finality-grandpa]64git = 'https://github.com/paritytech/substrate.git'65branch = 'polkadot-v0.9.17'6667[dependencies.sc-keystore]68git = 'https://github.com/paritytech/substrate.git'69branch = 'polkadot-v0.9.17'7071[dependencies.sc-rpc]72git = 'https://github.com/paritytech/substrate.git'73branch = 'polkadot-v0.9.17'7475[dependencies.sc-rpc-api]76git = 'https://github.com/paritytech/substrate.git'77branch = 'polkadot-v0.9.17'7879[dependencies.sc-service]80features = ['wasmtime']81git = 'https://github.com/paritytech/substrate.git'82branch = 'polkadot-v0.9.17'8384[dependencies.sc-telemetry]85git = 'https://github.com/paritytech/substrate.git'86branch = 'polkadot-v0.9.17'8788[dependencies.sc-transaction-pool]89git = 'https://github.com/paritytech/substrate.git'90branch = 'polkadot-v0.9.17'9192[dependencies.sc-tracing]93git = 'https://github.com/paritytech/substrate.git'94branch = 'polkadot-v0.9.17'9596[dependencies.sp-block-builder]97git = 'https://github.com/paritytech/substrate.git'98branch = 'polkadot-v0.9.17'99100[dependencies.sp-api]101git = 'https://github.com/paritytech/substrate.git'102branch = 'polkadot-v0.9.17'103104[dependencies.sp-blockchain]105git = 'https://github.com/paritytech/substrate.git'106branch = 'polkadot-v0.9.17'107108[dependencies.sp-consensus]109git = 'https://github.com/paritytech/substrate.git'110branch = 'polkadot-v0.9.17'111112[dependencies.sp-consensus-aura]113git = 'https://github.com/paritytech/substrate.git'114branch = 'polkadot-v0.9.17'115116[dependencies.sp-core]117git = 'https://github.com/paritytech/substrate.git'118branch = 'polkadot-v0.9.17'119120[dependencies.sp-finality-grandpa]121git = 'https://github.com/paritytech/substrate.git'122branch = 'polkadot-v0.9.17'123124[dependencies.sp-inherents]125git = 'https://github.com/paritytech/substrate.git'126branch = 'polkadot-v0.9.17'127128[dependencies.sp-keystore]129git = 'https://github.com/paritytech/substrate.git'130branch = 'polkadot-v0.9.17'131132[dependencies.sp-offchain]133git = 'https://github.com/paritytech/substrate.git'134branch = 'polkadot-v0.9.17'135136[dependencies.sp-runtime]137git = 'https://github.com/paritytech/substrate.git'138branch = 'polkadot-v0.9.17'139140[dependencies.sp-session]141git = 'https://github.com/paritytech/substrate.git'142branch = 'polkadot-v0.9.17'143144[dependencies.sp-timestamp]145git = 'https://github.com/paritytech/substrate.git'146branch = 'polkadot-v0.9.17'147148[dependencies.sp-transaction-pool]149git = 'https://github.com/paritytech/substrate.git'150branch = 'polkadot-v0.9.17'151152[dependencies.sp-trie]153git = 'https://github.com/paritytech/substrate.git'154branch = 'polkadot-v0.9.17'155156[dependencies.substrate-frame-rpc-system]157git = 'https://github.com/paritytech/substrate.git'158branch = 'polkadot-v0.9.17'159160[dependencies.sc-network]161git = 'https://github.com/paritytech/substrate.git'162branch = 'polkadot-v0.9.17'163164[dependencies.serde]165features = ['derive']166version = '1.0.130'167168[dependencies.serde_json]169version = '1.0.68'170171172################################################################################173# Cumulus dependencies174175[dependencies.cumulus-client-consensus-aura]176git = 'https://github.com/uniqueNetwork/cumulus.git'177branch = 'polkadot-v0.9.17'178179[dependencies.cumulus-client-consensus-common]180git = 'https://github.com/uniqueNetwork/cumulus.git'181branch = 'polkadot-v0.9.17'182183[dependencies.cumulus-client-collator]184git = 'https://github.com/uniqueNetwork/cumulus.git'185branch = 'polkadot-v0.9.17'186187[dependencies.cumulus-client-cli]188git = 'https://github.com/uniqueNetwork/cumulus.git'189branch = 'polkadot-v0.9.17'190191[dependencies.cumulus-client-network]192git = 'https://github.com/uniqueNetwork/cumulus.git'193branch = 'polkadot-v0.9.17'194195[dependencies.cumulus-primitives-core]196git = 'https://github.com/uniqueNetwork/cumulus.git'197branch = 'polkadot-v0.9.17'198199[dependencies.cumulus-primitives-parachain-inherent]200git = 'https://github.com/uniqueNetwork/cumulus.git'201branch = 'polkadot-v0.9.17'202203[dependencies.cumulus-client-service]204git = 'https://github.com/uniqueNetwork/cumulus.git'205branch = 'polkadot-v0.9.17'206207[dependencies.cumulus-relay-chain-interface]208git = 'https://github.com/uniqueNetwork/cumulus.git'209branch = 'polkadot-v0.9.17'210211[dependencies.cumulus-relay-chain-local]212git = 'https://github.com/uniqueNetwork/cumulus.git'213branch = 'polkadot-v0.9.17'214215################################################################################216# Polkadot dependencies217[dependencies.polkadot-primitives]218git = "https://github.com/paritytech/polkadot"219branch = 'release-v0.9.17'220221[dependencies.polkadot-service]222git = "https://github.com/paritytech/polkadot"223branch = 'release-v0.9.17'224225[dependencies.polkadot-cli]226git = "https://github.com/paritytech/polkadot"227branch = 'release-v0.9.17'228229[dependencies.polkadot-test-service]230git = "https://github.com/paritytech/polkadot"231branch = 'release-v0.9.17'232233[dependencies.polkadot-parachain]234git = "https://github.com/paritytech/polkadot"235branch = 'release-v0.9.17'236237238################################################################################239# Local dependencies240241[dependencies.unique-runtime]242path = '../../runtime'243244[dependencies.up-data-structs]245path = "../../primitives/data-structs"246default-features = false247248################################################################################249# Package250251[package]252authors = ['Unique Network <support@uniquenetwork.io>']253build = 'build.rs'254description = 'Unique Node'255edition = '2021'256homepage = 'https://unique.network'257license = 'GPLv3'258name = 'unique-node'259repository = 'https://github.com/UniqueNetwork/unique-chain'260version = '0.9.17'261262[[bin]]263name = 'unique-collator'264path = "src/main.rs"265266[package.metadata.docs.rs]267targets = ['x86_64-unknown-linux-gnu']268269[dependencies]270futures = '0.3.17'271log = '0.4.14'272flexi_logger = "0.15.7"273parking_lot = '0.11.2'274clap = "3.1.2"275jsonrpc-core = '18.0.0'276jsonrpc-pubsub = "18.0.0"277278fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }279fc-consensus = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }280fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }281fc-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }282fc-db = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }283fp-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }284pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }285286unique-rpc = { path = "../rpc" }287288[features]289default = []290runtime-benchmarks = [291 'unique-runtime/runtime-benchmarks',292 'polkadot-service/runtime-benchmarks',293]node/cli/src/chain_spec.rsdiffbeforeafterboth--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -15,7 +15,6 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
use cumulus_primitives_core::ParaId;
-use unique_runtime::*;
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
use sc_service::ChainType;
use sp_core::{sr25519, Pair, Public};
@@ -25,8 +24,19 @@
use serde::{Deserialize, Serialize};
use serde_json::map::Map;
+#[cfg(feature = "unique-runtime")]
+use unique_runtime as runtime;
+
+#[cfg(feature = "quartz-runtime")]
+use quartz_runtime as runtime;
+
+#[cfg(feature = "opal-runtime")]
+use opal_runtime as runtime;
+
+use runtime::{*, opaque::*};
+
/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.
-pub type ChainSpec = sc_service::GenericChainSpec<unique_runtime::GenesisConfig, Extensions>;
+pub type ChainSpec = sc_service::GenericChainSpec<runtime::GenesisConfig, Extensions>;
/// Helper function to generate a crypto pair from seed
pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
@@ -217,8 +227,8 @@
id: ParaId,
) -> GenesisConfig {
GenesisConfig {
- system: unique_runtime::SystemConfig {
- code: unique_runtime::WASM_BINARY
+ system: runtime::SystemConfig {
+ code: runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
},
@@ -235,9 +245,9 @@
key: Some(root_key),
},
vesting: VestingConfig { vesting: vec![] },
- parachain_info: unique_runtime::ParachainInfoConfig { parachain_id: id },
+ parachain_info: runtime::ParachainInfoConfig { parachain_id: id },
parachain_system: Default::default(),
- aura: unique_runtime::AuraConfig {
+ aura: runtime::AuraConfig {
authorities: initial_authorities,
},
aura_ext: Default::default(),
node/cli/src/command.rsdiffbeforeafterboth--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -41,7 +41,6 @@
use cumulus_primitives_core::ParaId;
use cumulus_client_service::genesis::generate_genesis_block;
use log::info;
-use unique_runtime::Block;
use polkadot_parachain::primitives::AccountIdConversion;
use sc_cli::{
ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,
@@ -54,6 +53,17 @@
use sp_runtime::traits::Block as BlockT;
use std::{io::Write, net::SocketAddr};
+#[cfg(feature = "unique-runtime")]
+use unique_runtime as runtime;
+
+#[cfg(feature = "quartz-runtime")]
+use quartz_runtime as runtime;
+
+#[cfg(feature = "opal-runtime")]
+use opal_runtime as runtime;
+
+use runtime::Block;
+
fn load_spec(id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
Ok(match id {
"westend-local" => Box::new(chain_spec::local_testnet_westend_config()),
@@ -104,7 +114,7 @@
}
fn native_runtime_version(_: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
- &unique_runtime::VERSION
+ &runtime::VERSION
}
}
node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -26,8 +26,17 @@
use unique_rpc::overrides_handle;
// Local Runtime Types
-use unique_runtime::RuntimeApi;
+#[cfg(feature = "unique-runtime")]
+use unique_runtime as runtime;
+
+#[cfg(feature = "quartz-runtime")]
+use quartz_runtime as runtime;
+#[cfg(feature = "opal-runtime")]
+use opal_runtime as runtime;
+
+use runtime::RuntimeApi;
+
// Cumulus Imports
use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion};
use cumulus_client_consensus_common::ParachainConsensus;
@@ -69,11 +78,11 @@
type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
- unique_runtime::api::dispatch(method, data)
+ runtime::api::dispatch(method, data)
}
fn native_version() -> sc_executor::NativeVersion {
- unique_runtime::native_version()
+ runtime::native_version()
}
}
node/rpc/Cargo.tomldiffbeforeafterboth--- a/node/rpc/Cargo.toml
+++ b/node/rpc/Cargo.toml
@@ -51,7 +51,10 @@
pallet-unique = { path = "../../pallets/unique" }
uc-rpc = { path = "../../client/rpc" }
up-rpc = { path = "../../primitives/rpc" }
-unique-runtime = { path = "../../runtime" }
+unique-runtime = { path = "../../runtime/unique", optional = true }
+quartz-runtime = { path = "../../runtime/quartz", optional = true }
+opal-runtime = { path = "../../runtime/opal", optional = true }
[features]
+default = ["unique-runtime"]
std = []
node/rpc/src/lib.rsdiffbeforeafterboth--- a/node/rpc/src/lib.rs
+++ b/node/rpc/src/lib.rs
@@ -15,7 +15,6 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
use sp_runtime::traits::BlakeTwo256;
-use unique_runtime::{Hash, AccountId, CrossAccountId, Index, opaque::Block, BlockNumber, Balance};
use fc_rpc::{
EthBlockDataCache, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override,
StorageOverride, SchemaV2Override, SchemaV3Override,
@@ -41,6 +40,17 @@
use sc_service::TransactionPool;
use std::{collections::BTreeMap, marker::PhantomData, sync::Arc};
+#[cfg(feature = "unique-runtime")]
+use unique_runtime as runtime;
+
+#[cfg(feature = "quartz-runtime")]
+use quartz_runtime as runtime;
+
+#[cfg(feature = "opal-runtime")]
+use opal_runtime as runtime;
+
+use runtime::opaque::{Hash, AccountId, CrossAccountId, Index, Block, BlockNumber, Balance};
+
/// Public io handler for exporting into other modules
pub type IoHandler = jsonrpc_core::IoHandler<sc_rpc::Metadata>;
@@ -231,7 +241,7 @@
client.clone(),
pool.clone(),
graph,
- unique_runtime::TransactionConverter,
+ runtime::TransactionConverter,
network.clone(),
signers,
overrides.clone(),