From a10dbc885d0308c085cf65e72398ff3215d71001 Mon Sep 17 00:00:00 2001 From: Raymond Sukanto Date: Tue, 7 Jan 2025 23:17:09 +0700 Subject: [PATCH 1/4] update mainnet acp 77 --- .../avalanche-mainnet.mdx | 443 ++++-------------- 1 file changed, 93 insertions(+), 350 deletions(-) diff --git a/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx b/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx index 21d2644b6d2..1c47c81eaae 100644 --- a/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx +++ b/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx @@ -12,9 +12,7 @@ After managing a successful Avalanche L1 deployment on the `Fuji Testnet`, you'r This tutorial shows how to do the following on `Mainnet`. -- Create an Avalanche L1. -- Deploy a virtual machine based on Subnet-EVM. -- Join a node to the newly created Avalanche L1. +- Deploy an Avalanche L1. - Add a node as a validator to the Avalanche L1. @@ -23,49 +21,15 @@ All IDs in this article are for illustration purposes only. They are guaranteed ## Prerequisites -- 5+ nodes running and [fully bootstrapped](/nodes) on `Mainnet` +- An Avalanche node running and [fully bootstrapped](/nodes) on `Mainnet` - [Avalanche-CLI is installed](/tooling/guides/get-avalanche-cli) on each validator node's box - A [Ledger](https://www.ledger.com/) device - You've [created an Avalanche L1 configuration](/avalanche-l1s/build-first-avalanche-l1#create-your-avalanche-l1-configuration) and fully tested a [Fuji Testnet Avalanche L1 deployment](/avalanche-l1s/deploy-a-avalanche-l1/fuji-testnet) - -Although only one validator is strictly required to run an Avalanche L1, running with less than five validators is extremely dangerous and guarantees network downtime. Plan to support at least five validators in your production network. - - -### Getting Your Mainnet NodeIDs[​](#getting-your-mainnet-nodeids "Direct link to heading") - -You need to collect the NodeIDs for each of your validators. This tutorial uses these NodeIDs in several commands. - -To get the NodeID of a `Mainnet` node, call the [info.getNodeID](/api-reference/info-api#infogetnodeid) endpoint. For example: - -```bash -curl -X POST --data '{ - "jsonrpc":"2.0", - "id" :1, - "method" :"info.getNodeID" -}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info -``` - -The response should look something like: - -```json -{ - "jsonrpc": "2.0", - "result": { - "nodeID": "NodeID-5mb46qkSBj81k9g9e4VFjGGSbaaSLFRzD" - }, - "id": 1 -} -``` - -In the sample response, `NodeID-5mb46qkSBj81k9g9e4VFjGGSbaaSLFRzD` is the NodeID. Note that the `NodeID-` prefix is part of the NodeID. - ### Setting up Your Ledger[​](#setting-up-your-ledger "Direct link to heading") In the interest of security, all Avalanche-CLI `Mainnet` operations require the use of a connected Ledger device. You must unlock your Ledger and run the Avalanche App. See [How to Use Ledger](https://support.avax.network/en/articles/6150237-how-to-use-a-ledger-nano-s-or-nano-x-with-avalanche) for help getting set up. -Avalanche-CLI supports the Ledger `Nano X`, `Nano S`, and `Nano S Plus`. - Ledger devices support TX signing for any address inside a sequence automatically generated by the device. By default, Avalanche-CLI uses the first address of the derivation, and that address needs funds to issue the TXs to create the Avalanche L1 and add validators. @@ -84,10 +48,10 @@ avalanche key list --ledger 0 --mainnet +--------+---------+-------------------------+-----------------------------------------------+---------+---------+ ``` -The command prints the P-Chain address for `Mainnet`, `P-avax1ucykh6ls8thqpuwhg3vp8vvu6spg5e8tp8a25j`, and its balance. You should fund this address with at least 2.5 AVAX to cover TX fees. the TX fee for creating your Avalanche L1 costs 2 AVAX. Adding validators costs 0.001 AVAX each. For more details, see [Fees](/api-reference/standards/guides/txn-fees) +The command prints the P-Chain address for `Mainnet`, `P-avax1ucykh6ls8thqpuwhg3vp8vvu6spg5e8tp8a25j`, and its balance. -You can use the `key list` command to get any Ledger address in the derivation sequence by changing the index parameter from `0` to the one desired, or to a list of them (for example: `2`, or `0,4,7`). Also, you can ask for addresses on `Fuji` with the `--fuji` parameter, and local networks with the `--local` parameter. +You can use the `key list` command to get any Ledger address in the derivation sequence by changing the index parameter from `0` to the one desired, or to a list of them (for example: `2`, or `0,4,7`). Also, you can ask for addresses on `Mainnet` with the `--mainnet` parameter, and local networks with the `--local` parameter. #### Funding the Ledger[​](#funding-the-ledger "Direct link to heading") @@ -101,7 +65,31 @@ You can move test funds from the C-Chain to the P-Chain by clicking Stake on Cor Deploy the Avalanche L1[​](#deploy-the-avalanche-l1 "Direct link to heading") ----------------------------------------------------------------- -With your Ledger unlocked and running the Avalanche app, run + +To deploy the Avalanche L1, you will need some AVAX on the P-chain. + + +For our Fuji example, we used our local machine as a bootstrap validator. However, since bootstrapping a node to Mainnet will take several hours, +we will use an Avalanche node set up on an AWS server that is already bootstrapped to Mainnet for this example. + +To check if the Avalanche node is done bootstrapping, ssh into the node and call [`info.isBootstrapped`](/api-reference/info-api#infoisbootstrapped) by copying and pasting the following command: + +```bash +curl -X POST --data '{ + "jsonrpc":"2.0", + "id" :1, + "method" :"info.isBootstrapped", + "params": { + "chain":"P" + } +}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info +``` + +If this returns `true`, it means that the chain is bootstrapped and we will proceed to deploying our L1. + +We will need to have the Avalanche node's NodeID, BLS public key and proof of possession. These can be obtained by ssh into the node itself and run the `getNodeID` API specified [here](https://docs.avax.network/api-reference/info-api#infogetnodeid) + +To deploy the new Avalanche L1, with your Ledger unlocked and running the Avalanche app, run: ```bash avalanche blockchain deploy testblockchain @@ -112,12 +100,12 @@ This is going to start a new prompt series. ```bash Use the arrow keys to navigate: ↓ ↑ → ← ? Choose a network to deploy on: - Local Network + ▸ Local Network Fuji - ▸ Mainnet + Mainnet ``` -This tutorial is about deploying to `Mainnet`, so navigate with the arrow keys to `Mainnet` and hit enter. +This tutorial is about deploying to `Mainnet`, so navigate with the arrow keys to `Mainnet` and hit enter. The user is then asked to provide which private key to use for the deployment. Select a key to has P-Chain AVAX to pay for transaction fees. ```bash ✔ Mainnet @@ -130,341 +118,133 @@ After that, CLI shows the `Mainnet` Ledger address used to fund the deployment: Ledger address: P-avax1ucykh6ls8thqpuwhg3vp8vvu6spg5e8tp8a25j ``` -The deployment requires running a `createSubnet` transaction and a `createBlockchain` transaction, and so this first Ledger address must have the funds to issue both operations. - -This tutorial creates a permissioned Avalanche L1. As such, you must specify which P-Chain addresses can control the Avalanche L1. These addresses are known as `Control Keys`. The CLI can automatically set your Ledger's address as the sole control key or the user may specify a custom list. - - -In production Avalanche L1s, you should always use multiple control keys running in a multisig configuration. This tutorial uses a single control key for illustrative purposes only. - -For instructions on controlling your Avalanche L1 with a multisig, see the [Multisig Deployment Tutorial](/avalanche-l1s/deploy-a-avalanche-l1/multisig-auth). - +Select `No` to using local machine as a bootstrap validator on the blockchain. ```bash -Configure which addresses may make changes to the Avalanche L1. -These addresses are known as your control keys. You are going to also -set how many control keys are required to make an Avalanche L1 change (the threshold). +You can use your local machine as a bootstrap validator on the blockchain +This means that you don't have to to set up a remote server on a cloud service (e.g. AWS / GCP) to be a validator on the blockchain. Use the arrow keys to navigate: ↓ ↑ → ← -? How would you like to set your control keys?: - ▸ Use ledger address - Custom list +? Do you want to use your local machine as a bootstrap validator?: + Yes + ▸ No ``` -For this tutorial, opt to use the first Ledger address, so enter at `Use ledger address`. Only this address is going to be able to add or remove validators, or create blockchains on the Avalanche L1. +Enter 1 as the number of bootstrap validators we will be setting up. ```bash -Your Avalanche L1's control keys: [P-avax1ucykh6ls8thqpuwhg3vp8vvu6spg5e8tp8a25j] -Your Avalanche L1 auth keys for chain creation: [P-avax1ucykh6ls8thqpuwhg3vp8vvu6spg5e8tp8a25j] +✔ No +✗ How many bootstrap validators do you want to set up?: 1 ``` -Next, the CLI generates a TX for creating the SubnetID and asks the user to sign it by using the Ledger. - -```bash -*** Please sign Avalanche L1 creation hash on the ledger device *** -``` - -This activates a `Please review` window on the Ledger. Navigate to the Ledger's `APPROVE` window by using the Ledger's right button, and then authorize the request by pressing both left and right buttons. - -If the Ledger doesn't have enough funds, the user may see an error message: +Select `Yes` since we have already set up our Avalanche Node on AWS. ```bash -*** Please sign Avalanche L1 creation hash on the ledger device *** -Error: insufficient funds: provided UTXOs need 1000000000 more units of asset "U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK" +If you have set up your own Avalanche Nodes, you can provide the Node ID and BLS Key from those nodes in the next step. +Otherwise, we will generate new Node IDs and BLS Key for you. +Use the arrow keys to navigate: ↓ ↑ → ← +? Have you set up your own Avalanche Nodes?: + ▸ Yes + No ``` -If successful, the CLI next asks you to sign a chain creation TX. +Next, we will enter the node's Node-ID: ```bash -Avalanche L1 has been created with ID: 2UUCLbdGqawRDND7kHjwq3zXXMPdiycG2bkyuRzYMnuTSDr6db. Now creating blockchain... -*** Please sign blockchain creation hash on the ledger device *** +Getting info for bootstrap validator 1 +✗ What is the NodeID of the node you want to add as bootstrap validator?: █ ``` -This activates a `Please review` window on the Ledger. Navigate to the Ledger's `APPROVE` window by using the Ledger's right button, and then authorize the request by pressing both left and right buttons. - -After that, CLI creates the blockchain within the Avalanche L1, and a summary window for the deployment appears: +And BLS public key and proof of possession: ```bash -+--------------------+------------------------------------------------------------------------------------+ -| DEPLOYMENT RESULTS | | -+--------------------+------------------------------------------------------------------------------------+ -| Chain Name | testblockchain | -+--------------------+------------------------------------------------------------------------------------+ -| Subnet ID | 2UUCLbdGqawRDND7kHjwq3zXXMPdiycG2bkyuRzYMnuTSDr6db | -+--------------------+------------------------------------------------------------------------------------+ -| VM ID | rW1esjm6gy4BtGvxKMpHB2M28MJGFNsqHRY9AmnchdcgeB3ii | -+--------------------+------------------------------------------------------------------------------------+ -| Blockchain ID | wNoEemzDEr54Zy3iNn66yjUxXmZS9LKsZYSUciL89274mHsjG | -+--------------------+------------------------------------------------------------------------------------+ -| RPC URL | http://127.0.0.1:9650/ext/bc/wNoEemzDEr54Zy3iNn66yjUxXmZS9LKsZYSUciL89274mHsjG/rpc | -+--------------------+------------------------------------------------------------------------------------+ -| P-Chain TXID | wNoEemzDEr54Zy3iNn66yjUxXmZS9LKsZYSUciL89274mHsjG | -+--------------------+------------------------------------------------------------------------------------+ +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?: █ ``` -Well done. You have just created your own Avalanche L1 running on `Mainnet`. Now it's time to add your validators. - -Request to Join an Avalanche L1 as a Validator[​](#request-to-join-a-avalanche-l1-as-a-validator "Direct link to heading") -------------------------------------------------------------------------------------------------------------- - -The new Avalanche L1 created in the previous steps doesn't have any dedicated validators yet. To request permission to validate an Avalanche L1, the following steps are required: - - -Adding a validator on an Avalanche L1 requires that the node is already a validator on the primary network, which means that your node has **fully bootstrapped**. - -See [here](/nodes/validate/node-validator#add-a-validator-with-core-extension) on how to become a validator. - - -First, request permission to validate by running the `join` command along with the Avalanche L1 name: +Next, the CLI generates a CreateSubnet TX to create the Subnet and asks the user to sign it by using the Ledger. ```bash -avalanche blockchain join testblockchain -``` - -Note: Running `join` does not guarantee that your node is a validator of the Avalanche L1! The owner of the Avalanche L1 must approve your node to be a validator afterwards by calling `addValidator` as described in the next section. - -### Select Mainnet[​](#select-mainnet "Direct link to heading") - -When you `join` command, you are first prompted with the network selection. Choose `Mainnet`: - -```bash -Use the arrow keys to navigate: ↓ ↑ → ← -? Choose a network to validate on (this command only supports public networks): - Fuji - ▸ Mainnet -``` - -### Setup Node Automatically[​](#setup-node-automatically "Direct link to heading") - -There are now two choices possible: automatic and Manual configuration. As mentioned earlier, "Automatic" attempts to edit your config file and sets up your plugin directory, while "Manual" just prints the required config to the screen. If you are running the CLI on the same box as your validator, you should run the commands in automated mode. If you don't want to run Avalanche-CLI on the same box as your validator, use the manual commands. - -Select automatic. - -#### Set Config File[​](#set-config-file "Direct link to heading") - -```bash -✔ Automatic -✔ Path to your existing config file (or where it's going to be generated): config.json +*** Please sign Avalanche L1 creation hash on the ledger device *** ``` -Provide a path to a config file. If this command runs on the box where your validator is running, then you could point this to the actually used config file, for example `/etc/avalanchego/config.json` - just make sure the tool has **write** access to the file. Or you could just copy the file later. In any case, the tool is going to either try to edit the existing file specified by the given path, or create a new file. Again, set write permissions. - -#### Set Plugin Directory[​](#set-plugin-directory "Direct link to heading") +This activates a `Please review` window on the Ledger. Navigate to the Ledger's `APPROVE` window by using the Ledger's right button, and then authorize the request by pressing both left and right buttons. -Next, provide the plugin directory. Each VM runs its own binary, called a plugin. Therefore, you need to copy your VM's plugin binary into AvalancheGo's plugin directory. This directory depends on your AvalancheGo install location. +If the Ledger doesn't have enough funds, the user may see an error message: ```bash -✔ Path to your avalanchego plugin dir (likely avalanchego/build/plugins): /home/user/go/src/github.com/ava-labs/avalanchego/build/plugins +*** Please sign Avalanche L1 creation hash on the ledger device *** +Error: insufficient funds: provided UTXOs need 1000000000 more units of asset "U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK" ``` -The tool doesn't know where exactly it's located so it requires the full path. With the path given, it's going to copy the VM binary to the provided location: +If successful, the CLI next asks you to sign a CreateChain Tx. Once CreateChain Tx is signed, it will then ask you to sign ConvertSubnetToL1 Tx. -```bash -✔ Path to your avalanchego plugin dir (likely avalanchego/build/plugins): /home/user/go/src/github.com/ava-labs/avalanchego/build/plugins█ -VM binary written to /home/user/go/src/github.com/ava-labs/avalanchego/build/plugins/tGBrMADESojmu5Et9CpbGCrmVf9fiAJtZM5ZJ3YVDj5JTu2qw -This is going to edit your existing config file. This edit is nondestructive, -but it's always good to have a backup. -Use the arrow keys to navigate: ↓ ↑ → ← -? Proceed?: - ▸ Yes - No -``` +Well done. You have just created your own Avalanche L1 on `Mainnet`. -Hitting `Yes` writes the necessary file: +You will be able to see information on the deployed L1 at the end of `avalanche blockchain deploy` command: ```bash -✔ Yes -The config file has been edited. To use it, make sure to start the node with the '--config-file' -option, e.g. - -./build/avalanchego --config-file config.json - -(using your binary location). The node has to be restarted for the changes to take effect. ++--------------------+----------------------------------------------------+ +| DEPLOYMENT RESULTS | | ++--------------------+----------------------------------------------------+ +| Chain Name | testblockchain | ++--------------------+----------------------------------------------------+ +| Subnet ID | 2cNuyBhvAd4jH5bFSGndezhB66Z4UHYAsLCMGoCpvhXVhrZfgd | ++--------------------+----------------------------------------------------+ +| VM ID | qcvkEX1zWSz7PtGd7CKvPRBqLVTzA7qyMPvkh5NMDWkuhrcCu | ++--------------------+----------------------------------------------------+ +| Blockchain ID | 2U7vNdB78xTiN6QtZ9aetfKoGtQhfeEPQG6QZC8bpq8QMf4cDx | ++--------------------+ + +| P-Chain TXID | | ++--------------------+----------------------------------------------------+ ``` -#### Restart the Node[​](#restart-the-node "Direct link to heading") - -It's **required to restart the node**. - -### Setup Node Manually[​](#setup-node-manually "Direct link to heading") - -By choosing "Manual" instead, the tool prints _instructions_. The user is going to have to follow these instructions and apply them to the node. Note that the IDs for the VM and Avalanche L1 are different for each Avalanche L1 deployment and you shouldn't copy them from this tutorial. - -```bash -✔ Manual - -To setup your node, you must do two things: - -1. Add your VM binary to your node's plugin directory -2. Update your node config to start validating the Avalanche L1 - -To add the VM to your plugin directory, copy or scp from /tmp/tGBrMADESojmu5Et9CpbGCrmVf9fiAJtZM5ZJ3YVDj5JTu2qw - -If you installed avalanchego manually, your plugin directory is likely -avalanchego/build/plugins. - -If you start your node from the command line WITHOUT a config file (e.g. via command -line or systemd script), add the following flag to your node's startup command: - ---track-subnets=2b175hLJhGdj3CzgXENso9CmwMgejaCQXhMFzBsm8hXbH2MF7H -(if the node already has a track-subnets config, append the new value by -comma-separating it). - -For example: -./build/avalanchego --network-id=Mainnet --track-subnets=2b175hLJhGdj3CzgXENso9CmwMgejaCQXhMFzBsm8hXbH2MF7H - -If you start the node via a JSON config file, add this to your config file: -track-subnets: 2b175hLJhGdj3CzgXENso9CmwMgejaCQXhMFzBsm8hXbH2MF7H - -TIP: Try this command with the --avalanchego-config flag pointing to your config file, -this tool is going to try to update the file automatically (make sure it can write to it). - -After you update your config, you are going to need to restart your node for the changes to -take effect. -``` +To get your new Avalanche L1 information, visit the [Avalanche L1 Explorer](https://subnets-test.avax.network/). The search best works by blockchain ID, so in this example, enter `2U7vNdB78xTiN6QtZ9aetfKoGtQhfeEPQG6QZC8bpq8QMf4cDx` into the search box and you should see your shiny new blockchain information. Add a Validator[​](#add-a-validator "Direct link to heading") ------------------------------------------------------------- - -If the `join` command isn't successfully completed before `addValidator` is completed, the Avalanche L1 could experience degraded performance or even halt. - - -Now that the node has joined the Avalanche L1, an Avalanche L1 control key holder must call `addValidator` to grant the node permission to be a validator in your Avalanche L1. +Before proceeding to add a validator to our Avalanche L1, we will need to have the validator's NodeID, BLS public key and proof of possession. These can be obtained by ssh into the node itself and run the `getNodeID` API specified [here](https://docs.avax.network/api-reference/info-api#infogetnodeid) -To whitelist a node as a recognized validator on the Avalanche L1, run: +To add a validator to an Avalanche L1, the owner of the key that acts as the controller of ValidatorManager contract specified in `avalanche blockchain create` command above run: ```bash avalanche blockchain addValidator testblockchain ``` -You need to repeat this process for every validator you add to the network. - -You can run the `addValidator` transactions from the same box that deployed the Avalanche L1. - -### Submit addValidator TX to Mainnet[​](#submit-addvalidator-tx-to-mainnet "Direct link to heading") - -First choose `Mainnet` as the network to add the Avalanche L1 validator to. +Choose `Mainnet`: ```bash Use the arrow keys to navigate: ↓ ↑ → ← -? Choose a network to add validator to.: - Fuji +? Choose a network to deploy on: ▸ Mainnet ``` -Because this operation issues a new transaction, the CLI needs the control keys to sign the operation. Because this tutorial only uses one control key in the Avalanche L1, the process looks slightly different if you use multiple controls keys. The address needs to pay a TX fee of 0.001 AVAX. - -```bash -Your Avalanche L1 auth keys for add validator tx creation: [P-avax1ucykh6ls8thqpuwhg3vp8vvu6spg5e8tp8a25j] -``` - -### Set NodeID[​](#set-nodeid "Direct link to heading") - -Now enter the [NodeID](#getting-your-mainnet-nodeids) of the validator. - -```bash -Next, we need the NodeID of the validator you want to whitelist. - -Check https://docs.avax.network/apis/avalanchego/apis/info#infogetnodeid for instructions about how -to query the NodeID from your node -(Edit host IP address and port to match your deployment, if needed). -✔ What is the NodeID of the validator you'd like to whitelist?: NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg█ -``` - -Note, this ID is intentionally modified to prevent replication. - -### Set Stake Weight[​](#set-stake-weight "Direct link to heading") - -Select 30 as the stake weight. - - -The stake weight of all your validators should sum to at least 100. - - -```bash -Use the arrow keys to navigate: ↓ ↑ → ← -? What stake weight would you like to assign to the validator?: - Default (20) - ▸ Custom -``` - -```bash -✔ What stake weight would you like to assign to the validator?: 30 -``` - -### Set Validation Start Time[​](#set-validation-start-time "Direct link to heading") - -Next, specify when the validator is going to start validating. The time must be in the future. You can use the custom option to enter a specific date in `YYYY-MM-DD HH:MM:SS` format. Follow the default this time: - -```bash -Use the arrow keys to navigate: ↓ ↑ → ← -? Start time: - ▸ Start in one minute - Custom -``` - -### Set Validation Duration[​](#set-validation-duration "Direct link to heading") - -Finally, specify how long it's going to be validating: - -```bash -✔ Start in one minute -Use the arrow keys to navigate: ↓ ↑ → ← -? How long should your validator validate for?: - ▸ Until primary network validator expires - Custom -``` - -If you choose `Custom` here, you need to enter a **duration**, which is a time span expressed in hours. For example, say `200 days = 24 \* 200 = 4800h` +The CLI will show the Ledger address that will be used to pay for add validator tx: ```bash -✔ How long should this validator be validating? Enter a duration, e.g. 8760h: 4800h +Ledger address: P-avax1ucykh6ls8thqpuwhg3vp8vvu6spg5e8tp8a25j ``` -The CLI shows the user an actual date: +Now enter the **NodeID** of the new validator to be added. ```bash -? Your validator is going to finish staking by 2023-06-10 13:07:58: - ▸ Yes - No +What is the NodeID of the validator you'd like to whitelist?: NodeID-BFa1paAAAAAAAAAAAAAAAAAAAAQGjPhUy ``` -Confirm if correct. +Next, enter the node's BLS public key and proof of possession. -### Issue the TX[​](#issue-the-tx "Direct link to heading") +Now, enter the amount of AVAX that you would like to allocate to the new validator. -At this point the prompt series is complete and the CLI attempts the transaction: - -```bash -NodeID: NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg -Network: Mainnet -Start time: 2022-11-22 13:07:58 -End time: 2023-06-10 13:07:58 -Weight: 30 -Inputs complete, issuing transaction to add the provided validator information... -``` - -The CLI shows the Ledger address: - -```bash -Ledger address: P-avax1ucykh6ls8thqpuwhg3vp8vvu6spg5e8tp8a25j -``` +The validator's balance is used to pay for continuous fee to the P-Chain. When this Balance reaches 0, the validator will be considered inactive and will no longer participate in validating the L1. -At this point, if the Ledger address isn't the control key for the Avalanche L1, the user receives an error: +1 AVAX should last the validator about a month. ```bash -Error: wallet doesn't contain Avalanche L1 auth keys -exit status 1 +What balance would you like to assign to the validator (in AVAX)?: 1 ``` -If the Ledger doesn't have enough funds, the following error message appears: - -```bash -*** Please sign Avalanche L1 creation hash on the ledger device *** -Error: insufficient funds: provided UTXOs need 1000000 more units of asset "U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK" -``` - -Otherwise, both the CLI and the Ledger request to sign the TX: +Sign the add validator TX on Ledger: ```bash *** Please sign add validator hash on the ledger device *** @@ -478,46 +258,9 @@ This might take a couple of seconds. After, it prints: Transaction successful, transaction ID: r3tJ4Wr2CWA8AaticmFrKdKgAs5AhW2wwWTaQHRBZKwJhsXzb ``` -This means the node is now a validator on the given Avalanche L1 on `Mainnet`! However, your work isn't complete. You **must** finish the [Request to Join an Avalanche L1 as a Validator](#request-to-join-a-avalanche-l1-as-a-validator) section otherwise your Avalanche L1 risks downtime. - -You can get the P-Chain TX id information on [Avalanche Explorer](https://subnets.avax.network/) - -Avalanche L1 Export[​](#avalanche-l1-export "Direct link to heading") ---------------------------------------------------------- - -Because you need to setup multiple validators on multiple different machines, you need to export your Avalanche L1's configuration and import it on each validator. - -```bash -avalanche blockchain export testblockchain -✔ Enter file path to write export data to: /tmp/testblockchain-export.dat -``` - -The file is in text format and you shouldn't change it. You can use it to import the configuration on a different machine. - -Avalanche L1 Import[​](#avalanche-l1-import "Direct link to heading") ---------------------------------------------------------- - -To import a VM configuration, move the file you exported in the previous section to your desired machine and issue the `import` command with the path to the file. - -```bash -avalanche blockchain import /tmp/testblockchain-export.dat -Avalanche L1 imported successfully -``` - -After this the whole Avalanche L1 configuration should be available on the target machine: - -```bash -avalanche blockchain list -+---------------+---------------+----------+-----------+----------+ -| Avalanche L1 | CHAIN | CHAIN ID | TYPE | DEPLOYED | -+---------------+---------------+----------+-----------+----------+ -| testblockchain | testblockchain | 3333 | SubnetEVM | No | -+---------------+---------------+----------+-----------+----------+ -``` +This means the node is now a validator on the given Avalanche L1 on `Mainnet`! Going Live[​](#going-live "Direct link to heading") --------------------------------------------------- -Once all of your validators have joined the network, you are ready to issue transactions to your Avalanche L1. - For the safety of your validators, you should setup dedicated API nodes to process transactions, but for test purposes, you can issue transactions directly to one of your validator's RPC interface. From 0a24e87f0d9bef8999106166af81abac05fd429d Mon Sep 17 00:00:00 2001 From: sukantoraymond Date: Thu, 9 Jan 2025 22:07:51 +0700 Subject: [PATCH 2/4] Update content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx Co-authored-by: Meaghan FitzGerald Signed-off-by: sukantoraymond --- .../avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx b/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx index 1c47c81eaae..9c66eac3f7a 100644 --- a/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx +++ b/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx @@ -66,7 +66,7 @@ Deploy the Avalanche L1[​](#deploy-the-avalanche-l1 "Direct link to heading") ----------------------------------------------------------------- -To deploy the Avalanche L1, you will need some AVAX on the P-chain. +To deploy the Avalanche L1, you will need some AVAX on the P-Chain. For our Fuji example, we used our local machine as a bootstrap validator. However, since bootstrapping a node to Mainnet will take several hours, From 4b0dce0a5d8b8f3d270ff8ffe5c8be499f9c4280 Mon Sep 17 00:00:00 2001 From: sukantoraymond Date: Thu, 9 Jan 2025 22:08:39 +0700 Subject: [PATCH 3/4] Update content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx Co-authored-by: Meaghan FitzGerald Signed-off-by: sukantoraymond --- .../avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx b/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx index 9c66eac3f7a..43fca72f07f 100644 --- a/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx +++ b/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx @@ -244,7 +244,7 @@ The validator's balance is used to pay for continuous fee to the P-Chain. When t What balance would you like to assign to the validator (in AVAX)?: 1 ``` -Sign the add validator TX on Ledger: +Sign the addValidatorTx with your Ledger: ```bash *** Please sign add validator hash on the ledger device *** From 1f92c315e142a31c5b857ed6bf35186261dbf9bb Mon Sep 17 00:00:00 2001 From: Raymond Sukanto Date: Thu, 9 Jan 2025 22:20:47 +0700 Subject: [PATCH 4/4] address comments --- .../deploy-a-avalanche-l1/avalanche-mainnet.mdx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx b/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx index 43fca72f07f..2627010f557 100644 --- a/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx +++ b/content/docs/avalanche-l1s/deploy-a-avalanche-l1/avalanche-mainnet.mdx @@ -100,9 +100,9 @@ This is going to start a new prompt series. ```bash Use the arrow keys to navigate: ↓ ↑ → ← ? Choose a network to deploy on: - ▸ Local Network + Local Network Fuji - Mainnet + ▸ Mainnet ``` This tutorial is about deploying to `Mainnet`, so navigate with the arrow keys to `Mainnet` and hit enter. The user is then asked to provide which private key to use for the deployment. Select a key to has P-Chain AVAX to pay for transaction fees. @@ -199,7 +199,10 @@ You will be able to see information on the deployed L1 at the end of `avalanche +--------------------+----------------------------------------------------+ ``` -To get your new Avalanche L1 information, visit the [Avalanche L1 Explorer](https://subnets-test.avax.network/). The search best works by blockchain ID, so in this example, enter `2U7vNdB78xTiN6QtZ9aetfKoGtQhfeEPQG6QZC8bpq8QMf4cDx` into the search box and you should see your shiny new blockchain information. +To get your new Avalanche L1 information, there are two options: + +- Call `avalanche blockchain describe` command or +- Visit the [Avalanche L1 Explorer](https://subnets-test.avax.network/). The search best works by blockchain ID, so in this example, enter `2U7vNdB78xTiN6QtZ9aetfKoGtQhfeEPQG6QZC8bpq8QMf4cDx` into the search box and you should see your shiny new blockchain information. Add a Validator[​](#add-a-validator "Direct link to heading") -------------------------------------------------------------