From fc9622987799690be0f8ffe0b6f8ac17d63b42f0 Mon Sep 17 00:00:00 2001 From: Anton Hughes Date: Mon, 13 Jan 2025 14:41:31 +1300 Subject: [PATCH 01/11] Add spellcheck configuration and wordlist for Markdown files --- .github/spellcheck.yml | 21 +++++++++++++++++++++ .github/wordlist.txt | 20 ++++++++++++++++++++ .github/workflows/test-suite.yml | 5 ++++- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/spellcheck.yml create mode 100644 .github/wordlist.txt 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/.github/wordlist.txt b/.github/wordlist.txt new file mode 100644 index 000000000..aabea5d62 --- /dev/null +++ b/.github/wordlist.txt @@ -0,0 +1,20 @@ +CLI +Ethereum +Exercism +github +Grafana +HTTPS +localhost +linter +MacOS +mdBook +PRs +repo + +sigmaprime +sigp +SSV +Testnet +testnet +TODOs +Validator \ 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] From 70adb1b2c5734ee214dab818268c0f4495b0be4e Mon Sep 17 00:00:00 2001 From: Anton Hughes Date: Mon, 13 Jan 2025 14:42:19 +1300 Subject: [PATCH 02/11] Add installation guide for Anchor --- book/src/installation.md | 74 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 book/src/installation.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 +``` From 439d6d90d9474c555b5974966f7a3a7233315b0e Mon Sep 17 00:00:00 2001 From: Anton Hughes Date: Mon, 13 Jan 2025 14:42:25 +1300 Subject: [PATCH 03/11] Add installation section to SUMMARY.md --- book/src/SUMMARY.md | 1 + 1 file changed, 1 insertion(+) 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) From 5e6bbfeeaa92f31eaf21b4ee969aade23a42f3ff Mon Sep 17 00:00:00 2001 From: Anton Hughes Date: Mon, 13 Jan 2025 15:25:47 +1300 Subject: [PATCH 04/11] Fix typos and add code formating --- anchor/database/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/anchor/database/README.md b/anchor/database/README.md index 6f7908c8e..e8e466a74 100644 --- a/anchor/database/README.md +++ b/anchor/database/README.md @@ -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 From 0492db37207468f0b0029445bda826e6faee8ade Mon Sep 17 00:00:00 2001 From: Anton Hughes Date: Mon, 13 Jan 2025 15:26:02 +1300 Subject: [PATCH 05/11] sort wordlist --- wordlist.txt | 66 ++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/wordlist.txt b/wordlist.txt index 94ae3f525..c46f5c578 100644 --- a/wordlist.txt +++ b/wordlist.txt @@ -1,40 +1,40 @@ -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 dir -Exercism -blockchain Ethereum +Exercism +github +Grafana +http HTTPS -repo +io +libp +linter +localhost +MacOS +mdBook +middleware +PathBuf +performant pre -CLI +PRs +QBFT +repo 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 \ No newline at end of file From 60c9e6b88da1844a7d8baaa433dab5bba09d8cb4 Mon Sep 17 00:00:00 2001 From: Anton Hughes Date: Mon, 13 Jan 2025 15:39:22 +1300 Subject: [PATCH 06/11] Remove obsolete spellcheck configuration file --- .spellcheck.yml | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 .spellcheck.yml 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' From db0dbddef4152c1710433ed2e5f5e1b37a916604 Mon Sep 17 00:00:00 2001 From: Anton Hughes Date: Mon, 13 Jan 2025 15:39:33 +1300 Subject: [PATCH 07/11] updated wordlist --- .github/wordlist.txt | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/.github/wordlist.txt b/.github/wordlist.txt index aabea5d62..f4aa2ccea 100644 --- a/.github/wordlist.txt +++ b/.github/wordlist.txt @@ -1,20 +1,41 @@ CLI +Config Ethereum Exercism -github Grafana HTTPS -localhost -linter MacOS -mdBook PRs +PathBuf +QBFT +SSV +Styleguide +TODOs +Testnet +Testnets +UI +Validator +blockchain +clippy +config +dir +github +http +io +libp +linter +localhost +mdBook +middleware +performant +pre repo - +runtime +rustfmt sigmaprime sigp -SSV -Testnet +spec'd +struct +structs testnet -TODOs -Validator \ No newline at end of file +validator \ No newline at end of file From 8693ae19c989edcd0d0210e3d38dc9c33a0edc67 Mon Sep 17 00:00:00 2001 From: Anton Hughes Date: Mon, 13 Jan 2025 15:42:58 +1300 Subject: [PATCH 08/11] add code ticks --- anchor/database/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anchor/database/README.md b/anchor/database/README.md index e8e466a74..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 From 64ff50ab460fe6bc2680f61141cc3674fd248de2 Mon Sep 17 00:00:00 2001 From: Anton Hughes Date: Mon, 13 Jan 2025 15:43:12 +1300 Subject: [PATCH 09/11] update wordlist --- .github/wordlist.txt | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/wordlist.txt b/.github/wordlist.txt index f4aa2ccea..2433ea3eb 100644 --- a/.github/wordlist.txt +++ b/.github/wordlist.txt @@ -1,41 +1,44 @@ -CLI -Config -Ethereum -Exercism -Grafana -HTTPS -MacOS -PRs -PathBuf -QBFT -SSV -Styleguide -TODOs -Testnet -Testnets -UI -Validator blockchain +CLI clippy +Config config +cryptographic dir +Ethereum +Exercism github +Grafana http +HTTPS io libp linter localhost +MacOS mdBook middleware +PathBuf performant pre +PRs +QBFT repo +RSA runtime rustfmt sigmaprime sigp spec'd +SSV struct structs +Styleguide +Testnet testnet -validator \ No newline at end of file +Testnets +TODOs +UI +Validator +validator +validators \ No newline at end of file From 6bc9f373a9de8358b1d48f94b6c8fc2a05519802 Mon Sep 17 00:00:00 2001 From: Anton Hughes Date: Mon, 13 Jan 2025 15:46:22 +1300 Subject: [PATCH 10/11] add ETH to wordlist --- .github/wordlist.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/wordlist.txt b/.github/wordlist.txt index 2433ea3eb..8420359c6 100644 --- a/.github/wordlist.txt +++ b/.github/wordlist.txt @@ -5,6 +5,7 @@ Config config cryptographic dir +ETH Ethereum Exercism github From bc2742cc75ee596827f3d477cc7db30f237e8e0e Mon Sep 17 00:00:00 2001 From: Anton Hughes Date: Mon, 13 Jan 2025 20:12:35 +1300 Subject: [PATCH 11/11] remove redundant wordlist file --- wordlist.txt | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 wordlist.txt diff --git a/wordlist.txt b/wordlist.txt deleted file mode 100644 index c46f5c578..000000000 --- a/wordlist.txt +++ /dev/null @@ -1,40 +0,0 @@ -blockchain -CLI -clippy -Config -config -dir -Ethereum -Exercism -github -Grafana -http -HTTPS -io -libp -linter -localhost -MacOS -mdBook -middleware -PathBuf -performant -pre -PRs -QBFT -repo -runtime -rustfmt -sigmaprime -sigp -spec'd -SSV -struct -structs -Styleguide -Testnet -testnet -Testnets -TODOs -UI -validator \ No newline at end of file