diff --git a/book/src/running-validator/validator-software.md b/book/src/running-validator/validator-software.md index 2fdc50f2bc..03b1b07aea 100644 --- a/book/src/running-validator/validator-software.md +++ b/book/src/running-validator/validator-software.md @@ -8,6 +8,10 @@ machine by running: curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.21.0/install/solana-install-init.sh | sh -s - 0.21.0 ``` +If you are connecting to a different testnet, you can replace `0.21.0` with the +release tag matching the software version of your desired testnet, or replace it +with the named channel `stable`, `beta`, or `edge`. + The following output indicates a successful update: ```text diff --git a/book/src/running-validator/validator-start.md b/book/src/running-validator/validator-start.md index 2a94a09f85..fc78a571dc 100644 --- a/book/src/running-validator/validator-start.md +++ b/book/src/running-validator/validator-start.md @@ -1,16 +1,24 @@ # Starting a Validator +## Configure Solana CLI + +The solana cli includes `get` and `set` configuration commands to automatically +set the `--url` argument for cli commands. For example: + +```bash +solana set --url http://testnet.solana.com:8899 +``` + +\(You can always override the set configuration by explicitly passing the +`--url` argument with a command, eg: `solana --url http://beta.testnet.solana.com:8899 balance`\) + ## Confirm The Testnet Is Reachable Before attaching a validator node, sanity check that the cluster is accessible -to your machine by running some simple commands. If any of the commands fail, -please retry 5-10 minutes later to confirm the testnet is not just restarting -itself before debugging further. - -Fetch the current transaction count over JSON RPC: +to your machine by fetching the transaction count: ```bash -curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' http://testnet.solana.com:8899 +solana get-transaction-count ``` Inspect the network explorer at @@ -90,13 +98,13 @@ solana-keygen grind --starts-with e1v1s Depending on the string requested, it may take days to find a match... -## Wallet Configuration +## More Solana CLI Configuration -Set solana configuration to use your validator keypair and the stable -testnet for all following commands: +Now that you have a keypair, set the solana configuration to use your validator +keypair for all following commands: ```bash -solana set --url http://testnet.solana.com:8899 --keypair ~/validator-keypair.json +solana set --keypair ~/validator-keypair.json ``` You should see the following output: diff --git a/book/src/running-validator/validator-testnet.md b/book/src/running-validator/validator-testnet.md index 5fb8e26c13..7d616a6e65 100644 --- a/book/src/running-validator/validator-testnet.md +++ b/book/src/running-validator/validator-testnet.md @@ -17,70 +17,17 @@ tracks the most stable tagged release. ### Get Testnet Version -You can submit a JSON-RPC request to see the specific version of the cluster. +You can submit a JSON-RPC request to see the specific software version of the +cluster. Use this to specify [the software version to install](validator-software.md). ```bash -curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getVersion"}' edge.testnet.solana.com:8899 -{"jsonrpc":"2.0","result":{"solana-core":"0.21.0"},"id":1} +curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getVersion"}' testnet.solana.com:8899 ``` +Example result: +`{"jsonrpc":"2.0","result":{"solana-core":"0.21.0"},"id":1}` ## Using a Different Testnet This guide is written in the context of testnet.solana.com, our most stable -cluster. To participate in another testnet, you will need to modify some of the -commands in the following pages. - -### Downloading Software - -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.21.0/install/solana-install-init.sh | sh -s - 0.21.0 -``` - -```bash -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.21.0 -``` - -If you are downloading pre-compiled binaries or building from source, simply -choose the release matching your desired testnet. - -### Validator Commands - -The Solana CLI tool points at testnet.solana.com by default. Include a `--url` -argument to point at a different testnet. For instance: - -```bash -solana --url http://beta.testnet.solana.com:8899 balance -``` - -The solana cli includes `get` and `set` configuration commands to automatically -set the `--url` argument for future cli commands. For example: - -```bash -solana set --url http://beta.testnet.solana.com:8899 -``` - -\(You can always override the set configuration by explicitly passing the -`--url` argument with a command.\) - -Solana-gossip and solana-validator commands already require an explicit -`--entrypoint` argument. Simply replace testnet.solana.com in the examples with -an alternate url to interact with a different testnet. For example: - -```bash -solana-validator --identity-keypair ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 beta.testnet.solana.com -``` - -You can also submit JSON-RPC requests to a different testnet, like: - -```bash -curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' http://beta.testnet.solana.com:8899 -``` +cluster. To participate in another testnet, modify the commands in the following +pages, replacing `testnet.solana.com` with your desired testnet.