-
Notifications
You must be signed in to change notification settings - Fork 87
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
ouroboros-network changes for cardano-node-8.9.3 #4869
Merged
Merged
Conversation
This file contains 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
Order first by `remoteAddress`, then by `localAddress`.
Make `ConnectionId` use sites independent of the order of `ConnectionId` fields.
The peer-sharing protocol application should throw an exception when more peers were received than requested. Note that the outbound governor never used more peers it requested.
There's no need to pass `StdGen` to `PrunePolicy` from the `InboundGovernor` when it's more natural to get it from connection manager. This opens a possibility to use `InboundObservableState` for different purposes (and in a different way).
ccc2527
to
50f860f
Compare
karknu
reviewed
May 2, 2024
85d4396
to
9b5e916
Compare
The order of the commits is wrong. |
`PublicInboundGovernorState` extracts information directly from `InboundGovernorState` and exposes an `STM` action which allows to read it.
In the previous commit we improved error handling of threads started by the server. Now we don't need to use `Async.link` in the tests to make sure exceptions are propagated, and some the errors are not longer wrapped in `ExceptionInLinkedThread`.
In a following patch we will need the `readInboundState` to be available for creation of `PeerSelectionActions`.
A more generic name suits better since we want to use it not just for random delays.
…Peers This patch replaces `readNewInboundConnection` with `readInboundPeers`, including the monitoring action for inbound connections. In the following patch we will implement an action which is using inbound duplex peers.
This patch also update `PeerSelection` tests to cover inbound peers.
When outbound governor timeouts, we need have to update the `stdGen` available in the outbound governor, so next time it has a chance to make a different decision (known peers decisions use random selection between light peer sharing (aka inbound peers) and peer sharing).
When calculating publicRoot lookup results having only configured peers with IP addreses is not a DNS failure. Instead of a 3h TTL use 60s for IP addresses only (will be increased by backoff logic).
If we are above the credits instead of failing instantly take a look if any of the events provide us with more credits. This makes the test suite more robust incase one kind of events happens close to another kind of events. For example a burst of peersharing activity just before the node starts to look for new public roots.
Stolen from `ouroboros-consensus`.
`PeerSelectionCounters` provide now raw data in terms of sizes of active / established / known sets. Added `PeerSelectionCountersHWC` pattern synonym, which calculates sizes in terms of hot / warm / cold sets. The counters include: * public roots (excluding big ledger peers) * big ledger peers * bootstrap peers * local roots * shared peers (e.g. peers received through peer sharing) Co-authored-by: Armando Santos (@bolt12) Co-authored-by: Marcin Szamotulski (@coot)
Also export it from `Governor` module, it is useful in `cardano-node`.
`localRoots` didn't count local connections, but the targets. We don't expose other targets in EKG metrics, so there's no reason to actually include local root targets.
Since `PeerSelectionCounters` are stored in a `TVar` we don't need to cache them in `PeerSelectionState`.
Use `peerSelectionStateToCounters` to compute numbers of peers over which outbound-governor is making decisions.
Local roots are always disjoint with big ledger peers. This is ensured when we are adding new big ledger peers and when the local roots has changed, there's no need to subtract them in `EstablishedPeers.aboveTargetOther`.
PeerSelectionView is a generalisation of PeerSelectionCounters useful internally in the outbound-governor. It allows us to not duplicate the logic of computing counters separately for churn and the outbound governor, which can help us to introduce bugs.
`Ouroboros.Network.PeerSelection.Governor.Type` excluded from `check-stylish`, to preserve large export of record names in pattern synonyms.
d7c853b
to
8e0f65f
Compare
This is less misleading, especially since ex-local root peers might fall into that category, and they were never received through peer sharing.
ouroboros-network: 0.15.0.0 ouroboros-network-framework: 0.13.0.0
8e0f65f
to
02ef293
Compare
karknu
reviewed
May 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
inbound-governor
Issues / PRs related to inbound-governor
outbound-governor
Issues / PRs related to outbound-governor
peer-sharing
Issues / PRs related to peer sharing
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.
Description
Includes:
Checklist
Quality
Maintenance
ouroboros-network
project.