A distributed p2p network with gossipsub and kademlia DHT implemented using rust-libp2p.
Implements a gossipsub network with kademlia DHT, and mDNS for peer discovery. The network can have n number of nodes running locally in different terminals. Each node can propagate messages to all other nodes in the network, and is subscribed to a topic ("transaction"). This network implementation is to demonstrate the use of gossipsub and kademlia DHT in a p2p network to propagating transactions data across the network.
- Clone the repository
git clone https://github.com/SAMAD101/chain-gossip.git- Change directory to the project root
cd chain-gossip- Run in multiple terminals to simulate a network of nodes
cargo runNew peers are automatically discovered and connected to the network using mDNS.
Terminate a node by pressing Ctrl+c in the terminal.
chain-gossip.webm
This simple project explores the applicatgion of libp2p in building decentralized networks which can be used in context of blockchain networks.