Skip to content

Commit 809125b

Browse files
committed
client: added local geth connection instructions to developer debug section in README
1 parent 0959546 commit 809125b

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

packages/client/README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,9 @@ to help contributors better understand how the project is organized.
341341

342342
#### Networking
343343

344-
For debugging on networking issues two npm start scripts exist to set up two local client nodes to test networking connection flow.
344+
##### Local Connection: EthereumJS <- EthereumJS
345+
346+
For debugging on networking issues there are two custom npm start scripts with appropriate settings.
345347

346348
Start a first client listening on the default port and using the default data directory with:
347349

@@ -353,11 +355,43 @@ DEBUG=devp2p:* npm run client:start:dev1 -- --datadir=datadir-dev1
353355
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:
354356

355357
```shell
356-
DEBUG=devp2p:* npm run client:start:dev2 -- --bootnodes=enode://[NODE_ID]@127.0.0.1:30303
358+
DEBUG=devp2p:* npm run client:start:dev2 -- --bootnodes=enode://[DEV1_NODE_ID]@127.0.0.1:30303
357359
```
358360

359361
This second client is using './datadir-dev2' for its data directory.
360362

363+
##### Local Connection: EthereumJS <- Geth
364+
365+
To connect Geth to a running EthereumJS instance start a client with:
366+
367+
```shell
368+
DEBUG=devp2p:* npm run client:start:dev1
369+
```
370+
371+
Then connect with your Geth instance via:
372+
373+
```shell
374+
geth --maxpeers=1 --bootnodes=enode://[DEV1_NODE_ID]@127.0.0.1:30303
375+
```
376+
377+
Depending on your use case you might want to turn off your internet connection to not allow further incoming connections on your Geth instance in case the EthereumJS connection gets disconnected.
378+
379+
##### Local Connection: Geth <- EthereumJS
380+
381+
Start your Geth instance:
382+
383+
```shell
384+
geth [--syncmode=full] [--verbosity=5]
385+
```
386+
387+
Note that you might want to turn off your internet connection to limit on the Geth discovery process (setting the `--nodiscover` flag won't work since this also disallows our local client from connecting).
388+
389+
Then connect with your EthereumJS instance via:
390+
391+
```shell
392+
geth --maxpeers=1 --bootnodes=enode://[GETH_NODE_ID]@127.0.0.1:30303
393+
```
394+
361395
### Diagram Updates
362396

363397
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`.

0 commit comments

Comments
 (0)