nimbus-eth1/fluffy/network/wire
Kim De Mey 9430619272
Remove Accumulator as network content type and add it to binary (#1267)
Portal master accumulator was removed from the network specs as a
content type shared on the network, as since the merge this is
a finite accumulator (pre-merge only).
So in this PR the accumulator gets removed as network type and
gets instead baked into the library. Building it is done by
seperate tooling (eth_data_exporter).
Because of this a lot of extra code can be removed that was
located in history_network, content_db, portal_protocol, etc.

Also removed to option to build the accumulator at start-up
of fluffy as this takes several minutes making it not viable.
It can still be loaded from a provided file however.

The ssz accumulator file is for now stored in the recently
created portal-spec-tests repository.
2022-10-17 20:38:51 +02:00
..
README.md Add Portal protocol testing docs and more (#912) 2021-12-13 14:12:51 +01:00
messages.nim StyleCheck fixes for Fluffy and lcproxy (#1220) 2022-09-10 21:00:27 +02:00
portal_protocol.nim Remove Accumulator as network content type and add it to binary (#1267) 2022-10-17 20:38:51 +02:00
portal_protocol_config.nim Change radius-config option to radius and allow also logRadius (#1100) 2022-05-23 23:23:24 +02:00
portal_stream.nim Clean up (#1197) 2022-08-22 12:23:26 +02:00

README.md

Portal Network Wire Protocol

Introduction

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

The wire 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_wire_encoding
# Build & run Portal wire protocol network test
./env.sh nim c -r ./fluffy/tests/test_portal_wire_protocol

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 fluffy-tools

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