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

Implement GossipSub as an alternative networking protocol for Algorand Nodes #5603

Open
jsgranados opened this issue Jul 24, 2023 · 0 comments
Labels
Epic new-feature-request Feature request that needs triage p2p Work related to the p2p project Team Carbon-11

Comments

@jsgranados
Copy link
Contributor

Background

One of our goals is to fully decentralize Algorand and eliminate the dependence on centralized entities in order to ensure the longevity and stability of the network. In particular, we wish to remove the centrally managed DNS infrastructure containing lists of approved trusted peers.

Problem

Our current network protocol relies on relay nodes to perform message all forwarding and serve as the facility to connect all nodes in the network. Since relays are a permissioned set of nodes, this is a source of centralization.

In order to remove this barrier to decentralization, we will gradually transition the network from requiring relays to making relays optional.

In the new set up, Algorand could have a base network that forwards messages with no need for centralized entities and provides the ability for node operators to set up their own "fast-paths" on the network with specialized relay nodes.

Solution

We will use libp2p, a networking library that provides features such as configurable multiplexed transports, message routing, peer addressing and discovery, NAT hole punching, secure channels, and block data exchange. Libp2p is currently used by IPFS, Filecoin, Polkadot, and Ethereum’s PoS consensus clients.

This will allow Algorand to gradually adopt libP2P features, begin relieving relays of their responsibilities, and transition our current network to a fully permission-less P2P network.

Project Phases

Phase 0: Optional LibP2P network implementation, disabled by default

Outcome
Nodes can be configured to be P2P nodes and begin forwarding and accepting tx traffic on the network

Definition of Done:

  • LibP2P is incorporated as a dependency to go-algorand
  • Algod has a P2P client and server configuration mode
  • Algod properly handles legacy and P2P network implementations simultaneously
  • Algorand implementation of GossipSub as a networking protocol is tested for performance and correctness

Notes:

  • Release / Implementation plan:
    • Current approach is add txtrecords to algobootsrap. Enable peerID on subset of relays
  • How to enable P2P functionality:
    • Related:
      • PeerSelector, catchup and ledger (catchpoint service) works with peerselector
      • Depending on what you want you get a specific peer class
      • Network should be able to map specific peer classes to a specific set of peers

Phase 1-N: More phases to come...

@jsgranados jsgranados added new-feature-request Feature request that needs triage Team Carbon-11 Epic labels Jul 24, 2023
@jsgranados jsgranados added the p2p Work related to the p2p project label Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic new-feature-request Feature request that needs triage p2p Work related to the p2p project Team Carbon-11
Projects
None yet
Development

No branches or pull requests

1 participant