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 14 commits into
base: master
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 2 times, most recently from ec2a42f to 31f11c0 Compare October 4, 2024 06:36
@coot coot force-pushed the coot/random-chain-sync-time-limits branch 2 times, most recently from ec2e41d to 42e3a65 Compare October 10, 2024 06:27
Expose `connectTo` version which accepts a callback that has access to
`Mux`.  This allows to implement ones own logic for:
* starting approriate mini-protocols (one doesn't need to start all of
  them).
* implement ones own restarting policy for `mini-protocols`, without
  terminating a connection.
* added `ConnectToArgs`
* `connectToNode` and friends return the result of the first terminated
  mini-protocol (or its error)
Provide a `Channel` which can send arbitrary data.  This is useful if
one wants to test application with or without the multiplexer.  For us
this simplifies `Ouroboros.Network.Channel` module in the
`ouroboros-network-framework` package.
It is used to name various shared stm variables.
NOTE: we name them when we `runMux`, not when `newMux` is created.
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 42e3a65 to caa9259 Compare October 10, 2024 07:46
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