From 8c7ebf33acfa2194ca0e65e9d7f7e7b596afa7dc Mon Sep 17 00:00:00 2001 From: BHouwens Date: Mon, 4 Mar 2024 15:18:25 +0100 Subject: [PATCH 1/3] Adding mining documentation to sidebar --- docs/mining-overview.mdx | 41 ++++++++++++++++ docs/mining/hardware-requirements.mdx | 30 +++++++++++ docs/mining/installing-a-node.mdx | 71 +++++++++++++++++++++++++++ docs/valence-node.mdx | 2 +- sidebars.js | 14 ++++++ static/img/mining_icon.svg | 17 +++++++ 6 files changed, 174 insertions(+), 1 deletion(-) create mode 100644 docs/mining-overview.mdx create mode 100644 docs/mining/hardware-requirements.mdx create mode 100644 docs/mining/installing-a-node.mdx create mode 100644 static/img/mining_icon.svg diff --git a/docs/mining-overview.mdx b/docs/mining-overview.mdx new file mode 100644 index 0000000..f5a8645 --- /dev/null +++ b/docs/mining-overview.mdx @@ -0,0 +1,41 @@ +--- +sidebar_position: 2 +title: Mining +sidebar_label: Mining +hide_title: true +tags: + - mining +--- + +import DocCardList from '@theme/DocCardList'; +import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; +import Hero from "../static/img/mining_icon.svg" + +
+ +
+ + + + +

Mining on AIBlock

+ +

+ How AIBlock mining works, from the ground up +
+
+

+
+ +## Bringing Fairness and Equality Back to Mining + +AIBlock has gone to great lengths to ensure that mining on the system is made as fair and equitable as possible. The protocol leverages +a unique consensus mechanism and block creation process to minimise the advantage of ASICs and brings mining back to the CPU. Any CPU. + +In addition, AIBlock's use of UNiCORNs in a novel random selection process ensures that the energy used during mining is minimal. AIBlock mining +is there to validate transactions, rather than consuming vast amounts of electricity. + +You can find out more about how mining works on AIBlock at the following articles: + +- [Beyond Bitcoin: AIBlock’s Leap Towards Sustainable, High-Reward Mining](https://medium.com/@AIBlock/beyond-bitcoin-aiblocks-leap-towards-sustainable-high-reward-mining-3f0f1aad5402) +- [Empowering Miners: The Revolutionary Approach to AIBlock’s Proof of Work](https://medium.com/@AIBlock/empowering-miners-the-revolutionary-approach-to-aiblocks-proof-of-work-bc07b350e672) \ No newline at end of file diff --git a/docs/mining/hardware-requirements.mdx b/docs/mining/hardware-requirements.mdx new file mode 100644 index 0000000..e687d53 --- /dev/null +++ b/docs/mining/hardware-requirements.mdx @@ -0,0 +1,30 @@ +--- +title: Hardware Requirements +description: Hardware requirements needed for miners +sidebar_label: Hardware Requirements +sidebar_position: 0 +hide_title: false +tags: + - mining + - hardware requirements +--- + +This section covers the recommended hardware requirements for running a mining node on AIBlock + +
+ +### Resource Requirements + +The following are the tested hardware specifications for mining nodes within the AIBlock system. These are not necessarily +the minimum hardware specs required, but mining has been tested on them and runs successfully. + + +| | Windows | Ubuntu | MacOS | +|-----|-----------------------------------------|-----------------------------------------|---------------------------------| +| OS | Windows 11 Home version 22H2 | Ubuntu 22.04.2 LTS | macOS Big Sur v11.6.2 | +| CPU | 11th Gen Intel Core i7-1165G7 @ 2.80GHz | 11th Gen Intel Core i7-1165G7 @ 2.80GHz | 2 GHz Quad-Core Intel Core i5 | +| GPU | Intel Iris Xe Graphics | Mesa Intel Xe Graphics (TGL GT2) | Intel Iris Plus Graphics 1536MB | +| RAM | 16GB | 16GB | 16GB | +| SSD | 64GB | 64GB | 64GB | + +_* SSD requirements are based on the smallest SSD drives regularly available_ \ No newline at end of file diff --git a/docs/mining/installing-a-node.mdx b/docs/mining/installing-a-node.mdx new file mode 100644 index 0000000..1be234f --- /dev/null +++ b/docs/mining/installing-a-node.mdx @@ -0,0 +1,71 @@ +--- +title: Installing a Node +description: How to install a mining node +sidebar_label: Installing a Node +sidebar_position: 0 +hide_title: false +tags: + - mining + - installation +--- + +Mining nodes in the AIBlock system can be installed in one of two ways: + +1. Docker container +2. Built from source + +The Docker container is still currently being built, so for now you'll need to build from source in order to start mining. + +## Build from Source + +To build a mining node from source, you can implement the following steps: + +### Setup + +The AIBlock Network runs on Rust, so installing this is the first step before dealing with any code. You can install `rustup`, Rust's toolchain installer, by running the following: + +``` +curl https://sh.rustup.rs -sSf | sh +``` + +When asked how to proceed, simply selecting the option `1) Proceed with installation` is generally the best. You can then run the following to update the `PATH` variable and check whether everything installed correctly: + +``` +source $HOME/.cargo/env +rustc --version +``` + +If the terminal responds with the `rustc` version you're currently running then everything went well, and you're ready to go. + +### Linux + +Linux (Ubuntu 20.04.01 LTS) may require extra package installations depending on what you've developed before. The following package installs assume a completely new machine instance, and should cover everything you need to get going: + +``` +sudo apt install build-essential +sudo apt-get install m4 +sudo apt-get install llvm +sudo apt-get install libclang-dev +``` + +The above should enable you to install `librocksdb-sys` successfully, but older versions of this crate had bugs so it would be wise to ensure you've installed `rocksdb = "0.21.0"` or higher in order to avoid compilation issues. + +### Mining Node Build + +With the prerequisites set up, you can now clone the repo to your local machine: + +``` +git clone git@github.com:AIBlockOfficial/Network.git +``` + +You can then build everything by running + +```rust +cargo build --release +``` + +This will compile everything into a release state, from which you can then run the following to connect to the Playground testnet to mine: + +``` +RUST_LOG=warp target/release/node miner --config=src/bin/node_settings_playground.toml --api_use_tls=0 --with_user_index=0` +``` \ No newline at end of file diff --git a/docs/valence-node.mdx b/docs/valence-node.mdx index 6ad62ef..74995c5 100644 --- a/docs/valence-node.mdx +++ b/docs/valence-node.mdx @@ -19,7 +19,7 @@ import Hero from "../static/img/valance_core.svg" -

Valance

+

Valence

The AIBlock L2 node for data exchange between peers. Complete with E2E encryption. diff --git a/sidebars.js b/sidebars.js index d3c0f06..af5bf50 100644 --- a/sidebars.js +++ b/sidebars.js @@ -105,6 +105,20 @@ const sidebars = { }, ], }, + { + type: "category", + label: "Mining", + link: { + type: "doc", + id: "mining-overview" + }, + items: [ + { + type: "autogenerated", + dirName: "mining" + }, + ], + }, ], } ] diff --git a/static/img/mining_icon.svg b/static/img/mining_icon.svg new file mode 100644 index 0000000..30fa29f --- /dev/null +++ b/static/img/mining_icon.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + From d8b8de9ae6ee3b93c872882f8a114d7255fe95a3 Mon Sep 17 00:00:00 2001 From: BHouwens Date: Mon, 4 Mar 2024 15:20:38 +0100 Subject: [PATCH 2/3] Adding PR template --- .github/pull_request_template.md | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..cadbeea --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,39 @@ +## Description +Provide a clear and concise description of the changes introduced in this pull request. + +Fixes # (issue number) + +## Changelog + +- List the changes to the codebase that this PR introduces + +## Type of Change +Please mark the appropriate option by putting an "x" inside the brackets: + +- [ ] Bug fix +- [ ] New feature +- [ ] Enhancement or optimization +- [ ] Documentation update +- [ ] Other (please specify) + +## Checklist +Put an "x" in the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help! + +- [ ] I have tested the changes locally and they work as expected. +- [ ] I have added necessary documentation or updated existing documentation. +- [ ] My code follows the project's coding standards and style guidelines. +- [ ] I have added/updated relevant tests to ensure the changes are properly covered. +- [ ] I have checked for and resolved any merge conflicts. +- [ ] My commits have clear and descriptive messages. + +## Screenshots (if applicable) +If the changes affect the UI or have visual effects, please provide screenshots or GIFs showcasing the changes. + +## Additional Context (if applicable) +Add any additional context or information about the changes that may be helpful in understanding the pull request. + +## Related Issues (if applicable) +If this pull request is related to any existing issues, please list them here. + +## Requested Reviewers +Mention any specific individuals or teams you would like to request a review from. \ No newline at end of file From 1ca9c34be5946949cc5333f789e3e6b93a4d6dbd Mon Sep 17 00:00:00 2001 From: BHouwens Date: Mon, 4 Mar 2024 15:27:50 +0100 Subject: [PATCH 3/3] Fixes for icon and build --- docs/mining-overview.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/mining-overview.mdx b/docs/mining-overview.mdx index f5a8645..4e7ba6d 100644 --- a/docs/mining-overview.mdx +++ b/docs/mining-overview.mdx @@ -15,7 +15,9 @@ import Hero from "../static/img/mining_icon.svg"

- +
+ +

Mining on AIBlock