Skip to content
Closed
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ having trouble. As always, jump on [discord](https://discord.gg/cyAszAh)
if you get stuck.

Additionally,
the ["Contributing to Anchor" section](https://anchor-book.sigmaprime.io/contributing.html#contributing-to-anchor)
the ["Contributing" section](https://anchor.sigmaprime.io/contributing)
of the Anchor Book provides more details on the setup.

## FAQs
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Anchor maintains two permanent branches:
Anchor welcomes contributors.

If you are looking to contribute, please head to the
[Contributing](https://anchor-book.sigmaprime.io/contributing.html) section
[Contributing](https://anchor.sigmaprime.io/contributing) section
of the Anchor book.

## Contact
Expand Down
2 changes: 1 addition & 1 deletion anchor/common/bls_lagrange/src/blsful.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use zeroize::Zeroizing;

use crate::Error;

#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct KeyId {
num: u64,
identifier: IdentifierPrimeField<Scalar>,
Expand Down
2 changes: 1 addition & 1 deletion anchor/common/bls_lagrange/src/blst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use rand::prelude::*;

use crate::{Error, random_key};

#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct KeyId {
num: u64,
// note: while blst_scalar is also used for bls keys, the scalars used in key ids are NOT
Expand Down
15 changes: 13 additions & 2 deletions anchor/validator_store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ impl<T: SlotClock, E: EthSpec> AnchorValidatorStore<T, E> {

// First, attempt to get the cluster normally
if let Some(cluster) = state.clusters().get_by(&validator.cluster_id) {
if cluster.liquidated {
return Err(Error::SpecificError(SpecificError::ClusterLiquidated));
}
return Ok((validator, cluster.clone()));
}

Expand Down Expand Up @@ -745,6 +748,7 @@ pub enum SpecificError {
cluster_id: ClusterId,
},
KeyShareDecryptionFailed,
ClusterLiquidated,
}

impl From<CollectionError> for SpecificError {
Expand Down Expand Up @@ -792,12 +796,19 @@ impl<T: SlotClock, E: EthSpec> ValidatorStore for AnchorValidatorStore<T, E> {
I: FromIterator<PublicKeyBytes>,
F: Fn(DoppelgangerStatus) -> Option<PublicKeyBytes>,
{
let state = self.database.state();

// Treat all shares as `SigningEnabled`
self.database
.state()
state
.shares()
.values()
.filter_map(|v| filter_func(DoppelgangerStatus::SigningEnabled(v.validator_pubkey)))
.filter(|public_key| {
if let Some(clusters) = state.clusters().get_by(public_key) {
return !clusters.liquidated;
}
false
})
.collect()
}

Expand Down
3 changes: 1 addition & 2 deletions docs/docs/pages/cli-keygen.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ Anchor.
anchor keygen --encrypt --output-path /path/to/keys
```

Anchor will look for the key file inside the directory specific by `--datadir`, unless you
specify it via `--key-file`.
Anchor will look for the key file in the default directory `~/.anchor/{network}`, or the directory specified by `--datadir`.
2 changes: 1 addition & 1 deletion docs/docs/pages/cli-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ anchor node [OPTIONS]
| --- | --- | ---|
| `--metrics` | Enable metrics server | Disabled |
| `--metrics-address <ADDRESS>` | Listen address for metrics server | `127.0.0.1` if `--metrics` is set |
| `--metrics-port <PORT>` | Listen port for metrics server | `15000` if `--metrics` is set |
| `--metrics-port <PORT>` | Listen port for metrics server | `5164` if `--metrics` is set |

#### Network Options

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/pages/development_environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ As with most other Rust projects, Anchor uses `cargo test` for unit and
integration tests. For example, to test the `qbft` crate run:

```bash
cd src/qbft
cd anchor/common/qbft
cargo test
```

Expand Down
27 changes: 20 additions & 7 deletions docs/docs/pages/installation.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@

# Anchor Installation Guide

This guide provides step-by-step instructions for installing **Anchor**.
This guide provides step-by-step instructions for installing Anchor.

---
## Recommended System Requirements

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 |
|--------|---------|
| CPU | AMD Ryzen, Intel Broadwell, ARMv8 or newer |
| Memory | 16 GB RAM |
| Storage | 200 GB |

## 1. Download the Latest Release from GitHub

Expand All @@ -14,11 +24,14 @@ This guide provides step-by-step instructions for installing **Anchor**.
### Example

```bash
wget https://github.com/sigp/anchor/releases/download/<version>/anchor-<platform>.tar.gz

# 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

tar -xvf anchor-<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
sudo mv anchor /usr/local/bin/
```

Expand All @@ -38,10 +51,10 @@ anchor node --version
docker pull sigp/anchor:latest
```

2. Run the Anchor container:
2. Verify the installation:

```bash
docker run --rm -it sigp/anchor:latest --help
docker run --rm -it sigp/anchor:latest node --version
```

## 3. Clone and Build Locally
Expand Down
83 changes: 11 additions & 72 deletions docs/docs/pages/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ production setting.

## What is SSV?

Secret Shared Validators (SSV) is a protocol that splits a validator key into multiple shares, distributed across different operators. This approach provides:
Secret Shared Validators (SSV) is a protocol that splits a validator key into multiple shares, distributed across different operators.
Instead of running a validator on a single machine, SSV splits the validator's duties across multiple operators, creating a more resilient and decentralized staking infrastructure. This approach provides:

- **Fault Tolerance**: Your validator remains online even if some operators go offline
- **No Single Point of Failure**: No single operator can compromise your validator
Expand All @@ -19,95 +20,33 @@ Secret Shared Validators (SSV) is a protocol that splits a validator key into mu

## Why Choose Anchor?

Anchor stands out as an SSV client with several key advantages:

### 🔒 **Security First**
- Written in Rust for memory safety and security
- Comprehensive fuzzing and security testing
- Built by Sigma Prime, trusted Ethereum infrastructure experts

### ⚡ **High Performance**
- Optimized for efficiency and low resource usage
- Fast consensus and networking implementation
- Minimal latency for time-sensitive validator duties

### 🛠️ **Developer Friendly**
- Clean, well-documented codebase
- Extensive CLI tools for key management and operations
- Active open-source development
Written in Rust, Anchor focuses on memory safety and security. As an independent implementation of the SSV protocol,
Anchor promotes client diversity in the SSV space, reducing the risk of network-wide failures. Anchor is optimized for
efficiency, fast consensus and networking implementation.

## Who Should Use Anchor?

### Staking Pool Operators
Run distributed validators with enhanced security and fault tolerance for your staking infrastructure.

### Solo Stakers
Increase the reliability of your validator setup by distributing risk across multiple operators.

### SSV Network Operators
Operate as part of the SSV network, providing validator services to other users.

## Quick Start Paths

Choose your path based on your role:

:::code-group

```bash [🎯 New to SSV]
# Start here to understand the basics
→ Read: What is SSV?
→ Next: Installation Guide
```

```bash [⚙️ Run an Operator]
# Become an SSV network operator
→ Next: Installation → Running an Operator
→ Then: Operator Configuration
```

```bash [🔑 Manage Keys]
# Generate and split validator keys
→ Next: Installation → CLI Reference
→ Focus: Keygen and KeySplit tools
```

```bash [🧑‍💻 Developer]
# Contribute or integrate
→ Next: Development Environment
→ Then: Architecture Overview
```

:::

## Prerequisites

Before getting started, ensure you have:

- **System Requirements**: Linux, macOS, or Windows
- **Rust** (if building from source): Version 1.88.0 or later
- **Ethereum Knowledge**: Basic understanding of validators and staking
- **Command Line**: Comfort with terminal/command prompt usage
Anyone with a running staking infrastructure can opt to additionally run Anchor and become part of the SSV network.
This includes staking pool operators, node operators and solo stakers.

## What's Next?

1. **[Installation](/installation)** - Get Anchor running on your system
2. **[Running an Operator](/running_an_operator)** - Start operating in the SSV network
3. **[CLI Reference](/cli)** - Master the command-line tools
4. **[Architecture](/architecture)** - Understand Anchor's technical design
5. **[SSV documentation](https://docs.ssv.network/learn/introduction)** - read more about the SSV network


## About This Documentation

This documentation is open source and community-driven. We welcome contributions to help improve the experience for all users.

- **Contribute**: [github.com/sigp/anchor/docs](https://github.com/sigp/anchor/tree/unstable/docs)
- **Community Support**: [GitHub Discussions](https://github.com/sigp/anchor/discussions)
- **Professional Support**: [Sigma Prime](https://sigmaprime.io)
This documentation is open source and community-driven. We welcome [contributions](https://github.com/sigp/anchor/tree/unstable/docs) to help improve the experience for all users.

---

:::tip
Need Help?
- Check our [FAQ](/faq) for common questions
- Join the community on [GitHub](https://github.com/sigp/anchor)
- Join the community on [Discord](https://discord.com/invite/cyAszAh)
- Report issues or request features in our [issue tracker](https://github.com/sigp/anchor/issues)
:::
2 changes: 1 addition & 1 deletion docs/docs/pages/metrics.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Metrics

Anchor comes pre-built with a suite of metrics for developers or users to monitor the health
and performance of their node.
and performance of the node.

They must be enabled at runtime using the `--metrics` CLI flag.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/pages/running_an_operator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Save your public key as you'll need it for on-chain registration. **Back up your

**Step 2: Register as an Operator on the SSV Network**

To register an operator, follow the instructions for the official
To register an operator, follow the instructions in the official
[ssv docs](https://docs.ssv.network/operators/operator-management/registration).

**Step 3: Configure and run your Anchor node**
Expand Down
103 changes: 0 additions & 103 deletions docs/docs/pages/what_is_ssv.mdx

This file was deleted.

Loading
Loading