Verona 백서

Verona

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 54쪽 중 41쪽

to send to a peer # Including space needed by encoding (one varint per transaction). # XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 max_batch_bytes = 0 # ttl-duration, if non-zero, defines the maximum amount of time a transaction # can exist for in the mempool. # # Note, if ttl-num-blocks is also defined, a transaction will be removed if it # has existed in the mempool at least ttl-num-blocks number of blocks or if it's # insertion time into the mempool is beyond ttl-duration. ttl-duration = "0s" # ttl-num-blocks, if non-zero, defines the maximum number of blocks a transaction # can exist for in the mempool. # # Note, if ttl-duration is also defined, a transaction will be removed if it # has existed in the mempool at least ttl-num-blocks number of blocks or if # it's insertion time into the mempool is beyond ttl-duration. ttl-num-blocks = 0 ####################################################### ### State Sync Configuration Options ### ####################################################### [statesync] # State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine # snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in # the network to take and serve state machine snapshots. State sync is not attempted if the node # has any local state (LastBlockHeight > 0). The node will have a truncated block history, # starting from the height of the snapshot. enable = false # RPC servers (comma-separated) for light client verification of the synced state machine and # retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding # header hash obtained from a trusted source, and a period during which validators can be trusted. # # For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 # weeks) during which they can be financially punished (slashed) for misbehavior. rpc_servers = "" trust_height = 0 trust_hash = "" trust_period = "168h0m0s" # Time to spend discovering snapshots before initiating a restore. discovery_time = "15s" # Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). # Will create a new, randomly named directory within, and remove it when done. temp_dir = "" # The timeout duration before re-requesting a chunk, possibly from a different # peer (default: 1 minute). chunk_request_timeout = "10s" # The number of concurrent chunk fetchers to run (default: 1). chunk_fetchers = "4" ####################################################### ### Block Sync Configuration Options ### ####################################################### [blocksync] # Block Sync version to use: # # In v0.37, v1 and v2 of the block sync protocols were deprecated. # Please use v0 instead. # # 1) "v0" - the default block sync implementation version = "v0" ####################################################### ### Consensus Configuration Options ### ####################################################### [consensus] wal_file = "data/cs.wal/wal" # How long we wait for a proposal block before prevoting nil timeout_propose = "100ms" # How much timeout_propose increases with each round timeout_propose_delta = "500ms" # How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) timeout_prevote = "100ms" # How much the timeout_prevote increases with each round timeout_prevote_delta = "500ms" # How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) timeout_precommit = "100ms" # How much the timeout_precommit increases with each round timeout_precommit_delta = "500ms" # How long we wait after committing a block, before starting on the new # height (this gives us a chance to receive some more precommits, even # though we already have +2/3). timeout_commit = "1s" # How many blocks to look back to check existence of the node's consensus votes before joining consensus # When non-zero, the node will panic upon restart # if the same consensus key was used to sign {double_sign_check_height} last blocks. # So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. double_sign_check_height = 0 # Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) skip_timeout_commit = false # EmptyBlocks mode and possible interval between empty blocks create_empty_blocks = true create_empty_blocks_interval = "0s" # Reactor sleep duration parameters peer_gossip_sleep_duration = "100ms" peer_query_maj23_sleep_duration = "2s" ####################################################### ### Storage Configuration Options ### ####################################################### [storage] # Set to true to discard ABCI responses from the state store, which can save a # considerable amount of disk space. Set to false to ensure ABCI responses are # persisted. ABCI responses are required for /block_results RPC queries, and to # reindex events in the command-line tool. discard_abci_responses = false ####################################################### ### Transaction Indexer Configuration Options ### ####################################################### [tx_index] # What indexer to use for transactions # # The application will set which txs to index. In some cases a node operator will be able # to decide which txs to index based on configuration set in the application. # # Options: # 1) "null" # 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). # - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. # 3) "psql" - the indexer services backed by PostgreSQL. # When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. indexer = "kv" # The PostgreSQL connection configuration, the connection format: # postgresql://<user>:<password>@<host>:<port>/<db>?<opts> psql-conn = "" ####################################################### ### Instrumentation Configuration Options ### ####################################################### [instrumentation] # When true, Prometheus metrics are served under /metrics on # PrometheusListenAddr. # Check out the documentation for the list of available metrics. prometheus = true # Address to listen for Prometheus collector(s) connections prometheus_listen_addr = ":26660" # Maximum number of simultaneous connections. # If you want to accept a larger number than the default, make sure # you increase your OS limits. # 0 - unlimited. max_open_connections = 3 # Instrumentation namespace namespace = "cometbft" ``` # Join the Network How to join the network with a configured daemon With a configured Verona daemon, we can attempt to join one of the Verona networks. ## Select a Network | Network | Genesis JSON | Addressbook JSON | Node Snapshot | | ---------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `xion-testnet-2` | [genesis.json](https://raw.githubusercontent.com/burnt-labs/xion-testnet-2/refs/heads/main/config/genesis.json) | [addrbook.json](https://snapshots.polkachu.com/testnet-addrbook/xion/addrbook.json) | [latest.tar.lz4](https://snapshots.polkachu.com/testnet-snapshots/xion/xion_1647937.tar.lz4) | | `xion-mainnet-1` | TBD | TBD | TBD | * The Genesis JSON file specifies the account balances and parameters at the inception of the network, and anchors the application state to a point in time. * The Addressbook lists a selection of peers for your node to dial, such that it may discover other nodes in the network. ## Configure the Network information For detailed information on how to join each network, please refer to its corresponding subsection. <table data-view="cards"><thead><tr><th></th><th align="center"></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td></td><td align="center">xion-testnet-2</td><td></td><td><a href="/en/nodes-and-validators/run-a-node/join-the-network/xion-testnet-2">xion-testnet-2</a></td></tr></tbody></table> ## Start the Verona daemon Finally, with all the configurations in place, we can start synchronizing our node: ``` $ xiond start --x-crisis-skip-assert-invariants --home /home/xiond/.xiond ``` # xion-testnet-2 Details to join the xion-testnet-2 network. ## Hosts and Endpoints The different Hosts and Endpoints of `xion-testnet-2` are: * **Seeds** * `20e1000e88125698264454a884812746c2eb4807@testnet-seeds.lavenderfive.com:22356` * `ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@testnet-seeds.polkachu.com:22356` * `69e1aa5800ffa82615986eac5f99b77c2b8f1ccb@burnt-testnet-seed.itrocket.net:55656` * **Peers** * `0f1c8ed0d4c4a52ecb8fb6c6b2c6f7d1856326d5@65.21.10.115:22356` * `5166bcee9d5db28dfede2a936f2a60e07778fa89@65.109.113.219:22356` * `7108f0b946f7a4b5b88f01bd29edbaf87d4dbfb4@65.109.89.19:22356` * `73b62ebfb71023900d8debb6e6dc7f1379c34686@65.109.58.86:22356` * `85e868567ca46f8d94b1fba87b2fa5b42a271439@141.94.240.117:22356` ## Download the Genesis JSON file We provide a sample snippet which will download the `genesis.json` to the correct destination. ``` #!/usr/bin/env bash set -euxo pipefail BASEDIR="/home/xiond/.xiond" GENESIS_JSON="https://raw.githubusercontent.com/burnt-labs/xion-testnet-2/refs/heads/main/config/genesis.json" curl ${GENESIS_JSON} -o ${BASEDIR}/config/genesis.json -s ``` ## Specify the Seed node to discover peers We provide a sample snippet which will edit the `config.toml` with our Seed node. ``` #!/usr/bin/env bash set -euxo pipefail SEED_NODE="20e1000e88125698264454a884812746c2eb4807@testnet-seeds.lavenderfive.com:22356,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@testnet-seeds.polkachu.com:22356" sed -i.bak -E "s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"$SEED_NODE\"|" ${BASEDIR}/config/config.toml ``` ## Synchronize the chain Now that we've configured our Verona daemon to discover other nodes in the Verona network, we can attempt to synchronize the chain. While it's definitely possible to synchronize the chain from Genesis, we recommend you only do so if you want to run an Archive node, and perform processing on each of the blocks as they come in. Instead, we highly recommend you either download a Node snapshot and restore it locally, or attempt to synchronize using the State Sync feature. These methods are much faster, and provide you with a functional node in a fraction of the time. ### Download a Node Snapshot Downloading the most recent Node Snapshot is the most reliable way to catch up with the chain. We produce Node Snapshots every twenty-four (24) hours, and keep the last six (6) tarballs. As a convenience, the latest Snapshot is available with the `-latest.tar.lz4` suffix. We provide a sample snippet, with which to download our latest public snapshot. ``` #!/usr/bin/env bash set -euxo pipefail BASEDIR="/home/xiond/.xiond" TAR_LZ4="https://snapshots.polkachu.com/testnet-snapshots/xion/xion_1647937.tar.lz4" curl -o - -L ${TAR_LZ4} | lz4 -c -d - | tar -x -v -C ${BASEDIR} ``` ### Restore a State Sync snapshot Syncing the chain using State Sync is the fastest way to catch up with the latest block. We provide a sample snippet, with which to edit the `config.toml` for State Sync. ``` #!/bin/bash set -euxo pipefail SNAP_RPC="https://rpc.xion-testnet-2.burnt.com:443" LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \ BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \ TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \ s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \ s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \ s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.burnt/config/config.toml ``` {% hint style="info" %} :warning: **State Sync is Flaky** While it's a great idea in theory, and when it works it's fantastic, sometimes State Sync just won't cooperate. Notably, it doesn't handle synchronizing WASM data. If State Sync just isn't working for you, **DON'T PANIC!** Try the restore using a Node snapshot instead. {% endhint %} # Confirm node is running If all is setup correctly, you will see a stream of messages like the snippet below: ```bash 3:50PM INF received proposal module=consensus proposal="Proposal{4/0 (FF2048471E9D5C9BC10CEB45C0C7F018C520E76C0C68B178827CFD4FD4402688:1:168EC863D01F, -1) 704E32F3A363 @ 2024-06-24T22:50:37.401132Z}" proposer=BC872B003191D49EB8F900AA0698DF218BD0D0A7 3:50PM INF received complete proposal block hash=FF2048471E9D5C9BC10CEB45C0C7F018C520E76C0C68B178827CFD4FD4402688 height=4 module=consensus 3:50PM INF finalizing commit of block hash=FF2048471E9D5C9BC10CEB45C0C7F018C520E76C0C68B178827CFD4FD4402688 height=4 module=consensus num_txs=0 root=92AD0010299BAB47510BA13C9711437AAC6F2745DC3AB9C0E014B7C2C9FB959B 3:50PM INF minted coins from module account amount=2uxion from=mint module=x/bank 3:50PM INF executed block height=4 module=state num_invalid_txs=0 num_valid_txs=0 3:50PM INF commit synced commit=436F6D6D697449447B5B32362032353220333320313330203336203932203437203232332037312031333820323235203230362031383620323337203135372033302034302031393820373320393020313535203737203732203320323332203720313034203233322032323120313131203430203231375D3A347D module=server 3:50PM INF committed state app_hash=1AFC2182245C2FDF478AE1CEBAED9D1E28C6495A9B4D4803E80768E8DD6F28D9 height=4 module=state num_txs=0 3:50PM INF indexed block events height=4 module=txindex ``` To confirm the node is running run the following command: If on the same machine run `xiond status`, otherwise run `xiond status --node <RPC URL>`. You should see output like this: ```json { "NodeInfo": { "protocol_version": { "p2p": "8", "block": "11", "app": "0" }, "id": "f10f5001726e95c62a763f2d020df6b53b19f44a", "listen_addr": "65.108.134.47:22356", "network": "xion-testnet-2", "version": "0.37.4", "channels": "40202122233038606100", "moniker": "e4fed392-45ec-5eed-98f2-ca1ff10a2409", "other": { "tx_index": "on", "rpc_address": "tcp://0.0.0.0:22357" } }, "SyncInfo": { "latest_block_hash": "AA34628DD2703228D7B1F7526824A6BFD92426A53E5396D8AA3AE5DE786E38EA", "latest_app_hash": "162655290CEE5D8E33800A7FD8197FFC833FFE701E6B2AE0ED45D6336DD8E890", "latest_block_height": "8524122", "latest_block_time": "2024-06-24T22:55:26.352076939Z", "earliest_block_hash": "91960249D3B580C9A7A8964FF32C8EBCF9F3ECAF976DB3472A7F17EE1F829F7D", "earliest_app_hash": "DF28B965DC616AD1E911486C310AFF9DD16A8EE436F59510D5EB52944EE15277", "earliest_block_height": "8221187", "earliest_block_time": "2024-06-06T08:28:57.373856111Z", "catching_up": false }, "ValidatorInfo": { "Address": "CB63B900E0031FA6F4D67B7308A39197B87AAC2F", "PubKey": { "type": "tendermint/PubKeyEd25519", "value": "VH+Q/cJBj5h2OmG3bBtKi/oTbYXywTuHa9h2BbZrX64=" }, "VotingPower": "0" } } ``` # Become a Validator Validators secure the **Verona** network. On-chain naming (`xiond`, bech32 `xion1…`) is unchanged under the Verona rebrand. ## Section Content <table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Initial Setup</strong></td><td></td><td></td><td><a href="/en/nodes-and-validators/become-a-validator/initial-setup">Initial Setup</a></td></tr><tr><td><strong>Obtain a Wallet Address</strong></td><td></td><td></td><td><a href="/en/nodes-and-validators/become-a-validator/obtain-a-wallet-address">Obtain a Wallet Address</a></td></tr><tr><td><strong>Obtain Funds</strong></td><td></td><td></td><td><a href="/en/nodes-and-validators/become-a-validator/obtain-funds">Obtain Funds</a></td></tr><tr><td><strong>Create Validator</strong></td><td></td><td></td><td><a href="/en/nodes-and-validators/become-a-validator/create-validator">Create Validator</a></td></tr><tr><td><strong>IBC Relayers</strong></td><td></td><td></td><td><a href="/en/nodes-and-validators/ibc-relayers">IBC Relayers and Tokens</a></td></tr></tbody></table> # Initial Setup How to run a Validator Node on the Verona network {% hint style="info" %} :warning: **Disclaimer** While setting up a rudimentary validator node is easy, running a production-grade validator node with a robust architecture and security features requires a more involved setup, which is beyond the scope of this guide. {% endhint %} The tasks in this section describe how to set up a Validator Node on the Verona network. The Verona network relies on CometBFT for its Network and Consensus layers, as we are leveraging Cosmos SDK `0.47.10` Validators run full nodes, participate in consensus by broadcasting votes, commit new blocks to the blockchain, and participate in governance of the blockchain. Validators can cast votes on behalf of their delegators. A validator's voting power is weighted according to their total stake. The top 100 validators make up the **Active Validator Set** and are the only validators that sign blocks and receive revenue. <table data-view="cards"><thead><tr><th></th><th align="center"></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td></td><td align="center">Obtain a Wallet</td><td></td><td><a href="/en/nodes-and-validators/become-a-validator/obtain-a-wallet-address">Obtain a Wallet Address</a></td></tr><tr><td></td><td align="center">Obtain Funds</td><td></td><td><a href="/en/nodes-and-validators/become-a-validator/obtain-funds">Obtain Funds</a></td></tr><tr><td></td><td align="center">Create Validator</td><td></td><td><a href="/en/nodes-and-validators/become-a-validator/create-validator">Create Validator</a></td></tr></tbody></table> # Obtain a Wallet Address How to create a Wallet and obtain Funds {% hint style="info" %} :warning: **Disclaimer** While setting up a rudimentary validator node is easy, running a production-grade validator node with a robust architecture and security features requires a more involved setup, which is beyond the scope of this guide. {% endhint %} ## Create a new Wallet We provide a sample snippet which will create a new key in your local keychain: <pre><code><strong>$ xiond keys add \ </strong> my-wallet-name \ --keyring-backend test \ --home /home/xiond/.xiond </code></pre> When running this command, you will not be prompted to enter your keyring password, due to `--keyring-backend` being set to `test`. This is the least secure setting. Please refer to the [Cosmos SDK documentation](https://docs.cosmos.network/v0.46/run-node/keyring.html) for a more in-depth discussion of the different keyring backends. The output of this command contains the wallet address, as well as its associated mnemonic. {% hint style="info" %} :warning: **Keep your Mnemonic Safe** **Be sure to preserve and protect your mnemonic.** You should take the utmost precautions when managing the mnemonic for any of your cryptocurrency wallets. {% endhint %} ## Restore a Wallet from a Mnemonic We also provide a sample snippet which will help recover a wallet from its mnemonic: ``` $ xiond keys add \ my-wallet-name \ --keyring-backend test \ --home /home/xiond/.xiond \ --recover ``` As above, you will not be prompted to enter your keyring password, due to `--keyring-backend` being set to `test`. However, you will be prompted to enter your BIP39 mnemonic; upon completion, your wallet will be restored and available for use. # Obtain Funds How to obtain funds on XION as a validator **Note: This section is for current Validators only.** <table data-view="cards"><thead><tr><th></t
프로젝트로 돌아가기