Skip to content

Describe peer discovery in ADR - #33

Merged
tzdybal merged 6 commits into
mainfrom
tzdybal/adr-003
Mar 31, 2021
Merged

Describe peer discovery in ADR#33
tzdybal merged 6 commits into
mainfrom
tzdybal/adr-003

Conversation

@tzdybal

Copy link
Copy Markdown
Contributor

Number 003 is selected, because 002 is proposed in #29.

Number 003 is selected, because 002 is proposed in #29.
@tzdybaltzdybal added the T:documentation Improvements or additions to documentation label Mar 29, 2021
@tzdybal
tzdybal requested review from Wondertan and liamsiMarch 29, 2021 12:08
Comment threaddocs/lazy-adr/adr-003-peer-discovery.md Outdated
Comment threaddocs/lazy-adr/adr-003-peer-discovery.md Outdated
1. There will be a set of well-known, application-agnostic seed nodes. Every optimint client will be able to connect to such node, addresses will be saved in configuration.
* This does not limit applications which can create independent networks, with separate set of seed nodes.
2. Nodes in the network will serve DHT. It will be used for active peer discovery. Client of each ORU network will be able to find other peers in this particular network.
* All nodes will cooperate on the same DHT.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* All nodes will cooperate on the same DHT.
* Nodes of different ORU chains will cooperate on the same DHT.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this incorrect? "All nodes" is rather unspecific IMO.

Comment threaddocs/lazy-adr/adr-003-peer-discovery.md Outdated
Comment on lines +21 to +23
## Alternatives
1. IPFS DHT for peer discovery.
2. Custom peer-exchange protocol.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It would be even better if we'd briefly list pros/cons for these too.

tzdybaland others added 3 commits March 29, 2021 14:58
Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>
Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>
Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>
@@ -0,0 +1,23 @@
# Peer Discovery

Libp2p provides multiple ways to discover peers (DHT, mDNS). Currently there are no plans to support mDNS (as it's limited to local networks).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note: PEx in PubSub is also a way to discover peers

* There may be some overhead for clients to handle DHT requests from other ORU networks.

## Alternatives
1. IPFS DHT for peer discovery.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We are using IPFS DHT technology already, so I think the alternative is confusing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I suggest mentioning in Proposed network architecture that we are building a fully independent DHT network and joining public IPFS's one as an alternative.

### Cons
* There may be some overhead for clients to handle DHT requests from other ORU networks.

## Alternatives

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As an alternative we can also specify discv5 from geth

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additionally, the alternative would be running an independent DHT network for each ORU

@Wondertan

Copy link
Copy Markdown
Contributor

@tzdybal, it is also worth mentioning separate PubSub network(along with doing so). Both DHT and PubSub allows setting custom protocol ID so connected nodes won't speak even running the same engine(DHT, PubSub). So basically custom protocol ID == custom network

@tzdybal
tzdybal requested review from Wondertan and liamsiMarch 30, 2021 08:01
@tzdybal

Copy link
Copy Markdown
ContributorAuthor

Thanks for comments and suggestions. Everything is addressed, please re-review.

@tzdybal
tzdybal merged commit e7de747 into mainMar 31, 2021
@liamsi
liamsi deleted the tzdybal/adr-003 branch March 31, 2021 20:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T:documentationImprovements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@tzdybal@Wondertan@liamsi