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

doc(net): Explain how we prioritise peer messages, and why it is secure #6488

Merged
merged 3 commits into from
Apr 13, 2023

Conversation

teor2345
Copy link
Contributor

Motivation

The auditors asked about a TODO about peer starvation.

Closes #6344

Complex Code or Requirements

This PR documents concurrent code. If it's unclear, please ask questions or suggest changes in the PR.

Solution

  • Explain why we want to prefer inbound messages when waiting for a request
  • Explain why we prefer cancellations and timeouts when waiting for a response

Review

This is a routine audit fix.

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
    • Does it change concurrent code, unsafe code, or consensus rules?
  • How do you know it works? Does it have tests?

@teor2345 teor2345 added A-docs Area: Documentation P-Medium ⚡ A-network Area: Network protocol updates or fixes A-concurrency Area: Async code, needs extra work to make it work properly. labels Apr 12, 2023
@teor2345 teor2345 requested a review from a team as a code owner April 12, 2023 01:58
@teor2345 teor2345 self-assigned this Apr 12, 2023
@teor2345 teor2345 requested review from upbqdn and removed request for a team April 12, 2023 01:58
@github-actions github-actions bot added the C-security Category: Security issues label Apr 12, 2023
@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Merging #6488 (25b68a7) into main (3d11a09) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6488      +/-   ##
==========================================
+ Coverage   77.80%   77.84%   +0.04%     
==========================================
  Files         304      304              
  Lines       39678    39686       +8     
==========================================
+ Hits        30870    30894      +24     
+ Misses       8808     8792      -16     

@mpguerra mpguerra mentioned this pull request Apr 12, 2023
36 tasks
Copy link
Contributor

@dconnolly dconnolly left a comment

Choose a reason for hiding this comment

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

🎉

mergify bot added a commit that referenced this pull request Apr 13, 2023
mergify bot added a commit that referenced this pull request Apr 13, 2023
@mergify mergify bot merged commit e678423 into main Apr 13, 2023
@mergify mergify bot deleted the doc-peer-starving-todo branch April 13, 2023 04:58
mergify bot added a commit that referenced this pull request Apr 13, 2023
@arya2 arya2 mentioned this pull request Apr 18, 2023
36 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-concurrency Area: Async code, needs extra work to make it work properly. A-docs Area: Documentation A-network Area: Network protocol updates or fixes C-security Category: Security issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve open Peer Starving TODO
2 participants