mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
Complete telemetry for parachain & relaychain (#301)
* Complete telemetry for parachain & relaychain * Update Substrate & Polkadot
This commit is contained in:
Generated
+360
-274
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,7 @@ cumulus-runtime = { path = "../runtime" }
|
|||||||
|
|
||||||
# Other dependencies
|
# Other dependencies
|
||||||
log = "0.4.8"
|
log = "0.4.8"
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.0", features = [ "derive" ] }
|
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ] }
|
||||||
futures = { version = "0.3.1", features = ["compat"] }
|
futures = { version = "0.3.1", features = ["compat"] }
|
||||||
parking_lot = "0.9"
|
parking_lot = "0.9"
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "m
|
|||||||
# Other deps
|
# Other deps
|
||||||
futures = { version = "0.3.8", features = ["compat"] }
|
futures = { version = "0.3.8", features = ["compat"] }
|
||||||
tokio = "0.1.22"
|
tokio = "0.1.22"
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.0", features = [ "derive" ] }
|
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ] }
|
||||||
tracing = "0.1.22"
|
tracing = "0.1.22"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|||||||
@@ -502,7 +502,7 @@ where
|
|||||||
|
|
||||||
match para_best_chain {
|
match para_best_chain {
|
||||||
Some(best) => Decode::decode(&mut &best[..]).map_err(|e| {
|
Some(best) => Decode::decode(&mut &best[..]).map_err(|e| {
|
||||||
ConsensusError::ChainLookup(format!("Error decoding parachain head: {}", e.what()))
|
ConsensusError::ChainLookup(format!("Error decoding parachain head: {}", e))
|
||||||
}),
|
}),
|
||||||
None => Err(ConsensusError::ChainLookup(
|
None => Err(ConsensusError::ChainLookup(
|
||||||
"Could not find parachain head for best relay chain!".into(),
|
"Could not find parachain head for best relay chain!".into(),
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch =
|
|||||||
cumulus-primitives = { path = "../primitives" }
|
cumulus-primitives = { path = "../primitives" }
|
||||||
|
|
||||||
# other deps
|
# other deps
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.0", features = [ "derive" ] }
|
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ] }
|
||||||
futures = { version = "0.3.1", features = ["compat"] }
|
futures = { version = "0.3.1", features = ["compat"] }
|
||||||
futures-timer = "3.0.2"
|
futures-timer = "3.0.2"
|
||||||
log = "0.4.8"
|
log = "0.4.8"
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ sp-state-machine = { git = "https://github.com/paritytech/substrate", default-fe
|
|||||||
sp-trie = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
sp-trie = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||||
|
|
||||||
# Other Dependencies
|
# Other Dependencies
|
||||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"]}
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"]}
|
||||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||||
hash-db = { version = "0.15.2", default-features = false }
|
hash-db = { version = "0.15.2", default-features = false }
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-f
|
|||||||
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" }
|
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" }
|
||||||
|
|
||||||
# Other dependencies
|
# Other dependencies
|
||||||
codec = { package = "parity-scale-codec", version = "1.0.5", default-features = false, features = [ "derive" ] }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [ "derive" ] }
|
||||||
impl-trait-for-tuples = "0.1.3"
|
impl-trait-for-tuples = "0.1.3"
|
||||||
|
|
||||||
# Polkadot dependencies
|
# Polkadot dependencies
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
[package]
|
[package]
|
||||||
name = 'rococo-collator'
|
name = "rococo-collator"
|
||||||
version = '0.1.0'
|
version = "0.1.0"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
build = 'build.rs'
|
build = "build.rs"
|
||||||
edition = '2018'
|
edition = "2018"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = 'rococo-collator'
|
name = "rococo-collator"
|
||||||
path = 'src/main.rs'
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
derive_more = '0.15.0'
|
derive_more = "0.15.0"
|
||||||
exit-future = '0.1.4'
|
exit-future = "0.1.4"
|
||||||
futures = { version = "0.3.1", features = ["compat"] }
|
futures = { version = "0.3.1", features = ["compat"] }
|
||||||
log = '0.4.8'
|
log = "0.4.8"
|
||||||
parking_lot = '0.9.0'
|
parking_lot = "0.9.0"
|
||||||
trie-root = '0.15.2'
|
trie-root = "0.15.2"
|
||||||
codec = { package = 'parity-scale-codec', version = '1.0.0' }
|
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||||
structopt = "0.3.3"
|
structopt = "0.3.3"
|
||||||
serde = { version = "1.0.101", features = ["derive"] }
|
serde = { version = "1.0.101", features = ["derive"] }
|
||||||
hex-literal = "0.2.1"
|
hex-literal = "0.2.1"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ name = "parachain-info"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||||
|
|
||||||
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ edition = '2018'
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||||
|
|
||||||
parachain-info = { path = "../pallets/parachain-info", default-features = false }
|
parachain-info = { path = "../pallets/parachain-info", default-features = false }
|
||||||
rococo-parachain-primitives = { path = "../primitives", default-features = false }
|
rococo-parachain-primitives = { path = "../primitives", default-features = false }
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ pub fn run() -> Result<()> {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
Some(Subcommand::ExportGenesisState(params)) => {
|
Some(Subcommand::ExportGenesisState(params)) => {
|
||||||
let mut builder = sc_cli::GlobalLoggerBuilder::new("");
|
let mut builder = sc_cli::LoggerBuilder::new("");
|
||||||
builder.with_profiling(sc_tracing::TracingReceiver::Log, "");
|
builder.with_profiling(sc_tracing::TracingReceiver::Log, "");
|
||||||
let _ = builder.init();
|
let _ = builder.init();
|
||||||
|
|
||||||
@@ -241,7 +241,7 @@ pub fn run() -> Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
Some(Subcommand::ExportGenesisWasm(params)) => {
|
Some(Subcommand::ExportGenesisWasm(params)) => {
|
||||||
let mut builder = sc_cli::GlobalLoggerBuilder::new("");
|
let mut builder = sc_cli::LoggerBuilder::new("");
|
||||||
builder.with_profiling(sc_tracing::TracingReceiver::Log, "");
|
builder.with_profiling(sc_tracing::TracingReceiver::Log, "");
|
||||||
let _ = builder.init();
|
let _ = builder.init();
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ pub fn run() -> Result<()> {
|
|||||||
&polkadot_cli,
|
&polkadot_cli,
|
||||||
&polkadot_cli,
|
&polkadot_cli,
|
||||||
task_executor,
|
task_executor,
|
||||||
None,
|
config.telemetry_handle.clone(),
|
||||||
).map_err(|err| format!("Relay chain argument error: {}", err))?;
|
).map_err(|err| format!("Relay chain argument error: {}", err))?;
|
||||||
let collator = cli.run.base.validator || cli.collator;
|
let collator = cli.run.base.validator || cli.collator;
|
||||||
|
|
||||||
@@ -431,4 +431,11 @@ impl CliConfiguration<Self> for RelayChainCli {
|
|||||||
fn announce_block(&self) -> Result<bool> {
|
fn announce_block(&self) -> Result<bool> {
|
||||||
self.base.base.announce_block()
|
self.base.base.announce_block()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn telemetry_endpoints(
|
||||||
|
&self,
|
||||||
|
chain_spec: &Box<dyn ChainSpec>,
|
||||||
|
) -> Result<Option<sc_telemetry::TelemetryEndpoints>> {
|
||||||
|
self.base.base.telemetry_endpoints(chain_spec)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,13 +49,13 @@ pub fn new_partial(
|
|||||||
(),
|
(),
|
||||||
sp_consensus::import_queue::BasicQueue<Block, PrefixedMemoryDB<BlakeTwo256>>,
|
sp_consensus::import_queue::BasicQueue<Block, PrefixedMemoryDB<BlakeTwo256>>,
|
||||||
sc_transaction_pool::FullPool<Block, TFullClient<Block, RuntimeApi, Executor>>,
|
sc_transaction_pool::FullPool<Block, TFullClient<Block, RuntimeApi, Executor>>,
|
||||||
Option<sc_telemetry::TelemetrySpan>,
|
(),
|
||||||
>,
|
>,
|
||||||
sc_service::Error,
|
sc_service::Error,
|
||||||
> {
|
> {
|
||||||
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
|
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
|
||||||
|
|
||||||
let (client, backend, keystore_container, task_manager, telemetry_span) =
|
let (client, backend, keystore_container, task_manager) =
|
||||||
sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;
|
sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;
|
||||||
let client = Arc::new(client);
|
let client = Arc::new(client);
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ pub fn new_partial(
|
|||||||
transaction_pool,
|
transaction_pool,
|
||||||
inherent_data_providers,
|
inherent_data_providers,
|
||||||
select_chain: (),
|
select_chain: (),
|
||||||
other: telemetry_span,
|
other: (),
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(params)
|
Ok(params)
|
||||||
@@ -125,7 +125,6 @@ where
|
|||||||
)?;
|
)?;
|
||||||
|
|
||||||
let params = new_partial(¶chain_config)?;
|
let params = new_partial(¶chain_config)?;
|
||||||
let telemetry_span = params.other;
|
|
||||||
params
|
params
|
||||||
.inherent_data_providers
|
.inherent_data_providers
|
||||||
.register_provider(sp_timestamp::InherentDataProvider)
|
.register_provider(sp_timestamp::InherentDataProvider)
|
||||||
@@ -171,7 +170,6 @@ where
|
|||||||
network: network.clone(),
|
network: network.clone(),
|
||||||
network_status_sinks,
|
network_status_sinks,
|
||||||
system_rpc_tx,
|
system_rpc_tx,
|
||||||
telemetry_span,
|
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let announce_block = {
|
let announce_block = {
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# Other dependencies
|
# Other dependencies
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = [ "derive" ] }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [ "derive" ] }
|
||||||
hash-db = { version = "0.15.2", default-features = false }
|
hash-db = { version = "0.15.2", default-features = false }
|
||||||
memory-db = { version = "0.25.0", default-features = false }
|
memory-db = { version = "0.26.0", default-features = false }
|
||||||
trie-db = { version = "0.22.0", default-features = false }
|
trie-db = { version = "0.22.0", default-features = false }
|
||||||
|
|
||||||
# Cumulus dependencies
|
# Cumulus dependencies
|
||||||
|
|||||||
@@ -32,4 +32,4 @@ cumulus-primitives = { path = "../../primitives" }
|
|||||||
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master" }
|
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master" }
|
||||||
|
|
||||||
# Other deps
|
# Other deps
|
||||||
codec = { package = "parity-scale-codec", version = "1.0.5", default-features = false, features = [ "derive" ] }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [ "derive" ] }
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ edition = '2018'
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# Other dependencies
|
# Other dependencies
|
||||||
codec = { package = "parity-scale-codec", version = "1.0.5", default-features = false, features = [ "derive" ] }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [ "derive" ] }
|
||||||
|
|
||||||
# Substrate dependencies
|
# Substrate dependencies
|
||||||
sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||||
|
|
||||||
# Substrate dependencies
|
# Substrate dependencies
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cumulus-test-service"
|
name = "cumulus-test-service"
|
||||||
version = '0.1.0'
|
version = "0.1.0"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
edition = '2018'
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = 'parity-scale-codec', version = '1.0.0' }
|
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||||
rand = "0.7.3"
|
rand = "0.7.3"
|
||||||
serde = { version = "1.0.101", features = ["derive"] }
|
serde = { version = "1.0.101", features = ["derive"] }
|
||||||
|
|
||||||
|
|||||||
@@ -73,13 +73,13 @@ pub fn new_partial(
|
|||||||
(),
|
(),
|
||||||
sp_consensus::import_queue::BasicQueue<Block, PrefixedMemoryDB<BlakeTwo256>>,
|
sp_consensus::import_queue::BasicQueue<Block, PrefixedMemoryDB<BlakeTwo256>>,
|
||||||
sc_transaction_pool::FullPool<Block, TFullClient<Block, RuntimeApi, RuntimeExecutor>>,
|
sc_transaction_pool::FullPool<Block, TFullClient<Block, RuntimeApi, RuntimeExecutor>>,
|
||||||
Option<sc_telemetry::TelemetrySpan>,
|
(),
|
||||||
>,
|
>,
|
||||||
sc_service::Error,
|
sc_service::Error,
|
||||||
> {
|
> {
|
||||||
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
|
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
|
||||||
|
|
||||||
let (client, backend, keystore_container, task_manager, telemetry_span) =
|
let (client, backend, keystore_container, task_manager) =
|
||||||
sc_service::new_full_parts::<Block, RuntimeApi, RuntimeExecutor>(&config)?;
|
sc_service::new_full_parts::<Block, RuntimeApi, RuntimeExecutor>(&config)?;
|
||||||
let client = Arc::new(client);
|
let client = Arc::new(client);
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ pub fn new_partial(
|
|||||||
transaction_pool,
|
transaction_pool,
|
||||||
inherent_data_providers,
|
inherent_data_providers,
|
||||||
select_chain: (),
|
select_chain: (),
|
||||||
other: telemetry_span,
|
other: (),
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(params)
|
Ok(params)
|
||||||
@@ -146,7 +146,6 @@ where
|
|||||||
let mut parachain_config = prepare_node_config(parachain_config);
|
let mut parachain_config = prepare_node_config(parachain_config);
|
||||||
|
|
||||||
let params = new_partial(&mut parachain_config)?;
|
let params = new_partial(&mut parachain_config)?;
|
||||||
let telemetry_span = params.other;
|
|
||||||
params
|
params
|
||||||
.inherent_data_providers
|
.inherent_data_providers
|
||||||
.register_provider(sp_timestamp::InherentDataProvider)
|
.register_provider(sp_timestamp::InherentDataProvider)
|
||||||
@@ -207,7 +206,6 @@ where
|
|||||||
network: network.clone(),
|
network: network.clone(),
|
||||||
network_status_sinks,
|
network_status_sinks,
|
||||||
system_rpc_tx,
|
system_rpc_tx,
|
||||||
telemetry_span,
|
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let announce_block = {
|
let announce_block = {
|
||||||
@@ -419,6 +417,7 @@ pub fn node_config(
|
|||||||
telemetry_handle: None,
|
telemetry_handle: None,
|
||||||
telemetry_endpoints: None,
|
telemetry_endpoints: None,
|
||||||
telemetry_external_transport: None,
|
telemetry_external_transport: None,
|
||||||
|
telemetry_span: None,
|
||||||
default_heap_pages: None,
|
default_heap_pages: None,
|
||||||
offchain_worker: OffchainWorkerConfig {
|
offchain_worker: OffchainWorkerConfig {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ use substrate_test_runtime_client::AccountKeyring::*;
|
|||||||
|
|
||||||
#[substrate_test_utils::test]
|
#[substrate_test_utils::test]
|
||||||
async fn test_collating_and_non_collator_mode_catching_up(task_executor: TaskExecutor) {
|
async fn test_collating_and_non_collator_mode_catching_up(task_executor: TaskExecutor) {
|
||||||
let mut builder = sc_cli::GlobalLoggerBuilder::new("");
|
let mut builder = sc_cli::LoggerBuilder::new("");
|
||||||
builder.with_colors(false);
|
builder.with_colors(false);
|
||||||
let _ = builder.init();
|
let _ = builder.init();
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# Other dependencies
|
# Other dependencies
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.0", features = [ "derive" ], default-features = false }
|
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ], default-features = false }
|
||||||
|
|
||||||
# Substrate Dependencies
|
# Substrate Dependencies
|
||||||
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||||
|
|||||||
Reference in New Issue
Block a user