Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
jsonrpc http server: expose health endpoint (#11395)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasad1 authored May 11, 2022
1 parent 34737a2 commit 6c14be4
Show file tree
Hide file tree
Showing 22 changed files with 40 additions and 39 deletions.
36 changes: 18 additions & 18 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion bin/node-template/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ frame-system = { version = "4.0.0-dev", path = "../../../frame/system" }
pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, path = "../../../frame/transaction-payment" }

# These dependencies are used for the node template's RPCs
jsonrpsee = { version = "0.12.0", features = ["server"] }
jsonrpsee = { version = "0.13.0", features = ["server"] }
sc-rpc = { version = "4.0.0-dev", path = "../../../client/rpc" }
sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
sc-rpc-api = { version = "0.10.0-dev", path = "../../../client/rpc-api" }
Expand Down
2 changes: 1 addition & 1 deletion bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ crate-type = ["cdylib", "rlib"]
clap = { version = "3.1.6", features = ["derive"], optional = true }
codec = { package = "parity-scale-codec", version = "3.0.0" }
serde = { version = "1.0.136", features = ["derive"] }
jsonrpsee = { version = "0.12.0", features = ["server"] }
jsonrpsee = { version = "0.13.0", features = ["server"] }
futures = "0.3.21"
hex-literal = "0.3.4"
log = "0.4.16"
Expand Down
2 changes: 1 addition & 1 deletion bin/node/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = "https://github.com/paritytech/substrate/"
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
jsonrpsee = { version = "0.12.0", features = ["server"] }
jsonrpsee = { version = "0.13.0", features = ["server"] }
node-primitives = { version = "2.0.0", path = "../primitives" }
pallet-contracts-rpc = { version = "4.0.0-dev", path = "../../../frame/contracts/rpc/" }
pallet-mmr-rpc = { version = "3.0.0", path = "../../../frame/merkle-mountain-range/rpc/" }
Expand Down
2 changes: 1 addition & 1 deletion client/beefy/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ homepage = "https://substrate.io"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"] }
futures = "0.3.21"
jsonrpsee = { version = "0.12.0", features = ["server", "macros"] }
jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }
log = "0.4"
parking_lot = "0.12.0"
serde = { version = "1.0.136", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion client/consensus/babe/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
jsonrpsee = { version = "0.12.0", features = ["server", "macros"] }
jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }
futures = "0.3.21"
serde = { version = "1.0.136", features = ["derive"] }
thiserror = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion client/consensus/manual-seal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
jsonrpsee = { version = "0.12.0", features = ["server", "macros"] }
jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }
assert_matches = "1.3.0"
async-trait = "0.1.50"
codec = { package = "parity-scale-codec", version = "3.0.0" }
Expand Down
2 changes: 1 addition & 1 deletion client/finality-grandpa/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ homepage = "https://substrate.io"
[dependencies]
finality-grandpa = { version = "0.15.0", features = ["derive-codec"] }
futures = "0.3.16"
jsonrpsee = { version = "0.12.0", features = ["server", "macros"] }
jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }
log = "0.4.8"
parity-scale-codec = { version = "3.0.0", features = ["derive"] }
serde = { version = "1.0.105", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion client/rpc-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ sp-rpc = { version = "6.0.0", path = "../../primitives/rpc" }
sp-runtime = { version = "6.0.0", path = "../../primitives/runtime" }
sp-tracing = { version = "5.0.0", path = "../../primitives/tracing" }
sp-version = { version = "5.0.0", path = "../../primitives/version" }
jsonrpsee = { version = "0.12.0", features = ["server", "macros"] }
jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }
2 changes: 1 addition & 1 deletion client/rpc-servers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
futures = "0.3.21"
jsonrpsee = { version = "0.12.0", features = ["server"] }
jsonrpsee = { version = "0.13.0", features = ["server"] }
log = "0.4.16"
serde_json = "1.0.79"
tokio = { version = "1.17.0", features = ["parking_lot"] }
Expand Down
1 change: 1 addition & 0 deletions client/rpc-servers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ pub async fn start_http<M: Send + Sync + 'static>(
.max_request_body_size(max_payload_in as u32)
.max_response_body_size(max_payload_out as u32)
.set_access_control(acl.build())
.health_api("/health", "system_health")
.custom_tokio_runtime(rt);

let rpc_api = build_rpc_api(rpc_api);
Expand Down
2 changes: 1 addition & 1 deletion client/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
codec = { package = "parity-scale-codec", version = "3.0.0" }
futures = "0.3.21"
hash-db = { version = "0.15.2", default-features = false }
jsonrpsee = { version = "0.12.0", features = ["server"] }
jsonrpsee = { version = "0.13.0", features = ["server"] }
lazy_static = { version = "1.4.0", optional = true }
log = "0.4.16"
parking_lot = "0.12.0"
Expand Down
2 changes: 1 addition & 1 deletion client/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ wasmtime = ["sc-executor/wasmtime"]
test-helpers = []

[dependencies]
jsonrpsee = { version = "0.12.0", features = ["server"] }
jsonrpsee = { version = "0.13.0", features = ["server"] }
thiserror = "1.0.30"
futures = "0.3.21"
rand = "0.7.3"
Expand Down
2 changes: 1 addition & 1 deletion client/sync-state-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0" }
jsonrpsee = { version = "0.12.0", features = ["server", "macros"] }
jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.79"
thiserror = "1.0.30"
Expand Down
2 changes: 1 addition & 1 deletion frame/contracts/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0" }
jsonrpsee = { version = "0.12.0", features = ["server", "macros"] }
jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }
serde = { version = "1", features = ["derive"] }

# Substrate Dependencies
Expand Down
2 changes: 1 addition & 1 deletion frame/merkle-mountain-range/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0" }
jsonrpsee = { version = "0.12.0", features = ["server", "macros"] }
jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }
serde = { version = "1.0.136", features = ["derive"] }
sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
Expand Down
2 changes: 1 addition & 1 deletion frame/transaction-payment/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0" }
jsonrpsee = { version = "0.12.0", features = ["server", "macros"] }
jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }
pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", path = "./runtime-api" }
sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
Expand Down
2 changes: 1 addition & 1 deletion utils/frame/remote-externalities/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0" }
env_logger = "0.9"
jsonrpsee = { version = "0.12.0", features = ["ws-client", "macros"] }
jsonrpsee = { version = "0.13.0", features = ["ws-client", "macros"] }
log = "0.4.16"
serde = "1.0.136"
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion utils/frame/rpc/state-trie-migration-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ sp-state-machine = { path = "../../../../primitives/state-machine" }
sp-trie = { path = "../../../../primitives/trie" }
trie-db = { version = "0.23.1" }

jsonrpsee = { version = "0.12.0", features = ["server", "macros"] }
jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }

# Substrate Dependencies
sc-client-api = { version = "4.0.0-dev", path = "../../../../client/api" }
Expand Down
4 changes: 2 additions & 2 deletions utils/frame/rpc/support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0" }
futures = "0.3.21"
jsonrpsee = { version = "0.12.0", features = ["jsonrpsee-types"] }
jsonrpsee = { version = "0.13.0", features = ["jsonrpsee-types"] }
serde = "1"
frame-support = { version = "4.0.0-dev", path = "../../../../frame/support" }
sc-rpc-api = { version = "0.10.0-dev", path = "../../../../client/rpc-api" }
sp-storage = { version = "6.0.0", path = "../../../../primitives/storage" }

[dev-dependencies]
scale-info = "2.0.1"
jsonrpsee = { version = "0.12.0", features = ["ws-client", "jsonrpsee-types"] }
jsonrpsee = { version = "0.13.0", features = ["ws-client", "jsonrpsee-types"] }
tokio = "1.17.0"
frame-system = { version = "4.0.0-dev", path = "../../../../frame/system" }
2 changes: 1 addition & 1 deletion utils/frame/rpc/system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
serde_json = "1"
codec = { package = "parity-scale-codec", version = "3.0.0" }
jsonrpsee = { version = "0.12.0", features = ["server"] }
jsonrpsee = { version = "0.13.0", features = ["server"] }
futures = "0.3.21"
log = "0.4.16"
frame-system-rpc-runtime-api = { version = "4.0.0-dev", path = "../../../../frame/system/rpc/runtime-api" }
Expand Down
2 changes: 1 addition & 1 deletion utils/frame/try-runtime/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ parity-scale-codec = "3.0.0"
serde = "1.0.136"
zstd = { version = "0.10.0", default-features = false }
remote-externalities = { version = "0.10.0-dev", path = "../../remote-externalities" }
jsonrpsee = { version = "0.12.0", default-features = false, features = ["ws-client"] }
jsonrpsee = { version = "0.13.0", default-features = false, features = ["ws-client"] }
sc-chain-spec = { version = "4.0.0-dev", path = "../../../../client/chain-spec" }
sc-cli = { version = "0.10.0-dev", path = "../../../../client/cli" }
sc-executor = { version = "0.10.0-dev", path = "../../../../client/executor" }
Expand Down

0 comments on commit 6c14be4

Please sign in to comment.