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
14 changes: 0 additions & 14 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,20 +185,6 @@ jobs:
with:
config_path: .github/spellcheck.yml
output_file: spellcheck-output.txt
# cli-check:
# name: cli-check
# needs: [check-labels]
# if: needs.check-labels.outputs.skip_ci != 'true'
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4
# - name: Get latest version of stable Rust
# uses: moonrepo/setup-rust@v1
# with:
# channel: stable
# cache-target: release
# - name: Run Makefile to trigger the bash script
# run: make cli
cargo-sort:
name: cargo-sort
needs: [check-labels]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ of the Anchor book.
## Contact

The best place to reach us in the
[#anchor](https://discord.com/channels/605577013327167508/1376460624069918720) in our [Lighthouse
[#anchor](https://discord.com/channels/605577013327167508/1376460624069918720) channel in our [Lighthouse
discord server](https://discord.gg/cyAszAh).

For security related matters, please reach out to
Expand Down
17 changes: 10 additions & 7 deletions docs/docs/pages/cli-keygen.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ anchor keygen [OPTIONS]

| Option | Description | Default |
| --- | --- | ---|
|`--output-path <PATH>` | Directory to store generated keys | Current Directory |
|`--force` | Force overwrite of existing key files | Disabled |
|`--encrypt` | Encrypt the private key | Disabled |
|`--password-file <PATH>` | Path to a file containing the key password | None |
|`--help` | Display help information | |
| `-d, --data-dir <DIR>` | Directory to store generated keys | `~/.anchor/{network}` |
| `--force` | Force overwrite of existing key files | Disabled |
| `--encrypt` | Enable password encryption (password read from terminal or `--password-file`) | Disabled |
| `--password-file <PATH>` | Path to a file containing the password to use | None |
| `--network <NETWORK>` | Network to use (mainnet, holesky, hoodi) | `hoodi` |
| `-t, --testnet-dir <DIR>` | Directory containing testnet specs | None |
| `--debug-level <DEBUG_LEVEL>` | Verbosity level for terminal logs | `INFO` |
| `-h, --help` | Display help information | |

### Examples

Expand All @@ -32,7 +35,7 @@ operator. The password must be provided via `--password-file` or interactively w
Anchor.

```bash
anchor keygen --encrypt --output-path /path/to/keys
anchor keygen --encrypt --data-dir /path/to/keys
```

Anchor will look for the key file in the default directory `~/.anchor/{network}`, or the directory specified by `--datadir`.
Anchor will look for the key file in the default directory `~/.anchor/{network}`, or the directory specified by `--data-dir`.
23 changes: 14 additions & 9 deletions docs/docs/pages/cli-keysplit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ Both subcommands share these Options
| Option | Description | Default |
| --- | --- | ---|
| `--keystore-path <PATH>` | Path to validator keystore file | Required |
| `--password <PASSWORD>` | Password for the validator keystore | Required |
| `--owner <ADDRESS>` | ETH address that owns the validator | Required |
| `--output-path <PATH>` | Path for output file | Required |
| `--operators <IDS>` | Comma-separated list of operator IDs (must be 4, 7, 10, or 13) | Required|
| `--help` | Display help information | |
| `--password-file <PATH>` | Path to a file containing the password for the validator keystore (if omitted, password will be prompted) | None |
| `--owner <ADDRESS>` | EOA address that owns the validator | Required |
| `--output-path <OUTPUT PATH>` | Path for output file | Required |
| `--operators <IDS>` | Comma-separated list of operator IDs | Required|
| `-d, --data-dir <DIR>` | Data directory for node files | `~/.anchor/{network}` |
| `--network <NETWORK>` | Network to use (mainnet, holesky, hoodi) | `hoodi` |
| `-t, --testnet-dir <DIR>` | Directory containing testnet specs | None |
| `--debug-level <DEBUG_LEVEL>` | Verbosity level for terminal logs | `INFO` |
| `-h, --help` | Display help information | |

### Manual Keysplit Subcommand

Expand All @@ -33,7 +37,7 @@ Additional Options:
| Option | Description | Default |
| --- | --- | ---|
| `--nonce <NONCE>` | Nonce for the owner address | Required |
| `--public-keys <KEYS>` | Comma-separated RSA public keys for operators | Required|
| `--public-keys <KEYS>...` | RSA public keys for the operators | Required|

### Onchain Keysplit Subcommand

Expand All @@ -54,20 +58,21 @@ Manual key splitting
```bash
anchor keysplit manual \
--keystore-path /path/to/validator_keystore.json \
--password "your_keystore_password" \
--password-file /path/to/password.txt \
--owner 0x123abc... \
--operators 1,2,3,4 \
--output-path /path/to/output.json \
--nonce 0 \
--public-keys key1,key2,key3,key4
--public-keys key1 key2 key3 key4 \
--network hoodi
```

Onchain key splitting

```bash
anchor keysplit onchain \
--keystore-path /path/to/validator_keystore.json \
--password "your_keystore_password" \
--password-file /path/to/password.txt \
--owner 0x123abc... \
--operators 1,2,3,4 \
--output-path /path/to/output.json \
Expand Down
54 changes: 33 additions & 21 deletions docs/docs/pages/cli-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ anchor node [OPTIONS]

| Option | Description | Default |
| --- | --- | ---|
| `--beacon-nodes <URLS>` | Comma-separated beacon node HTTP URLs | `http://localhost:5052`|
| `--execution-rpc <URLS>` | Comma-separated execution node RPC URLs | `http://localhost:8545` |
| `--execution-ws <URL>` | Execution node websocket URL | `ws://localhost:8546` |
| `--beacon-node-tls-certs <FILES>` | Certificate files for beacon node connections | None |
| `--execution-node-tls-certs <FILES>` | Certificate files for execution node connections | None |
| `--beacon-nodes <NETWORK_ADDRESSES>` | Comma-separated beacon node HTTP URLs | `http://localhost:5052`|
| `--execution-rpc <NETWORK_ADDRESSES>` | Comma-separated execution node RPC URLs | `http://localhost:8545` |
| `--execution-ws <NETWORK_ADDRESSES>` | Execution node websocket URL | `ws://localhost:8546` |
| `--beacon-nodes-tls-certs <CERTIFICATE-FILES>` | Comma-separated paths to custom TLS certificates for beacon nodes (PEM format) | None |
| `--execution-nodes-tls-certs <CERTIFICATE-FILES>` | Comma-separated paths to custom TLS certificates for execution nodes (PEM format) | None |

#### HTTP API

Expand All @@ -40,14 +40,14 @@ anchor node [OPTIONS]

| Option | Description | Default |
| --- | --- | ---|
| `--listen-address <ADDRESS>` | Network address to listen for UDP & TCP connections | `0.0.0.0` |
| `--port <PORT>` | Base port for all network connections | `13001` |
| `--port6 <PORT>` | Base port for IPv6 network connections | Same as `--port` |
| `--listen-addresses [<ADDRESS>...]` | Network addresses to listen for UDP & TCP connections (can be set multiple times for IPv4 and IPv6) | `0.0.0.0` |
| `--port <PORT>` | TCP/UDP ports for IPv4 (discovery and TCP will use this value, QUIC will use this + 1) | `12001` (discovery), `13001` (TCP) |
| `--port6 <PORT>` | TCP/UDP ports for IPv6 when listening over both IPv4 and IPv6 (QUIC will use this + 1) | Same as `--port` |
| `--discovery-port <PORT>` | UDP port for discovery | Same as `--port` if specified, otherwise `12001` |
| `--discovery-port6 <PORT>` | UDP port for IPv6 discovery | Same as `--discovery-port` |
| `--quic-port <PORT>` | UDP port for QUIC protocol | `--port` + 1 |
| `--quic-port6 <PORT>` | UDP port for IPv6 QUIC protocol | `--port6` + 1 |
| `--boot-nodes <NODES>` | Comma-separated ENRs or Multiaddrs to bootstrap the network | None|
| `--boot-nodes <BOOT_NODES>` | Comma-separated ENRs or Multiaddrs to bootstrap the network | None|
| `--enr-address <ADDRESS>` | IPv4 address to broadcast in the node's ENR | None |
| `--enr-address6 <ADDRESS>` | IPv6 address to broadcast in the node's ENR | None |
| `--enr-udp-port <PORT>` | UDP port to advertise in the node's ENR | None |
Expand All @@ -56,41 +56,53 @@ anchor node [OPTIONS]
| `--enr-udp6-port <PORT>` | IPv6 UDP port to advertise in the node's ENR | None |
| `--enr-tcp6-port <PORT>` | IPv6 TCP port to advertise in the node's ENR | None |
| `--enr-quic6-port <PORT>` | IPv6 QUIC port to advertise in the node's ENR | None |
| `--disable-enr-auto-update` | Disable discovery from automatically updating the ENR with external addresses | Disabled |
| `--subscribe-all-subnets` | Subscribe to all subnets regardless of committee membership | Disabled|

#### Security Options

| Option | Description | Default |
| --- | --- | ---|
| `--key-file <PATH>` | Path to the operator key | Detected in data dir |
| `--password-file <PATH>` | Path to a file containing the key password | None |
| `--disable-slashing-protection` | Disable slashing protection (NOT RECOMMENDED) | None |
| `--key-file <PATH>` | Path to the operator key file (`.txt` for unencrypted, `.json` for encrypted) | Detected in data dir |
| `--password-file <PATH>` | Path to a file containing the key password for decryption | None |

#### Payload Building Options

| Option | Description | Default |
| --- | --- | ---|
| `--builder-proposals` | Use external block building | Disabled |
| `--builder-boost-factor <FACTOR>` | Percentage multiplier for builder payload value | None |
| `--prefer-builder-proposals` | Always prefer builder blocks regardless of value | Disabled |
| `--builder-proposals` | Query Beacon Node for only block headers during proposals and sign over headers | Disabled |
| `--builder-boost-factor <UINT64>` | Percentage multiplier to apply to builder's payload value | None |
| `--prefer-builder-proposals` | Always prefer builder blocks regardless of payload value | Disabled |
| `--gas-limit <INTEGER>` | Gas limit for all builder proposals for all validators | `36000000` |

#### Logging Options

| Option | Description | Default |
| --- | --- | ---|
| `--debug-level <LEVEL>` | Verbosity for terminal logs | `info` |
| `--logfile-debug-level <LEVEL>` | Verbosity for file logs | `debug` |
| `--logfile-max-size <SIZE>` | Maximum size of each log file in MB | `50` |
| `--logfile-max-number <NUMBER>` | Maximum number of log files to keep | `100` |
| `--logfile-dir <DIR>` | Directory to store log files | Same as `--datadir` |
| `--debug-level <DEBUG_LEVEL>` | Verbosity for terminal logs | `INFO` |
| `--logfile-debug-level <LOGFILE_DEBUG_LEVEL>` | Verbosity for file logs | `DEBUG` |
| `--logfile-max-size <SIZE>` | Maximum size of each log file in MB (set to 0 to disable) | `50` |
| `--logfile-max-number <NUMBER>` | Maximum number of log files to keep (set to 0 to disable) | `10` |
| `--logfile-dir <DIR>` | Directory to store log files | Same as `--data-dir` |
| `--logfile-compression` | Compress old log files | Disabled |
| `--logfile-color` | Enable colors in logfile | Disabled |
| `--discv5-log-level <DISCV5_LOG_LEVEL>` | Verbosity level for discv5 dependency log file | `DEBUG` |
| `--libp2p-log-level <LIBP2P_LOG_LEVEL>` | Verbosity level for libp2p dependency log file | `DEBUG` |

#### Additional Network and Performance Options

| Option | Description | Default |
| --- | --- | ---|
| `--disable-gossipsub-peer-scoring` | Disable gossipsub peer scoring | Enabled |
| `--disable-latency-measurement-service` | Disable the latency measurement service | Enabled |
| `--enable-high-validator-count-metrics` | Enable per validator metrics for > 64 validators | Auto-enabled for ≤ 64 validators |

#### Examples

```bash
anchor node \
--network hoodi \
--datadir /data/anchor \
--data-dir /data/anchor \
--beacon-nodes https://beacon1.example.com,https://beacon2.example.com \
--execution-rpc https://execution1.example.com,https://execution2.example.com \
--execution-ws wss://execution1.example.com \
Expand Down
10 changes: 6 additions & 4 deletions docs/docs/pages/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ Where `<COMMAND>` is one of:

| Option | Description | Default |
| --- | --- |-----------------------|
| `--data-dir <DIR>` | Data directory for node files | `~/.anchor/{network}` |
| `--testnet-dir <DIR>` | Directory containing testnet specs | None |
| `--network <NETWORK>` | Network to use (Mainnet, Holesky, Hoodi) | `hoodi` |
| `--help` | Display help information | Unset |
| `-d, --data-dir <DIR>` | Data directory for node files | `~/.anchor/{network}` |
| `-t, --testnet-dir <DIR>` | Directory containing testnet specs | None |
| `--network <NETWORK>` | Network to use (mainnet, holesky, hoodi) | `hoodi` |
| `--debug-level <DEBUG_LEVEL>` | Verbosity level for terminal logs | `INFO` |
| `-h, --help` | Display help information | Unset |
| `-V, --version` | Print version information | Unset |

14 changes: 7 additions & 7 deletions docs/docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ description: A highly performant and secure SSV client written in Rust, by Sigma
written in Rust, by Sigma Prime.
</p>
<div className="hero-buttons">
<a href="/installation" className="btn btn-primary">Get Started</a>
<a href="/introduction" className="btn btn-secondary">Documentation</a>
<a href="/introduction" className="btn btn-primary">Documentation</a>
<a href="/migrate_to_anchor" className="btn btn-secondary">Migrate to Anchor</a>
<a href="https://github.com/sigp/anchor" className="btn btn-secondary">GitHub</a>
</div>

Expand Down Expand Up @@ -57,7 +57,7 @@ anchor --help

```bash [From Release]
# Specify the platform i.e aarch64-apple-darwin (for apple) x86_64-unknown-linux-gnu.tar.gz
wget https://github.com/sigp/anchor/releases/download/v0.2.0/anchor-<platform>.tar.gz
wget https://github.com/sigp/anchor/releases/download/v1.0.0-rc.1/anchor-<platform>.tar.gz
# Extract the file
tar -xvf anchor-<platform>.tar.gz
# Make it executable
Expand All @@ -74,15 +74,15 @@ chmod +x anchor
<div className="stats-section">
<div className="stats-row">
<div className="stat-item">
<div className="stat-number">46</div>
<div className="stat-number">50</div>
<div className="stat-label">Stars</div>
</div>
<div className="stat-item">
<div className="stat-number">12</div>
<div className="stat-number">14</div>
<div className="stat-label">Contributors</div>
</div>
<div className="stat-item">
<div className="stat-number">v0.2.0</div>
<div className="stat-number">v1.0.0-rc.1</div>
<div className="stat-label">Version</div>
</div>
<div className="stat-item">
Expand All @@ -104,7 +104,7 @@ chmod +x anchor
</div>
<div className="feature-card">
<h3>Differentially Fuzzed</h3>
<p>We reguarly fuzz both the Anchor and the go-ssv client for differences and security
<p>We regularly fuzz both the Anchor and the go-ssv client for differences and security
vulnerabilities</p>
</div>
</div>
Expand Down
36 changes: 18 additions & 18 deletions docs/docs/pages/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ Anchor itself is a light-weight client when run alone.
However, as Anchor needs to connect to a beacon node and an execution client, this implies that a complete setup will require
the hardware specifications equivalent to running an Ethereum node.

| Hardware | Hoodi testnet |
| Hardware | Hoodi testnet |
|--------|---------|
| CPU | AMD Ryzen, Intel Broadwell, ARMv8 or newer |
| Memory | 16 GB RAM |
| Storage | 200 GB |

Anchor can be run independently of an Ethereum beacon node and execution client, in which case the
requirements are that of a standard validator client. These are very light weight and can run on
small machines such as raspberry pi's. However, Anchor does have its own network and has minimum
bandwidth requirements of around 20MB/s.

## 1. Download the Latest Release from GitHub

1. Visit the [Anchor Releases page](https://github.com/sigp/anchor/releases).
Expand All @@ -24,14 +29,14 @@ the hardware specifications equivalent to running an Ethereum node.
### Example

```bash
# General download link format
# General download link format
# Replace <version> and <platform> with the appropriate values.
wget https://github.com/sigp/anchor/releases/download/<version>/anchor-<version>-<platform>.tar.gz
tar -xvf anchor-<version>-<platform>.tar.gz

# Specific version example
https://github.com/sigp/anchor/releases/download/v0.3.1/anchor-v0.3.1-x86_64-unknown-linux-gnu.tar.gz
tar -xvf anchor-v0.3.1-x86_64-unknown-linux-gnu.tar.gz
wget https://github.com/sigp/anchor/releases/download/v1.0.0-rc.1/anchor-v1.0.0-rc.1-x86_64-unknown-linux-gnu.tar.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am unsure if our version update script can properly replace the -rc.1, it looks like the regex is just replacing the part consisting of digits and dots?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should either put 0.0.0 so that it is obvious that this is to be replaced, or put some obvious placeholder like ##VERSION##

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah nice catch. The regex didn't include the rc versions. I've improved the regex so that it does.

That script didn't include this file however. This file had hard-coded examples. Figure might as well update this, so changed the script to include this file.

Of course with scripts like this, if the filename changes or format changes it will break. But I think the main page probably will most likely be static and if this page changes, I think its fine to have an out-of-date example.

tar -xvf anchor-v1.0.0-rc.1-x86_64-unknown-linux-gnu.tar.gz
sudo mv anchor /usr/local/bin/
```

Expand Down Expand Up @@ -59,29 +64,24 @@ anchor node --version

## 3. Clone and Build Locally

1. Clone the Anchor repository:
1. Clone the Anchor repository and build the binary:

```bash
git clone https://github.com/sigp/anchor.git
cd anchor
make
```

2. Build the Anchor binary:

```bash
cargo build --release
```

The binary will be located in `./target/release/`.
The binary should be installed at `~/.cargo/bin`.

3. Move the binary to a location in your `PATH`:
2. If `~/.cargo/bin` is not in your `PATH` add it:

```bash
sudo mv target/release/anchor /usr/local/bin/
export PATH=$HOME/.cargo/bin:$PATH
```

Verify the installation:
3. Verify the installation:

```bash
anchor node --version
```
```bash
anchor --version
```
Loading
Loading