haskell-distributed / haskell-distributed/distributed-process

Relax EndPointAddress equality requirement

Open
#404 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

network-transport
Dominant language
Haskell
Stars
751
Forks
99
Avg merge
45m
Merged PRs (30d)
2

Description

There are tests which check that the address of an EndPoint is equal (as a ByteString) to the EndPointAddress which appears in events like ConnectionOpened on a peer to which it connects. I propose removing this requirement. Really we just need to ensure that connecting to the EndPointAddress given in the peer's event queue will indeed connect to the EndPoint which opened the connection. == may be sufficient for that but it's not necessary.

Some motivation: https://github.com/haskell-distributed/network-transport-tcp/pull/54 in network-transport-tcp we don't want to use the EndPointAddress reported by the peer as an identifier for a connection to it, because the peer could lie about it and thereby deny service to whoever really does have the given address. So the OS-determined host/port should factor into the EndPointAddress chosen by the contacted peer, but that can't be done because the equality constraint forces us to use the peer's reported address exactly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the tests that require an EndPoint address to equal the EndPointAddress in ConnectionOpened events, then trace how an EndPointAddress from a peer's event queue is used for connection attempts. Done means a connection reaches the EndPoint that opened it without requiring ByteString equality with the peer-reported address.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
distributed-systems, networking
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.