Repository navigation
fix: bound inbound p2p work handled per network pass #7784
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
Open
brice-stacks
wants to merge
14
commits into
stacks-network:main
Choose a base branch
from
brice-stacks:fix/p2p-bound-inbound-work
base: main
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.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
36b047e
fix: bound inbound p2p work handled per network pass
brice-stacks 3d02d9d
Merge branch 'main' into fix/p2p-bound-inbound-work
brice-stacks f1a17ff
fix: enforce the pass deadline inside chat and drain dead sockets
brice-stacks 62c87cd
fix: defer socket reads on any inbox backlog
brice-stacks 2578e57
test: verify config parsing for p2p bounds
brice-stacks 4712548
refactor: use `Instant` for the inbound processing deadline
brice-stacks 8915279
refactor: pass inbound message cap and deadline together
brice-stacks b0e3503
refactor: decide whether to revisit a convo in process_p2p_conversation
brice-stacks 9fcb7b3
refactor: split off skipped conversions instead of copying them
brice-stacks 0e0ae81
fix: drain the inbox when a send to a backlogged peer fails
brice-stacks d834ac3
test: verify skipped conversations are handled in later passes
brice-stacks fa939d6
test: fix `run_drain_inbox_on_disconnect` on linux
brice-stacks f8a42c9
test: add `test_step_drain_socket_on_send_failure`
brice-stacks 95f1cb8
fix: drain socket after relay-handle flush
brice-stacks 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| New `[connection_options]` settings bound how much inbound p2p work a node does in one network pass: `max_inbound_messages_per_pass` (default `64`) caps the messages handled from any one peer, and `max_inbound_processing_ms` (default `500`) caps the time spent handling inbound messages before the node moves on to inventory sync, block downloads and StackerDB sync. Work that doesn't fit is carried over to the next pass, which starts immediately unless the node is still processing previously downloaded blocks. While a peer's leftover messages are queued, the node stops reading from that peer's socket, so a burst of messages can't overflow the inbox and drop the connection. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.