Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use patched ws-rs #583

Merged
merged 3 commits into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords = ["jsonrpc", "json-rpc", "json", "rpc", "serde"]
license = "MIT"
name = "jsonrpc-core-client"
repository = "https://github.com/paritytech/jsonrpc"
version = "14.2.0"
version = "15.0.0"

categories = [
"asynchronous",
Expand All @@ -26,7 +26,7 @@ ipc = ["jsonrpc-client-transports/ipc"]
arbitrary_precision = ["jsonrpc-client-transports/arbitrary_precision"]

[dependencies]
jsonrpc-client-transports = { version = "14.2", path = "./transports", default-features = false }
jsonrpc-client-transports = { version = "15.0", path = "./transports", default-features = false }

[badges]
travis-ci = { repository = "paritytech/jsonrpc", branch = "master"}
12 changes: 6 additions & 6 deletions core-client/transports/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords = ["jsonrpc", "json-rpc", "json", "rpc", "serde"]
license = "MIT"
name = "jsonrpc-client-transports"
repository = "https://github.com/paritytech/jsonrpc"
version = "14.2.1"
version = "15.0.0"

categories = [
"asynchronous",
Expand Down Expand Up @@ -38,9 +38,9 @@ failure = "0.1"
futures = "0.1.26"
hyper = { version = "0.12", optional = true }
hyper-tls = { version = "0.3.2", optional = true }
jsonrpc-core = { version = "14.2", path = "../../core" }
jsonrpc-pubsub = { version = "14.2", path = "../../pubsub" }
jsonrpc-server-utils = { version = "14.2", path = "../../server-utils", optional = true }
jsonrpc-core = { version = "15.0", path = "../../core" }
jsonrpc-pubsub = { version = "15.0", path = "../../pubsub" }
jsonrpc-server-utils = { version = "15.0", path = "../../server-utils", optional = true }
log = "0.4"
parity-tokio-ipc = { version = "0.2", optional = true }
serde = { version = "1.0", features = ["derive"] }
Expand All @@ -51,8 +51,8 @@ url = "1.7"

[dev-dependencies]
assert_matches = "1.1"
jsonrpc-http-server = { version = "14.2", path = "../../http" }
jsonrpc-ipc-server = { version = "14.2", path = "../../ipc" }
jsonrpc-http-server = { version = "15.0", path = "../../http" }
jsonrpc-ipc-server = { version = "15.0", path = "../../ipc" }
lazy_static = "1.0"
env_logger = "0.7"
tokio = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords = ["jsonrpc", "json-rpc", "json", "rpc", "serde"]
license = "MIT"
name = "jsonrpc-core"
repository = "https://github.com/paritytech/jsonrpc"
version = "14.2.0"
version = "15.0.0"

categories = [
"asynchronous",
Expand Down
10 changes: 5 additions & 5 deletions derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ homepage = "https://github.com/paritytech/jsonrpc"
license = "MIT"
name = "jsonrpc-derive"
repository = "https://github.com/paritytech/jsonrpc"
version = "14.2.2"
version = "15.0.0"

[lib]
proc-macro = true
Expand All @@ -19,10 +19,10 @@ quote = "1.0.6"
proc-macro-crate = "0.1.4"

[dev-dependencies]
jsonrpc-core = { version = "14.2", path = "../core" }
jsonrpc-core-client = { version = "14.2", path = "../core-client" }
jsonrpc-pubsub = { version = "14.2", path = "../pubsub" }
jsonrpc-tcp-server = { version = "14.2", path = "../tcp" }
jsonrpc-core = { version = "15.0", path = "../core" }
jsonrpc-core-client = { version = "15.0", path = "../core-client" }
jsonrpc-pubsub = { version = "15.0", path = "../pubsub" }
jsonrpc-tcp-server = { version = "15.0", path = "../tcp" }
futures = "~0.1.6"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
6 changes: 3 additions & 3 deletions http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ keywords = ["jsonrpc", "json-rpc", "json", "rpc", "server"]
license = "MIT"
name = "jsonrpc-http-server"
repository = "https://github.com/paritytech/jsonrpc"
version = "14.2.0"
version = "15.0.0"

[dependencies]
hyper = "0.12"
jsonrpc-core = { version = "14.2", path = "../core" }
jsonrpc-server-utils = { version = "14.2", path = "../server-utils" }
jsonrpc-core = { version = "15.0", path = "../core" }
jsonrpc-server-utils = { version = "15.0", path = "../server-utils" }
log = "0.4"
net2 = "0.2"
unicase = "2.0"
Expand Down
6 changes: 3 additions & 3 deletions ipc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ homepage = "https://github.com/paritytech/jsonrpc"
license = "MIT"
name = "jsonrpc-ipc-server"
repository = "https://github.com/paritytech/jsonrpc"
version = "14.2.0"
version = "15.0.0"

[dependencies]
log = "0.4"
tokio-service = "0.1"
jsonrpc-core = { version = "14.2", path = "../core" }
jsonrpc-server-utils = { version = "14.2", path = "../server-utils" }
jsonrpc-core = { version = "15.0", path = "../core" }
jsonrpc-server-utils = { version = "15.0", path = "../server-utils" }
parity-tokio-ipc = "0.4"
parking_lot = "0.10.0"

Expand Down
6 changes: 3 additions & 3 deletions pubsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ keywords = ["jsonrpc", "json-rpc", "json", "rpc", "macros"]
license = "MIT"
name = "jsonrpc-pubsub"
repository = "https://github.com/paritytech/jsonrpc"
version = "14.2.0"
version = "15.0.0"

[dependencies]
log = "0.4"
parking_lot = "0.10.0"
jsonrpc-core = { version = "14.2", path = "../core" }
jsonrpc-core = { version = "15.0", path = "../core" }
serde = "1.0"
rand = "0.7"

[dev-dependencies]
jsonrpc-tcp-server = { version = "14.2", path = "../tcp" }
jsonrpc-tcp-server = { version = "15.0", path = "../tcp" }
futures = { version = "0.3", features = ["compat", "thread-pool"] }
lazy_static = "1.4"

Expand Down
10 changes: 5 additions & 5 deletions pubsub/more-examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name = "jsonrpc-pubsub-examples"
description = "Examples of Publish-Subscribe extension for jsonrpc."
homepage = "https://github.com/paritytech/jsonrpc"
repository = "https://github.com/paritytech/jsonrpc"
version = "14.2.0"
version = "15.0.0"
authors = ["tomusdrw <[email protected]>"]
license = "MIT"

[dependencies]
jsonrpc-core = { version = "14.2", path = "../../core" }
jsonrpc-pubsub = { version = "14.2", path = "../" }
jsonrpc-ws-server = { version = "14.2", path = "../../ws" }
jsonrpc-ipc-server = { version = "14.2", path = "../../ipc" }
jsonrpc-core = { version = "15.0", path = "../../core" }
jsonrpc-pubsub = { version = "15.0", path = "../" }
jsonrpc-ws-server = { version = "15.0", path = "../../ws" }
jsonrpc-ipc-server = { version = "15.0", path = "../../ipc" }
4 changes: 2 additions & 2 deletions server-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ keywords = ["jsonrpc", "json-rpc", "json", "rpc", "serde"]
license = "MIT"
name = "jsonrpc-server-utils"
repository = "https://github.com/paritytech/jsonrpc"
version = "14.2.0"
version = "15.0.0"

[dependencies]
bytes = "0.4"
globset = "0.4"
jsonrpc-core = { version = "14.2", path = "../core" }
jsonrpc-core = { version = "15.0", path = "../core" }
lazy_static = "1.1.0"
log = "0.4"
tokio = { version = "0.1.15" }
Expand Down
4 changes: 2 additions & 2 deletions stdio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ homepage = "https://github.com/paritytech/jsonrpc"
license = "MIT"
name = "jsonrpc-stdio-server"
repository = "https://github.com/paritytech/jsonrpc"
version = "14.2.0"
version = "15.0.0"

[dependencies]
futures = "0.1.23"
jsonrpc-core = { version = "14.2", path = "../core" }
jsonrpc-core = { version = "15.0", path = "../core" }
log = "0.4"
tokio = "0.1.7"
tokio-codec = "0.1.0"
Expand Down
6 changes: 3 additions & 3 deletions tcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ homepage = "https://github.com/paritytech/jsonrpc"
license = "MIT"
name = "jsonrpc-tcp-server"
repository = "https://github.com/paritytech/jsonrpc"
version = "14.2.0"
version = "15.0.0"

[dependencies]
log = "0.4"
parking_lot = "0.10.0"
tokio-service = "0.1"
jsonrpc-core = { version = "14.2", path = "../core" }
jsonrpc-server-utils = { version = "14.2", path = "../server-utils" }
jsonrpc-core = { version = "15.0", path = "../core" }
jsonrpc-server-utils = { version = "15.0", path = "../server-utils" }

[dev-dependencies]
lazy_static = "1.0"
Expand Down
10 changes: 5 additions & 5 deletions test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "jsonrpc-test"
description = "Simple test framework for JSON-RPC."
version = "14.2.0"
version = "15.0.0"
authors = ["Tomasz Drwięga <[email protected]>"]
license = "MIT"
homepage = "https://github.com/paritytech/jsonrpc"
Expand All @@ -10,9 +10,9 @@ documentation = "https://docs.rs/jsonrpc-test/"
edition = "2018"

[dependencies]
jsonrpc-core = { version = "14.2", path = "../core" }
jsonrpc-core-client = { version = "14.2", path = "../core-client" }
jsonrpc-pubsub = { version = "14.2", path = "../pubsub" }
jsonrpc-core = { version = "15.0", path = "../core" }
jsonrpc-core-client = { version = "15.0", path = "../core-client" }
jsonrpc-pubsub = { version = "15.0", path = "../pubsub" }
log = "0.4"
serde = "1.0"
serde_json = "1.0"
Expand All @@ -21,5 +21,5 @@ serde_json = "1.0"
arbitrary_precision = ["jsonrpc-core-client/arbitrary_precision", "serde_json/arbitrary_precision", "jsonrpc-core/arbitrary_precision"]

[dev-dependencies]
jsonrpc-derive = { version = "14.2", path = "../derive" }
jsonrpc-derive = { version = "15.0", path = "../derive" }

8 changes: 4 additions & 4 deletions ws/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ homepage = "https://github.com/paritytech/jsonrpc"
license = "MIT"
name = "jsonrpc-ws-server"
repository = "https://github.com/paritytech/jsonrpc"
version = "14.2.0"
version = "15.0.0"

[dependencies]
jsonrpc-core = { version = "14.2", path = "../core" }
jsonrpc-server-utils = { version = "14.2", path = "../server-utils" }
jsonrpc-core = { version = "15.0", path = "../core" }
jsonrpc-server-utils = { version = "15.0", path = "../server-utils" }
log = "0.4"
parking_lot = "0.10.0"
slab = "0.4"
ws = "0.9"
parity-ws = "0.10"

[badges]
travis-ci = { repository = "paritytech/jsonrpc", branch = "master"}
2 changes: 1 addition & 1 deletion ws/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use jsonrpc_server_utils as server_utils;

pub use jsonrpc_core;
pub use ws;
pub use parity_ws as ws;

#[macro_use]
extern crate log;
Expand Down
2 changes: 2 additions & 0 deletions ws/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ impl Server {
config.max_connections = max_connections;
// don't accept super large requests
config.max_fragment_size = max_payload_bytes;
config.max_in_buffer_capacity = max_payload_bytes;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially I thought that maybe it's too little, but the default 5MB for this should be more than enough for a bunch of requests.

config.max_out_buffer_capacity = max_payload_bytes;
// don't grow non-final fragments (to prevent DOS)
config.fragments_grow = false;
config.fragments_capacity = cmp::max(1, max_payload_bytes / config.fragment_size);
Expand Down