jsonrpsee:61656562378f10327a585ff2b23d8d885b5acccc commitshttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commits/61656562378f10327a585ff2b23d8d885b5acccc2021-01-18T10:37:11+01:00https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/61656562378f10327a585ff2b23d8d885b5accccmerge v2 to master (#180)2021-01-18T10:37:11+01:00Niklas Adolfssonniklasadolfsson1@gmail.com
* update http example
* ungeneric crate
* update dependencies
* [client]: add WebSocket client again.
* [deps]: remove needless dev dependencies
* nits: forgot to commit new files
* [ws client]: `send_text` instead of `send_binary`
This is temporary fix to work with the `server` which assumes that
`WebSocket` resonses are `text`
* chore: add a bunch of more logging
* [ws]: port tests but some are failing.
* chore: fmt
* [server API]: expose `fn local_addr` as public API.
* [tests]: make them less ugly by using `127.0.0.1:0`
* fix: a bunch of compiler warnings.
* [api]: uniform naming, `bind -> new` in transport.
* [websocket server]: reply when deserial fails
When the server receives an request with invalid JSON
`-32700, Parse error shall be returned`
* chore: fmt
* [tests]: fix remaining tests
* [websocket server]: support `binary` and `text`
* [ws server]: fix bug in subscription response.
`.await` was missing in RegisteredSubscription::send() and no responses
were actually sent which this commit fixes.
* [client API]: export `WsSubscription`
* [examples]: use `localhost` instead of `127.0.0.1`
Hostname is required when using `wss` and `127.0.0.1` is not valid hostname.
* [examples]: add subscription example.
* chore: fmt
* [ws server]: fix bug register new subscription.
Fixes newly introduced bug that causes `register_subscription` to have
side-effects even if the subscription fails.
* fmt
* more uniform logs
* [ws server]: simple subscription test.
* [ws server]: subscription tests improved.
* [tests]: extract test helpers to a separate crate (#125)
* [ws server]: don't close connection when `deserialization` fails (#131)
* [ws server]: don't close conn. when `deser` fails
* Update src/ws/transport.rs
* grumbles: prefer matching of if else.
* chore: CI warn `intra_doc_link_resolution_failure` (#139)
Since we have not updated the documentation properly it's annoying that
the entire job fails.
* chore: rustfmt.toml (#138)
* chore: add `rustfmt.toml` for formatting
* style: `cargo fmt --all` with new config
* [server raw params]: fix debug implementation (#137)
* [server]: simply raw params impl
Use debug implementation of `common::Params` instead of doing something
similar that doesn't work properly.
* [raw params]: derive `Debug` impl.
* [ws server]: parse subscription ID for unsubscription instead of hardcoding `JsonValue::Null` (#136)
* [ws server]: fix broken unsubscribe.
Try to parse the subscription ID as the first element of an Array or the `subscription`
field of an Object/Map.
If both of those fails then regard it as a error.
* fmt
* fix grumbles: remove space indentation
* fix(ws server): sub/unsubscribe to same method should generate an error (#140)
* fix(ws server): sub/unsubscribe to same method err
Subscribe and unsubscribe to the same method should generate an error, which this commit fixed.
This bug was introduced by myself in <a href="https://github.com/paritytech/jsonrpsee/commit/fc87889de2615dbb3d0cf2d91a306f016d48df2d" rel="nofollow noreferrer noopener" target="_blank">https://github.com/paritytech/jsonrpsee/commit/fc87889de2615dbb3d0cf2d91a306f016d48df2d</a>
* Update src/ws/server.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* chore: add naive benches for request/response (#142)
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/f4c2634184172564be1cba31914b37b1?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com">Niklas</a> <<a href="mailto:niklasadolfsson1@gmail.com" title="niklasadolfsson1@gmail.com">niklasadolfsson1@gmail.com</a>></span>
* fix(ws server): remove faulty debug_assert (#145)
The code assumed that `subscription id` is still in `active_subscriptions` when the
connection was dropped.
The list of subscriptions (kept in raw server) are not notified when a client dropped its
subscription/unsubscribed thus it's possible that the actual subscriptions are closed before the
entire client was dropped.
* ci(benches): cargo check on benches. (#146)
* fix(http client): implement `clone` uniform API. (#147)
* chore(deps): update `futures v0.3.7` (#148)
* chore(deps): update remaining crates (#149)
* chore(deps): update `futures v0.3.7`
* chore(deps): bump the rest of deps
* Improve HTTP client background thread (#150)
* refactor: resultify API + some crate reorg (#144)
* [ws client]: resultify API and fix subscribe.
* The commit changes the API to return `Err` when it's possible and to not ignore underlying errors.
* Fix that `fn subscribe` doesn't accept the subscription and unsubscription to be same which causes
errors in the server.
* nits: Err::SubscriptionMetod -> Err::Subscription
* refactor(client): common error type
* refactor(http client): resultify
* refactor(common): rename common -> types..
This commit renames the `common module` to `types` and tries to distinguish the types that is
directly related to the `JSON-RPC v2 specification` from others.
Somethings are a little big sloppy named as naming is hard.
Also, as bonus a removed a bunch of needless stuff in http server related to subscription.
* Update src/ws/tests.rs
* style: cargo fmt
* fix(grumble): matches -> assert(matches)
* fix(grumbles): `jsonrpc_v2` -> `jsonrpc`
* fix(nit): remove unused code.
* fix(benches): make it compile again.
* style: cargo fmt
* fix nits (#151)
* fix(ws client): send binary (1 byte less payload)
* docs(ws server): fix bad comment.
* chore: add `editorconfig` (#152)
* chore: make `debug log` less verbose. (#153)
* chore: make `debug log` less verbose.
The debug logging was just too verbose and this commit simplies it as follows:
```
DEBUG recv: {"jsonrpc":"2.0","method":"<METHOD>","params":<PARAMS>,"id":<ID>}
DEBUG send: {"jsonrpc":"2.0","result":"<RESULT>","id":<ID>}
```
* style: cargo fmt
* fix: missed logs
* [jsonrpc types]: implement Display for Request/Response (#160)
* feat(jsonrpc response/request): impl `Display`
* refactor(logging): use display impl
* use serde_json for verbosity
* [http client]: refactor with "syncronous-like" design (#156)
* experimental
* ci(benches): sync and concurrent roundtrips
Improve benchmarks to take concurrent requests into account.
* ci(benches): sync and concurrent roundtrips
Improve benchmarks to take concurrent requests into account.
* fix(nits)
* feat(http client): limit max request body size
* test(http transport): request limit test
* test(http client): add tests.
* fix typo
* fix(benches): make it compile again.
* fix(ws example): revert unintentional change.
* test(http client): subscription response on call.
* fix(cleanup)
* fix(benches): make it compile again.
* Update src/client/http/transport.rs
* fix(http client): `&str` -> `AsRef<str>`
* docs(client types): better docs for Mismatch type.
* style: `Default::default` -> `HttpConfig::default`
* fix(http client): read body size from header.
Expermential to read number of bytes from `HTTP Content Length` to pre-allocate the number of bytes and bail early
if the length is bigger than the `max_request_body size`
Need to be benched with bigger requests.
* test(raw http): enable tests to works again.
* style: cargo fmt
* benches: address grumbles
* feat(jsonrpc response/request): impl `Display`
* refactor(logging): use display impl
* fix(http client): nits.
* Update benches/benches.rs
* fix bad merge.
* chore(deps): update dependencies. (#164)
* feat(http server): configurable request body limit (#162)
* feat(http server): configurable request body limit
* refactor(crate reorg): to have shared http helpers.
* Merge client and server errors.
* Move `http_server_utils` to `utils/http`
* Minor cleanup
* fix nits
* fix(hyper helper): u64 -> u32
* Update src/utils/http/hyper_helpers.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* Update src/utils/http/hyper_helpers.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* fix: grumbles
* Update src/utils/http/hyper_helpers.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* Update src/http/server.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* ci: remove nightly (#167)
Use stabilized `broken_intra_doc_links` instead of `intra_doc_link_resolution_failure`
* fix(websocket client): drop subscriptions that can't keep up with the internal buffer size (#166)
* fix(ws client): drop subscriptions when full.
This commit changes the behavior in the `WebSocket Client` where each subscription channel is used in a non-blocking
matter until it is determined as full or disconnected. When that occurs the channel is simply dropped and when
the user `poll` the subscription it will return all sent subscriptions before it was and terminate (return None)
once it's polled one last time. Similarly as `Streams` works in Rust.
It also adds configuration for the `WebSocket Client` to configure capacity for the different internal channels to avoid
filling the buffers when it's not expected.
* tests(ws client): simple subscription test.
* fix: nits
* Update src/client/ws/client.rs
* refactor(tests): introduce integration_tests
Make the repo structure more understable w.r.t testing.
* chore(license): add missing license headers
* Update src/client/ws/client.rs
* Update src/client/ws/client.rs
* style: remove unintended spaces.
* tests: add concurrent deadlock test
Ensure that if more than the requested channel buffer capacity is exceeded it should not deadlock.
Such as spawning alot of concurrent requests, notifications or new subscriptions.
* Update src/client/ws/client.rs
* fix: review grumbles
* fix nits: `remove needless closure`
* fix: cargo fmt
* Update src/client/ws/client.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* fix more nits
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* fix(ws client): embed request id in `SubscriptionClosed` (#170)
* fix(ws client): embed request id SubscriptClosed
Fixes <a href="https://github.com/paritytech/jsonrpsee/issues/169" rel="nofollow noreferrer noopener" target="_blank">https://github.com/paritytech/jsonrpsee/issues/169</a>
* Update src/client/ws/client.rs
* Update src/client/ws/client.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* Update src/client/ws/client.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* chore(deps): bump dependencies (#172)
* [ws client]: add tests (#134)
* [test utils]: add `internal_err` and consts
[errors]: unify client/server errors
[test utils]: fake WebSocket jsonrpc server
[ws client]: export errors
[ws client]: add some basic tests
* fmt
* remove log target
* fix nits
* [ws client]: add subscription test
* revert unintendend changes.
* fmt
* [ws client]: fix panic in tests
* cleanup
* tests(ws client): test for invalid request ID.
* fix nits
* [ws client]: kill raw client (#171)
* getting started
* WIP WIP
* cleanup
* cleanup v2
* cleanup v3
* perf: use BufReader BufWriter
* fix(request manager): resultify insert API
The rationale behind this change is that the `insert_methods` takes ownership of the `send_back_oneshot`
and if the operation fails it should be propagated the frontend.
So returning the `Err(send_back_oneshot)` if it fails makes it possible.
* fix nits
* examples(ws): revert changes
* Update tests/integration_tests.rs
* nits: fix unwraps
* Update src/client/ws/manager.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* Update src/client/ws/transport.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* Update src/client/ws/client.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* fix build
* refactor: simplify `Error::InvalidRequestId`
It was hard to use when the expected id is not known.
* fix(ws client): error handling.
* fix(grumble error type): better error message.
* fix(grumble): docs `JSONRPC WebSocket transport`
* fix(ws manager): fix grumbles.
* Add better documentation
* Rename methods.
* Add `proof` to unreachable!
* fix(ws manager): fix nit in docs.
* fix(grumbles): ws client
* fix more nits
* fix compile warning: export websocket transports.
* Update src/client/ws/manager.rs
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
* deps: tokio 1.0 and hyper 0.14 (#176)
* deps: tokio 1.0 and hyper 0.14
* Update Cargo.toml
* refactor: crate re-organization with separate crates (#177)
* [ci]: feature `http` and `ws` removed.
* refactor: re-org crate with smaller crates.
* fmt
* [ci]: remove default features
Currently there are no features in the crates, so that check is not needed.
* [http client]: remove unused dependency tokio
* docs(http client): fix nits tokio 0.2 -> tokio 1.0 (#178)
* docs(http client): tokio 0.2 -> tokio 1.0
* fix: better link
* [ci]: github actions (#179)
* docs(http client): tokio 0.2 -> tokio 1.0
* [ci]: remove travis
* [ci]: add github actions.
* [ci]: fix identation nits
* [ci]: use cache for actions
* [ci]: filter to clippy
* [ci]: remove hacks
* separate action for ci and benchmarks
* [ci]: tweak to run on master branch.
* examples/subscription -> examples/ws_subscription
* force CI
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/6bed507c0085d39447171b95c515a890?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">David</a> <<a href="mailto:dvdplm@gmail.com" title="dvdplm@gmail.com">dvdplm@gmail.com</a>></span>
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:1096222+maciejhirsz@users.noreply.github.com" title="1096222+maciejhirsz@users.noreply.github.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/e6d3d799a6d38d63090033557bcc0455?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:1096222+maciejhirsz@users.noreply.github.com" title="1096222+maciejhirsz@users.noreply.github.com">Maciej Hirsz</a> <<a href="mailto:1096222+maciejhirsz@users.noreply.github.com" title="1096222+maciejhirsz@users.noreply.github.com">1096222+maciejhirsz@users.noreply.github.com</a>></span>
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:atkinschang@gmail.com" title="atkinschang@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/8f3cb6b26547553fbc38bee292319361?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:atkinschang@gmail.com" title="atkinschang@gmail.com">Atkins</a> <<a href="mailto:atkinschang@gmail.com" title="atkinschang@gmail.com">atkinschang@gmail.com</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/040c4b286ea273e0e0f05ac1363d5e9665e88dd3Update Cargo.toml (#120)2020-07-21T15:22:40+02:00Kian Paimani5588131+kianenigma@users.noreply.github.comhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/5aba7daab06facc08f310da4d73fbba1f7808b40Expose the server module (#115)2020-06-30T14:24:39+02:00Pierre Kriegerpierre.krieger1708@gmail.comhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/26a8331da7e3ebc6c73a198713a0073ab298fa91Fix bad opcode error in WebSocket server (#114)2020-06-30T13:19:26+02:00Pierre Kriegerpierre.krieger1708@gmail.comhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/cf6847db01fb6b5e4307663897804640ba4d9464Fix potential deadlock in WebSockets server (#113)2020-06-29T17:22:56+02:00Pierre Kriegerpierre.krieger1708@gmail.comhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/dc56d058b57e25010786f7ee3daf9f196674d57eAdds a ws_server function at the root, and remove some async qualifiers (#112)2020-06-29T15:46:35+02:00Pierre Kriegerpierre.krieger1708@gmail.com
* Adds a ws_server function at the root, and not some async qualifiers
* Rustfmthttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/ccae2c3b05207093e85c4e4c8704c8f8a65ed1e8Implement WebSocket server (#97)2020-06-17T11:38:11+02:00Pierre Kriegerpierre.krieger1708@gmail.com
* Implement WebSocket server
* Rustfmt
* Fix doctests
* Also pin pin-project
* Fix soketto update
* Rustfmthttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/f2e4aab2bd31b72be3393142d08b39ffa6b883d0Upgrade to the latest version of rustls and pin-project (#111)2020-06-17T10:23:29+02:00Demi Obenourdemi@parity.io
* Upgrade to the latest version of rustls
* Fix some warningshttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/eb5a38be145aa70150fd1670630732271794c484Update to soketto 0.4.0 (#110)2020-06-13T22:10:47+02:00Pierre Kriegerpierre.krieger1708@gmail.comhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/6bcb8efe3953f5882890d83bfcf1da223cf7eab0fix hot loop in HTTP client background thread (#109)2020-06-11T12:51:14+03:00Svyatoslav Nikolskysvyatonik@gmail.comhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/62da58d12321355aac76975bfedfbc3ab0fe08e3Add correct response on incorrect JSON (#100)2020-03-16T10:51:16+01:00Alexey Ivushkin33075301+Morgan-iv@users.noreply.github.com
* Add correct response on incorrect JSON
Implement correct response on requests with incorrect JSON instead of
just panic. Errors in `body_to_request` are propagated to response if
they occurred before request deserialization
* Remove imports and use :: syntax within functions
Co-Authored-By: <span data-trailer="Co-Authored-By:"><a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/dd5473f99247530063128ac6168ab24e?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com">Pierre Krieger</a> <<a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com">pierre.krieger1708@gmail.com</a>></span>
* Fix module path
* Apply cargo fmt after name resolution
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/dd5473f99247530063128ac6168ab24e?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com">Pierre Krieger</a> <<a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com">pierre.krieger1708@gmail.com</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/98b95a91e980c265f9e5b8b706783e7e931e5b20Add special enum variant for errors from user code (#101)2020-03-16T10:33:58+01:00Alexey Ivushkin33075301+Morgan-iv@users.noreply.github.com
As described in [JSON-RPC specs](<a href="https://www.jsonrpc.org/specification" rel="nofollow noreferrer noopener" target="_blank">https://www.jsonrpc.org/specification</a>),
server errors must be used only for errors from server implementation.
They can take only values from -32099 to -32000, and library users must
not use them to describe business logic errors. I separated them from
user code errors, and now users must use MethodError to describe errors
from business logichttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/a0bea41c4f37125fa742ec48b12e11cf55c592b5Deny intra_doc_link_resolution_failure on travis only (#95)2020-02-28T13:51:15+01:00Pierre Kriegerpierre.krieger1708@gmail.com
* Deny intra_doc_link_resolution_failure on travis only
* Fix nightly not installed
* Actually fix links
* Last linkhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/d5c911a45c142aa7a606932902a56371ed2ac816Makes the crate's API way more understandable (#96)2020-02-28T12:29:46+01:00Pierre Kriegerpierre.krieger1708@gmail.com
* Move common to crate root
* Move transport traits to own module
* Hide transport::client and transport::server
* Move ws and http to transport
* Typo fix
* Remove the shortcuts for raw client and servers
* Rename core to raw
* Remove commented-out code
* Fix docs of raw module
* Rustfmt
* Force inline
* Rustfmthttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/de7cbf2b7528802b6c1079de837db1d4f24561a6Merge all the crates into one (#93)2020-02-26T12:29:47+01:00Pierre Kriegerpierre.krieger1708@gmail.com
* Merge all the crates into one
* Rustfmt
* Fix examples
* Fix testshttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/f0f9d4b23ec7694f4de1a360200d9887bf31436dParse Positional Params (#94)2020-02-24T14:53:18+01:00Hernando CastanoHCastano@users.noreply.github.com
* New rpc attribute for rpc_api macro allowing methods to have positional
args.
* Fix some whitespace issues
* Make Cargo Fmt happy again
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:jim.posen@gmail.com" title="jim.posen@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/48bfca1c986ed9f869575949f053883b?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:jim.posen@gmail.com" title="jim.posen@gmail.com">Jim Posen</a> <<a href="mailto:jim.posen@gmail.com" title="jim.posen@gmail.com">jim.posen@gmail.com</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/0486b10c68423264ec159f239713460641df688dPrepare core for no_std support (#90)2020-02-19T12:24:00+01:00Pierre Kriegerpierre.krieger1708@gmail.com
* Prepare core for no_std support
* Fix missing documentation thingies
* Rustfmt
* For some reason my local rustfmt didn't pick up these changes
* Fix compilation
* Rustfmthttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/f089667f9c5a4c5e534da7c336cb5ca7db734b6aUpdate some dependencies (#92)2020-02-19T12:09:53+01:00Qinxuan Chenkoushiro.cqx@gmail.com
* Replace err-derive with thiserror
* Remove some useless dependencies
Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:koushiro.cqx@gmail.com" title="koushiro.cqx@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/43cf3ad074bd676058e15a585c837690?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:koushiro.cqx@gmail.com" title="koushiro.cqx@gmail.com">koushiro</a> <<a href="mailto:koushiro.cqx@gmail.com" title="koushiro.cqx@gmail.com">koushiro.cqx@gmail.com</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/0e2b03fbdede31eb8d988c701eb08bf13480ebaaDon't just swallow RawClient error, log it (#88)2020-01-28T13:33:30+01:00Andrew Jonesascjones@gmail.comhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/f17b12d438f33340d3183218d5b698af6e749bfcSupport websockets client TLS (#85)2020-01-20T12:46:16+01:00Andrew Jonesascjones@gmail.com
* Experiment using TLS for ws client
* Polkadot example works
* Fmt
* Support both Plain and Tls streams
* Dependencies in alphabetic order
* Use url scheme in connect to determine Plain or Tls
* Fmt
* Fix mode match
* License and docs stream.rs
* Move url parsing to ClientBuilder
* Remove commented out line, remove default port from wsshttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/20bce1b151d103a66a60ded427afe3d383903901Fix panic when dropping subscription (#87)2020-01-20T12:31:39+01:00Andrew Jonesascjones@gmail.com
* Fix panic when dropping subscription
* Remove remove active subscriptionhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/462a5562431c40084cf8cd164bcc2772f8f9e7b3Export client mod for Subscription (and Error) types (#84)2020-01-13T13:30:03+01:00Andrew Jonesascjones@gmail.com
* Export client module for Subscription and Error types
* Update polkadot example to use Client subscriptionhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/3090cd82fe0eb1cc8a529e98a8df5be032876f17Update to stable futures (#77)2020-01-09T10:56:34+01:00Andrew Jonesascjones@gmail.com
* Update to stable futures
* Fix breaking hyper and tokio changes
* Fix breaking soketto changes
* Try to fix hyper update errors
* Fix remaining hyper compilation error
* Update futures timer
* Update to tokio 0.2
* Enable basic_scheduler
* Enable logging in example
* Bind server inside runtime context
* Format code
* Return error via channel if async server bind fails
* Apply suggestions from code review
Co-Authored-By: <span data-trailer="Co-Authored-By:"><a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/dd5473f99247530063128ac6168ab24e?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com">Pierre Krieger</a> <<a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com">pierre.krieger1708@gmail.com</a>></span>
* Question mark
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/dd5473f99247530063128ac6168ab24e?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com">Pierre Krieger</a> <<a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com">pierre.krieger1708@gmail.com</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/01f57c03312f2d887995a157a011e7aa14f9a875Some adjustments for the new Client and Server structs (#81)2020-01-03T14:41:53+01:00Pierre Kriegerpierre.krieger1708@gmail.com
* local() -> local_raw() and add local()
* Add shortcuts in lib.rshttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/ba6fef6fac40f2f688816dd8d446b0ab91023c53Rename Client/Server to RawClient/Server and SharedClient/Server to Client/Se...2020-01-03T12:58:04+01:00Pierre Kriegerpierre.krieger1708@gmail.com
* Rename Client/Server -> RawClient/RawServer
* SharedClient/Server -> Client/Server
* Rename http/ws constructors
* Rustfmt
* Fix some bad renames
* Rustfmt
* More fixinghttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/68e4ef4e571f0908275833ea1bff492d2a9b91e2Add a SharedServer (#75)2020-01-03T11:46:37+01:00Pierre Kriegerpierre.krieger1708@gmail.com
* Add a SharedServer
* More work
* More work
* More work
* Make it work
* Copyright update
* Finish workhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/6df8f6b3b0e8555be92304a5352a38508ebf1486Support generic params (#78)2020-01-03T11:24:27+01:00Andrew Jonesascjones@gmail.com
* Add Deserialize type constraint on server for generic params
* Add generic type params to Tmp struct
* fmt
Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com"><img alt="default avatar" src="https://secure.gravatar.com/avatar/dd5473f99247530063128ac6168ab24e?s=32&d=identicon" class="avatar s16 avatar-inline"></a><a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com">Pierre Krieger</a> <<a href="mailto:pierre.krieger1708@gmail.com" title="pierre.krieger1708@gmail.com">pierre.krieger1708@gmail.com</a>></span>
https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/6ee64282bb9fbf5ba4167ae7d83860b572fca96fRustfmt (#79)2020-01-02T17:12:10+01:00Pierre Kriegerpierre.krieger1708@gmail.comhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/6436d27de9630241b2e91a54d4c837d363608a51Add a SharedClient (#74)2020-01-02T16:18:30+01:00Pierre Kriegerpierre.krieger1708@gmail.com
* Add a SharedClient
* More work
* More work
* More work
* Finish Sharedclient
* Fix merge conflict
* Add From implhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/3e4cf9ba52821b113bb5dd14d16cb15d75a1a19cRename RawClient/RawServer -> TransportClient/TransportServer (#73)2019-11-22T17:44:57+01:00Pierre Kriegerpierre.krieger1708@gmail.com
* RawClient -> TransportClient
* RawServer -> TransportServer
* Rustfmthttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/3451a0d0c91f7fb1b06640c45bdb5ffe89c6fe70Check rustfmt first (#69)2019-11-21T14:33:35+01:00Pierre Kriegerpierre.krieger1708@gmail.comhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/dd5f254ab8ffdfdb9445e2799a0d68c5e212a967Basic cleanup of server-utils (#71)2019-11-21T14:10:15+01:00Pierre Kriegerpierre.krieger1708@gmail.comhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/ae34de4acf8f777154971f66098898aba03fa278Add ClientActiveSubscription::is_closing (#68)2019-11-21T13:49:50+01:00Pierre Kriegerpierre.krieger1708@gmail.com
* Add ClientActiveSubscription::is_closing
* Rustfmthttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/40397abe72cfd81f1154eb34cdeb1fd6b5666963Allow closing a subscription from the client side (#66)2019-11-19T11:24:57+01:00Pierre Kriegerpierre.krieger1708@gmail.com
* Allow closing a subscription from the client side
* Rustfmthttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/67e448799a9f0e15b5464605bd448f8510c526aaFix bug with rpc attr on RPC API definition. (#64)2019-11-18T14:54:19+01:00Jim Posenjim.posen@gmail.com
Fixes #26.https://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/78ce41f842a869bfcf3409dcc61732ebdab00cd1Apply Rustfmt and add a CI check (#63)2019-11-18T13:14:03+01:00Pierre Kriegerpierre.krieger1708@gmail.com
* Apply Rustfmt and add a CI check
* Install rustfmthttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/42377c466b9e0e30376be2fd905965915d278164Add missing LICENSE to server-utils and bump to 1.0.0 (#62)2019-11-18T11:40:52+01:00Pierre Kriegerpierre.krieger1708@gmail.comhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/51fa678252a6924e2172e461c0fad71331bdedcbUse iterators for the closed and ready subscriptions (#57)2019-11-18T11:24:02+01:00Pierre Kriegerpierre.krieger1708@gmail.comhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/95ab173027de15f3a53de206d61e9cb4b76dfb35Access control (#31)2019-11-18T11:16:13+01:00dpmkl524935+dpmkl@users.noreply.github.com
* Add initial acl implementation
* Implemented access control with utilities from paritytech::jsonrpc
* Incorrect if
* Make allowed_hosts an enum
* Handling CORS in process_request
* Build for AccessControl and naming coherence
* "clean up your room! clean up your room ! that's all i ever hear..."
- preflight requests
- test and bench
- wasm for yew
* Add basic acl tests for 'host'
* Remove 'macro_use'
* Apply rustfmt to server-utils
* Apply rustfmt to http
* Bump lazy_static dependencyhttps://gitlab.parity.io/parity/mirrors/jsonrpsee/-/commit/e7e64be1da5274fa53891c1a6cb402c051083a96Try make CI pass again (#61)2019-11-18T11:06:24+01:00Pierre Kriegerpierre.krieger1708@gmail.com
* Try make CI pass again
* Use stable Rust