-
Notifications
You must be signed in to change notification settings - Fork 273
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
Use patched ws-rs #583
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or should it be
14.3.0
? cc @ordianThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's technically a breaking change (so should be
15.0.0
) because ofpub use parity_ws as ws;
(it's also exposed in other public API):ws 0.9
andparity-ws 0.10
are two different (semver-incompatible) crates.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, seems the
ws
stuff is exposed for instance in middlewares, which for sure are used byopenethereum
(not necessarilysubstrate
though).Let's bump to
15.0.0
then.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomusdrw should I bump the version in the PR, and if so, should all crates be bumped to
15.0.0
or just thejsonrpc-ws-server
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and yes. We prefer to keep the major versions synchronized for simplicity even though there weren't any breaking changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to create a
v15.x
branch for that instead of merging it tov14.x
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think not; I think the current v15 branch has unrelated and breaking changes. If this here becomes v15, then the current v15-branch will become v16 (correct me if I'm wrong @tomusdrw).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dvdplm could you point me to the
v15
branch? I don't see it listed here https://github.com/paritytech/jsonrpc/branches/all.Or did you mean
master
? I thinkmaster
can later becomev16
if that's what you mean.