Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
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
83 changes: 42 additions & 41 deletions Cargo.lock

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

9 changes: 5 additions & 4 deletions core/rpc-servers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ authors = ["Parity Technologies <[email protected]>"]
edition = "2018"

[dependencies]
jsonrpc-core = "13.1.0"
pubsub = { package = "jsonrpc-pubsub", version = "13.1.0" }
jsonrpc-core = "13.2.0"
pubsub = { package = "jsonrpc-pubsub", version = "13.2.0" }
log = "0.4"
serde = "1.0"
serde_json = "1.0"
sr-primitives = { path = "../sr-primitives" }

[target.'cfg(not(target_os = "unknown"))'.dependencies]
http = { package = "jsonrpc-http-server", version = "13.1.0" }
ws = { package = "jsonrpc-ws-server", version = "13.1.0" }
http = { package = "jsonrpc-http-server", version = "13.2.0" }
ws = { package = "jsonrpc-ws-server", version = "13.2.0" }
13 changes: 13 additions & 0 deletions core/rpc-servers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ pub fn rpc_handler<M: PubSubMetadata>(
) -> RpcHandler<M> {
let mut io = pubsub::PubSubHandler::default();
extension.augment(&mut io);

// add an endpoint to list all available methods.
let mut methods = io.iter().map(|x| x.0.clone()).collect::<Vec<String>>();
io.add_method("rpc_methods", {
methods.sort();
let methods = serde_json::to_value(&methods)
.expect("Serialization of Vec<String> is infallible; qed");

move |_| Ok(serde_json::json!({
"version": 1,
"methods": methods.clone(),
}))
});
io
}

Expand Down
8 changes: 4 additions & 4 deletions core/rpc/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ edition = "2018"
codec = { package = "parity-scale-codec", version = "1.0.0" }
derive_more = "0.14.0"
futures03 = { package = "futures-preview", version = "0.3.0-alpha.17", features = ["compat"] }
jsonrpc-core = "13.0.0"
jsonrpc-core-client = "13.0.0"
jsonrpc-derive = "13.0.0"
jsonrpc-pubsub = "13.0.0"
jsonrpc-core = "13.2.0"
jsonrpc-core-client = "13.2.0"
jsonrpc-derive = "13.2.0"
jsonrpc-pubsub = "13.2.0"
log = "0.4"
parking_lot = "0.9.0"
primitives = { package = "substrate-primitives", path = "../../primitives" }
Expand Down
30 changes: 9 additions & 21 deletions core/service/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -821,12 +821,9 @@ ServiceBuilder<
TBl
>,
>, Error> {
let mut config = self.config;
session::generate_initial_session_keys(
self.client.clone(),
config.dev_key_seed.clone().map(|s| vec![s]).unwrap_or_default()
)?;
let (
let ServiceBuilder {
marker: _,
mut config,
client,
fetcher,
backend,
Expand All @@ -840,21 +837,12 @@ ServiceBuilder<
rpc_extensions,
dht_event_tx,
rpc_builder,
) = (
self.client,
self.fetcher,
self.backend,
self.keystore,
self.select_chain,
self.import_queue,
self.finality_proof_request_builder,
self.finality_proof_provider,
self.network_protocol,
self.transaction_pool,
self.rpc_extensions,
self.dht_event_tx,
self.rpc_builder,
);
} = self;

session::generate_initial_session_keys(
client.clone(),
config.dev_key_seed.clone().map(|s| vec![s]).unwrap_or_default()
)?;

new_impl!(
TBl,
Expand Down
2 changes: 1 addition & 1 deletion node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ log = "0.4"
tokio = "0.1.7"
futures = "0.1"
exit-future = "0.1"
jsonrpc-core = "13.1.0"
jsonrpc-core = "13.2.0"
cli = { package = "substrate-cli", path = "../../core/cli" }
codec = { package = "parity-scale-codec", version = "1.0.0" }
sr-io = { path = "../../core/sr-io" }
Expand Down
8 changes: 4 additions & 4 deletions node/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ edition = "2018"

[dependencies]
client = { package = "substrate-client", path = "../../core/client" }
jsonrpc-core = "13.1.0"
jsonrpc-core-client = "13.1.0"
jsonrpc-derive = "13.1.0"
jsonrpc-pubsub = "13.1.0"
jsonrpc-core = "13.2.0"
jsonrpc-core-client = "13.2.0"
jsonrpc-derive = "13.2.0"
jsonrpc-pubsub = "13.2.0"
keyring = { package = "substrate-keyring", path = "../../core/keyring" }
log = "0.4"
node-primitives = { path = "../primitives" }
Expand Down
2 changes: 1 addition & 1 deletion node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 158,
impl_version: 158,
impl_version: 159,
apis: RUNTIME_API_VERSIONS,
};

Expand Down