diff --git a/CHANGELOG.md b/CHANGELOG.md index ccafc2d3bc..81501f03df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,48 @@ The format is based on [Keep a Changelog]. [Keep a Changelog]: http://keepachangelog.com/en/1.0.0/ +## [v0.20.0] - 2023-08-11 + +Another breaking release where the major changes are: +- `host filtering` has been moved to tower middleware instead of the server API. +- the clients now supports default port number such `wss://my.server.com` +- the background task for the async client has been refactored to multiplex send and read operations. + +Regarding host filtering prior to this release one had to do: + +```rust +let acl = AllowHosts::Only(vec!["http://localhost:*".into(), "http://127.0.0.1:*".into()]); +let server = ServerBuilder::default().set_host_filtering(acl).build("127.0.0.1:0").await.unwrap(); +``` + +After this release then one have to do: + +```rust +let middleware = tower::ServiceBuilder::new().layer(HostFilterLayer::new(["example.com"]).unwrap()); +let server = Server::builder().set_middleware(middleware).build("127.0.0.1:0".parse::()?).await?; +``` + +Thanks to the external contributors [@polachok](https://github.com/polachok), [@bobs4462](https://github.com/bobs4462) and [@aj3n](https://github.com/aj3n) that contributed to this release. + +### [Added] +- feat(server): add `SubscriptionMessage::new` ([#1176](https://github.com/paritytech/jsonrpsee/pull/1176)) +- feat(server): add `SubscriptionSink::connection_id` ([#1175](https://github.com/paritytech/jsonrpsee/pull/1175)) +- feat(server): add `Params::get` ([#1173](https://github.com/paritytech/jsonrpsee/pull/1173)) +- feat(server): add `PendingSubscriptionSink::connection_id` ([#1163](https://github.com/paritytech/jsonrpsee/pull/1163)) + +### [Fixed] +- fix(server): host filtering URI read authority ([#1178](https://github.com/paritytech/jsonrpsee/pull/1178)) + +### [Changed] +- refactor: make ErrorObject::borrowed accept `&str` ([#1160](https://github.com/paritytech/jsonrpsee/pull/1160)) +- refactor(client): support default port number ([#1172](https://github.com/paritytech/jsonrpsee/pull/1172)) +- refactor(server): server host filtering ([#1174](https://github.com/paritytech/jsonrpsee/pull/1174)) +- refactor(client): refactor background task ([#1145](https://github.com/paritytech/jsonrpsee/pull/1145)) +- refactor: use `RootCertStore::add_trust_anchors` ([#1165](https://github.com/paritytech/jsonrpsee/pull/1165)) +- chore(deps): update criterion v0.5 and pprof 0.12 ([#1161](https://github.com/paritytech/jsonrpsee/pull/1161)) +- chore(deps): update webpki-roots requirement from 0.24 to 0.25 ([#1158](https://github.com/paritytech/jsonrpsee/pull/1158)) +- refactor(server): move host filtering to tower middleware ([#1179](https://github.com/paritytech/jsonrpsee/pull/1179)) + ## [v0.19.0] - 2023-07-20 ### [Fixed] diff --git a/Cargo.toml b/Cargo.toml index f04dd54858..f290ac7261 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ resolver = "2" [workspace.package] authors = ["Parity Technologies ", "Pierre Krieger "] -version = "0.19.0" +version = "0.20.0" edition = "2021" rust-version = "1.64.0" license = "MIT" @@ -30,11 +30,11 @@ keywords = ["jsonrpc", "json", "http", "websocket", "WASM"] readme = "README.md" [workspace.dependencies] -jsonrpsee-types = { path = "types", version = "0.19.0" } -jsonrpsee-core = { path = "core", version = "0.19.0" } -jsonrpsee-server = { path = "server", version = "0.19.0" } -jsonrpsee-ws-client = { path = "client/ws-client", version = "0.19.0" } -jsonrpsee-http-client = { path = "client/http-client", version = "0.19.0" } -jsonrpsee-wasm-client = { path = "client/wasm-client", version = "0.19.0" } -jsonrpsee-client-transport = { path = "client/transport", version = "0.19.0" } -jsonrpsee-proc-macros = { path = "proc-macros", version = "0.19.0" } +jsonrpsee-types = { path = "types", version = "0.20.0" } +jsonrpsee-core = { path = "core", version = "0.20.0" } +jsonrpsee-server = { path = "server", version = "0.20.0" } +jsonrpsee-ws-client = { path = "client/ws-client", version = "0.20.0" } +jsonrpsee-http-client = { path = "client/http-client", version = "0.20.0" } +jsonrpsee-wasm-client = { path = "client/wasm-client", version = "0.20.0" } +jsonrpsee-client-transport = { path = "client/transport", version = "0.20.0" } +jsonrpsee-proc-macros = { path = "proc-macros", version = "0.20.0" } diff --git a/README.md b/README.md index 7ae6af1980..789e3e4962 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ![MIT](https://img.shields.io/crates/l/jsonrpsee.svg) [![CI](https://github.com/paritytech/jsonrpsee/actions/workflows/ci.yml/badge.svg)](https://github.com/paritytech/jsonrpsee/actions/workflows/ci.yml) [![Benchmarks](https://github.com/paritytech/jsonrpsee/actions/workflows/benchmarks_gitlab.yml/badge.svg)](https://github.com/paritytech/jsonrpsee/actions/workflows/benchmarks_gitlab.yml) -[![dependency status](https://deps.rs/crate/jsonrpsee/0.18.1/status.svg)](https://deps.rs/crate/jsonrpsee/0.18.1) +[![dependency status](https://deps.rs/crate/jsonrpsee/0.18.1/status.svg)](https://deps.rs/crate/jsonrpsee/0.20.0) JSON-RPC library designed for async/await in Rust.