--- a/client/rpc/Cargo.toml
+++ b/client/rpc/Cargo.toml
@@ -36,11 +36,17 @@
sc-executor = { workspace = true }
-opal-runtime = { workspace = true }
+opal-runtime = { workspace = true, optional = true }
quartz-runtime = { workspace = true, optional = true }
unique-runtime = { workspace = true, optional = true }
[features]
+default = ['opal-runtime']
+all-runtimes = [
+ 'opal-runtime',
+ 'quartz-runtime',
+ 'unique-runtime',
+]
pov-estimate = [
'opal-runtime/pov-estimate',
'quartz-runtime?/pov-estimate',
--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -99,6 +99,11 @@
[features]
default = ["opal-runtime"]
+all-runtimes = [
+ 'opal-runtime',
+ 'quartz-runtime',
+ 'unique-runtime',
+]
pov-estimate = [
'opal-runtime/pov-estimate',
'quartz-runtime?/pov-estimate',
--- a/node/cli/src/cli.rs
+++ b/node/cli/src/cli.rs
@@ -15,11 +15,9 @@
// along with Unique Network. If not, see .
use crate::chain_spec;
-use std::{path::PathBuf, env};
+use std::path::PathBuf;
use clap::Parser;
-const NODE_NAME_ENV: &str = "UNIQUE_NODE_NAME";
-
/// Sub-commands supported by the collator.
#[derive(Debug, Parser)]
pub enum Subcommand {
@@ -99,21 +97,7 @@
impl Cli {
pub fn node_name() -> String {
- match env::var(NODE_NAME_ENV).ok() {
- Some(name) => name,
- None => {
- if cfg!(feature = "unique-runtime") {
- "Unique"
- } else if cfg!(feature = "sapphire-runtime") {
- "Sapphire"
- } else if cfg!(feature = "quartz-runtime") {
- "Quartz"
- } else {
- "Opal"
- }
- }
- .into(),
- }
+ "Unique".into()
}
}
--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -68,7 +68,6 @@
use up_common::types::opaque::*;
-#[cfg(feature = "pov-estimate")]
use crate::chain_spec::RuntimeIdentification;
/// Unique native executor instance.
@@ -507,12 +506,10 @@
#[cfg(feature = "pov-estimate")]
let rpc_backend = backend.clone();
- #[cfg(feature = "pov-estimate")]
let runtime_id = parachain_config.chain_spec.runtime_id();
let rpc_builder = Box::new(move |deny_unsafe, subscription_task_executor| {
let full_deps = unique_rpc::FullDeps {
- #[cfg(feature = "pov-estimate")]
runtime_id: runtime_id.clone(),
#[cfg(feature = "pov-estimate")]
@@ -1040,12 +1037,10 @@
#[cfg(feature = "pov-estimate")]
let rpc_backend = backend.clone();
- #[cfg(feature = "pov-estimate")]
let runtime_id = config.chain_spec.runtime_id();
let rpc_builder = Box::new(move |deny_unsafe, subscription_executor| {
let full_deps = unique_rpc::FullDeps {
- #[cfg(feature = "pov-estimate")]
runtime_id: runtime_id.clone(),
#[cfg(feature = "pov-estimate")]
--- a/node/rpc/Cargo.toml
+++ b/node/rpc/Cargo.toml
@@ -44,4 +44,3 @@
default = []
pov-estimate = ['uc-rpc/pov-estimate']
std = []
-unique-runtime = []
--- a/node/rpc/src/lib.rs
+++ b/node/rpc/src/lib.rs
@@ -80,7 +80,7 @@
/// EthFilterApi pool.
pub filter_pool: Option,
- #[cfg(feature = "pov-estimate")]
+ /// Runtime identification (read from the chain spec)
pub runtime_id: RuntimeId,
/// Executor params for PoV estimating
#[cfg(feature = "pov-estimate")]
@@ -194,8 +194,7 @@
deny_unsafe,
filter_pool,
- #[cfg(feature = "pov-estimate")]
- runtime_id,
+ runtime_id: _,
#[cfg(feature = "pov-estimate")]
exec_params,