Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ system_rpc_runtime_api = { package = "frame-system-rpc-runtime-api", git = "http
codec = { package = "parity-scale-codec", version = "1.1.0" }
sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-offchain = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
prometheus-exporter = { package = "prometheus-exporter", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }

[features]
default = ["rocksdb"]
Expand Down
10 changes: 9 additions & 1 deletion service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ pub use consensus::run_validation_worker;
pub use codec::Codec;
pub use polkadot_runtime;
pub use kusama_runtime;
use prometheus_exporter::Registry;

/// Configuration type that is being used.
///
Expand Down Expand Up @@ -177,7 +178,10 @@ macro_rules! new_full_start {
})?
.with_rpc_extensions(|builder| -> Result<polkadot_rpc::RpcExtension, _> {
Ok(polkadot_rpc::create_full(builder.client().clone(), builder.pool()))
})?;
})?
.with_prometheus_registry(
Registry::new_custom(Some("polkadot".into()), None)?
);

(builder, import_setup, inherent_data_providers)
}}
Expand Down Expand Up @@ -475,6 +479,7 @@ pub fn new_full<Runtime, Dispatch, Extrinsic>(
on_exit: service.on_exit(),
telemetry_on_connect: Some(service.telemetry_on_connect_stream()),
voting_rule: grandpa::VotingRulesBuilder::default().build(),
prometheus_registry: service.prometheus_registry(),
};

service.spawn_essential_task(
Expand Down Expand Up @@ -628,5 +633,8 @@ where

Ok(polkadot_rpc::create_light(builder.client().clone(), remote_blockchain, fetcher, builder.pool()))
})?
.with_prometheus_registry(
Registry::new_custom(Some("polkadot".into()), None)?
)
.build()
}