Skip to content

Commit d3962ae

Browse files
committed
client: added dedicated dev node start commands for local client connection debugging, added networking debugging section in developer README
1 parent 708e607 commit d3962ae

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

packages/client/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,27 @@ to help contributors better understand how the project is organized.
337337

338338
## Developer
339339

340+
### Debugging
341+
342+
#### Networking
343+
344+
For debugging on networking issues two npm start scripts exist to set up two local client nodes to test networking connection flow.
345+
346+
Start a first client listening on the default port and using the default data directory with:
347+
348+
```shell
349+
DEBUG=devp2p:*,devp2p:*.* npm run client:start:dev1
350+
DEBUG=devp2p:*,devp2p:*.* npm run client:start:dev1 -- --datadir=datadir-dev1
351+
```
352+
353+
Then take the enode address from the started client instance (use `127.0.0.1` for the IP address) and start a second client with:
354+
355+
```shell
356+
DEBUG=devp2p:* npm run client:start:dev2 -- --bootnodes=enode://[NODE_ID]@127.0.0.1:30303
357+
```
358+
359+
This second client is using './datadir-dev2' for its data directory.
360+
340361
### Diagram Updates
341362

342363
To update the structure diagram files in the root folder open the `client.drawio` file in [draw.io](https://draw.io/), make your changes, and open a PR with the updated files. Export `svg` and `png` with `border` `width=20` and `transparency=false`. For `png` go to "Advanced" and select `300 DPI`.

packages/client/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"prepublishOnly": "npm run build && npm run test",
2020
"bundle": "webpack",
2121
"client:start": "ts-node bin/cli.ts",
22+
"client:start:dev1": "ts-node bin/cli.ts --discDns=false --discV4=false --bootnodes",
23+
"client:start:dev2": "ts-node bin/cli.ts --discDns=false --discV4=false --transports=rlpx --port=30304 --datadir=datadir-dev2",
2224
"coverage": "nyc npm run test && nyc report --reporter=lcov",
2325
"docs:build": "typedoc --tsconfig tsconfig.prod.json",
2426
"lint": "ethereumjs-config-lint",

0 commit comments

Comments
 (0)