IntersectMBO / IntersectMBO/ouroboros-network
Extend `Ouroboros.Network.ConnectionManager.Types.AddressType` to support Unix sockets/named pipes
- Dominant language
- Haskell
- Stars
- 296
- Forks
- 104
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 4
Description
In https://github.com/input-output-hk/ouroboros-network/pull/4660#discussion_r1312923848, @coot suggested the following:
> I think we should extend `AddressType` to also cover `UnixSocket` / `NamedPipes` which we do support, e.g.
> ```hs
> data AddressType = IPv4Address | IPv6Address | LocalAddress
> ```
> Then we can make `socketAddressType :: SockAddr -> AddressType` a total function. For local connection manager `cmAddressType = const LocalAddress` better express the intend than `const Nothing`. This way `cmAddressType,diNtnAddressType :: addr -> AddressType`.
As I mentioned in response to that, one impact of that change would be new partialities at instance definitions for `GlobalAddressScheme` (e.g. [`Test.Ouroboros.Network.Diffusion.Node.NodeKernel`](https://github.com/input-output-hk/ouroboros-network/blob/cdd54f98c6743f5fd7bfe0d5a9d0b0f8a4a10b73/ouroboros-network/sim-tests/Test/Ouroboros/Network/Diffusion/Node/NodeKernel.hs#L126-L134)). Because of this and other potential impacts, I've opened this issue to discuss this further.
Contributor guide
Assessment
This issue has not been assessed yet.