mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 12:51:05 +00:00
e16ef0861f
This is a rather big change in jsonrpsee, the major things in this bump are: - Server backpressure (the subscription impls are modified to deal with that) - Allow custom error types / return types (remove jsonrpsee::core::Error and jsonrpee::core::CallError) - Bug fixes (graceful shutdown in particular not used by substrate anyway) - Less dependencies for the clients in particular - Return type requires Clone in method call responses - Moved to tokio channels - Async subscription API (not used in this PR) Major changes in this PR: - The subscriptions are now bounded and if subscription can't keep up with the server it is dropped - CLI: add parameter to configure the jsonrpc server bounded message buffer (default is 64) - Add our own subscription helper to deal with the unbounded streams in substrate The most important things in this PR to review is the added helpers functions in `substrate/client/rpc/src/utils.rs` and the rest is pretty much chore. Regarding the "bounded buffer limit" it may cause the server to handle the JSON-RPC calls slower than before. The message size limit is bounded by "--rpc-response-size" thus "by default 10MB * 64 = 640MB" but the subscription message size is not covered by this limit and could be capped as well. Hopefully the last release prior to 1.0, sorry in advance for a big PR Previous attempt: https://github.com/paritytech/substrate/pull/13992 Resolves https://github.com/paritytech/polkadot-sdk/issues/748, resolves https://github.com/paritytech/polkadot-sdk/issues/627
97 lines
4.2 KiB
TOML
97 lines
4.2 KiB
TOML
[package]
|
|
name = "parachain-template-node"
|
|
version = "0.1.0"
|
|
authors = ["Anonymous"]
|
|
description = "A new Cumulus FRAME-based Substrate Node, ready for hacking together a parachain."
|
|
license = "Unlicense"
|
|
homepage = "https://substrate.io"
|
|
repository.workspace = true
|
|
edition.workspace = true
|
|
build = "build.rs"
|
|
publish = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
clap = { version = "4.4.18", features = ["derive"] }
|
|
log = "0.4.20"
|
|
codec = { package = "parity-scale-codec", version = "3.0.0" }
|
|
serde = { version = "1.0.195", features = ["derive"] }
|
|
jsonrpsee = { version = "0.20.3", features = ["server"] }
|
|
futures = "0.3.28"
|
|
serde_json = "1.0.111"
|
|
|
|
# Local
|
|
parachain-template-runtime = { path = "../runtime" }
|
|
|
|
# Substrate
|
|
frame-benchmarking = { path = "../../../substrate/frame/benchmarking" }
|
|
frame-benchmarking-cli = { path = "../../../substrate/utils/frame/benchmarking-cli" }
|
|
pallet-transaction-payment-rpc = { path = "../../../substrate/frame/transaction-payment/rpc" }
|
|
sc-basic-authorship = { path = "../../../substrate/client/basic-authorship" }
|
|
sc-chain-spec = { path = "../../../substrate/client/chain-spec" }
|
|
sc-cli = { path = "../../../substrate/client/cli" }
|
|
sc-client-api = { path = "../../../substrate/client/api" }
|
|
sc-offchain = { path = "../../../substrate/client/offchain" }
|
|
sc-consensus = { path = "../../../substrate/client/consensus/common" }
|
|
sc-executor = { path = "../../../substrate/client/executor" }
|
|
sc-network = { path = "../../../substrate/client/network" }
|
|
sc-network-sync = { path = "../../../substrate/client/network/sync" }
|
|
sc-rpc = { path = "../../../substrate/client/rpc" }
|
|
sc-service = { path = "../../../substrate/client/service" }
|
|
sc-sysinfo = { path = "../../../substrate/client/sysinfo" }
|
|
sc-telemetry = { path = "../../../substrate/client/telemetry" }
|
|
sc-tracing = { path = "../../../substrate/client/tracing" }
|
|
sc-transaction-pool = { path = "../../../substrate/client/transaction-pool" }
|
|
sc-transaction-pool-api = { path = "../../../substrate/client/transaction-pool/api" }
|
|
sp-api = { path = "../../../substrate/primitives/api" }
|
|
sp-block-builder = { path = "../../../substrate/primitives/block-builder" }
|
|
sp-blockchain = { path = "../../../substrate/primitives/blockchain" }
|
|
sp-consensus-aura = { path = "../../../substrate/primitives/consensus/aura" }
|
|
sp-core = { path = "../../../substrate/primitives/core" }
|
|
sp-keystore = { path = "../../../substrate/primitives/keystore" }
|
|
sp-io = { path = "../../../substrate/primitives/io" }
|
|
sp-runtime = { path = "../../../substrate/primitives/runtime" }
|
|
sp-timestamp = { path = "../../../substrate/primitives/timestamp" }
|
|
substrate-frame-rpc-system = { path = "../../../substrate/utils/frame/rpc/system" }
|
|
substrate-prometheus-endpoint = { path = "../../../substrate/utils/prometheus" }
|
|
|
|
# Polkadot
|
|
polkadot-cli = { path = "../../../polkadot/cli", features = ["rococo-native"] }
|
|
polkadot-primitives = { path = "../../../polkadot/primitives" }
|
|
xcm = { package = "staging-xcm", path = "../../../polkadot/xcm", default-features = false }
|
|
|
|
# Cumulus
|
|
cumulus-client-cli = { path = "../../client/cli" }
|
|
cumulus-client-collator = { path = "../../client/collator" }
|
|
cumulus-client-consensus-aura = { path = "../../client/consensus/aura" }
|
|
cumulus-client-consensus-common = { path = "../../client/consensus/common" }
|
|
cumulus-client-consensus-proposer = { path = "../../client/consensus/proposer" }
|
|
cumulus-client-service = { path = "../../client/service" }
|
|
cumulus-primitives-core = { path = "../../primitives/core" }
|
|
cumulus-primitives-parachain-inherent = { path = "../../primitives/parachain-inherent" }
|
|
cumulus-relay-chain-interface = { path = "../../client/relay-chain-interface" }
|
|
color-print = "0.3.4"
|
|
|
|
[build-dependencies]
|
|
substrate-build-script-utils = { path = "../../../substrate/utils/build-script-utils" }
|
|
|
|
[features]
|
|
default = []
|
|
runtime-benchmarks = [
|
|
"cumulus-primitives-core/runtime-benchmarks",
|
|
"frame-benchmarking-cli/runtime-benchmarks",
|
|
"frame-benchmarking/runtime-benchmarks",
|
|
"parachain-template-runtime/runtime-benchmarks",
|
|
"polkadot-cli/runtime-benchmarks",
|
|
"polkadot-primitives/runtime-benchmarks",
|
|
"sc-service/runtime-benchmarks",
|
|
"sp-runtime/runtime-benchmarks",
|
|
]
|
|
try-runtime = [
|
|
"parachain-template-runtime/try-runtime",
|
|
"polkadot-cli/try-runtime",
|
|
"sp-runtime/try-runtime",
|
|
]
|