Skip to content

Commit

Permalink
Added custom telemetry. Bumped substrate and core dep to polkadot-1.7… (
Browse files Browse the repository at this point in the history
#576)

* Added custom telemetry. Bumped substrate and core dep to polkadot-1.7.1-patch-3

* cargo fmt
  • Loading branch information
markopoloparadox authored May 2, 2024
1 parent 95b48a6 commit 8dd8558
Show file tree
Hide file tree
Showing 8 changed files with 467 additions and 458 deletions.
302 changes: 151 additions & 151 deletions Cargo.lock

Large diffs are not rendered by default.

236 changes: 118 additions & 118 deletions Cargo.toml

Large diffs are not rendered by default.

166 changes: 83 additions & 83 deletions avail-subxt/Cargo.lock

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions avail-subxt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ path = "src/e2e.rs"

[dependencies]
avail-base = { path = "../base" }
avail-core = { git = "https://github.com/availproject/avail-core", tag = "node-v2100-rc2", features = ["serde"] }
avail-core = { git = "https://github.com/availproject/avail-core", tag = "node-v2200-rc1", features = ["serde"] }

# Other
derive_more = "0.99.17"
Expand All @@ -40,8 +40,8 @@ serde_json = { version = "1.0", features = ["arbitrary_precision"] }

# Substrate
subxt = "0.34"
sp-core = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2", default-features = false }
sp-runtime = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2", default-features = false }
sp-core = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3", default-features = false }
sp-runtime = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3", default-features = false }
codec = { package = "parity-scale-codec", version = "3", default-features = false, features = [
"derive",
"full",
Expand All @@ -51,7 +51,7 @@ scale-info = { version = "2.5.0", features = ["bit-vec"] }
bounded-collections = { version = "0.2.0", features = ["serde"] }

[dev-dependencies]
avail-core = { git = "https://github.com/availproject/avail-core", tag = "node-v2100-rc2", features = ["serde", "runtime"] }
avail-core = { git = "https://github.com/availproject/avail-core", tag = "node-v2200-rc1", features = ["serde", "runtime"] }

async-std = { version = "1.12.0", features = ["attributes", "tokio1"] }
futures = "0.3.13"
Expand All @@ -64,17 +64,17 @@ indicatif = "0.17"
rand = "0.8.5"

# Substrate
sp-keyring = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2" }
sp-keyring = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3" }
binary-merkle-tree = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch", default-features = false }
subxt-signer = "0.34"

# Dependency `subxt` uses it's own 'version' of sp-core so we need to patch it :)
[patch.crates-io]
sp-core = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2" }
sp-io = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2" }
sp-runtime = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2" }
sp-std = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2" }
# frame-metadata = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2" }
sp-core = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3" }
sp-io = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3" }
sp-runtime = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3" }
sp-std = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3" }
# frame-metadata = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3" }


[features]
Expand Down
168 changes: 84 additions & 84 deletions e2e/Cargo.lock

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ edition = "2021"

[dependencies]
avail-subxt = { path = "../avail-subxt" }
kate-recovery = { git = "https://github.com/availproject/avail-core", tag = "node-v2100-rc2" }
kate = { git = "https://github.com/availproject/avail-core", tag = "node-v2100-rc2" }
avail-core = { git = "https://github.com/availproject/avail-core", tag = "node-v2100-rc2" }
kate-recovery = { git = "https://github.com/availproject/avail-core", tag = "node-v2200-rc1" }
kate = { git = "https://github.com/availproject/avail-core", tag = "node-v2200-rc1" }
avail-core = { git = "https://github.com/availproject/avail-core", tag = "node-v2200-rc1" }

# Parity
sp-keyring = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2" }
sp-core = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2" }
sp-keyring = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3" }
sp-core = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3" }
subxt-signer = "0.34"
codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full", "bit-vec"] }
binary-merkle-tree = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2" }
binary-merkle-tree = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3" }

# Other
async-std = { version = "1.12.0", features = ["attributes", "tokio1"] }
Expand All @@ -25,7 +25,7 @@ serde = { version = "1.0.195", default-features = false, features = ["derive", "

# Dependency `subxt` uses it's own 'version' of sp-core so we need to patch it :)
[patch.crates-io]
sp-core = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2" }
sp-io = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2" }
sp-runtime = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2" }
sp-std = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-2" }
sp-core = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3" }
sp-io = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3" }
sp-runtime = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3" }
sp-std = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch-3" }
2 changes: 1 addition & 1 deletion node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ pub mod cli;
pub mod rpc;
pub mod service;

pub const NODE_VERSION: &str = "2.1.1";
pub const NODE_VERSION: &str = "2.1.2";
11 changes: 10 additions & 1 deletion node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use sc_network_sync::SyncingService;
use sc_service::{
error::Error as ServiceError, Configuration, RpcHandlers, TaskManager, WarpSyncParams,
};
use sc_telemetry::{Telemetry, TelemetryWorker};
use sc_telemetry::{custom_telemetry::CustomTelemetryWorker, Telemetry, TelemetryWorker};
use sc_transaction_pool_api::OffchainTransactionPoolFactory;
use sp_api::ProvideRuntimeApi;
use sp_core::crypto::Pair;
Expand Down Expand Up @@ -223,6 +223,15 @@ pub fn new_partial(
telemetry
});

let telemetry_handle = telemetry.as_ref().map(|t| t.handle());
let custom_telemetry_worker = CustomTelemetryWorker {
handle: telemetry_handle,
sampling_interval_ms: 20_000u128,
};
task_manager
.spawn_handle()
.spawn("custom_telemetry", None, custom_telemetry_worker.run());

let select_chain = sc_consensus::LongestChain::new(backend.clone());

let transaction_pool = sc_transaction_pool::BasicPool::new_full(
Expand Down

0 comments on commit 8dd8558

Please sign in to comment.