- Jun 28, 2022
-
-
Alexandru Vasile authored
Signed-off-by: Alexandru Vasile <[email protected]>
-
Alexandru Vasile authored
Signed-off-by: Alexandru Vasile <[email protected]>
-
- Jun 27, 2022
-
-
Alexandru Vasile authored
Signed-off-by: Alexandru Vasile <[email protected]>
-
Alexandru Vasile authored
Signed-off-by: Alexandru Vasile <[email protected]>
-
- Jun 24, 2022
-
-
Alexandru Vasile authored
Signed-off-by: Alexandru Vasile <[email protected]>
-
- Jun 21, 2022
-
-
Niklas Adolfsson authored
To include the bugfix for `tracing::enabled!` when `log` is enabled. Follow up on #722
-
Alexandru Vasile authored
Signed-off-by: Alexandru Vasile <[email protected]>
-
Niklas Adolfsson authored
* feat(clients): add explicit unsubscribe API * add tests for unsubscribe * rephrase bad english
-
Alexandru Vasile authored
Signed-off-by: Alexandru Vasile <[email protected]>
-
- Jun 20, 2022
-
-
Alexandru Vasile authored
Signed-off-by: Alexandru Vasile <[email protected]>
-
- Jun 14, 2022
-
-
Alexandru Vasile authored
* ws-server: Fix copyright for tests Signed-off-by: Alexandru Vasile <[email protected]> * rpc_module: Return a resource builder when subscribing Registering a subscription returns the subscription' callback wrapped into a `MethodResourcesBuilder` for resource limiting purposes. Signed-off-by: Alexandru Vasile <[email protected]> * tests: Fix `register_subscription` tests Signed-off-by: Alexandru Vasile <[email protected]> * server: Drop `ResourceGuard` with `SubscriptionSink` for resource limit Signed-off-by: Alexandru Vasile <[email protected]> * tests: Check resource limits for subscription Signed-off-by: Alexandru Vasile <[email protected]> * proc-macros: Render resource limits for subscription macro Signed-off-by: Alexandru Vasile <[email protected]> * tests: Extend subscription limiting test via macro generation Signed-off-by: Alexandru Vasile <[email protected]> * core: Check if the `unsubscribe` method was already inserted Signed-off-by: Alexandru Vasile <[email protected]> * tests: Fix unsupported fields for subscriptions Signed-off-by: Alexandru Vasile <[email protected]> * server: Verify subscription methods before registering them Signed-off-by: Alexandru Vasile <[email protected]> * Update test comment for subscription limiting Signed-off-by: Alexandru Vasile <[email protected]> * Modify tests comments Signed-off-by: Alexandru Vasile <[email protected]>
-
Niklas Adolfsson authored
* chore(release): v0.14.0 * Update CHANGELOG.md * Update CHANGELOG.md
-
- Jun 13, 2022
-
-
Niklas Adolfsson authored
* fix(servers): more descriptive errors calls fail Closing #775 * fix tests * rename constants * address grumbles
-
Niklas Adolfsson authored
* initial rewrite to re-use HTTP access control * clean things up * Update core/src/error.rs * Update core/src/error.rs * allow origin: add back removed Display impl * cleanup again * Update http-server/src/lib.rs * Update examples/examples/cors_server.rs * Update core/src/server/access_control/mod.rs Co-authored-by: Tarik Gul <[email protected]> * Update http-server/src/server.rs Co-authored-by: Tarik Gul <[email protected]> * fix bad comment * remove todo * fix grumbles * more grumbles * rename and document a bit * remove `Access-Control-Allow-Origin` in whitelist * fix nit: pub(super) * fix bad naming Co-authored-by: Tarik Gul <[email protected]>
-
Niklas Adolfsson authored
-
- Jun 01, 2022
-
-
Niklas Adolfsson authored
* fix(http server): omit jsonrpc details health API Closing https://github.com/paritytech/jsonrpsee/issues/784 Ordinary GET requests doesn't expect the body the be formatted as `JSON-RPC` responses which this fixes. * address grumbles * Update http-server/src/server.rs * cargo fmt
-
- May 13, 2022
-
-
Niklas Adolfsson authored
* chore(release): v0.13.1 * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Tarik Gul <[email protected]> * Update CHANGELOG.md Co-authored-by: Tarik Gul <[email protected]>
-
- May 11, 2022
-
-
Niklas Adolfsson authored
* chore(release): v0.13.0 * Update CHANGELOG.md
-
Niklas Adolfsson authored
* feat: add http health API * Update http-server/src/server.rs * remove needless change * fix middleware nits
-
- May 06, 2022
-
-
Niklas Adolfsson authored
-
- May 03, 2022
-
-
Niklas Adolfsson authored
* feat: limit the number of subscriptions Closing #729 * fix nit * Update core/src/server/helpers.rs * add integration tests + some fixes so it works * cargo fmt * fix doc links * Unsubscribe calls should avoid subscription limits Point to Tokio 1.16 (we use a method from it), and a little special treatment for unsubscribe methods * No resource limiting for Unsubscribe calls * Test that we can still unsubscribe after hitting a limit * Fix a comment typo Co-authored-by: Alexandru Vasile <[email protected]> * Update core/src/server/rpc_module.rs * Update core/src/server/rpc_module.rs Co-authored-by: James Wilson <[email protected]> Co-authored-by: Alexandru Vasile <[email protected]>
-
Niklas Adolfsson authored
* fix: use https conn for https * enable integration tests for https and wss * remove socket options of http client
-
- Apr 29, 2022
-
-
Niklas Adolfsson authored
fix(rpc module): close subscription task when a subscription is `unsubscribed` via the `unsubscribe call` (#743) * refactor: remove SubscriptionSink::inner_send * fix: close running task if unsubscribed * Update core/src/server/rpc_module.rs * Update core/src/server/rpc_module.rs * fix nits * Update core/src/server/rpc_module.rs * add test for canceling subscriptions * print subscription info; once per minute * revert closure stuff * Revert "print subscription info; once per minute" This reverts commit 366176a8 . * use tokio::sync::watch instead of oneshot The receiver is clonable and it's possible to check whether the sender is still alive * Update tests/tests/helpers.rs Co-authored-by: David <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * grumbles: use unwrap in tests * add test for reuse pipe_from_stream Co-authored-by: David <[email protected]>
-
- Apr 21, 2022
-
-
Niklas Adolfsson authored
* chore(release): v0.11.0 * remove unused deps * docs: rephrase bad english * Update CHANGELOG.md * update publish script * Update CHANGELOG.md Co-authored-by: David <[email protected]> * Update CHANGELOG.md Co-authored-by: David <[email protected]> * Update CHANGELOG.md Co-authored-by: David <[email protected]> Co-authored-by: David <[email protected]>
-
- Apr 20, 2022
-
-
Niklas Adolfsson authored
* fix(rpc module): fail subscription with bad params * draft; show my point * fix tests * fix build * add tests for proc macros too * add tests for bad params in proc macros * fix nits * commit all files * add ugly fix for proc macro code * add more user friendly API * make SubscriptionSink::close take mut self * fix grumbles * show james some code * Update core/src/server/rpc_module.rs Co-authored-by: James Wilson <[email protected]> * remove needless clone * fix build * client fix docs + error type * simplify code: merge connect reset and unsubscribe close reason * remove unknown close reason * refactor: remove Error::SubscriptionClosed * add some nice APIs to ErrorObjectOwned * unify api * address grumbles * remove redundant methods for close and reject * proc macro: compile err when subscription -> Result * rpc module: fix test subscription test * Update core/src/server/rpc_module.rs Co-authored-by: James Wilson <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: James Wilson <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: James Wilson <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: James Wilson <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: James Wilson <[email protected]> * Update proc-macros/src/lib.rs Co-authored-by: James Wilson <[email protected]> * address grumbles * remove faulty comment * Update core/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * fix: don't send `RPC Call failed: error`. * remove debug assert Co-authored-by: James Wilson <[email protected]> Co-authored-by: David <[email protected]>
-
- Apr 05, 2022
-
-
Niklas Adolfsson authored
* refactor(log): downgrade send errors to warn These logs are most likely related to that the client terminated the connection and they come with significant overhead. * chore(release): v0.10.1
-
Niklas Adolfsson authored
* fix(ws server): close all subscriptions * fix test * better comment and longer period * revert unintentional change
-
- Apr 04, 2022
-
-
Niklas Adolfsson authored
* update changelog * update versions v0.10.0 * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Tarik Gul <[email protected]> * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Tarik Gul <[email protected]>
-
- Apr 01, 2022
-
-
Niklas Adolfsson authored
* unify servers; use tokio::TcpListener * add API to build server from tcp socket * build_from_tcp nit: not async * fix nits * change `build_from_tcp` force users configure hyper The hyper settings might contradict to settings on the provided socket, force users of this API to configure that avoid confusion and unexpected settings. * Update http-server/src/server.rs * fix doc links * add separate APIs `build_from_tcp` and `build_from_hyper` * fix clippy * remove dead code * fix build * fix nit in example code
-
Niklas Adolfsson authored
* fix(client): close subscription when server sent `SubscriptionClosed` notification * Update core/src/client/async_client/helpers.rs
-
Niklas Adolfsson authored
* refactor: make `pipe_from_stream` take stream of result The rationale for this is that it is more flexible for use cases when `Stream<Item = Result<T, Error>>`. Take for example `tokio_stream::Broadcast` then one would have to something like: ```rust let stream = BroadcastStream::new(rx).take_while(|r| future::ready(r.is_ok())).filter_map(|r| future::ready(r.ok())); ``` Of course it's a bit awkward to return `Result` when the underlying stream can't fail but I think that's fair trade-off here. * Update core/src/server/rpc_module.rs Co-authored-by: Tarik Gul <[email protected]> * pipe_from_stream: make E: Display instead of StdError * add a test * add `pipe_from_try_stream` API to support `TryStream` * Update tests/tests/integration_tests.rs * Update proc-macros/src/lib.rs Co-authored-by: Tarik Gul <[email protected]>
-
- Mar 30, 2022
-
-
Niklas Adolfsson authored
* refactor: get rid off `Error::Request` variant * fix nit * to_owned -> to_call_error
-
- Mar 09, 2022
-
-
David authored
* wip wip wip Use tokio::sync::Notify to signal to the server when a subscriber has gone away without calling unsubscribe * Cleanup * Fmt * More cleanup more TODOs * fmt * Address a few todos * Update core/src/server/rpc_module.rs Co-authored-by: Niklas Adolfsson <[email protected]> * Update ws-server/src/server.rs Co-authored-by: Niklas Adolfsson <[email protected]> * Fix bad merge * Test * fmt * fix test * Finish test * Cleanup Add a second subscription to serverless test * Update tests/tests/integration_tests.rs Co-authored-by: Niklas Adolfsson <[email protected]> * simplify test * Review feedback: avoid allocations * cleanup * Remove async-channel * remove async-channel deps Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Feb 18, 2022
-
-
Niklas Adolfsson authored
* [proc macros]: only generate unsub if not provided * Update proc-macros/src/rpc_macro.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/lib.rs Co-authored-by: David <[email protected]> * fix grumbles * Update proc-macros/src/lib.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/lib.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/lib.rs Co-authored-by: David <[email protected]> * Update proc-macros/tests/ui/correct/alias_doesnt_use_namespace.rs Co-authored-by: David <[email protected]> Co-authored-by: David <[email protected]>
-
- Feb 03, 2022
-
-
David authored
* Release prep for v0.9 * Update CHANGELOG Don't dry-run when releasing * Tweak release notes * Update CHANGELOG.md Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Jan 21, 2022
-
-
Niklas Adolfsson authored
* feat(client): support request id as Strings. * add tests for Id::String * address grumbles: move id_kind to RequestManager * Update client/http-client/src/client.rs * types: take ref to `ID` get rid of some `Clone` * remove more clone * grumbles: rename tests
-
David authored
Add a method to RpcModule that transforms the module into a `RpcModule<()>`, i.e. removes the context. (#660) * Add a method to RpcModule, `decontextualize`, that transforms the module into a `RpcModule<()>`, i.e. removes the context. * Merging a module with an empty module cannot fail * fmt * Address grumbles * Cleanup macro * Update core/src/server/rpc_module.rs Co-authored-by: Maciej Hirsz <[email protected]> Co-authored-by: Maciej Hirsz <[email protected]>
-
Niklas Adolfsson authored
* feat(rpc module): add_stream to subscription sink * fix some nits * unify parameters to rpc methods * Update core/src/server/rpc_module.rs * Update tests/tests/integration_tests.rs Co-authored-by: David <[email protected]> * address grumbles * fix subscription tests * new type for `SubscriptionCallback` and glue code * remove unsed code * remove todo * add missing feature tokio/macros * make `add_stream` cancel-safe * rename add_stream and return status * fix nits * rename stream API -> streamify * Update core/src/server/rpc_module.rs * provide proper close reason * spelling * consume_and_streamify + docs * fmt * rename API pipe_from_stream * improve logging; indicate which subscription method that failed Co-authored-by: David <[email protected]>
- Jan 05, 2022
-
-
Niklas Adolfsson authored
* fix(http server): handle post and option requests. * Update http-server/src/response.rs * fmt * grumbles: validate CORS before checking method kind * revert unintentional change * Add A few tests around CORS and http method/header acceptance * Tweak the CORS test * return appropriate headers for CORS preflight response * cargo fmt * jsonrpc, not jsonrpsee in test requests * don't test OPTIONS method in unsupported_methods test as it has different expectations * Update tests/tests/integration_tests.rs * Update tests/tests/integration_tests.rs * Update tests/tests/integration_tests.rs * Update tests/tests/integration_tests.rs * Add an example to test CORS in browser, and a couple of fixes to CORS handling * cargo fmt * Update examples/cors_server.rs Co-authored-by: James Wilson <[email protected]>
-