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

feat!: libp2p #827

Merged
merged 1 commit into from
Dec 12, 2023
Merged

feat!: libp2p #827

merged 1 commit into from
Dec 12, 2023

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Dec 11, 2023

Description

Implements libp2p for tari DAN.

  • Adds streaming messaging swarm behaviour
  • Integrates Tari RPC framework and libp2p
  • Removes RTT wait for RPC session creation (client can send request immediately after handshake message without waiting for server response)
  • Implements Relay, DCUtR and hole-punching
  • Updates web UIs for validator and indexer

Motivation and Context

The current technique to facilitate inbound connections through a NAT is to use tor onion addresses. Tor latency is too high to make sense for Hotstuff consensus. Latencies in the order of 100-200ms are observed for direct hole-punched connections. This also opens up many features, such as browser-based comms (webRTC), mDNS, uPnP, UDP QUIC, and kademlia that would have required significant engineering effort.

How Has This Been Tested?

Cucumber tests and manually

What process can a PR reviewer use to test or verify this change?

Nodes should function as before. Testing within a local network is simpler as nodes will discover each other and connect automatically.

Breaking Changes

  • None
  • Requires data directory to be deleted
  • Other - Not compatible with previous node versions

Copy link

github-actions bot commented Dec 11, 2023

Test Results (CI)

185 tests  +13   185 ✔️ +13   1h 10m 29s ⏱️ - 3m 20s
  50 suites +  2       0 💤 ±  0 
    2 files   ±  0       0 ±  0 

Results for commit 13eeee9. ± Comparison against base commit 7a59c4d.

♻️ This comment has been updated with latest results.

@sdbondi sdbondi force-pushed the libp2p branch 3 times, most recently from ad3dee2 to 5495e28 Compare December 12, 2023 06:08
@stringhandler stringhandler added this pull request to the merge queue Dec 12, 2023
Merged via the queue into tari-project:development with commit 9c29995 Dec 12, 2023
@sdbondi sdbondi deleted the libp2p branch December 13, 2023 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants