Skip to content

Commit

Permalink
Merge pull request #20 from AIBlockOfficial/banner_update
Browse files Browse the repository at this point in the history
Add graphics banners to documentation pages
  • Loading branch information
BHouwens authored Apr 8, 2024
2 parents bd71308 + 578c023 commit 6317b14
Show file tree
Hide file tree
Showing 22 changed files with 184 additions and 20 deletions.
72 changes: 72 additions & 0 deletions docs/mining/installing-a-lite-node.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
title: Installing a Lite Node
description: How to install a lite node
sidebar_label: Installing a Lite Node
sidebar_position: 0
hide_title: false
tags:
- node
- lite node
- installation
---

Lite nodes are the same as mining nodes within the AIBlock system, except that they perform no mining activities. They can also 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 a lite node.

## Build from Source

To build a lite 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.

### Lite Node Build

With the prerequisites set up, you can now clone the repo to your local machine:

```
git clone [email protected]: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 user --config=src/bin/node_settings_playground.toml --api_use_tls=0`
```
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Installing a Node
title: Installing a Mining Node
description: How to install a mining node
sidebar_label: Installing a Node
sidebar_label: Installing a Mining Node
sidebar_position: 0
hide_title: false
tags:
Expand Down
15 changes: 4 additions & 11 deletions docs/network-wiki.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

# The AIBlock Network

![banner](../static/img/network-wiki.jpg)

The AIBlock Network is responsible for all the network-related code in the AIBlock system. It is the repo responsible for communication between nodes in the mining network, as well as integration with the blockchain data structure found in the `Chain` repo. The following are the table of contents for further documentation below, which will fill you in on the architecture of the project as a whole:

- [Node Types](network-wiki/node-types)
Expand All @@ -22,16 +25,6 @@ The **AIBlock Network** sends and receives messages that are passed between diff
## System Architecture
The AIBlock system architecture mirrors much of what you'll find in the Bitcoin architecture, as our blockchain is based on Proof-of-Work (PoW) consensus. Unlike traditional Bitcoin, however, our blockchain is capable of faster transaction speeds (leading to faster clearance periods) and our PoW system is light and more inclusive (but more on this later).

The other major difference between AIBlock and traditional blockchains is the introduction of the 2 way transaction system. Unlike traditional blockchains, our blockchain can record both the movement of tokens *and* the movement of assets for those tokens. Thanks to the Data Protocol, those assets can be your ownable and transactable data assets.
The other major difference between AIBlock and traditional blockchains is the introduction of the 2 way transaction system. Unlike traditional blockchains, our blockchain can record both the movement of tokens *and* the movement of assets for those tokens. Thanks to XGP, those assets can be your ownable and transactable data assets.

To facilitate this, the AIBlock architecture makes use of different types of nodes in its network. You can find out more about the different node types [here](network-wiki/node-types).

## Code Design
We have a specific design philosophy regarding the code written at AIBlock. The ideal is to have code which will be easily reusable, but most importantly easily understandable. We treat our code like a client-server relationship, where the code is the server and you, the human user, are the client. To that end we have adopted the [Three Tier Architecture](https://en.wikipedia.org/wiki/Multitier_architecture#Three-tier_architecture) approach popularised by [John J. Donovan](https://en.wikipedia.org/wiki/John_J._Donovan), which in brief consists of the following:

- **Presentation Tier**: To be treated like the user interface. At this level there should be the highest abstractions for any module we write, consisting of a few easy-to-use functions that can be implemented in an API for general consumption.
***Developer Level: Beginner***

- **Logic Tier**: This is one level down from the presentation tier, where the code is more complex but is capable of more powerful functions. Logic and business operations can be found at this level, helping to facilitate the higher-level abstractions in the presentation tier. ***Developer Level: Intermediate***

- **Data Tier**: This is the lowest level of code architecture, and as such is the most complex. Functions and operations at this level will directly interact with system-level operations such as I/O and network connection handling, as well as direct interaction with the blockchain. ***Developer Level: Advanced***
2 changes: 2 additions & 0 deletions docs/network-wiki/block-mining.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ tags:

# Block Mining Process

![banner](./img/miner.jpg)

The process for mining a block on the network is somewhat complex and involves several steps. Here's a general overview:

1. Users send their transactions to the [Mempool](mempool-node) ring, where all valid transactions are placed into a waiting pool to be included in a block.
Expand Down
Binary file added docs/network-wiki/img/mempol.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/network-wiki/img/miner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/network-wiki/img/storage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/network-wiki/img/transaction.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/network-wiki/img/unicorn.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/network-wiki/mempool-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ tags:

# Mempool Node

![banner](./img/mempol.jpg)

The Mempool node plays a crucial role in the AIBlock network, serving as one part of the power balance. Unlike fully distributed mining, as seen in Bitcoin, AIBlock opts for a compromise by employing a ring of decentralized Mempool nodes to facilitate transactions. Public, fully distributed Miner nodes are still responsible for mining the blocks and contributing to the fair decision-making process for transaction selection.

## Balance of Power
Expand Down
2 changes: 2 additions & 0 deletions docs/network-wiki/miner-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ tags:

# Miner Node

![banner](./img/miner.jpg)

The Miner node embodies the average miner in the AIBlock system, responsible for mining blocks of transactions and adding them to the blockchain history. Winning miners receive token rewards, and AIBlock employs a more energy-efficient mining method while retaining the useful aspects of [Proof-of-Work (PoW)](https://en.bitcoin.it/wiki/Proof_of_work). Further details on this method are discussed in the [Partitioning](#partitioning) section.

## Balance of Power
Expand Down
2 changes: 2 additions & 0 deletions docs/network-wiki/node-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ tags:

# AIBlock Network Node Types

![banner](../../static/img/network-wiki.jpg)

Unlike Bitcoin's uniform full node miners, the AIBlock Network employs diverse node types to enhance functionality. This diversity ensures quick payment settlements, geographic diversity, lighter blockchain storage requirements, and facilitates token-for-asset payments.

## Types at a Glance
Expand Down
2 changes: 2 additions & 0 deletions docs/network-wiki/storage-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ tags:

# Storage Node

![banner](./img/storage.jpg)

The Storage node has a singular responsibility: storing the complete blockchain history. Though seemingly straightforward, this task involves various components within the AIBlock system, detailed below.

## Storage Node Structure
Expand Down
3 changes: 3 additions & 0 deletions docs/network-wiki/transactions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ tags:
---

# Transactions

![banner](./img/transaction.jpg)

Transactions in the AIBlock system are structured similarly to those found in Bitcoin. They consist primarily of a reference to a previous spendable amount on the blockchain (for AIBlock, this can be tokens or items (data assets) ) and a reference to an address to send the spendable amount to. To accomplish this, the spender is required to verify that they are the original owner of the spendable amount through public key signature schemes.

## Structure
Expand Down
2 changes: 2 additions & 0 deletions docs/network-wiki/two-way-transaction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ tags:

# 2 Way Transaction

![banner](./img/transaction.jpg)

Currently, Bitcoin payments reflect as "charity": Alice pays Bob 1 BTC for a mid-range car, but the Bitcoin ledger can only reliably show that Alice charitably gave Bob 1 BTC. AIBlock's blockchain needs to be able to reflect the token payment as well as the asset the payment is for. To this end, what is required is a *2 way transaction*, or 2WT.

## How a 2WT Works
Expand Down
2 changes: 2 additions & 0 deletions docs/network-wiki/unicorns.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ tags:

# UNiCORNs

![banner](./img/unicorn.jpg)

UN-COntestable Random Numbers (UNiCORNs) are numbers generated by a group with the unique property that no member of the group can influence the UNiCORN to produce anything other than a random number. This characteristic makes UNiCORNs ideal for seeding cryptographic protocols and demonstrating fair (random) selection of elements from an enumerated list.

In the AIBlock blockchain system, UNiCORNs play a crucial role in three fundamental processes:
Expand Down
10 changes: 5 additions & 5 deletions docs/postman-collections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tags:
- Getting started
---

# Dedicated Postman Collection
# Postman Collections

Explore the power of AIBlock's API effortlessly with our dedicated Postman collection. Download the collection now and seamlessly integrate AIBlock services into your applications.

Expand All @@ -21,15 +21,15 @@ Explore the power of AIBlock's API effortlessly with our dedicated Postman colle

Ready to elevate your development experience? Download the Postman collection, access the Testnet environment, and explore our documentation. AIBlock API awaits your creativity!

..

## 📚 Resources

**<a href='/files/Infrastructure_AIBlock.postman_collection.json' target="_blank" download>▶️ Download Postman Collection</a>**

**<a href='/files/TestNet.postman_environment.json' target="_blank" download>▶️ Download Testnet Environment</a>**

**<a href='/docs/api-tutorials' download>👁️‍🗨️ Explore API Documentation</a>**

<br/>
**<a href='/files/MAINNET.postman_environment.json' target="_blank" download>▶️ Download Mainnet Environment</a>**

📌 Feel the power of AIBlock API – where innovation meets simplicity!
**<a href='/docs/api-tutorials' download>👁️‍🗨️ Explore API Documentation</a>**

2 changes: 2 additions & 0 deletions docs/welcome.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common';

# Welcome to AIBlock

![banner](../static/img/welcome.jpg)

Here you can find everything you need to get started in the AIBlock development environment.

Whether you're a developer exploring its capabilities or an enthusiast eager to delve into the world of blockchain technology,
Expand Down
21 changes: 19 additions & 2 deletions src/pages/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
text-align: center;
position: relative;
overflow: hidden;
height: 500px;
height: 200px;
}

.heroGraphic {
Expand All @@ -17,12 +17,29 @@
bottom: 0;
right: 0;
z-index: 1;
opacity: 0;
}

@media all and (min-width: 1300px) {
.heroGraphic {
opacity: 1;
}

.heroBanner {
height: 400px;
}
}

@media all and (min-width: 600px) {
.heroLogo {
width: 500px !important;
}
}

.heroLogo {
margin: 0 auto;
display: block;
width: 500px;
width: 80%;
}

:global .hero {
Expand Down
63 changes: 63 additions & 0 deletions static/files/MAINNET.postman_environment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"id": "442a513c-b5ef-4372-aa6e-4f12311eb386",
"name": "MAINNET",
"values": [
{
"key": "mempool_api_endpoint",
"value": "mempool.aiblock.ch",
"type": "default",
"enabled": true
},
{
"key": "mempool_api_port",
"value": "443",
"type": "default",
"enabled": true
},
{
"key": "storage_api_endpoint",
"value": "storage.aiblock.ch",
"type": "default",
"enabled": true
},
{
"key": "storage_api_port",
"value": "443",
"type": "default",
"enabled": true
},
{
"key": "miner_api_endpoint",
"value": "aiblock.ch",
"type": "default",
"enabled": true
},
{
"key": "miner_api_port",
"value": "3000",
"type": "default",
"enabled": true
},
{
"key": "protocol",
"value": "https",
"type": "default",
"enabled": true
},
{
"key": "listing_id",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "REQ_UUID",
"value": "",
"type": "any",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2024-04-08T09:46:20.221Z",
"_postman_exported_using": "Postman/10.24.17"
}
Binary file added static/img/network-wiki.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/welcome.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6317b14

Please sign in to comment.