- Oct 29, 2021
-
-
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] <[email protected]> * 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 <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: David <[email protected]>
-
- Oct 15, 2021
-
-
Niklas Adolfsson authored
-
- Oct 12, 2021
-
-
Niklas Adolfsson authored
-
Niklas Adolfsson authored
* update CHANGELOG * bump version number * fix nit * Update CHANGELOG.md Co-authored-by: David <[email protected]> * bullet list in CHANGELOG * add last item to CHANGELOG Co-authored-by: David <[email protected]>
-
- Oct 11, 2021
-
-
Niklas Adolfsson authored
* fix(ParamsSer): serialize to empty array Serialize `ParamsSer::NoParams` to an empty array inorder to comply with the jsonrpc v2 spec. * fix tests * remove ParamsSer::NoParams * address grumbles: adjust rpc params macro
-
Niklas Adolfsson authored
Closing #485
-
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 <[email protected]> * 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 <[email protected]> * syn-up all the things, handle resources on methods Co-authored-by: Niklas Adolfsson <[email protected]> * 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 <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]> * 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 <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Oct 05, 2021
-
-
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] <[email protected]> * set_origin -> set_headers * fmg Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Maciej Hirsz <[email protected]>
-
- Sep 30, 2021
-
-
David authored
* Move RequestIdGuard to types::client * Use the RequestIdGuard type for the http client as well * Fix batch request ID handling (one batch uses one slot) * Add a few tests to check that max_concurrent_requests work for http clients * Docs
-
- Sep 16, 2021
-
-
David authored
* Re-export v2::params, error, request and response types * Use shallow type paths
-
Niklas Adolfsson authored
-
- Sep 15, 2021
-
-
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
-
- Sep 14, 2021
-
-
David authored
* Add a test illustrating how to use the `call` convenience method * Extend test + review feedback * log * log * log * log * log * log * log * log * log * log * log * log * log * log * log * Add Methods::test_subscription Log more when params parsing fails * Add call_with test helper (ty @niklas!) + cleanup * Remove todo (part of https://github.com/paritytech/jsonrpsee/issues/457 ) * fmt * Let `test_subscription` be called from other crates * Manually fix indentation * fmt * SSself-review grumbles * CallError::InvalidParams carries an anyhow::Error * fmt * Tweak docs * Update utils/src/server/rpc_module.rs Co-authored-by: Niklas Adolfsson <[email protected]> * review grumble * Fix todos * fmt * Fixup error messages * Include source in the error message for `CallError` * fmt * Update proc-macros/src/render_server.rs Co-authored-by: Maciej Hirsz <[email protected]> * Mention needing jsonrpsee crate in scope * Resolve todo * Impl ToRpcParams for 0-sized array * optimized logging Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: Maciej Hirsz <[email protected]>
-
- Sep 13, 2021
-
-
Niklas Adolfsson authored
* new helper for testing * fix features * call_with_params -> call_with * call_with_params -> call_with * Update utils/src/server/rpc_module.rs * fix trait bound * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * call_with -> test_call * fix grumbles * fix nits Co-authored-by: David <[email protected]>
-
- Sep 11, 2021
-
-
David authored
-
- Sep 01, 2021
-
-
Niklas Adolfsson authored
* treat empty json as no params when optional * add test with nested array brackets * address grumbles: better tests * Update types/src/v2/params.rs Co-authored-by: David <[email protected]> * introduce RpcParams::sequence_ignore_empty * address grumbles: ignore empty json in RpcParams * Update proc-macros/src/render_server.rs * address grumbles: remove trim in next_inner() * address grumbles: trim_start after params.next() * address more grumbles * [proc macros]: add test for empty array * make proc macro kind of work * add hack to make it work in proc macros * add hack to make it work in proc macros * [] -> * revert cerebral palsy * Update proc-macros/tests/ui/correct/basic.rs * Update proc-macros/tests/ui/correct/basic.rs * address grumbles * improve is_option * add test for core::option::Option Co-authored-by: David <[email protected]>
-
- Aug 25, 2021
-
-
David authored
* Add license headers where missing and update year * Update examples/http.rs Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Aug 18, 2021
-
-
Niklas Adolfsson authored
* rewrite me * require proc macro API to return result * send unknown message when error is not CallError * show example that auto cast StdError doesn't work * register_*_method Into<Error> * clippy * replace generic errors with anyhow::Error * fix nits * example that anyhow::Error in register_method works * CallError: add missing From impl * [types]: add helper methods for Error types The rationale is to make it possible for users to either use anyhow::Error or use the helper methods. * fmt * Revert "register_*_method Into<Error>" This reverts commit 33b4fa28730b72647ba150659d3c0ab1937e524a. * add better comment * fix nit
-
- Aug 16, 2021
-
-
David authored
* Sniff the first byte to glean if the incoming request is a single or batch request This works around the serde limitations around `untagged` enums and `RawValue`. * fmt * For http server, check first byte before allocating space for the body Also, rework the way we return errors: prefer JSON-RPC errors according to spec (application/json) wherever sensible. * Review feedback * Don't assume there is a first byte to read * ty clipyp * Review concerns * Cleanup
-
- Aug 13, 2021
-
-
Niklas Adolfsson authored
-
- Aug 09, 2021
-
-
Niklas Adolfsson authored
To make sure that we are not affected by: - https://github.com/hyperium/hyper/security/advisories/GHSA-f3pg-qwvg-p99c - https://github.com/hyperium/hyper/security/advisories/GHSA-5h46-h7hh-c6x9 However, `hyper 13` is not fixed but I think we should remove that support anyway?!
-
- Jul 27, 2021
-
-
Maciej Hirsz authored
* WIP * Feature-complete-ish * WIP * Cleaner replace marker * Inject lifetimes in elided `Cow`s * Use a single static &str for all injected lifetimes * Working lifetimes * Add the `call` method to `Methods` * Testing proc macro with optional params * Remove internal loop * fmt * Fix grumbles
-
- Jul 12, 2021
-
-
David authored
* Include "macros" in the "server" feature * Re-export SubscriptionSink * Include the "types" feature in both the "client" and "server" features Export types::* from façade when the "types" is active Export types::* from servers * fmt * Export jsonrpsee_types under types * fmt * broken doc link * fix benches * fmt * Fix test imports
- Jul 10, 2021
-
-
David authored
* Pass OwnedRpcParams to async methods * Cow-ified RpcParams * fmt * Separate `RpcParamsSequence` parser from `RpcParams` * Remove OwnedId, use Id<'static> instead * Ensure that parsed `Id` is borrowing from input slice * Tweak/add some docs Test that parse() works after calling sequence() * Fix rustdoc link Co-authored-by: Maciej Hirsz <[email protected]>
-
- Jul 01, 2021
-
-
Igor Aleksanov authored
* Start working on the new proc macro system * Add skeleton for rendering * Improve error reporting * Main part of 'render_client' * Implement RPC client generation * Client successfully rendered * Add doc-comment generation for the API client * Check that all the methods have receiver * Start working on the server impl * Add helper method to find server crate * Fix usage of client rpc path * Decent progress on the server macro implementation * Server macro compiled successfully * Remove unneeded re-export * Insert SubscriptionSink argument to the subscription server signatures * Add basic doc-comment for the macro * no_run -> ignore * Trait with subscription compiles * Extend the example * Add integration test for client/server impl * Add trybuild setup * Set correct span for attribute parsing related errors * Add basic set of trybuild tests * Add tests for client and server generated separately * Improve proc-macro documentation * Update proc-macros/src/lib.rs Co-authored-by: Niklas Adolfsson <[email protected]> * Fix a couple of bugs in docs * Fix rendering subscription with params Co-authored-by: Niklas Adolfsson <[email protected]>
-
Maciej Hirsz authored
* Streaming RpcParams parsing * DRY RpcParams::one again * Fix doc comments
-
Maciej Hirsz authored
* Set allowed Host header values * Error if allowed hosts list is empty * Grammar Co-authored-by: David <[email protected]> Co-authored-by: David <[email protected]>
-
- Jun 29, 2021
-
-
Niklas Adolfsson authored
* feat: customizable error via RpcError trait This commit introduces a new trait for defining user customizable error codes and messages * revert trait stuff * use RawValue * fix docs * rexport to_json_raw_value
-
- Jun 24, 2021
-
-
Igor Aleksanov authored
* Add a way to stop HTTP server * Add a way to stop WS server * Apply suggestions from code review Co-authored-by: David <[email protected]> * Ensure the concrete type of error in stop test * Resolve merge artifacts * Add public re-exports of stop handle Co-authored-by: David <[email protected]>
-
Niklas Adolfsson authored
* [jsonrpsee types]: unify types + more tests * address grumbles
-
- Jun 18, 2021
-
-
Maciej Hirsz authored
* Initial implementation * Comments * Send a 403 on denied origin * Noodling around with `set_allowed_origins` * Error on empty list * Soketto 0.6 * fmt * Add `Builder::allow_all_origins`, clarify doc comments * Rename Cors -> AllowedOrigins, nits, no panic
-
Maciej Hirsz authored
* Make sync methods into Arc pointers * impl Clone for RpcModule and Methods * No need to wrap Methods in Arc anymore * Simplify generics * register_alias * fmt * grammar Co-authored-by: James Wilson <[email protected]> * Use a separate Arc counter for tracking max_connections Co-authored-by: James Wilson <[email protected]>
-
- Jun 04, 2021
-
-
David authored
* Release prep * Mention proc macro limitations * Mention publish script
-
Niklas Adolfsson authored
* [rpc module]: server-side close subscription Add functionality that closes the subscription after the sink has been dropped. * [integration tests]: add timeout on futures * remove global subscriber mutex * fix nit * [client types]: fix #349 Subscription::next() propogate error when parsing the response fails * [client types]: fix #349 Subscription::next() propogate error when parsing the response fails * unify subscription and notification * rename again * send notif response when subscription is dropped * stray debug stuff * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Revert "[client types]: fix #349" This reverts commit c4fefade719ebd8c964a62d0eb16f89db3346ccd. * Revert "[integration tests]: add timeout on futures" This reverts commit 21dfb99649aaaa8c847a693b4510e0202498fa2c. * show that actual edge-case * fix nit * Update types/src/traits.rs * fix bad merge * ugly; but works * complete solution * get rid of Option * Update tests/tests/integration_tests.rs * Update utils/src/server/rpc_module.rs * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * grumbles: fix faulty early return * remove weird abstraction KeepAlive * fix nits * revert test timeouts * address grumbles * fix build Co-authored-by: David <[email protected]>
-
- Jun 03, 2021
-
-
Niklas Adolfsson authored
* [client types]: fix #349 Subscription::next() propogate error when parsing the response fails * unify subscription and notification * rename again * Update types/src/traits.rs * fix bad merge * Update types/src/client.rs Co-authored-by: David <[email protected]> * grumbles: subscribe_method -> subscribe_to_method * Update tests/tests/integration_tests.rs Co-authored-by: David <[email protected]> * grumbles: doc links Co-authored-by: David <[email protected]>
-
David authored
* Add a builder to the ws server * Use the WsServerBuilder in tests&examples * cleanup * fmt * Fix benches * fix error message * Add connection count limiting and associated config item * Use the strong_count to `methods` to know how many connections we currently have * Fix test
-
- Jun 02, 2021
-
-
Maciej Hirsz authored
* Use a single map for methods * fmt * cargo fmt screwed indents somehow * Use Arc instead of Box for async methods * fmt * Implement `execute` on `MethodCallback` to keep things DRY * fmt * `OwnedJsonRpcRequest` is not necessary anymore * Call `execute` on `Methods` directly for even more DRY code * Update utils/src/server/rpc_module.rs Co-authored-by: Niklas Adolfsson <[email protected]> * Use `copied` instead of mapping a deref * DRY-er `params` in `MethodCallback` * Added comment on `0` conn_id in http Co-authored-by: Niklas Adolfsson <[email protected]>
-
Igor Aleksanov authored
* Enable docs/debug/pub warnings for server and types crates * Remove Debug bound on Notif * Stick to deriving debug * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> Co-authored-by: David <[email protected]>
-
David authored
* Misc async methods tinkerings * Update utils/src/server/rpc_module.rs Co-authored-by: Niklas Adolfsson <[email protected]> * Update types/src/v2/params.rs Co-authored-by: Niklas Adolfsson <[email protected]> * Fix review grumbles * fmt Co-authored-by: Niklas Adolfsson <[email protected]>
-