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

Randomized ProtocolTimeLimits #4980

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

coot
Copy link
Contributor

@coot coot commented Oct 3, 2024

Description

Provide access to a pseudo random number generator for consructing
ProtocolTimeLimits. This is used for ChainSync timeout in the StNext StMustReply state.

  • chain-sync: randomised ProtocolTimeLimits
  • ouroboros-network-protocols: improved haddocks
  • ouroboros-network-protocols: improved haddocks of node-to-node protocols
  • ouroboros-network-protocols: type signatures
  • Updated CHANGELOG.md files

Depends on:

Checklist

Quality

  • Commit sequence makes sense and have useful messages, see ref.
  • New tests are added and existing tests are updated.
  • Self-reviewed the PR.

Maintenance

  • Linked an issue or added the PR to the current sprint of ouroboros-network project.
  • Added labels.
  • Updated changelog files.
  • The documentation has been properly updated, see ref.

@coot coot requested a review from a team as a code owner October 3, 2024 10:05
@coot coot linked an issue Oct 3, 2024 that may be closed by this pull request
@coot coot self-assigned this Oct 3, 2024
@coot coot force-pushed the coot/random-chain-sync-time-limits branch 5 times, most recently from 42e3a65 to caa9259 Compare October 10, 2024 07:46
@coot coot force-pushed the coot/random-chain-sync-time-limits branch from caa9259 to e5df1e6 Compare October 11, 2024 16:04
This patch adds a way to randomise `ProtocolTimeLimits` per message,
rather than per connection.   This is used in `ChainSync` to pick
a random timeout in the `MustReply` state.
* Provide kinds for some of the type variables.  This improves haddocks.
* Added export list for `PeerSharing.Codec`
* Not exporting `encodeTxSubmission2` and `decodeTxSubmission2`, they
  are not used outside of this module, and they are not used in
  `ouroboros-consensus`.
@coot coot force-pushed the coot/random-chain-sync-time-limits branch from e5df1e6 to 2dd2a19 Compare October 14, 2024 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Selection preassure for peers with long chainsync timeout.
1 participant