mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 11:27:58 +00:00
433b7214f5
* Rough skeleton for what I think the RPC should look like * Create channel for sending justifications Sends finalized header and justification from Grandpa to the client. This lays the groundwork for hooking into the RPC module. * WIP: Add subscribers for justifications to Grandpa Adds the Sender end of a channel into Grandpa, through which notifications about block finality events can be sent. * WIP: Add a struct for managing subscriptions Slightly different approach from the last commit, but same basic idea. Still a rough sketch, very much doesn't compile yet. * Make naming more clear and lock data in Arc * Rough idea of what RPC would look like * Remove code from previous approach * Missed some things * Update client/rpc-api/src/chain/mod.rs Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com> * Update client/rpc-api/src/chain/mod.rs Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com> * Split justification subscription into sender and receiver halves * Replace RwLock with a Mutex * Add sample usage from the Service's point of view * Remove code that referred to "chain_" RPC * Use the Justification sender/receivers from Grandpa LinkHalf * Add some PubSub boilerplate * Add guiding comments * TMP: comment out to fix compilation * Return MetaIoHandler from PubSubHandler in create_full * Uncomment pubsub methods in rpc handler (fails to build) * node/rpc: make Metadata concrete in create_full to fix compilation * node: pass in SubscriptionManger to grandpa rpc handler * grandpa-rpc: use SubscriptionManger to add subscriber * grandpa-rpc: attempt at setting up the justification stream (fails to build) * grandpa-rpc: fix compilation of connecting stream to sink * grandpa-rpc: implement unsubscribe * grandpa-rpc: update older tests * grandpa-rpc: add full prefix to avoid confusing rust-analyzer * grandpa-rpc: add test for pubsub not available * grandpa-rpc: tidy up leftover code * grandpa-rpc: add test for sub and unsub of justifications * grandpa-rpc: minor stylistic changes * grandpa-rpc: split unit test * grandpa-rpc: minor stylistic changes in test * grandpa-rpc: skip returning future when cancelling * grandpa-rpc: reuse testing executor from sc-rpc * grandpa-rpc: don't need to use PubSubHandler in tests * node-rpc: use MetaIoHandler rather than PubSubHandler * grandpa: log if getting header failed * grandpa: move justification channel creation into factory function * grandpa: make the justification sender optional * grandpa: fix compilation warnings * grandpa: move justification notification types to new file * grandpa-rpc: move JustificationNotification to grandpa-rpc * grandpa-rpc: move JustificationNotification to its own file * grandpa: rename justification channel pairs * grandpa: rename notifier types * grandpa: pass justification as GrandpaJustification to the rpc module * Move Metadata to sc-rpc-api * grandpa-rpc: remove unsed error code * grandpa: fix bug for checking if channel is closed before sendind * grandpa-rpc: unit test for sending justifications * grandpa-rpc: update comments for the pubsub test * grandpa-rpc: update pubsub tests with more steps * grandpa-rpc: fix pubsub test * grandpa-rpc: minor indendation * grandpa-rpc: decode instead of encode in test * grandpa: fix review comments * grandpa: remove unused serde dependency Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com> Co-authored-by: Jon Häggblad <jon.haggblad@gmail.com> Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
53 lines
2.4 KiB
TOML
53 lines
2.4 KiB
TOML
[package]
|
|
name = "sc-rpc"
|
|
version = "2.0.0-rc5"
|
|
authors = ["Parity Technologies <admin@parity.io>"]
|
|
edition = "2018"
|
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
|
homepage = "https://substrate.dev"
|
|
repository = "https://github.com/paritytech/substrate/"
|
|
description = "Substrate Client RPC"
|
|
|
|
[package.metadata.docs.rs]
|
|
targets = ["x86_64-unknown-linux-gnu"]
|
|
|
|
[dependencies]
|
|
sc-rpc-api = { version = "0.8.0-rc5", path = "../rpc-api" }
|
|
sc-client-api = { version = "2.0.0-rc5", path = "../api" }
|
|
sp-api = { version = "2.0.0-rc5", path = "../../primitives/api" }
|
|
codec = { package = "parity-scale-codec", version = "1.3.4" }
|
|
futures = { version = "0.3.1", features = ["compat"] }
|
|
jsonrpc-pubsub = "14.2.0"
|
|
log = "0.4.8"
|
|
sp-core = { version = "2.0.0-rc5", path = "../../primitives/core" }
|
|
rpc = { package = "jsonrpc-core", version = "14.2.0" }
|
|
sp-version = { version = "2.0.0-rc5", path = "../../primitives/version" }
|
|
serde_json = "1.0.41"
|
|
sp-session = { version = "2.0.0-rc5", path = "../../primitives/session" }
|
|
sp-offchain = { version = "2.0.0-rc5", path = "../../primitives/offchain" }
|
|
sp-runtime = { version = "2.0.0-rc5", path = "../../primitives/runtime" }
|
|
sp-utils = { version = "2.0.0-rc5", path = "../../primitives/utils" }
|
|
sp-rpc = { version = "2.0.0-rc5", path = "../../primitives/rpc" }
|
|
sp-state-machine = { version = "0.8.0-rc5", path = "../../primitives/state-machine" }
|
|
sp-chain-spec = { version = "2.0.0-rc5", path = "../../primitives/chain-spec" }
|
|
sc-executor = { version = "0.8.0-rc5", path = "../executor" }
|
|
sc-block-builder = { version = "0.8.0-rc5", path = "../../client/block-builder" }
|
|
sc-keystore = { version = "2.0.0-rc5", path = "../keystore" }
|
|
sp-transaction-pool = { version = "2.0.0-rc5", path = "../../primitives/transaction-pool" }
|
|
sp-blockchain = { version = "2.0.0-rc5", path = "../../primitives/blockchain" }
|
|
hash-db = { version = "0.15.2", default-features = false }
|
|
parking_lot = "0.10.0"
|
|
lazy_static = { version = "1.4.0", optional = true }
|
|
|
|
[dev-dependencies]
|
|
assert_matches = "1.3.0"
|
|
futures01 = { package = "futures", version = "0.1.29" }
|
|
sc-network = { version = "0.8.0-rc5", path = "../network" }
|
|
sp-io = { version = "2.0.0-rc5", path = "../../primitives/io" }
|
|
substrate-test-runtime-client = { version = "2.0.0-rc5", path = "../../test-utils/runtime/client" }
|
|
tokio = "0.1.22"
|
|
sc-transaction-pool = { version = "2.0.0-rc5", path = "../transaction-pool" }
|
|
|
|
[features]
|
|
test-helpers = ["lazy_static"]
|