1. Oct 01, 2021
  2. Sep 30, 2021
  3. Sep 29, 2021
  4. Sep 24, 2021
  5. Sep 21, 2021
  6. Sep 17, 2021
  7. Sep 16, 2021
  8. 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
    • Niklas Adolfsson's avatar
      [http server]: export acl types + remove cors_max_age (#466) · be96c56d
      Niklas Adolfsson authored
      * [http server]: export acl + kill cors_max_age
      
      * fix cors_max_age nit
      
      * fmt
      
      * remove max_cors_age
      be96c56d
  9. Sep 14, 2021
    • David's avatar
      Fix build warnings (#465) · c13f97ba
      David authored
      * Silence warning on cors_max_age
      
      * Revert change to `AccessControl`
      c13f97ba
    • 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
    • Maciej Hirsz's avatar
      Reject overflowing connection with status code 429 (#456) · bf2fff04
      Maciej Hirsz authored
      * Reject overflowing connection with status code 429
      
      * fmt
      
      * rename Handshake -> HandshakeMode for clarity; verbose test
      
      * Gracefully shutdown after rejecting to hopefully fix the errors on windows
      
      * HandshakeMode -> HandshakeResponse; tweak pending subscriptions on shutdown test
      bf2fff04
  10. Sep 13, 2021
  11. Sep 11, 2021
  12. Sep 09, 2021
  13. Sep 08, 2021
  14. Sep 01, 2021
    • Maciej Hirsz's avatar
      Tidy `StopHandle` (#425) · ffa504e2
      Maciej Hirsz authored
      
      
      * Experimental generic driver for methods
      
      * Move FutureDriver to its own module
      
      * "Infallible" sync methods + fmt
      
      * Drive all methods to completion before background_task closes
      
      * Testing a different stop handle
      
      * Added the waker for the monitors
      
      * Fix the test
      
      * Fix a possible deadlock
      
      * fmt
      
      * Explain strong_count check in StopHandle Drop impl
      
      * Clippy tweak
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * Added comment on atomicbool ordering
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      ffa504e2
    • Niklas Adolfsson's avatar
      feat: alias attribute for proc macros (#442) · 3ad1cc21
      Niklas Adolfsson authored
      
      
      * feat: alias attribute for proc macros
      
      * implement David's suggested no more unsub field
      
      * keep aliases outside namespace
      
      * revert example
      
      * fix build
      
      * Update proc-macros/src/attributes.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * grumbles: alias -> aliases
      
      * grumbles v2: alias -> aliases
      
      Co-authored-by: default avatarDavid <[email protected]>
      3ad1cc21
    • 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
  15. Aug 31, 2021
  16. Aug 27, 2021
    • Niklas Adolfsson's avatar
      [proc macros]: support generic type params (#436) · 1045c785
      Niklas Adolfsson authored
      
      
      * PoC support generic type params
      
      * more annoying example
      
      * add trait bounds for generic params in proc macros
      
      * add compile-time test for complicated trait
      
      * smarter trait bounds in proc macros
      
      * add non-working example for now
      
      * revert nits
      
      * Update examples/proc_macro.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update proc-macros/src/helpers.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * add messy code but works
      
      * cleanup
      
      * add some simple compile check in tests
      
      * fix doc link
      
      * fix doc link last time
      
      * address grumbles
      
      * docs
      
      * Update proc-macros/src/helpers.rs
      
      * Update proc-macros/src/helpers.rs
      
      * Update proc-macros/src/helpers.rs
      
      * Update proc-macros/src/helpers.rs
      
      * Update proc-macros/src/visitor.rs
      
      * fix nit: | -> ||
      
      * Update proc-macros/src/helpers.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update proc-macros/src/helpers.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update proc-macros/src/helpers.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * add issues to introduced TODOs
      
      * generics support where clause on trait
      
      * Update proc-macros/src/helpers.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update proc-macros/src/helpers.rs
      
      * address grumbles
      
      * add more docs
      
      Co-authored-by: default avatarDavid <[email protected]>
      1045c785
  17. Aug 25, 2021
  18. Aug 18, 2021
    • Niklas Adolfsson's avatar
      [proc macros] force proc macro api to return `Result` (#435) · 09abbaaa
      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
      09abbaaa
    • Maciej Hirsz's avatar
  19. Aug 17, 2021
    • Maciej Hirsz's avatar
      Concurrent polling on async methods (#424) · c69e0dd8
      Maciej Hirsz authored
      * Experimental generic driver for methods
      
      * Move FutureDriver to its own module
      
      * "Infallible" sync methods + fmt
      
      * Drive all methods to completion before background_task closes
      c69e0dd8
  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. Aug 09, 2021
  23. Aug 05, 2021
    • Niklas Adolfsson's avatar
      fix(ws client): use query part of URL. (#429) · 430dcfaf
      Niklas Adolfsson authored
      * fix(ws client): use query part of URL.
      
      Fixes #428, we didn't take that query part of the URL into account and it wasn't sent in GET request.
      
      * add log when connecting to a target
      
      * fix(grumbles): path -> path_and_query
      430dcfaf