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

bitswap(messagequeue): Expose DONT_HAVE timeout knobs #701

Open
Wondertan opened this issue Oct 24, 2024 · 1 comment · May be fixed by #703
Open

bitswap(messagequeue): Expose DONT_HAVE timeout knobs #701

Wondertan opened this issue Oct 24, 2024 · 1 comment · May be fixed by #703
Labels
need/triage Needs initial labeling and prioritization

Comments

@Wondertan
Copy link
Member

Context

Don't have timeout is an important security feature that prevents malicious peers from never responding with DONT_HAVE. If a peer we sent WANT_BLOCK never responds, a Bitswap session stalls and does not re-request other peers. This mechanism has a bunch of configuration parameters .

Request

Expose those parameters for protocol-specific fine tuning. The defaults timeout too quickly, sometimes causing:

  • Duplclicate requests
    • A asked B for Cid -> A timed out waiting for Cid and asked C -> B kept processing requests, and with C now -> A received two responses.
  • Peers eviction from session. Once 64 DONT_HAVE received, the peer is dropped, even tho the peer is healthy.
@Wondertan Wondertan added the need/triage Needs initial labeling and prioritization label Oct 24, 2024
@Wondertan
Copy link
Member Author

(I will propose a PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant