- 20 Jul, 2022 1 commit
-
-
Niklas Adolfsson authored
-
- 18 Jul, 2022 1 commit
-
-
Niklas Adolfsson authored
-
- 06 Jul, 2022 3 commits
-
-
Niklas Adolfsson authored
-
Alexandru Vasile authored
* ws-server: Handle `soketto::Incoming::Closed` frames Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * ws-server: Change `warn` -> `debug` for dropped connections Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * ws-server: Remove closed reason log Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Update ws-server/src/server.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
Niklas Adolfsson authored
* WIP: refactoring * refactor http server * fix tests * Delete TODO.txt * fix tests again * add benches/src/lib.rs * remove bench changes; fast less deps * no more env_logger * update examples * ws server; expose headers in middleware * add back uncommented code * fix nits * make the code more readable * add back the tracing stuff * simplify code but one extra clone * fix tests again * revert async accept API * fix nits * different traits for WS and HTTP middleware * fix tests * revert benchmark change * Update core/src/server/helpers.rs * Update ws-server/Cargo.toml * add limit to batch responses as well * pre-allocate string for batches * small refactor
-
- 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
-
- 14 Jun, 2022 1 commit
-
-
Alexandru Vasile authored
* ws-server: Fix copyright for tests Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * 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 <alexandru.vasile@parity.io> * tests: Fix `register_subscription` tests Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * server: Drop `ResourceGuard` with `SubscriptionSink` for resource limit Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * tests: Check resource limits for subscription Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * proc-macros: Render resource limits for subscription macro Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * tests: Extend subscription limiting test via macro generation Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * core: Check if the `unsubscribe` method was already inserted Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * tests: Fix unsupported fields for subscriptions Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * server: Verify subscription methods before registering them Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Update test comment for subscription limiting Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Modify tests comments Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io>
-
- 13 Jun, 2022 3 commits
-
-
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 <47201679+TarikGul@users.noreply.github.com> * Update http-server/src/server.rs Co-authored-by:
Tarik Gul <47201679+TarikGul@users.noreply.github.com> * 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 <47201679+TarikGul@users.noreply.github.com>
-
Niklas Adolfsson authored
-
- 03 Jun, 2022 1 commit
-
-
Alexandru Vasile authored
* ws-server: Submit ping regardless of WS messages Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * use tokio_stream::IntervalStream for less boxing Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 27 May, 2022 1 commit
-
-
Alexandru Vasile authored
* ws-server: Implement `ping-ping` Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * ws-server: Set builder's ping_interval Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * ws-server: Handle just `ping` frames Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * ws-server: Simplify `select` Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * Use `futures_util::select` instead of `select!` macro Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * ws-server: Avoid pinning the delay Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * ws-server: Log when a `Pong` frame is received Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io> * ws-server: Use tokio for submitting pings Signed-off-by:
Alexandru Vasile <alexandru.vasile@parity.io>
-
- 25 May, 2022 1 commit
-
-
Alexander Polakov authored
-
- 04 May, 2022 1 commit
-
-
Igor Aleksanov authored
-
- 03 May, 2022 1 commit
-
-
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 <60601340+lexnv@users.noreply.github.com> * Update core/src/server/rpc_module.rs * Update core/src/server/rpc_module.rs Co-authored-by:
James Wilson <james@jsdw.me> Co-authored-by:
Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
-
- 05 Apr, 2022 2 commits
-
-
Niklas Adolfsson authored
These logs are most likely related to that the client terminated the connection and they come with significant overhead.
-
Niklas Adolfsson authored
* fix(ws server): close all subscriptions * fix test * better comment and longer period * revert unintentional change
-
- 30 Mar, 2022 1 commit
-
-
Niklas Adolfsson authored
* refactor: get rid off `Error::Request` variant * fix nit * to_owned -> to_call_error
-
- 22 Mar, 2022 1 commit
-
-
Quake Wang authored
* fix: max_request_body_size setting should not override max_response_size * chore: apply review comment
-
- 09 Mar, 2022 1 commit
-
-
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 <niklasadolfsson1@gmail.com> * Update ws-server/src/server.rs Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * 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 <niklasadolfsson1@gmail.com> * simplify test * Review feedback: avoid allocations * cleanup * Remove async-channel * remove async-channel deps Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 01 Feb, 2022 1 commit
-
-
Niklas Adolfsson authored
* refactor(ws server): set_id_provider `Box<dyn>` * address grumbles: thanks James * relax trait bounds with ?Sized * Update ws-server/src/tests.rs * add docs
-
- 21 Jan, 2022 1 commit
-
-
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 <dvdplm@gmail.com> * 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 <dvdplm@gmail.com>
-
- 21 Dec, 2021 1 commit
-
-
Niklas Adolfsson authored
* PoC * introduce IdProvider trait * revert Cow stuff * Update ws-server/src/server.rs * fix tests * cargo fmt * use 'static lifetime in SubscriptionId * fix tests * fmt * make tests compile again * fix tests * Fix tests * Move IdProvider impls to own module * move `sub-id gen` types to `core` * fix doc links * make rand non-optional dep * feature gate: id provider Co-authored-by:
David Palm <dvdplm@gmail.com>
-
- 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>
-
- 01 Dec, 2021 1 commit
-
-
Maciej Hirsz authored
* Squashed MethodSink * Middleware WIP * Passing all the information through * Unnecessary `false` * Apply suggestions from code review Co-authored-by:
David <dvdplm@gmail.com> * 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 <1096222+maciejhirsz@users.noreply.github.com> * Update ws-server/src/server.rs Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> * Update ws-server/src/server.rs Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> * 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 <1096222+maciejhirsz@users.noreply.github.com> * Update examples/Cargo.toml Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> * 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 <dvdplm@gmail.com>
-
- 17 Nov, 2021 1 commit
-
-
Niklas Adolfsson authored
* fix: enable several sockaddress when starting servers * nits * more verbose asserts in rustdoc tests * fix tests * fix tests again
-
- 11 Nov, 2021 2 commits
-
-
Maciej Hirsz authored
* Fix some clippy issues * Add an interval to periodically wake the SelectDriver Waker * Apply suggestions from code review Co-authored-by:
David <dvdplm@gmail.com> * Naming grumbles Co-authored-by:
David <dvdplm@gmail.com>
-
Niklas Adolfsson authored
* ws server: don't kill connection max limit exceeds * Update ws-server/src/server.rs * actually use max size in soketto * rewrite me * improve logs * use soketto fix * rewrite me * fix nit * revert unintentional change * use soketto 0.7.1 * fix logger * Update ws-server/src/server.rs Co-authored-by:
David <dvdplm@gmail.com> * Update ws-server/src/server.rs Co-authored-by:
David <dvdplm@gmail.com> * Update ws-server/src/server.rs Co-authored-by:
David <dvdplm@gmail.com> * Update ws-server/src/server.rs Co-authored-by:
David <dvdplm@gmail.com> * Update ws-server/src/server.rs Co-authored-by:
David <dvdplm@gmail.com> * fix build * reject too large response * fix some DRY code * feat: bounded serializer for RpcModule * Update utils/src/server/helpers.rs Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> * Update utils/src/server/helpers.rs Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> * address grumbles: safety and other nits * address grumbles: MaxCallSize on closures instead * Update utils/src/server/helpers.rs Co-authored-by:
David <dvdplm@gmail.com> * use max response size on errors too * Revert "use max response size on errors too" This reverts commit 3b07e42d257b2eebae311b92b7f72594d94d5f87. * include max limit in error response Co-authored-by:
David <dvdplm@gmail.com> Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com>
-
- 09 Nov, 2021 1 commit
-
-
Niklas Adolfsson authored
* ws server: don't kill connection max limit exceeds * Update ws-server/src/server.rs * actually use max size in soketto * rewrite me * improve logs * use soketto fix * rewrite me * fix nit * revert unintentional change * use soketto 0.7.1 * fix logger * Update ws-server/src/server.rs Co-authored-by:
David <dvdplm@gmail.com> * Update ws-server/src/server.rs Co-authored-by:
David <dvdplm@gmail.com> * Update ws-server/src/server.rs Co-authored-by:
David <dvdplm@gmail.com> * Update ws-server/src/server.rs Co-authored-by:
David <dvdplm@gmail.com> * Update ws-server/src/server.rs Co-authored-by:
David <dvdplm@gmail.com> * fix build Co-authored-by:
David <dvdplm@gmail.com>
-
- 08 Nov, 2021 1 commit
-
-
Chris Sosnin authored
* Implement Future for server handles * Explicitly assert timeout errors in tests
-
- 01 Nov, 2021 1 commit
-
-
Niklas Adolfsson authored
* reproduce Kian's issue * fix ws server wait until batches has completed * fix nit * clippify * enable benches for ws batch requests * use stream instead of futures::join_all * clippify * address grumbles: better assert
-
- 15 Oct, 2021 1 commit
-
-
Niklas Adolfsson authored
-
- 12 Oct, 2021 2 commits
-
-
Niklas Adolfsson authored
-
Maciej Hirsz authored
* Document resource limiting * Formatting * More formatting * fmt * Doc comment wording Co-authored-by:
David <dvdplm@gmail.com> * Cross-reference docs between servers and utils * Fix grumbles * More elaborate description * Update http-server/Cargo.toml Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * Apply suggestions from code review Co-authored-by:
David <dvdplm@gmail.com> * Allow for unlimited resources if cap is 0 * fmt * Update ws-server/Cargo.toml Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * Clarify 8 resources, 0s in costs/limits, and runtime errors Co-authored-by:
David <dvdplm@gmail.com> Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 11 Oct, 2021 2 commits
-
-
Niklas Adolfsson authored
* [ws server]: refactor start() * remove needless clone * fix http server too * fmt * unify stop APIs * fix bad merge * add API to use custom tokio runtime * use futures oneshot * fix unintentional change * Revert "use futures oneshot" This reverts commit 0432f6ba41d49a3494943458657a31f8afd79160. * Update http-server/src/server.rs Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com> Co-authored-by:
Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com>
-
Maciej Hirsz authored
* Squash post merge * RAII claims and some comments * Adding resources to Methods * Use arrays for claiming all resources at once * Register resources on ws-server * Return MethodResourcesBuilder from register_method * Return MethodResourcesBuilder from register_async_method * fmt and comments * Add `verify_and_insert` to get rid of `or_insert` in order to get mut ref to value * Resources initialization * No need for ResourceBuilder * Comment all the things * Handle errors on ws-server `start` method * Passing ResourceGuard to method execution * Start ws-server in background, simplify all the tests! * Claiming resources on runtime * Do checked math on resource claiming * Clearer error path for resources at limit * Resource limiting tests WIP * Unbox async futures * fmt * Cleaner proc macro * Fix lifetime issues with ResourceGuard with internal Arc * Remove unnecessary lifetime generic * Working tests * Use turbofish in tests * fmt * Fixed (?) benches * Apply suggestions from code review Co-authored-by:
David <dvdplm@gmail.com> * Tweak more grumbles * Adding a test for resource limiting with proc macros (WIP) * Reworking attribute macros for resource limiting (#507) * Squashed macros WIP * bae-less macros! * Make things simpler and more readable * Some comments and DRY aliases parsing * Naming things is hard * Respan is no longer needed * Simpler Arguments * Remove stale code * Apply suggestions from code review Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * syn-up all the things, handle resources on methods Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * Resource limiting on the http server * Test two resources at once * Test the HTTP server for resource limiting * Apply suggestions from code review Co-authored-by:
David <dvdplm@gmail.com> Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com> * Comment tweaks * More explicit error type for `AttributeMeta::retain` * Remove generic from ResourceTable; derive Default on ws Builder * Make the macros shorter Co-authored-by:
David <dvdplm@gmail.com> Co-authored-by:
Niklas Adolfsson <niklasadolfsson1@gmail.com>
-
- 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
-
- 16 Sep, 2021 1 commit
-
-
David authored
* Re-export v2::params, error, request and response types * Use shallow type paths
-
- 15 Sep, 2021 1 commit
-
-
David authored
* Renames * More renames * fmt * s/RpcParams/Params/ * Add a type alias `SubscriptionResponse` to `Notification` which is parametrized to `SubscriptionPayload` Move `SubscriptionResponse` to the `response` module * Fix doc links * Cleanup and some docs * Review feedback * cleanup
-