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

CLI Docs Consolidation and Update For E-Upgrade #1936

Merged
Merged
8 changes: 4 additions & 4 deletions app/(home)/page.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React, {
Fragment,
type ReactElement,
} from 'react';
import { IndentDecrease, Layers, MailIcon, MonitorCheck, Settings, SproutIcon, SquareGanttChart, TerminalIcon, Webhook, HomeIcon, FolderCode, BadgeDollarSign, CpuIcon, Files, Folder, Globe, Link, SquareIcon, ArrowLeftRight, Coins, SquareCode, SquareStackIcon, Triangle, ChevronDownIcon } from 'lucide-react';
import { IndentDecrease, Layers, MailIcon, MonitorCheck, Settings, SproutIcon, SquareGanttChart, TerminalIcon, Webhook, HomeIcon, FolderCode, BadgeDollarSign, CpuIcon, Files, Folder, Globe, Link, SquareIcon, ArrowLeftRight, Coins, SquareCode, SquareStackIcon, Triangle, ChevronDownIcon, Pyramid } from 'lucide-react';
import { RootToggle } from 'fumadocs-ui/components/layout/root-toggle';
import { Menu, Transition } from '@headlessui/react'

Expand Down Expand Up @@ -125,15 +125,15 @@ export function HamburgerMenu(): React.ReactElement {
url: '/dapps',
},
{
title: 'Avalanche CLI',
title: 'Avalanche L1s',
description: 'Build Your L1 Blockchain',
icon: <Layers />,
url: '/avalanche-l1s',
},
{
title: 'EVM L1s',
title: 'EVM Customization',
description: 'Customize the Ethereum VM',
icon: <FolderCode />,
icon: <Pyramid />,
url: '/evm-l1s',
},
{
Expand Down
8 changes: 4 additions & 4 deletions app/layout.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type BaseLayoutProps, type DocsLayoutProps } from 'fumadocs-ui/layout';
import { Title, HomeTitle } from '@/app/layout.client';
import { docsPageTree } from '@/utils/docs-loader';
import { RootToggle } from 'fumadocs-ui/components/layout/root-toggle';
import { MailIcon, SproutIcon, SquareGanttChart, IndentDecrease, Layers, MonitorCheck, Settings, Webhook, Server, FolderCode } from 'lucide-react';
import { MailIcon, SproutIcon, SquareGanttChart, IndentDecrease, Layers, MonitorCheck, Settings, Webhook, Pyramid } from 'lucide-react';

// home page configuration (HomeTitle includes hamburger menu)
export const homebaseOptions: BaseLayoutProps = {
Expand Down Expand Up @@ -68,15 +68,15 @@ export const docsOptions: DocsLayoutProps = {
url: '/dapps',
},
{
title: 'Avalanche CLI',
title: 'Avalanche L1s',
description: 'Build Your L1 Blockchain',
icon: <Layers />,
url: '/avalanche-l1s',
},
{
title: 'EVM L1s',
title: 'EVM Customization',
description: 'Customize the Ethereum VM',
icon: <FolderCode />,
icon: <Pyramid />,
url: '/evm-l1s',
},
{
Expand Down
1,241 changes: 0 additions & 1,241 deletions content/docs/avalanche-l1s/avalanche-cli-avalanche-l1s.mdx

This file was deleted.

219 changes: 169 additions & 50 deletions content/docs/avalanche-l1s/build-first-avalanche-l1.mdx

Large diffs are not rendered by default.

88 changes: 88 additions & 0 deletions content/docs/avalanche-l1s/maintain/add-validator-l1.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: Add Validator
description: Learn how to add a validator to an Avalanche L1.
---


### Add a Validator to an Avalanche L1
owenwahlgren marked this conversation as resolved.
Show resolved Hide resolved
```bash
avalanche blockchin addValidator <blockchainName>
owenwahlgren marked this conversation as resolved.
Show resolved Hide resolved
```
#### Choose Network
Choose the network where the operation will be
```bash
? Choose a network for the operation:
▸ Local Network
Devnet
Fuji Testnet
Mainnet
```

#### Choose P-Chain fee payer
owenwahlgren marked this conversation as resolved.
Show resolved Hide resolved
Choose the key that will be used to pay for the transaction fees on the P-Chain.
```bash
? Which key should be used to pay for transaction fees on P-Chain?:
▸ Use stored key
Use ledger
```

#### Enter Node ID
Enter the NodeID of the node you want to add as a blockchain validator.
```bash
✗ What is the NodeID of the node you want to add as a blockchain validator?:
```
<Callout>
You can find the NodeID in the node's configuration file or the console when first started with avalanchego.
An example of a NodeID is `NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg`
</Callout>

#### Enter the BLS Public Key
Enter the public key of the node's BLS
```bash
Next, we need the public key and proof of possession of the node's BLS
Check https://docs.avax.network/api-reference/info-api#infogetnodeid for instructions on calling info.getNodeID API
✗ What is the node's BLS public key?:
```
<Callout>
You can find the BLS public key in the node's configuration file or the console when first started with avalanchego.
</Callout>

#### Enter BLS Proof of Possession
Enter the proof of possession of the node's BLS
```bash
✗ What is the node's BLS proof of possession?:
```
<Callout>
You can find the BLS proof of possession in the node's configuration file or the console when first started with avalanchego.
</Callout>

#### Enter AVAX Balance
This balance will be used to pay the P-Chain continuous staking fee.
```bash
✗ What balance would you like to assign to the validator (in AVAX)?:
```

#### Enter Leftover AVAX Address
This address will receive any leftover AVAX when the node is removed from the validator set.
```bash
? Which key would you like to set as change owner for leftover AVAX if the node is removed from validator set?:
▸ Get address from an existing stored key (created from avalanche key create or avalanche key import)
Custom
```

#### Enter Disable Validator Address
This address will be able to disable the validator using P-Chain transactions.
```bash
Which address do you want to be able to disable the validator using P-Chain transactions?:
▸ Get address from an existing stored key (created from avalanche key create or avalanche key import)
Custom
```

### Proof of Stake specific parameters
If your network was created with Proof of Stake validator manager, you will be asked for the following additional parameters. You can also pass these parameters as flags to the command.

```bash
--delegation-fee uint16 delegation fee (in bips)
--stake-amount uint amount of native tokens to stake
--staking-period duration how long this validator will be staking
```
62 changes: 62 additions & 0 deletions content/docs/avalanche-l1s/maintain/remove-validator-l1.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: Remove Validator
description: Learn how to remove a validator from an Avalanche L1.
---

### Remove a Validator from an Avalanche L1

```bash
avalanche blockchin removeValidator <blockchainName>
owenwahlgren marked this conversation as resolved.
Show resolved Hide resolved
```

#### Choose the Network
owenwahlgren marked this conversation as resolved.
Show resolved Hide resolved
Choose the network where the validator is registered.
```bash
? Choose a network for the operation:
▸ Local Network
Devnet
Fuji Testnet
Mainnet
```

#### Choose P-Chain fee payer
Choose the key to pay for the transaction fees on the P-Chain.
```bash
? Which key should be used to pay for transaction fees on P-Chain?:
▸ Use stored key
Use ledger
```

#### Enter Node-ID of the validator to remove
owenwahlgren marked this conversation as resolved.
Show resolved Hide resolved
Enter the Node-ID of the validator you want to remove.
```bash
✗ What is the NodeID of the node you want to remove as a blockchain validator?:
```
<Callout>
You can find the NodeID in the node's configuration file or the console when first started with avalanchego.
An example of a NodeID is `NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg`
</Callout>

#### Confirm the removal
```bash
Validator manager owner 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC pays for the initialization of the validator's removal (Blockchain gas token)
RPC Endpoint: http://127.0.0.1:9652/ext/bc/2qmU6w47Mp7D7fGhbRuZm6Z1Nn6FZXZAxKpaeTMFiRQW9CBErh/rpc
Forcing removal of NodeID-7cQrriPWGXa5yuJGZUgsxxwH9j4T8pPkY as it is a PoS bootstrap validator
Using validationID: 228zzCgDmAmuaJDGnFkFgnVqbbJPRF7qF1Xpd3dhtqGDhMjJK2 for nodeID: NodeID-7cQrriPWGXa5yuJGZUgsxxwH9j4T8pPkY
ValidationID: 228zzCgDmAmuaJDGnFkFgnVqbbJPRF7qF1Xpd3dhtqGDhMjJK2
SetSubnetValidatorWeightTX fee: 0.000078836 AVAX
SetSubnetValidatorWeightTx ID: 2FUimPZ37DscPJiQDLrtKtumER3LNr48MJi6VR2jGXkYEKpCaq
✓ Validator successfully removed from the Subnet
```


### Proof of Authority Networks
<Callout>
If the network is a Proof of Authority network, the validator must be removed from the network by the Validator Manager owner.
</Callout>

### Proof of Stake Networks
<Callout>
If the network is a Proof of Stake network, the validator must be removed by the initial staker. Rewards will be distributed to the validator after the removal.
It is important to note that the initial PoS Validator set are treated as bootstrap validators and are not elgible for rewards.
</Callout>
Loading