From 75393fd1c3d4fd208ae4a2f0e0a1d54937d60092 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 7 Nov 2023 13:27:23 +0100 Subject: [PATCH] cmd/devp2p: update protocol testing docs --- cmd/devp2p/README.md | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/cmd/devp2p/README.md b/cmd/devp2p/README.md index 5ca7b497a2..1b11612e0b 100644 --- a/cmd/devp2p/README.md +++ b/cmd/devp2p/README.md @@ -108,31 +108,27 @@ Start the test by running `devp2p discv5 test -listen1 127.0.0.1 -listen2 127.0. The Eth Protocol test suite is a conformance test suite for the [eth protocol][eth]. -To run the eth protocol test suite against your implementation, the node needs to be initialized as such: +To run the eth protocol test suite against your implementation, the node needs to be initialized +with our test chain. The chain files are located in `./cmd/devp2p/internal/ethtest/testdata`. -1. initialize the geth node with the `genesis.json` file contained in the `testdata` directory -2. import the `halfchain.rlp` file in the `testdata` directory -3. run geth with the following flags: -``` -geth --datadir --nodiscover --nat=none --networkid 19763 --verbosity 5 -``` +1. initialize the geth node with the `genesis.json` file +2. import blocks from `chain.rlp` +3. run the client using the resulting database. For geth, use a command like the one below: -Then, run the following command, replacing `` with the enode of the geth node: - ``` - devp2p rlpx eth-test cmd/devp2p/internal/ethtest/testdata/chain.rlp cmd/devp2p/internal/ethtest/testdata/genesis.json -``` + geth --datadir --nodiscover --nat=none --networkid 3503995874084926 --verbosity 5 + +Tests also require access to the engine API. + +The test suite can now be executed using the devp2p tool. + + devp2p rlpx eth-test \ + -chain internal/ethtest/testdata \ + -node enode://.... \ + -engineapi http://127.0.0.1:8546 \ + -jwt 0x424242424242424242424242... Repeat the above process (re-initialising the node) in order to run the Eth Protocol test suite again. -#### Eth66 Test Suite - -The Eth66 test suite is also a conformance test suite for the eth 66 protocol version specifically. -To run the eth66 protocol test suite, initialize a geth node as described above and run the following command, -replacing `` with the enode of the geth node: - - ``` - devp2p rlpx eth66-test cmd/devp2p/internal/ethtest/testdata/chain.rlp cmd/devp2p/internal/ethtest/testdata/genesis.json -``` [eth]: https://github.com/ethereum/devp2p/blob/master/caps/eth.md [dns-tutorial]: https://geth.ethereum.org/docs/developers/geth-developer/dns-discovery-setup