diff --git a/.github/spellcheck.yml b/.github/spellcheck.yml new file mode 100644 index 000000000..f786756cf --- /dev/null +++ b/.github/spellcheck.yml @@ -0,0 +1,21 @@ +matrix: + - name: Markdown + aspell: + lang: en + dictionary: + wordlists: + - .github/wordlist.txt + encoding: utf-8 + pipeline: + - pyspelling.filters.markdown: + markdown_extensions: + - pymdownx.superfences + - pyspelling.filters.html: + comments: false + ignores: + - code + - pre + - a + sources: + - "**/*.md" + default_encoding: utf-8 \ No newline at end of file diff --git a/wordlist.txt b/.github/wordlist.txt similarity index 86% rename from wordlist.txt rename to .github/wordlist.txt index 94ae3f525..8420359c6 100644 --- a/wordlist.txt +++ b/.github/wordlist.txt @@ -1,40 +1,45 @@ -MacOS -linter -Testnets -testnet -Testnet -QBFT -SSV -validator -libp -middleware -performant -github -sigp -io -sigmaprime -mdBook -spec'd -PRs -Styleguide +blockchain +CLI clippy -rustfmt -TODOs -config -struct -structs Config -PathBuf +config +cryptographic dir -Exercism -blockchain +ETH Ethereum +Exercism +github +Grafana +http HTTPS -repo +io +libp +linter +localhost +MacOS +mdBook +middleware +PathBuf +performant pre -CLI +PRs +QBFT +repo +RSA runtime -localhost -http -Grafana -UI \ No newline at end of file +rustfmt +sigmaprime +sigp +spec'd +SSV +struct +structs +Styleguide +Testnet +testnet +Testnets +TODOs +UI +Validator +validator +validators \ No newline at end of file diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index cbce0ab1f..762de5ac4 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -180,7 +180,10 @@ jobs: - uses: actions/checkout@v4 # Uses the canonical version so that the version is up to date: # https://github.com/rojopolis/spellcheck-github-actions?tab=readme-ov-file#using-a-canonical-version - - uses: rojopolis/spellcheck-github-actions@v0 + - uses: rojopolis/spellcheck-github-actions@0.46.0 + with: + config_path: .github/spellcheck.yml + output_file: spellcheck-output.txt # cli-check: # name: cli-check # needs: [check-labels] diff --git a/.spellcheck.yml b/.spellcheck.yml deleted file mode 100644 index 806a68b0f..000000000 --- a/.spellcheck.yml +++ /dev/null @@ -1,23 +0,0 @@ -matrix: -- name: Markdown - sources: - - '!venv/**/*.md|**/*.md' - default_encoding: utf-8 - aspell: - lang: en - dictionary: - wordlists: - - wordlist.txt - encoding: utf-8 - pipeline: - - pyspelling.filters.markdown: - - pyspelling.filters.html: - comments: false - ignores: - - code - - pre - sources: - - './book/**/*.md' - - 'README.md' - - 'SECURITY.md' - - 'CONTRIBUTING.md' diff --git a/anchor/database/README.md b/anchor/database/README.md index 6f7908c8e..d713ffbcf 100644 --- a/anchor/database/README.md +++ b/anchor/database/README.md @@ -18,7 +18,7 @@ The Anchor Database serves as the backbone for storing and accessing SSV Network * **In-Memory Caching**: Efficient caching of frequently accessed data * **Multi-Index Access**: Flexible data access patters through multiple different keys * **Automatic State Recovery**: Rebuilds in-memory state from persistent storage on startup. -* **Thread Safety**: Concurrent access support through DashMap implementations +* **Thread Safety**: Concurrent access support through `DashMap` implementations ## Architecture @@ -27,15 +27,15 @@ The database architecture consists of a two key layers ### Storage Layer At the foundation lies a SQLite database that provides persistent storage. This layer encompasses -* **Database Connection Management**: A conneciton pool that maintains and resuses SQLite connections efficiently, preventing resource exhaustion while ensuring consistent access +* **Database Connection Management**: A connection pool that maintains and reuses SQLite connections efficiently, preventing resource exhaustion while ensuring consistent access * **Schema and Transaction Management**: Automatic table creation and transaction support for data integrity ### Cache Layer The in-memory cache layer combines high-performance caching with sophisticated indexing through a unified system. Is is broken up into Single-State and Multi-State. -* **Single State**: Single state handles straightforward, one-to-one relationships where data only needs one access pattern. This is ideal for data that is frequenlty access but has simple relationships. -* **Multi State**: Multi State handles complex relationships where the same data needs to be accessed through different keys. This is implemented through a series of MultiIndexMaps, each supporting three different access patterns for the same data. The type system enforces correct usage through the UniqueTag and NonUniqueTag markers, preventing incorrect access patterns at compile time. Each MultiIndexMap in the Multi State provides three ways to access its data: +* **Single State**: Single state handles straightforward, one-to-one relationships where data only needs one access pattern. This is ideal for data that is frequently access but has simple relationships. +* **Multi State**: Multi State handles complex relationships where the same data needs to be accessed through different keys. This is implemented through a series of `MultiIndexMap`s, each supporting three different access patterns for the same data. The type system enforces correct usage through the `UniqueTag` and `NonUniqueTag` markers, preventing incorrect access patterns at compile time. Each `MultiIndexMap` in the Multi State provides three ways to access its data: 1) A primary key that uniquely identifies each piece of data 2) A secondary key that can either uniquely identify data or map to multiple items 3) A tertiary key that can also be unique or map to multiple items @@ -45,8 +45,8 @@ The database handles several core data types **Operator** * Represents a network operator -* Identified by OperatorId -* Constains RSA public key and owner address +* Identified by `OperatorId` +* Contains RSA public key and owner address **Cluster** * Represents a group of Operators managing validators diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 135ce2713..4843bd51d 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -1,6 +1,7 @@ # Summary - [Introduction](./intro.md) +- [Installation](./installation.md) - [Metrics](./metrics.md) - [FAQs](./faq.md) - [Development Environment](./setup.md) diff --git a/book/src/installation.md b/book/src/installation.md new file mode 100644 index 000000000..c499feaa6 --- /dev/null +++ b/book/src/installation.md @@ -0,0 +1,74 @@ + +# Anchor Installation Guide + +This guide provides step-by-step instructions for installing **Anchor**. + +--- + +## 1. Download the Latest Release from GitHub + +1. Visit the [Anchor Releases page](https://github.com/sigp/anchor/releases). +2. Download the appropriate binary for your operating system. +3. Extract the file if necessary and move the binary to a location in your `PATH` (e.g., `/usr/local/bin/`). + +### Example + +```bash +wget https://github.com/sigp/anchor/releases/download//anchor-.tar.gz + +# Replace and with the appropriate values. + +tar -xvf anchor-.tar.gz +sudo mv anchor /usr/local/bin/ +``` + +Verify the installation: + +```bash +anchor --version +``` + +--- + +## 2. Run Anchor Using Docker + +1. Pull the latest Anchor Docker image: + + ```bash + docker pull sigp/anchor:latest + ``` + +2. Run the Anchor container: + + ```bash + docker run --rm -it sigp/anchor:latest --help + ``` + +## 3. Clone and Build Locally + +1. Clone the Anchor repository: + + ```bash + git clone https://github.com/sigp/anchor.git + cd anchor + ``` + +2. Build the Anchor binary: + + ```bash + cargo build --release + ``` + + The binary will be located in `./target/release/`. + +3. Move the binary to a location in your `PATH`: + + ```bash + sudo mv target/release/anchor /usr/local/bin/ + ``` + +Verify the installation: + +```bash +anchor --version +```