nimbus-eth1/fluffy/network
KonradStaniec cff5c5afc4
Update just seen on message replies (#805)
2021-08-20 16:02:29 +02:00
..
chain_history Add history messages from spec (#792) 2021-08-10 14:13:52 +02:00
state Update just seen on message replies (#805) 2021-08-20 16:02:29 +02:00
README.md Move Portal wire protocol from nim-eth to fluffy (#749) 2021-07-09 13:34:16 +02:00
portalcli.nim Move state network to separate folder (#800) 2021-08-17 10:58:40 +02:00

README.md

Portal Network Wire Protocol

Introduction

The fluffy/network directory holds a Nim implementation of the Portal Network Wire Protocol.

Both specification, at above link, and implementations are still WIP.

The protocol builds on top of the Node Discovery v5.1 protocol its talkreq and talkresp messages.

For further information on the Nim implementation of the Node Discovery v5.1 protocol check out the discv5 page.

Test suite

To run the test suite specifically for the Portal wire protocol, run following commands:

git clone git@github.com:status-im/nimbus-eth1.git
cd nimbus-eth1

# To bring the git submodules up to date
make update

# Build & run Portal wire protocol encoding test
./env.sh nim c -r ./fluffy/tests/test_portal_encoding
# Build & run Portal wire protocol network test
./env.sh nim c -r ./fluffy/tests/test_portal

portalcli

This is a small command line application that allows you to run a node running Discovery v5.1 + Portal wire protocol.

Note: Its objective is only to test the protocol wire component, not to actually serve content. This means it will always return empty lists on content requests currently. Perhaps in the future some hardcoded data could added and/or maybe some test vectors can be created in such form.

The portalcli application allows you to either run a node, or to specifically send one of the Portal message types, wait for the response, and then shut down.

Example usage

git clone git@github.com:status-im/nimbus-eth1.git
cd nimbus-eth1

# Build the fluffy tools
make tools-fluffy

# See all options
./build/portalcli --help
# Example command: Ping another node
./build/portalcli ping enr:<base64 encoding of ENR>
# Example command: Run discovery + portal node
./build/portalcli --log-level:debug --bootnode:enr:<base64 encoding of ENR>