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

Refactor PeerSelection.RootPeersDNS #4625

Merged
merged 11 commits into from
Nov 16, 2023
Merged

Refactor PeerSelection.RootPeersDNS #4625

merged 11 commits into from
Nov 16, 2023

Conversation

bolt12
Copy link
Contributor

@bolt12 bolt12 commented Jul 14, 2023

  • Refactor withLedgerPeers & resolveDomainAccessPoint
    • Removes withLedgerPeers (only used in tests now)
    • withPeerSelectionActions is responsible for fetching and resolving all peers
    • Renames resolveDomainAccessPoint to resolveLedgerPeers
  • Splits Ouroboros.Network.PeerSelection.RootPeersDNS into
    • Ouroboros.Network.PeerSelection.DNS.RootPeers
    • Ouroboros.Network.PeerSelection.DNS.LocalRoots
    • Ouroboros.Network.PeerSelection.DNS.LedgerPeers
    • Ouroboros.Network.PeerSelection.DNS.DNSSemaphore

Closes #4606

@bolt12 bolt12 requested a review from coot as a code owner July 14, 2023 16:56
@bolt12 bolt12 added networking peer-sharing Issues / PRs related to peer sharing DNS Issues / PRs related to DNS and removed peer-sharing Issues / PRs related to peer sharing labels Jul 14, 2023
@bolt12 bolt12 force-pushed the bolt12/4606 branch 2 times, most recently from 9c5a794 to ea2b5e2 Compare September 4, 2023 08:42
@bolt12 bolt12 requested a review from coot September 4, 2023 08:42
Copy link
Contributor

@coot coot left a comment

Choose a reason for hiding this comment

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

Overall it looks good, but a few things needs to be addressed.

@bolt12 bolt12 requested a review from coot September 25, 2023 16:50
@bolt12 bolt12 force-pushed the bolt12/4606 branch 2 times, most recently from c775c6f to af11b3b Compare September 26, 2023 14:17
Copy link
Contributor

@coot coot left a comment

Choose a reason for hiding this comment

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

LGTM

@coot coot enabled auto-merge September 28, 2023 09:47
@bolt12 bolt12 requested a review from coot October 3, 2023 13:19
@bolt12 bolt12 linked an issue Oct 3, 2023 that may be closed by this pull request
@bolt12 bolt12 force-pushed the bolt12/4606 branch 5 times, most recently from a4873f4 to e0d61a9 Compare October 11, 2023 16:27
- Refactor `withLedgerPeers` & `resolveDomainAccessPoint`
  - Removes `withLedgerPeers` (only used in tests now)
  - `withPeerSelectionActions` is responsible for fetching and resolving
    all peers
  - Renames `resolveDomainAccessPoint` to `resolveLedgerPeers`
- Splits `Ouroboros.Network.PeerSelection.RootPeersDNS` into
  - `Ouroboros.Network.PeerSelection.DNS.RootPeers`
  - `Ouroboros.Network.PeerSelection.DNS.LocalRoots`
  - `Ouroboros.Network.PeerSelection.DNS.LedgerPeers`
  - `Ouroboros.Network.PeerSelection.DNS.DNSSemaphore`
Add no assertion failure to testnet test suite

Fix livelock test and peer seleection dodgy trace test
Also use targets from the right source of truth
@bolt12 bolt12 force-pushed the bolt12/4606 branch 3 times, most recently from bc2051c to 5480712 Compare November 15, 2023 08:53
We are hiding the `peerconn` in an existential type, so we no longer
need to map it `()`.  This saves quite a lot of memory.

This patch also removes the `Functor` instance of `PeerSelectionState`,
which is no longer needed.
Copy link
Contributor

@coot coot left a comment

Choose a reason for hiding this comment

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

LGTM

@coot coot added this pull request to the merge queue Nov 16, 2023
Merged via the queue into master with commit ae5cbd5 Nov 16, 2023
8 checks passed
@coot coot deleted the bolt12/4606 branch November 16, 2023 16:09
@coot coot mentioned this pull request Nov 16, 2023
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DNS Issues / PRs related to DNS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dodgy trace in Diffusion testnet Refactor withLedgerPeers & resolveDomainAccessPoint
2 participants