You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My previous PR introduced a regression, as `--port` was only respected for the TCP port, but not the discovery port.
Also I noticed that `--port6` was not correctly set at all.
Ensure that:
- ports are set as in Go-SSV when `--port` is not specified.
- if only `--port` is specified, that is used for both TCP and discovery UDP.
- if `--discovery-port` is specified, that value is used for discovery UDP regardless of whether `--port` is specified.
- `--port6` is respected
Copy file name to clipboardExpand all lines: anchor/client/src/cli.rs
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -257,13 +257,12 @@ pub struct Node {
257
257
long,
258
258
value_name = "PORT",
259
259
help = "The TCP/UDP ports to listen on. There are two UDP ports. \
260
-
The discovery UDP port will be set to this value and the Quic UDP port will be set to this value + 1. The discovery port can be modified by the \
260
+
The discovery UDP and TCP port will be set to this value. The Quic UDP port will be set to this value + 1. The discovery port can be modified by the \
261
261
--discovery-port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port flag \
262
-
will apply to the IPv4 address and --port6 to the IPv6 address.",
263
-
default_value = "13001",
262
+
will apply to the IPv4 address and --port6 to the IPv6 address. If this flag is not set, the default values will be 12001 for discovery and 13001 for TCP.",
264
263
action = ArgAction::Set,
265
264
)]
266
-
pubport:u16,
265
+
pubport:Option<u16>,
267
266
268
267
#[clap(
269
268
long,
@@ -277,8 +276,7 @@ pub struct Node {
277
276
#[clap(
278
277
long,
279
278
value_name = "PORT",
280
-
help = "The UDP port that discovery will listen on. Defaults to `12001`",
281
-
default_value = "12001",
279
+
help = "The UDP port that discovery will listen on. Defaults to --port if --port is explicitly specified, and `12001` otherwise.",
Copy file name to clipboardExpand all lines: book/src/running_node.md
+11-5Lines changed: 11 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
5
5
An SSV operator is a node that holds shares of validators' keys and participates in committees to perform Ethereum validation duties. The SSV network enables distributed validation where multiple operators collectively validate without any single operator having access to the complete validator key.
6
6
7
+
If you want to migrate an existing key from the Golang implementation of SSV, you can directly proceed to Step 3.
8
+
7
9
**Step 1: Generate RSA keys**
8
10
9
11
Anchor includes a key generation tool to create the RSA keys needed for operator identity:
@@ -30,23 +32,27 @@ To register an operator, follow the instructions for the official
30
32
31
33
**Step 3: Configure and run your Anchor node**
32
34
33
-
Create a directory for Anchor-related data and move the generated private key into the directory.
35
+
Create a directory for Anchor-related data and move the generated private key into the directory. By default, Anchor
36
+
uses `~/.anchor/<network>`, where `<network>` is `hoodi` or `holesky`. We use `hoodi` below:
34
37
35
38
```bash
36
-
mkdir -p ~/.anchor
39
+
mkdir -p ~/.anchor/hoodi
37
40
38
-
mv encrypted_private_key.json ~/.anchor
41
+
mv encrypted_private_key.json ~/.anchor/hoodi
39
42
```
40
43
41
44
Use the [CLI Reference](./cli.md) or `--help` to launch the node. If you use an encrypted key, you must specify the password via a password file or interactively input it when starting the node.
42
45
43
46
```bash
44
47
anchor node \
45
48
--network hoodi \
46
-
--datadir ~/.anchor \
49
+
--datadir ~/.anchor/hoodi \
47
50
--beacon-nodes http://localhost:5052 \
48
51
--execution-rpc http://localhost:8545 \
49
52
--execution-ws ws://localhost:8546 \
50
-
--metrics \
51
53
--password-file /path/to/file
52
54
```
55
+
56
+
All options used in this example (except for the `password-file`) are actually used with the default values and can therefore be omitted, or adjusted to your setup.
57
+
58
+
The Anchor node will use the same ports as used by Go-SSV unless explicitly overridden. See [Advanced Networking](./advanced_networking.md) for more information
0 commit comments