1. Aug 03, 2022
  2. Jul 29, 2022
  3. Jul 21, 2022
    • James Wilson's avatar
      chore(release): v0.15.0 (#827) · e7dc80d0
      James Wilson authored
      * Add generate_changelog and adapt release checklist from subxt to make the process a little easier
      
      * prepare to releasse v0.15.0
      
      * release checklist tweak
      
      * fix numbers in release checklist
      
      * Add details about #820 to changelog
      v0.15.0
      e7dc80d0
  4. Jul 20, 2022
  5. Jul 06, 2022
    • Niklas Adolfsson's avatar
      middleware refactoring (#793) · 3ee635ff
      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
      3ee635ff
  6. Jun 29, 2022
  7. Jun 21, 2022
  8. Jun 14, 2022
  9. Jun 13, 2022
  10. Jun 01, 2022
  11. May 13, 2022
  12. May 11, 2022
  13. May 06, 2022
  14. May 03, 2022
  15. Apr 29, 2022
    • Niklas Adolfsson's avatar
      fix(rpc module): close subscription task when a subscription is `unsubscribed`... · 8e945de4
      Niklas Adolfsson authored
      fix(rpc module): close subscription task when a subscription is `unsubscribed` via the `unsubscribe call` (#743)
      
      * refactor: remove SubscriptionSink::inner_send
      
      * fix: close running task if unsubscribed
      
      * Update core/src/server/rpc_module.rs
      
      * Update core/src/server/rpc_module.rs
      
      * fix nits
      
      * Update core/src/server/rpc_module.rs
      
      * add test for canceling subscriptions
      
      * print subscription info; once per minute
      
      * revert closure stuff
      
      * Revert "print subscription info; once per minute"
      
      This reverts commit 366176a8
      
      .
      
      * use tokio::sync::watch instead of oneshot
      
      The receiver is clonable and it's possible to check whether the sender is still alive
      
      * Update tests/tests/helpers.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * grumbles: use unwrap in tests
      
      * add test for reuse pipe_from_stream
      
      Co-authored-by: default avatarDavid <[email protected]>
      8e945de4
  16. Apr 21, 2022
  17. Apr 20, 2022
  18. Apr 05, 2022
  19. Apr 04, 2022
  20. Apr 01, 2022
    • Niklas Adolfsson's avatar
      feat(http server): add new builder APIs `build_from_tcp` and `build_from_hyper` (#719) · 34c2fbef
      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
      34c2fbef
    • Niklas Adolfsson's avatar
      fix(client): close subscription when server sent `SubscriptionClosed` notification (#721) · f55ab3e3
      Niklas Adolfsson authored
      * fix(client): close subscription when server sent `SubscriptionClosed` notification
      
      * Update core/src/client/async_client/helpers.rs
      f55ab3e3
    • Niklas Adolfsson's avatar
      feat: add `SubscriptionSink::pipe_from_try_stream` to support streams that returns `Result` (#720) · 545ceaf6
      Niklas Adolfsson authored
      
      
      * refactor: make `pipe_from_stream` take stream of result
      
      The rationale for this is that it is more flexible for use cases when `Stream<Item = Result<T, Error>>`.
      
      Take for example `tokio_stream::Broadcast` then one would have to something like:
      
      ```rust
         let stream = BroadcastStream::new(rx).take_while(|r| future::ready(r.is_ok())).filter_map(|r| future::ready(r.ok()));
      ```
      
      Of course it's a bit awkward to return `Result` when the underlying stream can't fail but I think that's fair trade-off
      here.
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: default avatarTarik Gul <[email protected]>
      
      * pipe_from_stream: make E: Display instead of StdError
      
      * add a test
      
      * add `pipe_from_try_stream` API to support `TryStream`
      
      * Update tests/tests/integration_tests.rs
      
      * Update proc-macros/src/lib.rs
      
      Co-authored-by: default avatarTarik Gul <[email protected]>
      545ceaf6
  21. Mar 30, 2022
  22. Mar 09, 2022
  23. Feb 18, 2022
  24. Feb 03, 2022
  25. Jan 21, 2022
    • David's avatar
      Prep for releasing v0.8.0 (#664) · 7e7d3d6e
      David authored
      * Prep for releasing v0.8.0
      
      * Grumble
      v0.8.0
      7e7d3d6e
    • 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
    • David's avatar
      Add a method to RpcModule that transforms the module into a `RpcModule<()>`,... · c0f343d4
      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: default avatarMaciej Hirsz <[email protected]>
      
      Co-authored-by: default avatarMaciej Hirsz <[email protected]>
      c0f343d4
    • 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
  26. Jan 05, 2022
    • Niklas Adolfsson's avatar
      fix(http server): handle post and option HTTP requests properly. (#637) · 6f99a038
      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: default avatarJames Wilson <[email protected]>
      6f99a038
  27. Dec 22, 2021