Brush up validator start docs (#7333)
* Brush up validator start docs * Gut Choosing a Testnet to be less confusing
This commit is contained in:
parent
711487267d
commit
6a0d683f79
|
@ -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
|
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:
|
The following output indicates a successful update:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
|
|
|
@ -1,16 +1,24 @@
|
||||||
# Starting a Validator
|
# 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
|
## Confirm The Testnet Is Reachable
|
||||||
|
|
||||||
Before attaching a validator node, sanity check that the cluster is accessible
|
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,
|
to your machine by fetching the transaction count:
|
||||||
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:
|
|
||||||
|
|
||||||
```bash
|
```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
|
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...
|
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
|
Now that you have a keypair, set the solana configuration to use your validator
|
||||||
testnet for all following commands:
|
keypair for all following commands:
|
||||||
|
|
||||||
```bash
|
```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:
|
You should see the following output:
|
||||||
|
|
|
@ -17,70 +17,17 @@ tracks the most stable tagged release.
|
||||||
|
|
||||||
### Get Testnet Version
|
### 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
|
```bash
|
||||||
curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getVersion"}' edge.testnet.solana.com:8899
|
curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getVersion"}' testnet.solana.com:8899
|
||||||
{"jsonrpc":"2.0","result":{"solana-core":"0.21.0"},"id":1}
|
|
||||||
```
|
```
|
||||||
|
Example result:
|
||||||
|
`{"jsonrpc":"2.0","result":{"solana-core":"0.21.0"},"id":1}`
|
||||||
|
|
||||||
## Using a Different Testnet
|
## Using a Different Testnet
|
||||||
|
|
||||||
This guide is written in the context of testnet.solana.com, our most stable
|
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
|
cluster. To participate in another testnet, modify the commands in the following
|
||||||
commands in the following pages.
|
pages, replacing `testnet.solana.com` with your desired testnet.
|
||||||
|
|
||||||
### 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
|
|
||||||
```
|
|
||||||
|
|
Loading…
Reference in New Issue