Conversation
2a4e572 to
3fce719
Compare
ouroboros-network/src/Ouroboros/Network/PeerSelection/RootPeersDNS/DNSActions.hs
Outdated
Show resolved
Hide resolved
34fd024 to
75341dc
Compare
b3f0498 to
4649b5a
Compare
37c578d to
9718a9c
Compare
coot
reviewed
Dec 13, 2024
ouroboros-network-api/src/Ouroboros/Network/PeerSelection/RelayAccessPoint.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/RootPeersDNS/DNSActions.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/RootPeersDNS/DNSActions.hs
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/RootPeersDNS/DNSActions.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/RootPeersDNS/DNSActions.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/RootPeersDNS/DNSActions.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/RootPeersDNS/DNSActions.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/RootPeersDNS/LedgerPeers.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/RootPeersDNS/LedgerPeers.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/RootPeersDNS/LedgerPeers.hs
Outdated
Show resolved
Hide resolved
b7f94f7 to
793c2d4
Compare
The lookup mechanism was enhanced with a distinct tracer, and now returns either errors, or a list of peerAddr's with TTL. The raw IP's obtained from the lookup are only traced. Use SRV ttl Don't resolve disabled services
Update JSON instances and transplant CBOR instances from RelayAccessPointCoded type, which will be removed in a followup commit, to support LedgerPeerSnapshot type for Genesis big ledger peers snapshot.
Directly leverages JSON and CBOR instances for RelayAccessPoint instead of RelayAccessPointCoded, which will be removed in a followup commit. The upshot of this change is that all domain names in the snapshot file will be keyed by 'address' instead of 'domain', but other than that there is no change to it. What we gain is less maintenance burden of those extra instances that now can be dropped.
Tests round trip encoding, modulo fully qualified domain names, which previously was the only distinct feature of the RelayAccessPointCoded type which has been removed.
Co-authored-by: coot <coot@coot.me>
Reorganizes generation of diffusion script to accomodate mock DNS SRV lookups. The generation of DNS lookup map is postponed to genDomainMapScript function, where it is convenient to create followup lookup domains for relays tagged as RelayAccessSRVDomain. So now the strategy is first to generate some relays, and then adapt the DNS lookup map for a particular set of choices. This map was previously generated in the Arbitrary instance for RelayAccessInfosWithDNS, so simultaneously with the relays, which was not optimal for the present more sequential nature needed to generate the testcase. The latter type was therefore also removed. Previous RelayAccessInfos was renamed to TestnetRelayInfos and augmented with some fields for convenience.
793c2d4 to
2662870
Compare
f925945 to
899f1df
Compare
899f1df to
0c0cfdf
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This change introduces support for DNS SRV record lookups. When a relay is associated via SRV record, a two step resolution is attempted to first identify the relevant domains from which to make a secondary lookup to obtain the final address. All lookups are early bound in the sense that only the domains with top priority (ie. with the lowest priority numeric value in the record) are considered, and afterwards a single domain is randomly sampled it is queried for the address. If the lookup fails it is not retried.
The tracing of dns lookups has been reworked. The tracing happens in the
DNSActions'sdnsLookupWithTTLfunction, and the corresponding constructors from eg.TraceLocalRootPeers(and for Public and Ledger types) have been removed. This simplifies the logic inlocalRootsPeersProvider,publicRootPeersProviderandresolveLedgerPeersfunctions since the lookup doesn't have to return additional information regarding the domain names which have been resolved, which is used in the testing framework. But the main impetus was to extend test coverage to include the lookup functionality, which previously was excluded as only a map lookup was performed by the mock. Also, the tracing of dns lookups can now be performed via a dedicated dns tracer, which must be plumbed from the top level.Checklist
Quality
Maintenance
ouroboros-networkproject.