1. Aug 24, 2022
  2. Aug 12, 2022
  3. Jun 29, 2022
  4. Jun 22, 2022
  5. Jun 21, 2022
    • Niklas Adolfsson's avatar
      feat(logging): add `tracing span` per JSON-RPC call (#722) · 00c2ce65
      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
      00c2ce65
  6. Jun 13, 2022
  7. May 04, 2022
  8. Apr 20, 2022
  9. Mar 30, 2022
  10. Feb 22, 2022
  11. Jan 21, 2022
    • Niklas Adolfsson's avatar
      feat(client): support request id as Strings. (#659) · 708d4213
      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
      708d4213
  12. Dec 22, 2021
  13. Dec 21, 2021
    • Niklas Adolfsson's avatar
      feat: server configurable subscriptionID (#604) · bc688cc2
      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: default avatarDavid Palm <[email protected]>
      bc688cc2
  14. Dec 20, 2021
    • Niklas Adolfsson's avatar
      extract async client abstraction. (#580) · 292bd88a
      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: default avatarDavid <[email protected]>
      
      * Update client/core-client/src/lib.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * cargo fmt
      
      * Update client/ws-client/src/lib.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update client/ws-client/src/lib.rs
      
      Co-authored-by: default avatarDavid <[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: default avatarDavid <[email protected]>
      292bd88a
  15. Dec 17, 2021
    • Maciej Hirsz's avatar
      Crate restructuring (#590) · e159c449
      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: default avatarNiklas Adolfsson <[email protected]>
      
      * fmt
      
      * Feature gate the Client trait
      
      * Move `Client` traits to `client` module
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      e159c449
  16. Dec 15, 2021
    • Niklas Adolfsson's avatar
      refactor `SubscriptionClosed` (#612) · c480d90a
      Niklas Adolfsson authored
      
      
      * refactor `SubscriptionClosed`
      
      I noticed that we "trying" to sending "close messages" on subscriptions
      that already has been terminated by the client which is unnecessary.
      
      Moreover, this introduces `fn is_closed` to check whether a given
      channel is closed without having to send an actual message on the channel.
      
      * cargo fmt
      
      * Update types/src/error.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * fix nits
      
      * more grumbles
      
      * make rust stable happy
      
      * SubscriptionClosed: add deny unknown fields
      
      Co-authored-by: default avatarDavid <[email protected]>
      c480d90a
  17. Dec 10, 2021
  18. Dec 06, 2021
  19. Dec 01, 2021
    • Maciej Hirsz's avatar
      Middleware for metrics (#576) · 1657e26b
      Maciej Hirsz authored
      
      
      * Squashed MethodSink
      
      * Middleware WIP
      
      * Passing all the information through
      
      * Unnecessary `false`
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarDavid <[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: default avatarMaciej Hirsz <[email protected]>
      
      * Update ws-server/src/server.rs
      
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      
      * Update ws-server/src/server.rs
      
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      
      Co-authored-by: default avatarMaciej 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: default avatarMaciej Hirsz <[email protected]>
      
      * Update examples/Cargo.toml
      
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      
      Co-authored-by: default avatarMaciej 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: default avatarDavid <[email protected]>
      1657e26b
  20. Nov 30, 2021
  21. Nov 25, 2021
  22. Nov 18, 2021
  23. Nov 17, 2021
  24. Nov 11, 2021
  25. Nov 05, 2021
  26. Oct 29, 2021
  27. Oct 15, 2021
  28. Oct 11, 2021
    • Niklas Adolfsson's avatar
      remove `ParamsSer::NoParams` (#501) · b3e4297b
      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
      b3e4297b
    • Niklas Adolfsson's avatar
      improve SubscriptionClosed error (#504) · 36bdb85e
      Niklas Adolfsson authored
      Closing #485
      36bdb85e
    • Maciej Hirsz's avatar
      Resource Limiting (#500) · 518a6155
      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: default avatarDavid <[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: default avatarNiklas Adolfsson <[email protected]>
      
      * syn-up all the things, handle resources on methods
      
      Co-authored-by: default avatarNiklas 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: default avatarDavid <[email protected]>
      Co-authored-by: default avatarNiklas 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: default avatarDavid <[email protected]>
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      518a6155
  29. Sep 30, 2021
  30. Sep 16, 2021
  31. Sep 15, 2021
    • David's avatar
      Rename and reorg types (#462) · 635142e3
      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
      635142e3
  32. Sep 14, 2021
    • David's avatar
      Propagate cause of `InvalidParams` (#463) · b16568b4
      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: default avatarNiklas 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: default avatarMaciej Hirsz <[email protected]>
      
      * Mention needing jsonrpsee crate in scope
      
      * Resolve todo
      
      * Impl ToRpcParams for 0-sized array
      
      * optimized logging
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      b16568b4
  33. Sep 13, 2021
  34. Sep 11, 2021
  35. Sep 01, 2021
    • Niklas Adolfsson's avatar
      Make it possible to treat empty JSON response as no params (#446) · bf211cb2
      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: default avatarDavid <[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: default avatarDavid <[email protected]>
      bf211cb2