Skip to content

Commit

Permalink
Merge branch 'master' into feat/automation-code-testing-of-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamgambhir97 authored Oct 6, 2023
2 parents edf81c6 + a6da4f6 commit 500f33d
Show file tree
Hide file tree
Showing 47 changed files with 2,280 additions and 194 deletions.
17 changes: 17 additions & 0 deletions components/feature-guide-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,17 @@ export const FeatureGuideTabs = () => {
"A guide for converting Native FET to and from ERC-20 FET.",
path: "/guides/fetch-network/how-to-convert-fet-to-and-from-erc20",
},
{
title: "How to get testnet tokens via the Token Faucet 💰",
description:
"Learn how to get testnet tokens using the Faucet service.",
path: "/guides/fetch-network/ledger/faucet",
},
{
title: "Ledger",
description: "Get started with the Fetch Ledger.",
path: "/concepts/fetch-network/ledger/intro",
},
{
title: "CosmPy",
description: "A guide helping you to get started with CosmPy tools.",
Expand All @@ -152,6 +163,12 @@ export const FeatureGuideTabs = () => {
description: "A guide helping you to get started with Jenesis tools.",
path: "/guides/fetch-network/jenesis/getting-started",
},
{
title: "How to get testnet tokens via the token faucet 💰",
description:
"Get testnet tokens and start developing on the Fetch.ai testnet.",
path: "/guides/fetch-network/ledger/faucet",
},
],
},
];
Expand Down
22 changes: 22 additions & 0 deletions components/landing-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ function LandingPage() {
},
];

const beginnerGuides = [
{
label: "AI Agents 101 🤖",
path: "/guides/agent-courses/introductory-course",
icon: AgentverseGettingStartedIcon,
},
];

const GuideBox = ({
guide,
}: {
Expand Down Expand Up @@ -85,6 +93,20 @@ function LandingPage() {
</div>
</section>


<section className="nx-mt-60 landing-page-left-image">
<p className={styles.subTitle}>Beginner series</p>
<p className={styles.description}>Comprehensive guides for people new to programming and Fetch.ai</p>

<div className={styles.startGuides}>
<div className="nx-grid nx-grid-cols-1 sm:nx-grid-cols-2 md:nx-grid-cols-3 lg:nx-grid-cols-4 nx-gap-4">
{beginnerGuides.map((guide, index) => {
return <GuideBox key={index} guide={guide} />;
})}
</div>
</div>
</section>

<section className="nx-mt-landing-page-sections">
<div className="nx-flex nx-justify-between">
<p className={styles.subTitle}>Featured Guides</p>
Expand Down
4 changes: 2 additions & 2 deletions components/products.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ const items: { [key: string]: Item[] } = {
},
{
title: "Ledger",
description: <>Coming soon.</>,
description: <>Get started with the Fetch Ledger.</>,
icon: ledgerIcon,
path: "",
path: "/concepts/fetch-network/ledger/intro",
},
],
};
Expand Down
27 changes: 26 additions & 1 deletion pages/concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ import { GuideBox } from "../components/feature-guide-tabs";
## DeltaV

<div className="nx-text-fetch-content">
Discover DeltaV revolutionary features and services for AI-based commerce and service activities.
Discover DeltaV revolutionary features and services for AI-based commerce and services activities.
</div>

<Grid2>
Expand All @@ -159,6 +159,7 @@ import { GuideBox } from "../components/feature-guide-tabs";
</Grid2>

## Fetch network

<div className="nx-text-fetch-content">
Discover the tools and products constituting and adopted within the Fetch network.
</div>
Expand All @@ -175,9 +176,33 @@ import { GuideBox } from "../components/feature-guide-tabs";

</Grid2>

### Ledger

<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 Down
1 change: 1 addition & 0 deletions pages/concepts/fetch-network/_meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"native-and-erc20-fet-tokens": "Native and ERC-20 FET tokens",
"ledger": "Ledger",
"indexer": "Indexer"
}
4 changes: 2 additions & 2 deletions pages/concepts/fetch-network/indexer/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ The **ledger-subquery** is a [SubQuery-based ↗️](https://www.subquery.networ

For a list of tracked entities, see the [schema.graphql file ↗️](https://github.com/fetchai/ledger-subquery/blob/main/schema.graphql).

To learn more about how to [run ↗️](https://academy.subquery.network/run_publish/run.html) or [change this SubQuery Project ↗️](https://academy.subquery.network/quickstart/quickstart_chains/cosmos.html), get your own custom GraphQL API for your app, [visit the SubQuery Academy ↗️](https://academy.subquery.network/) for further documentation.
You can learn more on how to [run ↗️](https://academy.subquery.network/run_publish/run.html) or [change the SubQuery Project ↗️](https://academy.subquery.network/quickstart/quickstart_chains/cosmos.html), get your own custom GraphQL API for your app, by [visiting the SubQuery Academy ↗️](https://academy.subquery.network/) for further documentation.

Further information on the Indexer can be found in the [References ↗️](/references) section of our documentation.
Further information on the Indexer can be found within the [References ↗️](/references) section of our documentation.

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

# Ledger

## Introduction 🚀

A **ledger** refers to a decentralized and distributed digital book 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 such as [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 here, you will find all information to setup your client and connect on the network.

Head over to our [guides ↗️](/guides) section and get yourself started with the ledger [installation ↗️](/guides/fetch-network/ledger/installation) and different executable operations.

You can also visit the [references ↗️](/references) section for further information on ledger related topics, including [active networks ↗️](/references/fetch-network/ledger/active-networks) specifications, [ledger versions ↗️](/references/fetch-network/ledger/versions), and the [Command Line Interface (CLI) ↗️](/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 using the CLI.

<Callout type="info" emoji="ℹ️">
This documentation covers the things you need to know in order to prepare yourself and start developing on the Fetch network.
</Callout>

## Test networks

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

<Callout type="warning" emoji="⚠️">
This documentation is currently under construction, and the content may not be up-to-date.
</Callout>
81 changes: 81 additions & 0 deletions pages/concepts/fetch-network/ledger/validators.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
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 a **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 removing the need for a central authority to overlook transactions.

<Callout type="info" emoji="ℹ️">
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.
</Callout>

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. The consensus protocol 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

0 comments on commit 500f33d

Please sign in to comment.