Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/devp2p/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ with our test chain. The chain files are located in `./cmd/devp2p/internal/ethte
--nat=none \
--networkid 3503995874084926 \
--verbosity 5 \
--authrpc.jwtsecret 0x7365637265747365637265747365637265747365637265747365637265747365
--authrpc.jwtsecret jwt.secret

Note that the tests also require access to the engine API.
The test suite can now be executed using the devp2p tool.
Expand All @@ -130,7 +130,7 @@ The test suite can now be executed using the devp2p tool.
--chain internal/ethtest/testdata \
--node enode://.... \
--engineapi http://127.0.0.1:8551 \
--jwtsecret 0x7365637265747365637265747365637265747365637265747365637265747365
--jwtsecret $(cat jwt.secret)

Repeat the above process (re-initialising the node) in order to run the Eth Protocol test suite again.

Expand Down
12 changes: 0 additions & 12 deletions cmd/devp2p/rlpxcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,6 @@ type testParams struct {

func cliTestParams(ctx *cli.Context) *testParams {
nodeStr := ctx.String(testNodeFlag.Name)
if nodeStr == "" {
exit(fmt.Errorf("missing -%s", testNodeFlag.Name))
}
node, err := parseNode(nodeStr)
if err != nil {
exit(err)
Expand All @@ -156,14 +153,5 @@ func cliTestParams(ctx *cli.Context) *testParams {
jwt: ctx.String(testNodeJWTFlag.Name),
chainDir: ctx.String(testChainDirFlag.Name),
}
if p.engineAPI == "" {
exit(fmt.Errorf("missing -%s", testNodeEngineFlag.Name))
}
if p.jwt == "" {
exit(fmt.Errorf("missing -%s", testNodeJWTFlag.Name))
}
if p.chainDir == "" {
exit(fmt.Errorf("missing -%s", testChainDirFlag.Name))
}
return &p
}
7 changes: 5 additions & 2 deletions cmd/devp2p/runtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,29 @@ var (
}

// for eth/snap tests
testChainDirFlag = &cli.StringFlag{
testChainDirFlag = &cli.PathFlag{
Name: "chain",
Usage: "Test chain directory (required)",
Category: flags.TestingCategory,
Required: true,
}
testNodeFlag = &cli.StringFlag{
Name: "node",
Usage: "Peer-to-Peer endpoint (ENR) of the test node (required)",
Category: flags.TestingCategory,
Required: true,
}
testNodeJWTFlag = &cli.StringFlag{
Name: "jwtsecret",
Usage: "JWT secret for the engine API of the test node (required)",
Category: flags.TestingCategory,
Value: "0x7365637265747365637265747365637265747365637265747365637265747365",
Required: true,
}
testNodeEngineFlag = &cli.StringFlag{
Name: "engineapi",
Usage: "Engine API endpoint of the test node (required)",
Category: flags.TestingCategory,
Required: true,
}

// These two are specific to the discovery tests.
Expand Down