Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs): add ledger docs #142

Merged
merged 38 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1537529
feat(docs): add ledger docs
FelixNicolaeBucsa Sep 19, 2023
66cc6f6
edits: pulled content
FelixNicolaeBucsa Sep 19, 2023
f88b613
edits: added guides in guides for ledger
FelixNicolaeBucsa Sep 19, 2023
bb87722
fix: fixed conflicts and reorganised landing pages content
FelixNicolaeBucsa Sep 20, 2023
ee934bd
edits: started adding ledger guides in docs
FelixNicolaeBucsa Sep 20, 2023
b7ab385
edits: added all ledger guides missing. Only CLI guides missing for now.
FelixNicolaeBucsa Sep 20, 2023
039e465
edits: reviewed changes and content added yesterday in ledger guides
FelixNicolaeBucsa Sep 21, 2023
efede43
feat: added CLI guides in ledger docs
FelixNicolaeBucsa Sep 21, 2023
5474ae2
edits: edits to content. Created index for ledger docs in references
FelixNicolaeBucsa Sep 21, 2023
2d8c2ed
edits: small change
FelixNicolaeBucsa Sep 21, 2023
fe83ef7
edits: removed getting-tokens.mdx as duplicate guide
FelixNicolaeBucsa Sep 21, 2023
0827625
edits: addressed comments from Josh
FelixNicolaeBucsa Sep 21, 2023
e441454
edits
FelixNicolaeBucsa Sep 21, 2023
ccecfb6
edits: reviewed content and made edits
FelixNicolaeBucsa Sep 22, 2023
263714e
fix: solved conflicts
FelixNicolaeBucsa Sep 22, 2023
e5e6ed4
edits: ledger concepts and references sections
FelixNicolaeBucsa Sep 25, 2023
3331bf6
edits: edits to ledger guides
FelixNicolaeBucsa Sep 25, 2023
6fdad9d
edits: pulled content from master and solved conflicts
FelixNicolaeBucsa Sep 26, 2023
37d3f14
edits: changes to content
FelixNicolaeBucsa Sep 26, 2023
6dcbc1c
edits: integrated getting testnet tokens guide in featured guides for…
FelixNicolaeBucsa Sep 26, 2023
8837745
fix: solved conflicts and merged master branch
FelixNicolaeBucsa Sep 26, 2023
0da63a2
edits: fixed conflicts
FelixNicolaeBucsa Sep 26, 2023
e34ca47
edit: changes
FelixNicolaeBucsa Sep 26, 2023
0cb4adf
fix: solved conflicts
FelixNicolaeBucsa Sep 26, 2023
4357063
edits: general review and fixes
FelixNicolaeBucsa Sep 26, 2023
9d924bf
edits: fixed conflicts
FelixNicolaeBucsa Sep 26, 2023
6fb0f6c
edits: removed block explorer section
FelixNicolaeBucsa Sep 27, 2023
8045744
edits: edits to content and spelling and grammar.
FelixNicolaeBucsa Sep 27, 2023
83e8d6a
edits: changes and overall review
FelixNicolaeBucsa Oct 2, 2023
aec6254
fix: solved merging conflicts
FelixNicolaeBucsa Oct 4, 2023
8b3b387
Merge branch 'master' into feat/add-ledger-docs
devjsc Oct 5, 2023
47ff84c
edits: pulled content
FelixNicolaeBucsa Oct 5, 2023
7bb7f33
edits: pulled content
FelixNicolaeBucsa Oct 5, 2023
1f447a6
edits: changes
FelixNicolaeBucsa Oct 5, 2023
668729c
fix: solved conflict
FelixNicolaeBucsa Oct 5, 2023
b87587f
edits: review and change
FelixNicolaeBucsa Oct 6, 2023
56e3cec
fix: pulled content and solved conflicts
FelixNicolaeBucsa Oct 6, 2023
79fbc20
Merge branch 'master' into feat/add-ledger-docs
devjsc Oct 6, 2023
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
4 changes: 2 additions & 2 deletions components/products.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ const items: { [key: string]: Item[] } = {
},
FelixNicolaeBucsa marked this conversation as resolved.
Show resolved Hide resolved
{
title: "Ledger",
description: <>Coming soon.</>,
description: <>Get started with the Fetch Ledger.</>,
icon: ledgerIcon,
path: "",
path: "/concepts/fetch-network/ledger/intro",
},
],
};
Expand Down
35 changes: 32 additions & 3 deletions pages/concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,39 @@ import { GuideBox } from "../components/feature-guide-tabs";

</Grid2>

## Indexer
## Fetch Network

### Ledger

<div className="nx-text-fetch-content">
Explore the topics you need to know in order to prepare for and develop on the Fetch network.
</div>

<Grid2>

<GuideBox
content={{
title: "Introduction 🚀",
description: "Get yourself started with Fetch Ledger.",
path: "/concepts/fetch-network/ledger/intro"
}}
/>

<GuideBox
content={{
title: "Validators overview",
description: "Explore the role of validators within the Fetch ecosystem.",
path: "/concepts/fetch-network/ledger/validators"
}}
/>

</Grid2>

### Indexer

<div className="nx-text-fetch-content">
Explore how to index and query blockchain data efficiently using the SubQuery indexer for the Fetch ledger.

</div>

<Grid2>
Expand All @@ -134,7 +163,7 @@ Explore how to index and query blockchain data efficiently using the SubQuery in
content={{
title: "Introduction",
description: "The ledger-subquery is a SubQuery-based indexer for the Fetch ledger.",
path: "/concepts/indexer/intro"
path: "/concepts/fetch-network/indexer/intro"
}}
/>

Expand All @@ -143,7 +172,7 @@ Explore how to index and query blockchain data efficiently using the SubQuery in
content={{
title: "Architecture",
description: "Explore the architecture behind the ledger-subquery.",
path: "/concepts/indexer/architecture"
path: "/concepts/fetch-network/indexer/architecture"
}}
/>

Expand Down
2 changes: 1 addition & 1 deletion pages/concepts/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"agents": "uAgents",
"agent-services": "Agentverse Services",
"ai-engine": "AI Engine",
"indexer": "Indexer"
"fetch-network": "Fetch Network"
}
2 changes: 1 addition & 1 deletion pages/concepts/agents/_meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"agents": "Introduction",
"agents": "Introduction \uD83D\uDE80",
"rationale": "Why uAgents"
}
4 changes: 4 additions & 0 deletions pages/concepts/fetch-network/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"ledger": "Ledger",
"indexer": "Indexer"
}
4 changes: 4 additions & 0 deletions pages/concepts/fetch-network/ledger/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"intro": "Introduction \uD83D\uDE80",
"validators": "Validators"
}
23 changes: 23 additions & 0 deletions pages/concepts/fetch-network/ledger/intro.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Callout } from 'nextra/components'

# Ledger

## Introduction 🚀

In the context of blockchain technology, a ledger refers to a decentralized and distributed digital ledger that records all transactions across a network. This is used to ensure transparency and security of transactions and operations undertaken on that network.

Within this context, the Fetch Ledger developed by Fetch.ai constitutes the underlying infrastructure for various decentralized applications and contracts. It employs a consensus mechanism where [validators ↗️](/concepts/fetch-network/ledger/validators) are responsible for validating transactions and creating new blocks in the [blockchain ↗️](/concepts/fetch-network/ledger/validators#overview-blockchains-consensus-and-validators). The ledger utilizes Fetch native cryptocurrency, FET, which is used for various activities within the network, including transaction fees and staking. The ledger also supports features like [multi-signature keys ↗️](/guides/fetch-network/ledger/cli/multisig-keys), allowing users to control [keys ↗️](/guides/fetch-network/ledger/cli/keys) in different configurations.

The fetchhub [mainnet ↗️](/concepts/fetch-network/ledger/validators#test-network-testnet-vs-main-network-mainnet) forms the core of the Fetch.ai ecosystem. In these pages, you will find all information to setup your client and connect on the [network ↗️](/references/fetch-network/ledger/active-networks).

This documentation covers some of the things you need to know in order to prepare for and develop on the Fetch network.

## Test networks

The starting point for most is [our test network ↗️](/references/fetch-network/ledger/active-networks#test-nets), since it can provide you with test tokens with no value, that you can safely experiment with through the [faucet ↗️](/guides/fetch-network/ledger/faucet).

Head over to the [Command Line Interface (CLI) client ↗️](/guides/fetch-network/ledger/cli/intro) section for guidance on how to install and configure the `fetchd` client and perform different operations within the ledger.

<Callout type="warning" emoji="⚠️">
This documentation is currently under construction, and the content may not be up-to-date.
</Callout>
75 changes: 75 additions & 0 deletions pages/concepts/fetch-network/ledger/validators.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import { Callout } from 'nextra/components'

# Validators

## Overview: blockchains, consensus and validators

A **blockchain** is a series of data records that functions as a distributed, replicated digital ledger of transactions across a network of computer systems. On blockchains, the records of transactions are compiled into **blocks** which are linked together to form a chain. Thus, blockchains consists of a stable chain of blocks and each one of these blocks stores a list of previously confirmed transactions.

These transactions take place inside a [peer-to-peer (P2P) ↗️](https://www.investopedia.com/terms/p/peertopeer-p2p-service.asp) global network, thus, blockchains are considered borderless and immune to censorship. A blockchain network serves as a decentralized ledger since it is maintained by several computers located all over the world. This implies that each participant, namely **node**, keeps a copy of the blockchain data and interacts with other participants to make sure that everyone is aware of the same information stored in the block.

A blockchain, including the Fetch.ai Ledger, provides a secure and transparent way to record transactions, enabling trustless interactions between parties and eliminating the need for a central authority to oversee transactions. **This is especially crucial in decentralized systems in which multiple parties need to engage in secure and verifiable transactions**. Despite the absence of a central authority to confirm and authenticate the transactions, every blockchain transaction is considered totally safe and validated. Only the presence of a **consensus protocol** makes this feasible. A consensus algorithm allows every node in the blockchain network to agree on the distributed ledger's current state. These protocols ensures that all nodes in the network reach a common agreement on the order and validity of transactions.

More specifically, a **node** is any device or computer that participates in the network by maintaining a copy of the blockchain ledger, validating transactions, and broadcasting them to other nodes. Nodes can be categorized into different types, including **full** and **validator nodes**. These latter ones are specific type of node responsible for participating in the consensus process. These validate transactions, create new blocks, and contribute to the security and operation of the blockchain network. Validator nodes typically require a significant amount of cryptocurrency to be staked and which serves as collateral and as an incentive for them to act honestly.

**The most well-known consensus mechanisms** are:

- **Proof of Work (PoW)**: this is the original consensus protocol used by Bitcoin. It requires nodes (i.e. miners) to perform computationally intensive tasks to validate transactions and create new blocks. The first miner to solve the mathematical puzzle gets to add a block to the blockchain.

- **Proof of Stake (PoS)**: in this protocol, nodes (i.e. validators) are chosen based on the amount of cryptocurrency they hold and are willing to stake as collateral. Validators take turns proposing and validating blocks, and they earn rewards for their participation in the form of transaction fees and block.

**Compensation and incentives for validators** can take the form of:

- **Block rewards**: in PoW and some PoS systems, validators are rewarded with newly created cryptocurrency tokens for successfully adding a new block to the blockchain.

- **Transaction fees**: validators may receive transaction fees paid by users for including their transactions in a block.

- **Delegation rewards**: in PoS networks, validators who receive delegated stakes from token holders may share a portion of the rewards with their delegators. This encourages token holders to delegate their stakes to reputable validators.

- **Slashing penalties**: while not a form of compensation, validators can be penalized (i.e. slashed) for malicious behavior or violations of network rules. The penalties are typically deducted from the validator's committed stake.

In this context, the Fetch.ai Ledger relies on a set of validators that are responsible for committing new blocks in the blockchain. These validators participate in the consensus protocol by broadcasting votes which contain cryptographic signatures signed by each validator's private key. As previously highlighted, validator candidates can have FET delegated or staked to them by token holders. The validators are determined by who has the most stake delegated to them. The top validator candidates with the most stake become **active validators** within the network.

<Callout type="warning" emoji="⚠️">
If validators double sign, are frequently offline or do not participate in governance, their staked FET (including FET of users that delegated to them) can be slashed. The penalty depends on the severity of the violation.
</Callout>

### Test network (Testnet) vs Main Network (Mainnet)

We can distinguish between:

- **Testnet**: it is a separate blockchain environment that developers and users can use to test new features or applications without risking real tokens. It allows for experimentation in a controlled environment.

- **Mainnet**: it is the actual production blockchain where real transactions occur with real tokens. It is the live version of the blockchain.

<Callout type="info" emoji="ℹ️">
By setting up and experimenting on a testnet first, developers can ensure that everything works as intended before deploying it on the mainnet. This helps in avoiding potential issues or vulnerabilities in a live environment.
</Callout>

## Set up a validator node

If you are willing to set up a validator node on the Fetch network, visit our dedicated [guide ↗️](/guides/fetch-network/ledger/setup-validator-node).

### Hardware requirements

The hardware resources for running a validator node largely depend on the network load. As a _recommended configuration_, we suggest the following requirements:

- 2 x CPU, either Intel or AMD, with the SSE4.1, SSE4.2 and AVX flags (use lscpu to verify).
- 8 GB RAM.
- 500 GB SSD.
- 100 Mbit/s always-on internet connection.
- Linux OS (Ubuntu 18.04 or 20.04 recommended)/MacOS.

Up-time is incredibly important for being a validator. It is expected that validators will have appropriate redundancies for compute, power, connectivity and so on. While the blockchain itself is highly replicated, it is also expected that validators will perform local storage backups in order to minimise validator down-time.

### Set up a website for your validator

Set up a dedicated validator's website and signal your intention to become a validator on our [Discord ↗️](https://discord.gg/fetchai) server. This is important since delegators will want to have information about the entity they are delegating their FET to.

This is not necessary, however, it is recommended given that as a validator on the network, you will want to get other community users to delegate stake to your validator. The higher the delegated stake to a specific validator, the greater the share of the block rewards it will take.

## Community

We highly recommend to check out the validator community on the discord channel for more information and to check the latest announcements about becoming a validator within the Fetch.ai network:

- [Discord ↗️](https://discord.gg/fetchai).
Loading