1. Jun 29, 2022
  2. 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
  3. Jun 13, 2022
  4. May 03, 2022
  5. Apr 20, 2022
  6. Apr 05, 2022
  7. Jan 21, 2022
    • Niklas Adolfsson's avatar
      feat(rpc module): `stream API` for SubscriptionSink (#639) · 9bd21274
      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: default avatarDavid <[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: default avatarDavid <[email protected]>
      9bd21274
  8. 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
  9. 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
  10. Dec 06, 2021
  11. 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
  12. Nov 25, 2021
  13. Nov 11, 2021
  14. Oct 15, 2021
  15. Oct 13, 2021
  16. Sep 16, 2021
  17. 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
  18. 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
  19. Aug 25, 2021
  20. Aug 16, 2021
    • David's avatar
      Don't allocate until we know it's worth it (#420) · 326d0c91
      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
      326d0c91
  21. Aug 13, 2021
  22. Jun 07, 2021
  23. May 19, 2021
    • Niklas Adolfsson's avatar
      [types]: ID type instead of serde_json::RawValue (#325) · 4e95f436
      Niklas Adolfsson authored
      * get started
      
      * add additional test
      
      * fix nits
      
      * cargo fmt
      
      * [types]: write some tests.
      
      * [http server]: send empty response on notifs
      
      * [http server]: fix tests
      
      * [rpc module]: send subscription response
      
      * Update types/src/v2/error.rs
      
      * fix nits
      
      * cargo fmt
      
      * Update types/src/v2/params.rs
      
      * remove needless clone
      
      * remove dead code
      
      * [types]: impl PartialEq for JsonErrorObject + test
      
      * use beef::Cow
      
      * Update http-server/src/tests.rs
      4e95f436
  24. May 18, 2021
  25. May 07, 2021
  26. Apr 26, 2021
    • Niklas Adolfsson's avatar
      [types]: allow `data` field in jsonrpc error obj. (#286) · 187ee5e9
      Niklas Adolfsson authored
      * [types]: allow `data` field in jsonrpc error obj.
      
      * fmt
      
      * revert change to make fail
      
      * remove redundant test
      
      * [types]: bring back `data` and `message` in error.
      
      Basically deducing the error message from server defined error doesn't work
      and we should not strip out this information from to user which might be useful.
      
      * remove boiler plate code
      
      * [types]: impl From<ErrorCode> for JsonRpcError
      
      * address grumbles
      
      * remove more boiler plate
      187ee5e9
  27. Apr 20, 2021
    • Niklas Adolfsson's avatar
      [client] use types v2 (less alloc) (#269) · 31153ac7
      Niklas Adolfsson authored
      * rewrite me
      
      * v2
      
      * PoC works without batch request
      
      * remove `PartialEq` bounds
      
      * add naive benches types
      
      * misc
      
      * remove useless lifetime
      
      * [ws client]: move request ID generation to client
      
      * make tests compile again
      
      * [client transport]: kill leaky abstractions.
      
      * [http client transport]: minor changes in the API.
      
      * [ws client]: fix batch requests.
      
      * fix nits
      
      * [ws client]: generate two request IDs for subscrib
      
      * fix tests
      
      * remove unused types + less alloc for params.
      
      * fix nits
      
      * more tweaks.
      
      * remove unused code
      
      * fix more nits
      
      * remove unused legacy types
      
      * reorg types_v2 mod
      
      * port macros to new types
      
      * fix tests again; more jsonvalue
      
      * [proc macros]: bring back impl Into for params.
      
      * fix build
      
      * [proc macros]: make it work for external crates.
      
      * [types]: remove weird From<Option<T>> to impl.
      
      * cleanup again
      
      * [examples]: remove unused async-std dep
      
      * Update types/src/v2/mod.rs
      
      * [types]: remove unsed dep smallvec
      
      * rewrite me
      
      * [types]: error code impl ser/deser
      
      Manual implementation of serialize/deserialize to get rid of duplicated message string
      
      * [types v2]: re-org with explicit mods
      
      * fix faulty test
      
      * add missed files
      
      * [ws client]: req_manager reserve unsubscribe slot.
      
      * simplify test code
      
      * add tracking issue for TODO
      
      * remove unused deps
      31153ac7
  28. Apr 16, 2021
  29. Apr 12, 2021
  30. Apr 01, 2021
    • Niklas Adolfsson's avatar
      HTTP server refactor (#253) · 49899740
      Niklas Adolfsson authored
      * refactor benches
      
      * start
      
      * fix build: enable `raw value` feature serde_json
      
      * start
      
      * port it
      
      * make tests compile
      
      * fix bench
      
      * fix bench
      
      * introduce builder pattern
      
      * tweaks
      
      * remove unused code
      
      * cleanup
      
      * [http server]: configure tcp socket manually.
      
      The major reason is to provide a uniform API with the WebSocket server to return the local address.
      
      * remove unused deps
      
      * [examples]: remove needless sleep
      
      * chore: add docs and refactor noise.
      
      * Update types/src/jsonrpc/error.rs
      
      * http server use constants
      49899740