- Jun 29, 2022
-
-
Alexandru Vasile authored
* subscription: Allow errors in subscription callbacks Signed-off-by: Alexandru Vasile <[email protected]> * subscription: Remove the need to own the error Signed-off-by: Alexandru Vasile <[email protected]> * error: Build `ErrorObject` from `CallError` for improved ergonomics Signed-off-by: Alexandru Vasile <[email protected]> * Update examples for the new subscription API Signed-off-by: Alexandru Vasile <[email protected]> * Add alias for subscription result Signed-off-by: Alexandru Vasile <[email protected]> * macros: Render server subscription method with `ResultSubscription` Signed-off-by: Alexandru Vasile <[email protected]> * Port `proc_macro` example to new API Signed-off-by: Alexandru Vasile <[email protected]> * Rename `ResultSubscription` to `ReturnTypeSubscription` to avoid confusion Signed-off-by: Alexandru Vasile <[email protected]> * Port all tests to new subscription API Signed-off-by: Alexandru Vasile <[email protected]> * Update documentation Signed-off-by: Alexandru Vasile <[email protected]> * Port benches Signed-off-by: Alexandru Vasile <[email protected]> * Replace tabs with spaces & add documentation Signed-off-by: Alexandru Vasile <[email protected]> * Add dummy error for subscriptions Signed-off-by: Alexandru Vasile <[email protected]> * Implement `From` for `SubscriptionError` Signed-off-by: Alexandru Vasile <[email protected]> * Return `SubscriptionError` when parsing params Signed-off-by: Alexandru Vasile <[email protected]> * Rename `SubscriptionError` to `SubscriptionEmptyError` Signed-off-by: Alexandru Vasile <[email protected]> * Change `accept` signature Signed-off-by: Alexandru Vasile <[email protected]> * Port tests to new `accept` api Signed-off-by: Alexandru Vasile <[email protected]> * Implement `pipe_from_try_stream` and `pipe_from_stream` for `PendingSubscription` Signed-off-by: Alexandru Vasile <[email protected]> * Modify examples to ilustrate new API Signed-off-by: Alexandru Vasile <[email protected]> * Fix docs tests Signed-off-by: Alexandru Vasile <[email protected]> * Rename previously `SubscriptionResult` -> `InnerSubscriptionResult` Signed-off-by: Alexandru Vasile <[email protected]> * Rename `ReturnTypeSubscription` -> `SubscriptionResult` Signed-off-by: Alexandru Vasile <[email protected]> * Remove documentation line Signed-off-by: Alexandru Vasile <[email protected]> * Implement `PipeFromStreamResult` Signed-off-by: Alexandru Vasile <[email protected]> * Add comment for empty error Signed-off-by: Alexandru Vasile <[email protected]> * Update proc-macros/src/lib.rs Co-authored-by: Niklas Adolfsson <[email protected]> * Update proc-macros/src/lib.rs Co-authored-by: Niklas Adolfsson <[email protected]> * Update proc-macros/src/lib.rs Co-authored-by: Niklas Adolfsson <[email protected]> * Change `ReturnTypeSubscription` -> `SubscriptionResult` Signed-off-by: Alexandru Vasile <[email protected]> * Add `ResultConsumed` for `PipeFromStreamResult` Signed-off-by: Alexandru Vasile <[email protected]> * Update examples to use `PipeFromStreamResult` Signed-off-by: Alexandru Vasile <[email protected]> * Replace ConsumedResult with Options Signed-off-by: Alexandru Vasile <[email protected]> * Log warning when subscription callback fails Signed-off-by: Alexandru Vasile <[email protected]> * Change ubuntu test names Signed-off-by: Alexandru Vasile <[email protected]> * server: Make `pipe` methods of `SubscriptionSink` private Signed-off-by: Alexandru Vasile <[email protected]> * server: Remove `pipe_from_stream` method of `SubscriptionSink` Signed-off-by: Alexandru Vasile <[email protected]> * server: Update PipeFromStreamResult documentation Signed-off-by: Alexandru Vasile <[email protected]> * Adjust tests to `SubscriptionSink::pipe_from_stream` private interface Signed-off-by: Alexandru Vasile <[email protected]> * Add `accept-reject` API on `SubscriptionSink` Signed-off-by: Alexandru Vasile <[email protected]> * Make `pipe_from_try_stream` public Signed-off-by: Alexandru Vasile <[email protected]> * Maybe accept the subscription Signed-off-by: Alexandru Vasile <[email protected]> * Revert "server: Remove `pipe_from_stream` method of `SubscriptionSink`" This reverts commit d3c3ce9c . * Make `unsubscribe` channel optional on accepting the connection Signed-off-by: Alexandru Vasile <[email protected]> * Pass `SubscriptionSink` to subscription callbacks Signed-off-by: Alexandru Vasile <[email protected]> * Implement subscription sink state Signed-off-by: Alexandru Vasile <[email protected]> * Submit `InvalidParams` if sink was never accepted Signed-off-by: Alexandru Vasile <[email protected]> * Handle rejected sinks Signed-off-by: Alexandru Vasile <[email protected]> * Remove `PendingSubscription` Signed-off-by: Alexandru Vasile <[email protected]> * Fix doc tests Signed-off-by: Alexandru Vasile <[email protected]> * macro: Make subscription sink mutable Signed-off-by: Alexandru Vasile <[email protected]> * Fix tests and examples Signed-off-by: Alexandru Vasile <[email protected]> * macro: Return `sink.reject()` result Signed-off-by: Alexandru Vasile <[email protected]> * tests: Add test for `SubscriptionSinkState` Signed-off-by: Alexandru Vasile <[email protected]> * Test internal subscription sink state Signed-off-by: Alexandru Vasile <[email protected]> * Fix `send_error` to not always return `false` Signed-off-by: Alexandru Vasile <[email protected]> * Fix benches Signed-off-by: Alexandru Vasile <[email protected]> * Remove `PipeFromStreamResult` Signed-off-by: Alexandru Vasile <[email protected]> * Use valid Json-RPC return code for test errors Signed-off-by: Alexandru Vasile <[email protected]> * Remove `SubscriptionSinkState`" * Remodel state machine using `Option`s for `SubscriptionSink`s Signed-off-by: Alexandru Vasile <[email protected]> * tests: Double accept / reject API for `SubscriptionSink` Signed-off-by: Alexandru Vasile <[email protected]> * Implement `SubscriptionAcceptRejectError` for error propagation Signed-off-by: Alexandru Vasile <[email protected]> * Remove `maybe_accept` wrapper Signed-off-by: Alexandru Vasile <[email protected]> * Update comments and documentation Signed-off-by: Alexandru Vasile <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: Niklas Adolfsson <[email protected]> * Update core/src/server/rpc_module.rs Co-authored-by: Niklas Adolfsson <[email protected]> * rpc_server: Add type alias for unsubscription calls Signed-off-by: Alexandru Vasile <[email protected]> * rpc_server: Improve comment regarding dropped error Signed-off-by: Alexandru Vasile <[email protected]> * style: Single line return errors Signed-off-by: Alexandru Vasile <[email protected]> * Make comment more verbose Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: James Wilson <[email protected]>
-
- Jun 28, 2022
-
-
Niklas Adolfsson authored
-
Niklas Adolfsson authored
-
- Jun 25, 2022
-
-
Niklas Adolfsson authored
-
Niklas Adolfsson authored
-
- Jun 21, 2022
-
-
Niklas Adolfsson authored
To include the bugfix for `tracing::enabled!` when `log` is enabled. Follow up on #722
-
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
-
- Jun 20, 2022
-
-
Niklas Adolfsson authored
-
Niklas Adolfsson authored
-
- Jun 18, 2022
-
-
Niklas Adolfsson authored
-
- Jun 14, 2022
-
-
Niklas Adolfsson authored
* chore(release): v0.14.0 * Update CHANGELOG.md * Update CHANGELOG.md
-
- Jun 13, 2022
-
-
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
-
- May 13, 2022
-
-
Alexandru Vasile authored
* Move examples under dedicated folder to simplify `Cargo.toml` Signed-off-by: Alexandru Vasile <[email protected]> * Fix readme links for examples Signed-off-by: Alexandru Vasile <[email protected]> * Fix deadlinks Signed-off-by: Alexandru Vasile <[email protected]>
-
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
-
- 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]>
-
- 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
* 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 <[email protected]> * Update core/src/client/async_client/mod.rs Co-authored-by: David <[email protected]> * 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 <[email protected]>
-
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
-
- 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 02, 2022
-
-
Niklas Adolfsson authored
* update pubsub examples * Update examples/ws_subscription.rs * remove some docs * remove needless clone * simplify example * simplify code with async-broadcast channel * use tokio broadcast for smaller dependency tree * Update examples/ws_pubsub_broadcast.rs
-
- 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
-
- 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
-
-
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]>
- 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]>
-
- Dec 22, 2021
-
-
Niklas Adolfsson authored
* chore: release v0.7.0 * Update CHANGELOG.md * Update CHANGELOG.md * update changelog * Tweak CHANGELOG * re-export core for clients as well Co-authored-by: David Palm <[email protected]>
-
Niklas Adolfsson authored
Implies MSRV 1.56.x
-
- Dec 21, 2021
-
-
David authored
* Upgrade `tracing-subscriber` * One more
-
- Dec 20, 2021
-
-
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 <[email protected]> * Update client/core-client/src/lib.rs Co-authored-by: David <[email protected]> * cargo fmt * Update client/ws-client/src/lib.rs Co-authored-by: David <[email protected]> * Update client/ws-client/src/lib.rs Co-authored-by: David <[email protected]> * 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 <[email protected]>
-
- Dec 17, 2021
-
-
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 <[email protected]> * fmt * Feature gate the Client trait * Move `Client` traits to `client` module Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Dec 10, 2021
-
-
James Wilson authored
* get the tests passing * cargo fmt * tweak comment wording * point to StreamExt in the next() method impl just so that people know to import it if desired * ignore clippy lint on next() Iterator-like method * Fix an example * actually, unwrap instead of transpose
-
- Dec 09, 2021
-
-
David authored
* Remove usage of the `palaver` crate in an example * fmt
-
- Dec 08, 2021
-
-
Niklas Adolfsson authored
-
- Dec 01, 2021
-
-
Niklas Adolfsson authored
-
Niklas Adolfsson authored
-
Maciej Hirsz authored
* Squashed MethodSink * Middleware WIP * Passing all the information through * Unnecessary `false` * Apply suggestions from code review Co-authored-by: David <[email protected]> * Add a setter for middleware (#577) * Fix try-build tests * Add a middleware setter and an example * Actually add the example * Grumbles * Use an atomic * Set middleware with a constructor instead * Resolve a todo * Update ws-server/src/server.rs Co-authored-by: Maciej Hirsz <[email protected]> * Update ws-server/src/server.rs Co-authored-by: Maciej Hirsz <[email protected]> * Update ws-server/src/server.rs Co-authored-by: Maciej Hirsz <[email protected]> Co-authored-by: Maciej Hirsz <[email protected]> * Middleware::on_response for batches * Middleware in HTTP * fmt * Server builder for HTTP * Use actual time in the example * HTTP example * Middleware to capture method not found calls * An example of adding multiple middlewares. (#581) * Add an example of adding multiple middlewares. * Update examples/multi-middleware.rs Co-authored-by: Maciej Hirsz <[email protected]> * Update examples/Cargo.toml Co-authored-by: Maciej Hirsz <[email protected]> Co-authored-by: Maciej Hirsz <[email protected]> * Move `Middleware` to jsonrpsee-types (#582) * Move `Middleware` to jsonrpsee-types * Move Middleware trait to jsonrpsee-types * Add some docs. * Link middleware to `with_middleware` methods in docs * Doctests * Doc comment fixed * Clean up a TODO * Switch back to `set_middleware` * fmt * Tests * Add `on_connect` and `on_disconnect` * Add note to future selves Co-authored-by: David <[email protected]>
-