- 24 Aug, 2022 1 commit
-
-
Alexandru Vasile authored
Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io>
-
- 17 Aug, 2022 1 commit
-
-
Alexandru Vasile authored
* client: Log when frontend is dropped Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Never fail to handle frontend messages Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Format frontend warnings Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Format backend messages Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Uniform log messages Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * server: Uniform logs Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * server: Adjust logs Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * test: Fix cargo clippy Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * server: Log error as unrecoverable Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Update core/src/client/async_client/mod.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * Update core/src/client/async_client/mod.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 13 Jul, 2022 1 commit
-
-
Alexandru Vasile authored
* ws-client: Replace `httparse::Header` with `http::HeaderMap` Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * ws-client: Make headers optional Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * http-client: Expose custom header injection Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * http-client: Adjust testing for custom headers Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Make `http::HeaderMap` non-optional Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * http-client: Cache request headers Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Fix doc tests Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * http-client: Use `into_iter` for headers Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * docs: Improve custom headers documentation Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * http: Use `hyper::http` instead of `http` directly Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * http-client: Adjust testing Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Fix doc tests Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Expose `http::HeaderMap` and `http::HeaderValue` Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io>
-
- 21 Jun, 2022 1 commit
-
-
Niklas Adolfsson authored
* less verbose logging + tracing based on method name * add tracing per rpc call * fix nits * remove unsed feature * fix build * http make logging more human friendly * unify logging format * deps: make tracing hard dependency * fix tests * fix nit * fix build * fix nits * Update core/src/client/async_client/mod.rs * Update core/Cargo.toml * Update core/src/lib.rs
-
- 01 Jun, 2022 1 commit
-
-
Alexandru Vasile authored
* ws: Implement ping for `TransportSenderT` trait Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * ws/client: Receive pong frames Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * core/client: Use `select!` macro for the background task Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Propagate ping interval to background task Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * async_client: Submit ping requests Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * async_client: Handle pong replies Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Handle frontend messages to dedicated fn Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Handle backend messages in dedicated fn Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Add terminated fuse for opt-out pings Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Set opt-out behavior for client pings Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Move imports Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Handle handle_frontend_messages errors Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Add custom error related to byteslice conversions Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Modify `send_ping` to send empty slices Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Fix `cargo hack check` and use `select_biased` Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Handle sending pings with lowest priority Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * core: Add proper number of params to `background_task` Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Fix wasm client Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Handle raw bytes and string received messages Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Fix Cargo.toml feature Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Panic when empty slice does not fit into `ByteSlice125` Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * wasm: Add operation not supported for pings Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Rename `ReceivedMessage` from Data to Text Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Rename test variable Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Add documentation Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Use `future::select` for cancel safety Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Remove `pong` handling logic Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * client: Update ping documentation Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Update core/src/client/async_client/mod.rs Co-authored-by:
Tarik Gul <47201679+TarikGul@users.noreply.github.com> * Update core/src/client/async_client/mod.rs Co-authored-by:
Tarik Gul <47201679+TarikGul@users.noreply.github.com> * Update core/src/client/async_client/mod.rs Co-authored-by:
Tarik Gul <47201679+TarikGul@users.noreply.github.com> * Update core/src/client/async_client/mod.rs Co-authored-by:
Tarik Gul <47201679+TarikGul@users.noreply.github.com> * Update core/src/client/async_client/mod.rs Co-authored-by:
Tarik Gul <47201679+TarikGul@users.noreply.github.com> * Update core/Cargo.toml Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * Update core/Cargo.toml Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * logs: Keep debug log for submitting `Ping` frames Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Print debug logs when receiving `Pong` frames Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Update core/src/client/async_client/mod.rs Co-authored-by:
Tarik Gul <47201679+TarikGul@users.noreply.github.com> Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 20 Apr, 2022 1 commit
-
-
Niklas Adolfsson authored
* feat: untested web-sys transport * rewrite me * make it work * add hacks and works :) * add subscription test too * revert StdError change; still works * cleanup * remove hacks * more wasm tests outside workspace * kill mutually exclusive features * merge nits * remove unsafe hack * fix nit * core: fix features and deps * ci: add WASM test * test again * work work * comeon * work work * revert unintentional change * Update core/Cargo.toml Co-authored-by:
David <dvdplm@gmail.com> * Update core/src/client/async_client/mod.rs Co-authored-by:
David <dvdplm@gmail.com> * revert needless change: std hashmap + fxhashmap works * cleanup * extract try_connect_until fn * remove todo * fix bad merge * add wasm client wrapper crate * fix nits * use gloo-net dependency * fix build * grumbles CI: rename to `wasm_tests` * fix bad merge * fix grumbles * fix nit * comeon CI Co-authored-by:
David <dvdplm@gmail.com>
-
- 21 Jan, 2022 1 commit
-
-
Niklas Adolfsson authored
-
- 06 Jan, 2022 1 commit
-
-
Niklas Adolfsson authored
* fix(ws client): improve error message bad URL * fix nit: uri -> target * fix nit * fix grumbles
-
- 22 Dec, 2021 1 commit
-
-
Niklas Adolfsson authored
Implies MSRV 1.56.x
-
- 20 Dec, 2021 1 commit
-
-
Niklas Adolfsson authored
* extract ws client to async client * bring back jsonrpsee-ws-client crate * new crate core client * add missing file * jsonrpsee crate: add core client * rexport core client * more re-exports * downgrade trait bounds * update version * fix nits * send close reason * Update types/src/traits.rs * move 'TEN_MB_CONST' to core * Update client/core-client/Cargo.toml Co-authored-by:
David <dvdplm@gmail.com> * Update client/core-client/src/lib.rs Co-authored-by:
David <dvdplm@gmail.com> * cargo fmt * Update client/ws-client/src/lib.rs Co-authored-by:
David <dvdplm@gmail.com> * Update client/ws-client/src/lib.rs Co-authored-by:
David <dvdplm@gmail.com> * move `async-client` core The `async-client` is hidden behind a new feature flag `async-client` because it brings in additional dependecies such as tokio rt. * fix docs * add example how to use "core client" * fix build * Update http-server/Cargo.toml * Update client/transport/Cargo.toml Co-authored-by:
David <dvdplm@gmail.com>
-
- 17 Dec, 2021 1 commit
-
-
Maciej Hirsz authored
* Nuke V2 * fmt * Formatting and imports * Updated benches * Fix doc comment link * Brace imports in ws-server * Reworking imports * std first * fmt * std on top * Update to match changed line numbers * Rename jsonrpsee_utils -> jsonrpsee_core * Migrating things types -> core * RpcError -> ErrorResponse * Merge types::client into core::client * Continued move types -> core * Removing features to make checks pass * Move rpc_module tests to tests crate * Fixed doc comment links * Add futures-util dependency for client * Remove dead code Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * fmt * Feature gate the Client trait * Move `Client` traits to `client` module Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 10 Dec, 2021 1 commit
-
-
Niklas Adolfsson authored
-
- 06 Dec, 2021 1 commit
-
-
Niklas Adolfsson authored
* clients: introduce tls feature flag * Update tests/tests/integration_tests.rs * fix: don't rebuild tls connector of every connect * fix tests + remove url dep * fix tests again
-
- 29 Oct, 2021 1 commit
-
-
dependabot[bot] authored
* Update tokio-rustls requirement from 0.22 to 0.23 Updates the requirements on [tokio-rustls](https://github.com/tokio-rs/tls) to permit the latest version. - [Release notes](https://github.com/tokio-rs/tls/releases) - [Commits](https://github.com/tokio-rs/tls/commits ) --- updated-dependencies: - dependency-name: tokio-rustls dependency-type: direct:production ... Signed-off-by:
dependabot[bot] <support@github.com> * push fixes but requires rustls-native-certs v0.6 * update native certs to 0.6.0 * fix clippy warnings * remove webpki roots support * Revert "remove webpki roots support" This reverts commit 1144d567b343049ab7c967d320fc2fe162ba0f7c. * support both native cert store and webpki * sort deps in Cargo.toml * Update ws-client/src/transport.rs Co-authored-by:
David <dvdplm@gmail.com> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> Co-authored-by:
David <dvdplm@gmail.com>
-
- 21 Oct, 2021 1 commit
-
-
Niklas Adolfsson authored
* feat(ws client): support custom headers. Closing #531 * remove empty line * address grumbles: more user-friendly API * Update ws-client/src/client.rs Co-authored-by:
David <dvdplm@gmail.com> * Update ws-client/src/client.rs Co-authored-by:
David <dvdplm@gmail.com> * Update ws-client/src/client.rs Co-authored-by:
David <dvdplm@gmail.com> * address grumbles Co-authored-by:
David <dvdplm@gmail.com>
-
- 15 Oct, 2021 1 commit
-
-
Niklas Adolfsson authored
-
- 13 Oct, 2021 1 commit
-
-
Maciej Hirsz authored
* DRY error handling for methods * Fix clippy issues + unnecessary borrow
-
- 05 Oct, 2021 3 commits
-
-
Niklas Adolfsson authored
* feat(ws client): support redirections * reuse socket * reuse socket * add hacks * fix build * remove hacks * fix bad merge * address grumbles * fix grumbles * fix grumbles * fix nit * add redirection test * Update test-utils/src/types.rs * Resolved todo * Check that redirected client actually works * Rename test-utils "types" to "mocks" * Fix windows test (?) * fmt * What is wrong with you windows? * Ignore redirect test on windows * fix bad transport errors * debug windows tests * update soketto * maybe fix windows test * add config flag for max redirections * revert faulty change. Relative reference must start with either `/` or `//` * revert windows path * use manual join paths * remove url dep * Update ws-client/src/tests.rs * default max redirects 5 * remove needless clone vec * fix bad merge * cmon CI run Co-authored-by:
David Palm <dvdplm@gmail.com>
-
Niklas Adolfsson authored
It turns out that `hyper-rustls` already re-export ClientConfig so no need to use rustls for that purpose then.
-
dependabot[bot] authored
* Update soketto requirement from 0.6 to 0.7 Updates the requirements on [soketto](https://github.com/paritytech/soketto) to permit the latest version. - [Release notes](https://github.com/paritytech/soketto/releases) - [Changelog](https://github.com/paritytech/soketto/blob/develop/CHANGELOG.md) - [Commits](https://github.com/paritytech/soketto/compare/v0.6.0...v0.7.0 ) --- updated-dependencies: - dependency-name: soketto dependency-type: direct:production ... Signed-off-by:
dependabot[bot] <support@github.com> * set_origin -> set_headers * fmg Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by:
Maciej Hirsz <hello@maciej.codes>
-
- 24 Sep, 2021 1 commit
-
-
Niklas Adolfsson authored
* fix: server should not send to closed subscription Closing #481 * add a test * rewrite me * remove faulty server close * fix tests * fix tests * remove needless code * Update ws-client/src/client.rs * fix: remove atomic flag; use `close_sender` * remove terminate message; use close channel * remove faulty subscription closed error msg * fix tests * fix grumbles * fix build
-
- 25 Aug, 2021 1 commit
-
-
David authored
* Add license headers where missing and update year * Update examples/http.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 13 Aug, 2021 1 commit
-
-
Niklas Adolfsson authored
Co-authored-by:
David Palm <dvdplm@gmail.com>
-
- 05 Aug, 2021 1 commit
-
-
Niklas Adolfsson authored
* fix(ws client): use query part of URL. Fixes #428, we didn't take that query part of the URL into account and it wasn't sent in GET request. * add log when connecting to a target * fix(grumbles): path -> path_and_query
-
- 03 Jun, 2021 1 commit
-
-
Igor Aleksanov authored
* Stick test code to a single runtime * Replace async-std in ws-client with tokio * Replace std::thread::sleep with tokio::time::sleep in test * Add compatibility layer for tokio v0.2 * Add check for both features being enabled + some improvements * Update ws-client/src/tokio.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 28 May, 2021 1 commit
-
-
- 27 May, 2021 1 commit
-
-
Niklas Adolfsson authored
* [ws client]: return last seen error in connect * address grumbles * Update ws-client/src/transport.rs * clippy
-
- 25 May, 2021 1 commit
-
-
Niklas Adolfsson authored
* [ws client]: parse `path` from the URL This commit changes that the path/HTTP resource path is parsed from the URL and removes that option from WsClientBuilder. * address grumbles: introduce `RemoteWsTarget` type. * grumbles: RemoteWsTarget -> Target * cargo fmt
-
- 17 May, 2021 1 commit
-
-
Albin Hedman authored
* Add custom_certificate to WsClientBuilder * Use system certs instead of specified file * Cache client_config * Move client_config logic to fn build * Default use_system_certificates to true * Move out connector * Add CertificateStore type * cargo fmt * cargo clippy * Resolve comment: Rename variable * Resolved comments
-
- 21 Apr, 2021 1 commit
-
-
David authored
* Use a constant to express max request body size Consistently use u32 in all crates * Review grumbles
-
- 20 Apr, 2021 1 commit
-
-
Niklas Adolfsson authored
* rewrite me * v2 * PoC works without batch request * remove `PartialEq` bounds * add naive benches types * misc * remove useless lifetime * [ws client]: move request ID generation to client * make tests compile again * [client transport]: kill leaky abstractions. * [http client transport]: minor changes in the API. * [ws client]: fix batch requests. * fix nits * [ws client]: generate two request IDs for subscrib * fix tests * remove unused types + less alloc for params. * fix nits * more tweaks. * remove unused code * fix more nits * remove unused legacy types * reorg types_v2 mod * port macros to new types * fix tests again; more jsonvalue * [proc macros]: bring back impl Into for params. * fix build * [proc macros]: make it work for external crates. * [types]: remove weird From<Option<T>> to impl. * cleanup again * [examples]: remove unused async-std dep * Update types/src/v2/mod.rs * [types]: remove unsed dep smallvec * rewrite me * [types]: error code impl ser/deser Manual implementation of serialize/deserialize to get rid of duplicated message string * [types v2]: re-org with explicit mods * fix faulty test * add missed files * [ws client]: req_manager reserve unsubscribe slot. * simplify test code * add tracking issue for TODO * remove unused deps
-
- 12 Apr, 2021 1 commit
-
-
dependabot[bot] authored
* Update webpki requirement from 0.21 to 0.22 Updates the requirements on [webpki](https://github.com/briansmith/webpki) to permit the latest version. - [Release notes](https://github.com/briansmith/webpki/releases) - [Commits](https://github.com/briansmith/webpki/commits ) Signed-off-by:
dependabot[bot] <support@github.com> * update webpki Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 01 Apr, 2021 1 commit
-
-
Niklas Adolfsson authored
* [ws client]: client builder for uniform API * Update ws-client/src/transport.rs * Update ws-client/src/client.rs * Update ws-client/src/client.rs * Update ws-client/src/client.rs
-
- 31 Mar, 2021 1 commit
-
-
Niklas Adolfsson authored
-
- 04 Mar, 2021 1 commit
-
-
Niklas Adolfsson authored
* prep for client release. * fix nits * add changelogs * Update http-client/src/lib.rs Co-authored-by:
David <dvdplm@gmail.com> * address grumbles: one changelog * 0.2.0-alpha * revert rust2018 lint Co-authored-by:
David <dvdplm@gmail.com>
-
- 23 Feb, 2021 1 commit
-
-
Maciej Hirsz authored
* Re-apply changes * Fixed tests * 3 to go * Passing tests! * Fix formatting * Fix formatting in tests * Fixed examples * Bind listener when server starts * Formatting, disable deadlock test to check CI * Fixed deadlock test * Fix benches * Remove dead code * Restoring unit tests * Restored all unit tests * Missing unwraps Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * Missing unwraps Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * Typo :) Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * Remove broken connections from subscriptions * Tweak tests * Add some doc comments Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 18 Feb, 2021 1 commit
-
-
Niklas Adolfsson authored
* test(ws client): wss (TLS) * fix(ws client): bug replace target with host. * address review suggestions * tests: add tests for non-ascii URLs * refactor: impl TryFrom for WebSocketTransportBuild * fix nit: try to connect to all sockaddrs * document `Host type` * doc(ws client): default port. * remove helper function
-
- 02 Feb, 2021 1 commit
-
-
Niklas Adolfsson authored
* fix examples * [ws client]: transport use `max_payload_size` * fix nits * fix more nits * Update ws-client/src/client.rs * fix doc tests * [ws client]: all transport config configurable * Update ws-client/src/client.rs Co-authored-by:
David <dvdplm@gmail.com> * Update ws-client/src/manager.rs Co-authored-by:
David <dvdplm@gmail.com> * address grumbles * grumbles: WsDnsError -> WsHandshakeError * grumbles: remove needless clone * fix lint: remove explicit lifetime * fix nits: channel capacity + docs * clippy nits * clippy nits * fix grumbles: channel capacity 256 As Maciej pointed out the capacity is the number of messages (not bytes) and each message is 96 bytes. Thus, 256 * 96 = ~24kB which is reasonable default value. * Update ws-client/src/client.rs Co-authored-by:
David <dvdplm@gmail.com> * grumbles: docs Co-authored-by:
David <dvdplm@gmail.com>
-
- 18 Jan, 2021 1 commit
-
-
Niklas Adolfsson authored
* update http example * ungeneric crate * update dependencies * [client]: add WebSocket client again. * [deps]: remove needless dev dependencies * nits: forgot to commit new files * [ws client]: `send_text` instead of `send_binary` This is temporary fix to work with the `server` which assumes that `WebSocket` resonses are `text` * chore: add a bunch of more logging * [ws]: port tests but some are failing. * chore: fmt * [server API]: expose `fn local_addr` as public API. * [tests]: make them less ugly by using `127.0.0.1:0` * fix: a bunch of compiler warnings. * [api]: uniform naming, `bind -> new` in transport. * [websocket server]: reply when deserial fails When the server receives an request with invalid JSON `-32700, Parse error shall be returned` * chore: fmt * [tests]: fix remaining tests * [websocket server]: support `binary` and `text` * [ws server]: fix bug in subscription response. `.await` was missing in RegisteredSubscription::send() and no responses were actually sent which this commit fixes. * [client API]: export `WsSubscription` * [examples]: use `localhost` instead of `127.0.0.1` Hostname is required when using `wss` and `127.0.0.1` is not valid hostname. * [examples]: add subscription example. * chore: fmt * [ws server]: fix bug register new subscription. Fixes newly introduced bug that causes `register_subscription` to have side-effects even if the subscription fails. * fmt * more uniform logs * [ws server]: simple subscription test. * [ws server]: subscription tests improved. * [tests]: extract test helpers to a separate crate (#125) * [ws server]: don't close connection when `deserialization` fails (#131) * [ws server]: don't close conn. when `deser` fails * Update src/ws/transport.rs * grumbles: prefer matching of if else. * chore: CI warn `intra_doc_link_resolution_failure` (#139) Since we have not updated the documentation properly it's annoying that the entire job fails. * chore: rustfmt.toml (#138) * chore: add `rustfmt.toml` for formatting * style: `cargo fmt --all` with new config * [server raw params]: fix debug implementation (#137) * [server]: simply raw params impl Use debug implementation of `common::Params` instead of doing something similar that doesn't work properly. * [raw params]: derive `Debug` impl. * [ws server]: parse subscription ID for unsubscription instead of hardcoding `JsonValue::Null` (#136) * [ws server]: fix broken unsubscribe. Try to parse the subscription ID as the first element of an Array or the `subscription` field of an Object/Map. If both of those fails then regard it as a error. * fmt * fix grumbles: remove space indentation * fix(ws server): sub/unsubscribe to same method should generate an error (#140) * fix(ws server): sub/unsubscribe to same method err Subscribe and unsubscribe to the same method should generate an error, which this commit fixed. This bug was introduced by myself in https://github.com/paritytech/jsonrpsee/commit/fc87889de2615dbb3d0cf2d91a306f016d48df2d * Update src/ws/server.rs Co-authored-by:
David <dvdplm@gmail.com> Co-authored-by:
David <dvdplm@gmail.com> * chore: add naive benches for request/response (#142) Co-authored-by:
Niklas <niklasadolfsson1@gmail.com> * fix(ws server): remove faulty debug_assert (#145) The code assumed that `subscription id` is still in `active_subscriptions` when the connection was dropped. The list of subscriptions (kept in raw server) are not notified when a client dropped its subscription/unsubscribed thus it's possible that the actual subscriptions are closed before the entire client was dropped. * ci(benches): cargo check on benches. (#146) * fix(http client): implement `clone` uniform API. (#147) * chore(deps): update `futures v0.3.7` (#148) * chore(deps): update remaining crates (#149) * chore(deps): update `futures v0.3.7` * chore(deps): bump the rest of deps * Improve HTTP client background thread (#150) * refactor: resultify API + some crate reorg (#144) * [ws client]: resultify API and fix subscribe. * The commit changes the API to return `Err` when it's possible and to not ignore underlying errors. * Fix that `fn subscribe` doesn't accept the subscription and unsubscription to be same which causes errors in the server. * nits: Err::SubscriptionMetod -> Err::Subscription * refactor(client): common error type * refactor(http client): resultify * refactor(common): rename common -> types.. This commit renames the `common module` to `types` and tries to distinguish the types that is directly related to the `JSON-RPC v2 specification` from others. Somethings are a little big sloppy named as naming is hard. Also, as bonus a removed a bunch of needless stuff in http server related to subscription. * Update src/ws/tests.rs * style: cargo fmt * fix(grumble): matches -> assert(matches) * fix(grumbles): `jsonrpc_v2` -> `jsonrpc` * fix(nit): remove unused code. * fix(benches): make it compile again. * style: cargo fmt * fix nits (#151) * fix(ws client): send binary (1 byte less payload) * docs(ws server): fix bad comment. * chore: add `editorconfig` (#152) * chore: make `debug log` less verbose. (#153) * chore: make `debug log` less verbose. The debug logging was just too verbose and this commit simplies it as follows: ``` DEBUG recv: {"jsonrpc":"2.0","method":"<METHOD>","params":<PARAMS>,"id":<ID>} DEBUG send: {"jsonrpc":"2.0","result":"<RESULT>","id":<ID>} ``` * style: cargo fmt * fix: missed logs * [jsonrpc types]: implement Display for Request/Response (#160) * feat(jsonrpc response/request): impl `Display` * refactor(logging): use display impl * use serde_json for verbosity * [http client]: refactor with "syncronous-like" design (#156) * experimental * ci(benches): sync and concurrent roundtrips Improve benchmarks to take concurrent requests into account. * ci(benches): sync and concurrent roundtrips Improve benchmarks to take concurrent requests into account. * fix(nits) * feat(http client): limit max request body size * test(http transport): request limit test * test(http client): add tests. * fix typo * fix(benches): make it compile again. * fix(ws example): revert unintentional change. * test(http client): subscription response on call. * fix(cleanup) * fix(benches): make it compile again. * Update src/client/http/transport.rs * fix(http client): `&str` -> `AsRef<str>` * docs(client types): better docs for Mismatch type. * style: `Default::default` -> `HttpConfig::default` * fix(http client): read body size from header. Expermential to read number of bytes from `HTTP Content Length` to pre-allocate the number of bytes and bail early if the length is bigger than the `max_request_body size` Need to be benched with bigger requests. * test(raw http): enable tests to works again. * style: cargo fmt * benches: address grumbles * feat(jsonrpc response/request): impl `Display` * refactor(logging): use display impl * fix(http client): nits. * Update benches/benches.rs * fix bad merge. * chore(deps): update dependencies. (#164) * feat(http server): configurable request body limit (#162) * feat(http server): configurable request body limit * refactor(crate reorg): to have shared http helpers. * Merge client and server errors. * Move `http_server_utils` to `utils/http` * Minor cleanup * fix nits * fix(hyper helper): u64 -> u32 * Update src/utils/http/hyper_helpers.rs Co-authored-by:
David <dvdplm@gmail.com> * Update src/utils/http/hyper_helpers.rs Co-authored-by:
David <dvdplm@gmail.com> * fix: grumbles * Update src/utils/http/hyper_helpers.rs Co-authored-by:
David <dvdplm@gmail.com> * Update src/http/server.rs Co-authored-by:
David <dvdplm@gmail.com> Co-authored-by:
David <dvdplm@gmail.com> * ci: remove nightly (#167) Use stabilized `broken_intra_doc_links` instead of `intra_doc_link_resolution_failure` * fix(websocket client): drop subscriptions that can't keep up with the internal buffer size (#166) * fix(ws client): drop subscriptions when full. This commit changes the behavior in the `WebSocket Client` where each subscription channel is used in a non-blocking matter until it is determined as full or disconnected. When that occurs the channel is simply dropped and when the user `poll` the subscription it will return all sent subscriptions before it was and terminate (return None) once it's polled one last time. Similarly as `Streams` works in Rust. It also adds configuration for the `WebSocket Client` to configure capacity for the different internal channels to avoid filling the buffers when it's not expected. * tests(ws client): simple subscription test. * fix: nits * Update src/client/ws/client.rs * refactor(tests): introduce integration_tests Make the repo structure more understable w.r.t testing. * chore(license): add missing license headers * Update src/client/ws/client.rs * Update src/client/ws/client.rs * style: remove unintended spaces. * tests: add concurrent deadlock test Ensure that if more than the requested channel buffer capacity is exceeded it should not deadlock. Such as spawning alot of concurrent requests, notifications or new subscriptions. * Update src/client/ws/client.rs * fix: review grumbles * fix nits: `remove needless closure` * fix: cargo fmt * Update src/client/ws/client.rs Co-authored-by:
David <dvdplm@gmail.com> * fix more nits Co-authored-by:
David <dvdplm@gmail.com> * fix(ws client): embed request id in `SubscriptionClosed` (#170) * fix(ws client): embed request id SubscriptClosed Fixes https://github.com/paritytech/jsonrpsee/issues/169 * Update src/client/ws/client.rs * Update src/client/ws/client.rs Co-authored-by:
David <dvdplm@gmail.com> * Update src/client/ws/client.rs Co-authored-by:
David <dvdplm@gmail.com> Co-authored-by:
David <dvdplm@gmail.com> * chore(deps): bump dependencies (#172) * [ws client]: add tests (#134) * [test utils]: add `internal_err` and consts [errors]: unify client/server errors [test utils]: fake WebSocket jsonrpc server [ws client]: export errors [ws client]: add some basic tests * fmt * remove log target * fix nits * [ws client]: add subscription test * revert unintendend changes. * fmt * [ws client]: fix panic in tests * cleanup * tests(ws client): test for invalid request ID. * fix nits * [ws client]: kill raw client (#171) * getting started * WIP WIP * cleanup * cleanup v2 * cleanup v3 * perf: use BufReader BufWriter * fix(request manager): resultify insert API The rationale behind this change is that the `insert_methods` takes ownership of the `send_back_oneshot` and if the operation fails it should be propagated the frontend. So returning the `Err(send_back_oneshot)` if it fails makes it possible. * fix nits * examples(ws): revert changes * Update tests/integration_tests.rs * nits: fix unwraps * Update src/client/ws/manager.rs Co-authored-by:
David <dvdplm@gmail.com> * Update src/client/ws/transport.rs Co-authored-by:
David <dvdplm@gmail.com> * Update src/client/ws/client.rs Co-authored-by:
David <dvdplm@gmail.com> * fix build * refactor: simplify `Error::InvalidRequestId` It was hard to use when the expected id is not known. * fix(ws client): error handling. * fix(grumble error type): better error message. * fix(grumble): docs `JSONRPC WebSocket transport` * fix(ws manager): fix grumbles. * Add better documentation * Rename methods. * Add `proof` to unreachable! * fix(ws manager): fix nit in docs. * fix(grumbles): ws client * fix more nits * fix compile warning: export websocket transports. * Update src/client/ws/manager.rs Co-authored-by:
David <dvdplm@gmail.com> * deps: tokio 1.0 and hyper 0.14 (#176) * deps: tokio 1.0 and hyper 0.14 * Update Cargo.toml * refactor: crate re-organization with separate crates (#177) * [ci]: feature `http` and `ws` removed. * refactor: re-org crate with smaller crates. * fmt * [ci]: remove default features Currently there are no features in the crates, so that check is not needed. * [http client]: remove unused dependency tokio * docs(http client): fix nits tokio 0.2 -> tokio 1.0 (#178) * docs(http client): tokio 0.2 -> tokio 1.0 * fix: better link * [ci]: github actions (#179) * docs(http client): tokio 0.2 -> tokio 1.0 * [ci]: remove travis * [ci]: add github actions. * [ci]: fix identation nits * [ci]: use cache for actions * [ci]: filter to clippy * [ci]: remove hacks * separate action for ci and benchmarks * [ci]: tweak to run on master branch. * examples/subscription -> examples/ws_subscription * force CI Co-authored-by:
David <dvdplm@gmail.com> Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> Co-authored-by:
Atkins <atkinschang@gmail.com>
-