-
Notifications
You must be signed in to change notification settings - Fork 814
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
Delayed RPC Send Using Tokens #5923
Open
ackintosh
wants to merge
81
commits into
sigp:unstable
Choose a base branch
from
ackintosh:delayed-rpc-response
base: unstable
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,029
−185
Open
Changes from 74 commits
Commits
Show all changes
81 commits
Select commit
Hold shift + click to select a range
0154359
trickle responses
ackintosh d5fe64e
pruning
ackintosh aab59f5
cargo fmt
ackintosh e00e679
Test that the receiver delays the responses
ackintosh 670ec96
Add doc comments
ackintosh c0ae632
Fix typo
ackintosh 7e0c630
Add inbound request size limiter
ackintosh 6322210
Merge branch 'refs/heads/unstable' into delayed-rpc-response
ackintosh 3947bf6
Fix compile error
ackintosh 933dc00
Add doc comment and rename
ackintosh b62537f
Extract a function that calculates tau and t from the quota
ackintosh 86cf8fb
unwrap
ackintosh 8fd37c5
Remove unused limiter
ackintosh 6c1015e
Restrict more than two requests from running simultaneously on the sa…
ackintosh 817ce97
Rename from self_limiter to outbound_request_limiter
ackintosh 7e42568
Fix clippy errors
ackintosh 94c2493
Merge branch 'refs/heads/unstable' into delayed-rpc-response
ackintosh 9ad4eb7
Fix import
ackintosh de9d943
Fix clippy errors
ackintosh 7adb142
Merge branch 'refs/heads/unstable' into delayed-rpc-response
ackintosh 627fd33
Merge branch 'refs/heads/unstable' into delayed-rpc-response
ackintosh b55ffca
Update request_id with AppRequestId
ackintosh 73e9879
Merge branch 'unstable' into delayed-rpc-response
ackintosh cdef58d
Update beacon_node/lighthouse_network/src/rpc/active_requests_limiter.rs
ackintosh 3190d9a
Update beacon_node/lighthouse_network/src/rpc/mod.rs
ackintosh 19fe6b0
Merge branch 'unstable' into delayed-rpc-response
ackintosh 5a9237f
Remove the RequestSizeLimiter and check if the count of requested blo…
ackintosh 4609624
Revert extracting `tau_and_t()` because no longer need to do that
ackintosh a325438
Remove Instant from the requests field
ackintosh 3b6edab
Remove unused field
ackintosh 2ab853c
Merge branch 'unstable' into delayed-rpc-response
ackintosh 2621ce8
Add DataColumnsBy***
ackintosh 51247e3
Merge branch 'unstable' into delayed-rpc-response
ackintosh 5ed47b7
Fix the mistakes made during the merge
ackintosh cbfb2ea
cargo fmt
ackintosh 9f6177d
Update beacon_node/lighthouse_network/src/rpc/active_requests_limiter.rs
ackintosh 9008d3e
Merge branch 'unstable' into delayed-rpc-response
ackintosh bd9f13c
merge unstable
ackintosh 5dbac58
Move the response limiter logic from handler to behaviour
ackintosh ae67804
Remove Mutex from response_limiter
ackintosh 4852b20
Fix clippy error
ackintosh 156565c
Add the request back to active requests if the response is not a stre…
ackintosh 0e1e58b
Add ResponseLimiter to make RPC cleaner
ackintosh cb87af0
Remove pending responses on disconnect
ackintosh 023c542
Add ConnectionId to Request
ackintosh 14ffeec
Add a comment
ackintosh 5c9e063
Return early if the request is too large
ackintosh 3c058b3
Remove ActiveRequestsLimiter
ackintosh a9a675a
Merge branch 'unstable' into delayed-rpc-response
ackintosh 5d70573
Merge branch 'unstable' into delayed-rpc-response
ackintosh 4e872a0
merge unstable
ackintosh 450326c
Tweak for readability
ackintosh 14fb84c
Merge branch 'unstable' into delayed-rpc-response
ackintosh 636224c
Limit concurrent requests on self-limiter
ackintosh f6fd85b
Make the self-limiter mandatory, and make the rate-limiter optional w…
ackintosh 95f8378
Inform the limiter that a response has been received
ackintosh 9d2b263
Remove active requests belonging to the peer that disconnected
ackintosh 2d7a679
Fix unused variable error
ackintosh b73a336
Fix clippy errors
ackintosh dfd092d
Merge branch 'unstable' into delayed-rpc-response
ackintosh 810c5de
Fix clippy errors
ackintosh d46cbe8
Update test
ackintosh 540436c
Adding a slight margin to the elapsed time check to account for poten…
ackintosh 3d39f2c
Merge branch 'unstable' into delayed-rpc-response
ackintosh 60c9900
Remove an active request when it ends with an error
ackintosh eec6b4a
Merge branch 'unstable' into delayed-rpc-response
ackintosh 9a6eb72
Merge branch 'unstable' into delayed-rpc-response
ackintosh 0d0f48d
Sync with further updates from unstable
ackintosh ce7ae4b
Sync with further updates from unstable
ackintosh cfea9d2
Remove RPC::is_request_size_too_large
ackintosh 9850bce
Merge branch 'unstable' into delayed-rpc-response
ackintosh d859dad
Merge branch 'unstable' into delayed-rpc-response
ackintosh b0ce89d
Update beacon_node/lighthouse_network/src/rpc/mod.rs
ackintosh 1f521d6
Fix a mistake when merging the unstable
ackintosh a09fc1a
Add a metric that records the time our own request remained in the se…
ackintosh 5f6485a
Add a metric that records the time our response remained in the respo…
ackintosh 14cf204
Update beacon_node/lighthouse_network/src/rpc/mod.rs
ackintosh 9b1c180
Fix indentation
ackintosh c0c4459
Fix naming according to the naming conventions
ackintosh 580f921
Add a comment and log
ackintosh a9910e4
Move the sub match to avoid the unreachable
ackintosh 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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -606,6 +606,20 @@ pub enum ResponseTermination { | |||||
LightClientUpdatesByRange, | ||||||
} | ||||||
|
||||||
impl ResponseTermination { | ||||||
pub fn protocol(&self) -> Protocol { | ||||||
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. following the naming conventions this could be
Suggested change
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. I didn't know the naming conventions. 💡 Thanks! |
||||||
match self { | ||||||
ResponseTermination::BlocksByRange => Protocol::BlocksByRange, | ||||||
ResponseTermination::BlocksByRoot => Protocol::BlocksByRoot, | ||||||
ResponseTermination::BlobsByRange => Protocol::BlobsByRange, | ||||||
ResponseTermination::BlobsByRoot => Protocol::BlobsByRoot, | ||||||
ResponseTermination::DataColumnsByRoot => Protocol::DataColumnsByRoot, | ||||||
ResponseTermination::DataColumnsByRange => Protocol::DataColumnsByRange, | ||||||
ResponseTermination::LightClientUpdatesByRange => Protocol::LightClientUpdatesByRange, | ||||||
} | ||||||
} | ||||||
} | ||||||
|
||||||
/// The structured response containing a result/code indicating success or failure | ||||||
/// and the contents of the response | ||||||
#[derive(Debug, Clone)] | ||||||
|
Oops, something went wrong.
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.
nit: this indentation is not correct right?