From f133d7ab8d77d60025a0b028d76014baf5a4d9fa Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Fri, 22 Sep 2023 12:32:43 +0200 Subject: [PATCH] fix build for `dcli` and instructions for new path (#638) `dcli` got moved and the guide is no longer accurate. Update the paths. Also, relative imports were incorret inside `dcli.nim`, and error when using Nim 2.0 compiler. --- doc/discv5.md | 10 +++++----- tools/dcli.nim | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/discv5.md b/doc/discv5.md index ccc427ad..b446111b 100644 --- a/doc/discv5.md +++ b/doc/discv5.md @@ -88,13 +88,13 @@ node, by providing its ENR. # Make sure you have the latest modules, do NOT trust nimble on this. nimble install # Build dcli -nim c -d:chronicles_log_level:trace -d:release --threads:on eth/p2p/discoveryv5/dcli +nim c -d:chronicles_log_level:trace -d:release --threads:on ./tools/dcli # See all options -./eth/p2p/discoveryv5/dcli --help +./tools/dcli --help # Ping another node -./eth/p2p/discoveryv5/dcli ping enr: +./tools/dcli ping enr: # Run discovery node -./eth/p2p/discoveryv5/dcli --log-level:debug --bootnode:enr: +./tools/dcli --log-level:debug --bootnode:enr: ``` ### Metrics @@ -102,7 +102,7 @@ To run dcli with metrics enabled provide the `metrics` flag: ```sh # Run dcli with metrics -./eth/p2p/discoveryv5/dcli --metrics --bootnode:enr: +./tools/dcli --metrics --bootnode:enr: ``` You can now see the metrics at http://localhost:8008/metrics. Or use e.g. diff --git a/tools/dcli.nim b/tools/dcli.nim index e002107b..1f311324 100644 --- a/tools/dcli.nim +++ b/tools/dcli.nim @@ -12,9 +12,9 @@ import std/[options, strutils, tables, sets], confutils, confutils/std/net, chronicles, chronicles/topics_registry, chronos, metrics, metrics/chronos_httpserver, stew/byteutils, stew/bitops2, - ./eth/keys, ./eth/net/nat, - ./eth/p2p/discoveryv5/[enr, node], - ./eth/p2p/discoveryv5/protocol as discv5_protocol + ../eth/keys, ../eth/net/nat, + ../eth/p2p/discoveryv5/[enr, node], + ../eth/p2p/discoveryv5/protocol as discv5_protocol type DiscoveryCmd* = enum