Update README.md

This commit is contained in:
Jimmy Debe 2024-01-08 00:28:35 -05:00 committed by GitHub
parent 4fc42dfbe8
commit d55dba9769
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 10 deletions

View File

@ -2,18 +2,18 @@
## Introduction
This is the first guide in the tutorial demonstatraing how to build your own Waku node using python.
Waku provides a collection of protocols on top of libp2p to create mesage anonymity.
These guides will use the core protocols of Waku, as described in [10/WAKU2](https://rfc.vac.dev/spec/10/),
This is a tutorial demonstatraing how to build your own Waku node using python.
Waku provides a collection of protocols on top of libp2p providing messaging anonymity,.
This guide will use the core protocols of Waku v2, as described in [10/WAKU2](https://rfc.vac.dev/spec/10/),
other protocols can be added to your node after completing the tutorial.
This tutorial will focus on the Waku Relay protocol.
To start, we will implement the [11/WAKU2-RELAY](https://rfc.vac.dev/spec/11/) protocol.
## Configuration
Nodes must use configurations detailed in [11/WAKU2-RELAY](https://rfc.vac.dev/spec/11/).
Your node must use configurations detailed in [11/WAKU2-RELAY](https://rfc.vac.dev/spec/11/).
The [11/WAKU2-RELAY](https://rfc.vac.dev/spec/11/) is the most important protocol to implement,
as a Waku node should be a running a relay, as detailed (here)[].
Since this is the first
as all Waku nodes should be a running a relay.
Let's set up the basic libp2p modules that are need for a Waku Relay.
First, lets create a directory for our new project:
@ -36,19 +36,26 @@ In your new directory, download the supported py-libp2p from the github reposito
```
## Configuration
A Waku node is Publish/Subscribe which allows peers to communicate with each other.
Publish/Subscribe allows peers to join topics, within a network,
A Waku node uses Publish/Subscribe, pubsub, to allow peers to communicate with each other.
Using pubsub, peers are able to join topics, within a network,
that they are interseted in.
Once joined, they are able to send and recieve messages within the topic.
The gossipsub protocol is the Publish/Subscribe protocol used in a Waku node.
To implement gossipsub on your Waku node,
first we will import the proper packages.
``` python
# import the necessary py-libp2p
from libp2p.pubsub import pubsub
from libp2p.pubsub import gossipsub
from libp2p.peer.id import ID
class WakuNode():
def start() -> None:
```