substrate
substrate copied to clipboard
rpc: backpressured RPC server (bump jsonrpsee 0.20)
This is rather big change but most stuff are "chore", 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)
- Easier subscription API (spawned internally by jsonrpsee doesn't work well with rpc subscription prometheus, so these are spawned with oneshot to keep it alive)
- 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 - tokio channels are now used and tests must run on the tokio runtime to not panic
Hopefully the last release prior to 1.0, sorry in advance for a big PR
polkadot companion: https://github.com/paritytech/polkadot/pull/7211
cumulus companion: https://github.com/paritytech/cumulus/pull/2560