Validator docs revamp part 1 (#7171)

* Validator Docs revamp part 1

* Notes from @CriesofCarrots

* Fixup links and start page

* Update versions
This commit is contained in:
Tyera Eulberg 2019-11-28 15:39:27 -07:00 committed by GitHub
parent f97626346b
commit f4229a5d3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 261 additions and 120 deletions

View File

@ -26,7 +26,7 @@
* [The Runtime](validator/runtime.md)
* [Anatomy of a Transaction](transaction.md)
* [Running a Validator](running-validator/README.md)
* [Hardware Requirements](running-validator/validator-hardware.md)
* [Hardware Requirements](running-validator/validator-reqs.md)
* [Choosing a Testnet](running-validator/validator-testnet.md)
* [Installing the Validator Software](running-validator/validator-software.md)
* [Starting a Validator](running-validator/validator-start.md)

View File

@ -22,7 +22,5 @@ The testnets are configured to reset the ledger daily, or sooner, should the hou
There is a network explorer that shows the status of solana testnets available at [http://explorer.solana.com/](https://explorer.solana.com/).
There is a **\#validator-support** Discord channel available to reach other testnet participants, [https://discord.gg/pquxPsq](https://discord.gg/pquxPsq).
Also we'd love it if you choose to register your validator node with us at [https://forms.gle/LfFscZqJELbuUP139](https://forms.gle/LfFscZqJELbuUP139).

View File

@ -1,24 +0,0 @@
# Hardware Requirements
Since the testnet is not intended for stress testing of max transaction throughput, a higher-end machine with a GPU is not necessary to participate.
However ensure the machine used is not behind a residential NAT to avoid NAT traversal issues. A cloud-hosted machine works best. **Ensure that IP ports 8000 through 10000 are not blocked for Internet inbound and outbound traffic.**
Prebuilt binaries are available for Linux x86\_64 \(Ubuntu 18.04 recommended\). MacOS or WSL users may build from source.
## Recommended Setups
For a performance testnet with many transactions we have some preliminary recommended setups:
| | Low end | Medium end | High end | Notes |
| :--- | :--- | :--- | :--- | :--- |
| CPU | AMD Threadripper 1900x | AMD Threadripper 2920x | AMD Threadripper 2950x | Consider a 10Gb-capable motherboard with as many PCIe lanes and m.2 slots as possible. |
| RAM | 16GB | 32GB | 64GB | |
| OS Drive | Samsung 860 Evo 2TB | Samsung 860 Evo 4TB | Samsung 860 Evo 4TB | Or equivalent SSD |
| Accounts Drive\(s\) | None | Samsung 970 Pro 1TB | 2x Samsung 970 Pro 1TB | |
| GPU | 4x Nvidia 1070 or 2x Nvidia 1080 Ti or 2x Nvidia 2070 | 2x Nvidia 2080 Ti | 4x Nvidia 2080 Ti | Any number of cuda-capable GPUs are supported on Linux platforms. |
## GPU Requirements
CUDA is required to make use of the GPU on your system. The provided Solana release binaries are built on Ubuntu 18.04 with [CUDA Toolkit 10.1 update 1"](https://developer.nvidia.com/cuda-toolkit-archive). If your machine is using a different CUDA version then you will need to rebuild from source.

View File

@ -16,6 +16,28 @@ For details about optional fields for VALIDATOR\_INFO\_ARGS:
solana validator-info publish --help
```
## Example Commands
Example publish command:
```bash
solana validator-info publish "Elvis Validator" -n elvis -w "https://elvis-validates.com"
```
Example query command:
```bash
solana validator-info get
```
which outputs
```text
Validator info from 8WdJvDz6obhADdxpGCiJKZsDYwTLNEDFizayqziDc9ah
Validator pubkey: 6dMH3u76qZ7XG4bVboVRnBHR2FfrxEqTTTyj4xmyDMWo
Info: {"keybaseUsername":"elvis","name":"Elvis Validator","website":"https://elvis-validates.com"}
```
## Keybase
Including a Keybase username allows client applications \(like the Solana Network Explorer\) to automatically pull in your validator public profile, including cryptographic proofs, brand identity, etc. To connect your validator pubkey with Keybase:

View File

@ -0,0 +1,44 @@
# Hardware and Software Requirements
## Hardware
* CPU Recommendations
* We recommend a CPU with the highest number of cores as possible. AMD Threadripper or Intel Server \(Xeon\) CPUs are fine.
* We recommend AMD Threadripper as you get a larger number of cores for parallelization compared to Intel.
* Threadripper also has a cost-per-core advantage and a greater number of PCIe lanes compared to the equivalent Intel part. PoH \(Proof of History\) is based on sha256 and Threadripper also supports sha256 hardware instructions.
* SSD size and I/O style \(SATA vs NVMe/M.2\) for a validator
* Minimum example - Samsung 860 Evo 2TB
* Mid-range example - Samsung 860 Evo 4TB
* High-end example - Samsung 860 Evo 4TB
* GPUs
* While a CPU-only node may be able to keep up with the initial idling network, once transaction throughput increases, GPUs will be necessary
* What kind of GPU?
* We recommend Nvidia 2080Ti or 1080Ti series consumer GPU or Tesla series server GPUs.
* We do not currently support OpenCL and therefore do not support AMD GPUs. We have a bounty out for someone to port us to OpenCL. Interested? [Check out our GitHub.](https://github.com/solana-labs/solana)
* Power Consumption
* Approximate power consumption for a validator node running an AMD Threadripper 2950W and 2x 2080Ti GPUs is 800-1000W.
### Preconfigured Setups
Here are our recommendations for low, medium, and high end machine specifications:
| | Low end | Medium end | High end | Notes |
| :--- | :--- | :--- | :--- | :--- |
| CPU | AMD Threadripper 1900x | AMD Threadripper 2920x | AMD Threadripper 2950x | Consider a 10Gb-capable motherboard with as many PCIe lanes and m.2 slots as possible. |
| RAM | 16GB | 32GB | 64GB | |
| OS Drive | Samsung 860 Evo 2TB | Samsung 860 Evo 4TB | Samsung 860 Evo 4TB | Or equivalent SSD |
| Accounts Drive\(s\) | None | Samsung 970 Pro 1TB | 2x Samsung 970 Pro 1TB | |
| GPU | 4x Nvidia 1070 or 2x Nvidia 1080 Ti or 2x Nvidia 2070 | 2x Nvidia 2080 Ti | 4x Nvidia 2080 Ti | Any number of cuda-capable GPUs are supported on Linux platforms. |
## **Software**
* We build and run on Ubuntu 18.04. Some users have had trouble when running on Ubuntu 16.04
* See [Validator Software](validator-software.md) for the current Solana software release.
Be sure to ensure that the machine used is not behind a residential NAT to avoid NAT traversal issues. A cloud-hosted machine works best. **Ensure that IP ports 8000 through 10000 are not blocked for Internet inbound and outbound traffic.** For more information on port forwarding with regards to residential networks, see [this document](http://www.mcs.sdsmt.edu/lpyeatt/courses/314/PortForwardingSetup.pdf).
Prebuilt binaries are available for Linux x86\_64 \(Ubuntu 18.04 recommended\). MacOS or WSL users may build from source.
## GPU Requirements
CUDA is required to make use of the GPU on your system. The provided Solana release binaries are built on Ubuntu 18.04 with [CUDA Toolkit 10.1 update 1"](https://developer.nvidia.com/cuda-toolkit-archive). If your machine is using a different CUDA version then you will need to rebuild from source.

View File

@ -1,17 +1,21 @@
# Installing the Validator Software
## Bootstrap with `solana-install`
The `solana-install` tool can be used to easily install and upgrade the validator software on Linux x86\_64 and mac OS systems.
Install the Solana release [v0.21.0](https://github.com/solana-labs/solana/releases/tag/v0.21.0) on your machine by running:
```bash
curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.18.0/install/solana-install-init.sh | sh -s
curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.21.0/install/solana-install-init.sh | sh -s - 0.21.0
```
Alternatively build the `solana-install` program from source and run the following command to obtain the same result:
The following output indicates a successful update:
```bash
solana-install init
```text
looking for latest release
downloading v0.21.0 installer
Configuration: /home/solana/.config/solana/install/config.yml
Active release directory: /home/solana/.local/share/solana/install/active_release
* Release version: 0.21.0
* Release URL: https://github.com/solana-labs/solana/releases/download/v0.21.0/solana-release-x86_64-unknown-linux-gnu.tar.bz2
Update successful
```
After a successful install, `solana-install update` may be used to easily update the cluster software to a newer version at any time.
@ -30,7 +34,7 @@ cd solana-release/
export PATH=$PWD/bin:$PATH
```
### mac OS
### macOS
Download the binaries by navigating to [https://github.com/solana-labs/solana/releases/latest](https://github.com/solana-labs/solana/releases/latest), download **solana-release-x86\_64-apple-darwin.tar.bz2**, then extract the archive:
@ -48,3 +52,9 @@ If you are unable to use the prebuilt binaries or prefer to build it yourself fr
./scripts/cargo-install-all.sh .
export PATH=$PWD/bin:$PATH
```
You can then run the following command to obtain the same result as with prebuilt binaries:
```bash
solana-install init
```

View File

@ -1,23 +1,33 @@
# Staking
When your validator starts, it will have no stake, which means it will be ineligible to become leader.
# Staking
Adding stake can be accomplished by using the `solana` CLI
**By default your validator will have no stake.** This means it will be ineligible to become leader.
To delegate stake, first make sure your validator is running and has [caught up to the cluster](monitoring-your-validator.md#validator-catch-up).
First create a stake account keypair with `solana-keygen`:
## Create Stake Keypair
If you havent already done so, create a staking keypair. If you have completed this step, you should see the “validator-stake-keypair.json” in your Solana runtime directory.
```bash
solana-keygen new -o ~/validator-stake-keypair.json
```
and use the cli's `create-stake-account` and `delegate-stake` commands to stake your validator with 4242 lamports:
## Delegate Stake
Now delegate 1 SOL to your validator by first creating your stake account:
```bash
solana create-stake-account ~/validator-stake-keypair.json 1 SOL
```
and then delegating that stake to your validator:
```bash
solana create-stake-account ~/validator-stake-keypair.json 4242 lamports
solana delegate-stake ~/validator-stake-keypair.json ~/validator-vote-keypair.json
```
Note that stakes need to warm up, and warmup increments are applied at Epoch boundaries, so it can take an hour or more for the change to fully take effect.
> Dont delegate your remaining SOL, as your validator will use those tokens to vote.
Stakes can be re-delegated to another node at any time with the same command, but only one re-delegation is permitted per epoch:
@ -33,13 +43,56 @@ solana redeem-vote-credits ~/validator-stake-keypair.json ~/validator-vote-keypa
The rewards lamports earned are split between your stake account and the vote account according to the commission rate set in the vote account. Rewards can only be earned while the validator is up and running. Further, once staked, the validator becomes an important part of the network. In order to safely remove a validator from the network, first deactivate its stake.
Stake can be deactivated by running:
At the end of each slot, a validator is expected to send a vote transaction. These vote transactions are paid for by lamports from a validator's identity account.
This is a normal transaction so the standard transaction fee will apply. The transaction fee range is defined by the genesis block. The actual fee will fluctuate based on transaction load. You can determine the current fee via the [RPC API “getRecentBlockhash”](../api-reference/jsonrpc-api#getrecentblockhash) before submitting a transaction.
Learn more about [transaction fees here](../implemented-proposals/transaction-fees).
## Validator Stake Warm-up
Stakes need to warm up, and warmup increments are applied at Epoch boundaries, so it can take an hour or more for stake to come fully online.
To monitor your validator during its warmup period:
* View your vote account:`solana show-vote-account ~/validator-vote-keypair.json` This displays the current state of all the votes the validator has submitted to the network.
* View your stake account, the delegation preference and details of your stake:`solana show-stake-account ~/validator-stake-keypair.json`
* `solana uptime ~/validator-vote-keypair.json` will display the voting history \(aka, uptime\) of your validator over recent Epochs
* `solana show-validators` displays the current active stake of all validators, including yours
* `solana show-show-stake-history ` shows the history of stake warming up and cooling down over recent epochs
* Look for log messages on your validator indicating your next leader slot: `[2019-09-27T20:16:00.319721164Z INFO solana_core::replay_stage] <VALIDATOR_IDENTITY_PUBKEY> voted and reset PoH at tick height ####. My next leader slot is ####`
* Once your stake is warmed up, you will see a stake balance listed for your validator on the [Solana Network Explorer](http://explorer.solana.com/validators)
## Monitor Your Staked Validator
Confirm your validator becomes a [leader](../terminology.md#leader)
* After your validator is caught up, use the `$ solana balance` command to monitor the earnings as your validator is selected as leader and collects transaction fees
* Solana nodes offer a number of useful JSON-RPC methods to return information about the network and your validator's participation. Make a request by using curl \(or another http client of your choosing\), specifying the desired method in JSON-RPC-formatted data. For example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getEpochInfo"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":{"epoch":3,"slotIndex":126,"slotsInEpoch":256},"id":1}
```
Helpful JSON-RPC methods:
* `getEpochInfo`[ An epoch](../terminology.md#epoch) is the time, i.e. number of [slots](../terminology.md#slot), for which a [leader schedule](../terminology.md#leader-schedule) is valid. This will tell you what the current epoch is and how far into it the cluster is.
* `getVoteAccounts` This will tell you how much active stake your validator currently has. A % of the validator's stake is activated on an epoch boundary. You can learn more about staking on Solana [here](../cluster/stake-delegation-and-rewards.md).
* `getLeaderSchedule` At any given moment, the network expects only one validator to produce ledger entries. The [validator currently selected to produce ledger entries](../cluster/leader-rotation.md#leader-rotation) is called the “leader”. This will return the complete leader schedule \(on a slot-by-slot basis\) for the current epoch. If you validator is scheduled to be leader based on its currently activated stake, the identity pubkey will show up 1 or more times here.
## Deactivating Stake
Before detaching your validator from the TdS cluster, you should deactivate the stake that was previously delegated by running:
```bash
solana deactivate-stake ~/validator-stake-keypair.json
```
The stake will cool down, deactivate over time. While cooling down, your stake will continue to earn rewards. Only after stake cooldown is it safe to turn off your validator or withdraw it from the network. Cooldown may take several epochs to complete, depending on active stake and the size of your stake.
Stake is not deactivated immediately and instead cools down in a similar fashion as stake warm up. Your validator should remain attached to the cluster while the stake is cooling down. While cooling down, your stake will continue to earn rewards. Only after stake cooldown is it safe to turn off your validator or withdraw it from the network. Cooldown may take several epochs to complete, depending on active stake and the size of your stake.
Note that a stake account may only be used once, so after deactivation, use the cli's `withdraw-stake` command to recover the previously staked lamports.

View File

@ -16,97 +16,121 @@ View the [metrics dashboard](https://metrics.solana.com:3000/d/testnet-beta/test
## Confirm your Installation
Sanity check that you are able to interact with the cluster by receiving a small airdrop of lamports from the testnet drone:
```bash
solana set --url http://testnet.solana.com:8899
solana get
solana airdrop 123 lamports
solana balance --lamports
```
Also try running following command to join the gossip network and view all the other nodes in the cluster:
Try running following command to join the gossip network and view all the other nodes in the cluster:
```bash
solana-gossip --entrypoint testnet.solana.com:8001 spy
# Press ^C to exit
```
## Start your Validator
Create an identity keypair for your validator by running:
```bash
solana-keygen new -o ~/validator-keypair.json
```
### Wallet Configuration
You can set solana configuration to use your validator keypair for all following commands:
```bash
solana set --keypair ~/validator-keypair.json
```
**All following solana commands assume you have set `--keypair` config to** your validator identity keypair.\*\* If you haven't, you will need to add the `--keypair` argument to each command, like:
```bash
solana --keypair ~/validator-keypair.json airdrop 10
```
\(You can always override the set configuration by explicitly passing the `--keypair` argument with a command.\)
### Validator Start
Airdrop yourself some SOL to get started:
```bash
solana airdrop 10
```
Your validator will need a vote account. Create it now with the following commands:
```bash
solana-keygen new -o ~/validator-vote-keypair.json
solana create-vote-account ~/validator-vote-keypair.json ~/validator-keypair.json
```
Then use one of the following commands, depending on your installation choice, to start the node:
If this is a `solana-install`-installation:
```bash
solana-validator --identity-keypair ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 --entrypoint testnet.solana.com:8001
```
Alternatively, the `solana-install run` command can be used to run the validator node while periodically checking for and applying software updates:
```bash
solana-install run solana-validator -- --identity-keypair ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 --entrypoint testnet.solana.com:8001
```
If you built from source:
```bash
NDEBUG=1 USE_INSTALL=1 ./multinode-demo/validator.sh --identity-keypair ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --rpc-port 8899 --entrypoint testnet.solana.com:8001
```
### Enabling CUDA
## Enabling CUDA
If your machine has a GPU with CUDA installed \(Linux-only currently\), include the `--cuda` argument to `solana-validator`.
Or if you built from source, define the SOLANA\_CUDA flag in your environment _before_ running any of the previously mentioned commands
```bash
export SOLANA_CUDA=1
```
When your validator is started look for the following log message to indicate that CUDA is enabled: `"[<timestamp> solana::validator] CUDA is enabled"`
## Generate identity
Create an identity keypair for your validator by running:
```bash
solana-keygen new -o ~/validator-keypair.json
```
The identity public key can now be viewed by running:
```bash
solana-keygen pubkey ~/validator-keypair.json
```
> Note: The "validator-keypair.json” file is also your \(ed25519\) private key.
Your validator identity keypair uniquely identifies your validator within the network. **It is crucial to back-up this information.**
If you dont back up this information, you WILL NOT BE ABLE TO RECOVER YOUR VALIDATOR if you lose access to it. If this happens, YOU WILL LOSE YOUR ALLOCATION OF LAMPORTS TOO.
To back-up your validator identify keypair, **back-up your "validator-keypair.json” file to a secure location.**
## Wallet Configuration
You can set solana configuration to use your validator keypair and the stable testnet for all following commands:
```bash
solana set set --url http://testnet.solana.com:8899 --keypair ~/validator-keypair.json
```
You should see the following output:
```text
Wallet Config Updated: /home/solana/.config/solana/wallet/config.yml
* url: http://testnet.solana.com:8899
* keypair: /home/solana/validator-keypair.json
```
## Airdrop & Check Validator Balance
Airdrop yourself some SOL to get started:
```bash
solana airdrop 1000
```
To view your current balance:
```text
solana balance
```
Or to see in finer detail:
```text
solana balance --lamports
```
Read more about the [difference between SOL and lamports here](../introduction.md#what-are-sols).
## Create Vote Account
If you havent already done so, create a vote-account keypair and create the vote account on the network. If you have completed this step, you should see the “validator-vote-keypair.json” in your Solana runtime directory:
```bash
solana-keygen new -o ~/validator-vote-keypair.json
```
Create your vote account on the blockchain:
```bash
solana create-vote-account ~/validator-vote-keypair.json ~/validator-keypair.json
```
## Connect Your Validator
Connect to a testnet cluster by running:
```bash
solana-validator --identity-keypair ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json \
--ledger ~/validator-ledger --rpc-port 8899 --entrypoint testnet.solana.com:8001 \
--limit-ledger-size
```
To force validator logging to the console add a `--log -` argument, otherwise the validator will automatically log to a file.
Confirm your validator connected to the network by opening a new terminal and running:
```bash
solana-gossip spy --entrypoint testnet.solana.com:8001
```
If your validator is connected, its public key and IP address will appear in the list.
### Controlling local network port allocation
By default the validator will dynamically select available network ports in the 8000-10000 range, and may be overridden with `--dynamic-port-range`. For example, `solana-validator --dynamic-port-range 11000-11010 ...` will restrict the validator to ports 11000-11011.
### Limiting ledger size to conserve disk space
By default the validator will retain the full ledger. To conserve disk space start the validator with the `--limit-ledger-size`, which will instruct the validator to only retain the last couple hours of ledger.
The `--limit-ledger-size` arg will instruct the validator to only retain the last couple hours of ledger. To retain the full ledger, simply remove that arg.

View File

@ -28,17 +28,17 @@ This guide is written in the context of testnet.solana.com, our most stable clus
If you are bootstrapping with `solana-install`, you can specify the release tag or named channel to install to match your desired testnet.
```bash
curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.18.0/install/solana-install-init.sh | sh -s - 0.18.0
curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.21.0/install/solana-install-init.sh | sh -s - 0.21.0
```
```bash
curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.18.0/install/solana-install-init.sh | sh -s - beta
curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.21.0/install/solana-install-init.sh | sh -s - beta
```
Similarly, you can add this argument to the `solana-install` command if you've built the program from source:
```bash
solana-install init 0.18.0
solana-install init 0.21.0
```
If you are downloading pre-compiled binaries or building from source, simply choose the release matching your desired testnet.

View File

@ -1,4 +1,18 @@
# Troubleshooting
Coming soon...
There is a **\#validator-support** Discord channel available to reach other testnet participants, [https://discord.gg/pquxPsq](https://discord.gg/pquxPsq).
## Useful Links & Discussion
* [Tour de SOL Docs](https://docs.solana.com/tour-de-sol)
* [Network Explorer](http://explorer.solana.com/)
* [TdS metrics dashboard](https://metrics.solana.com:3000/d/testnet-edge/testnet-monitor-edge?refresh=1m&from=now-15m&to=now&var-testnet=tds&orgId=2&var-datasource=TdS%20Metrics%20%28read-only%29)
* Validator chat channels
* [\#validator-support](https://discord.gg/rZsenD) General support channel for any Validator related queries that dont fall under Tour de SOL.
* [\#tourdesol](https://discord.gg/BdujK2) Discussion and support channel for Tour de SOL participants.
* [\#tourdesol-announcements](https://discord.gg/Q5TxEC) The single source of truth for critical information relating to Tour de SOL
* [\#tourdesol-stage0](https://discord.gg/Xf8tES) Discussion for events within Tour de SOL Stage 0. Stage 0 includes all the dry-run
* [Core software repo](https://github.com/solana-labs/solana)
* [Current Testnet/TdS repo](https://github.com/solana-labs/tour-de-sol)
* [Submit bugs and feedback in this repo](https://github.com/solana-labs/tour-de-sol/issues)
Can't find what you're looking for? Send an email to ryan@solana.com or reach out to @rshea\#2622 on Discord.