Rename solana-fullnode to solana-validator (#4411)
This commit is contained in:
parent
b37d2fde3d
commit
fb2eac20bb
|
@ -2441,24 +2441,6 @@ dependencies = [
|
|||
"solana-sdk 0.15.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-fullnode"
|
||||
version = "0.15.0"
|
||||
dependencies = [
|
||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana 0.15.0",
|
||||
"solana-drone 0.15.0",
|
||||
"solana-logger 0.15.0",
|
||||
"solana-metrics 0.15.0",
|
||||
"solana-netutil 0.15.0",
|
||||
"solana-runtime 0.15.0",
|
||||
"solana-sdk 0.15.0",
|
||||
"solana-vote-api 0.15.0",
|
||||
"solana-vote-signer 0.15.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-genesis"
|
||||
version = "0.15.0"
|
||||
|
@ -2752,6 +2734,24 @@ dependencies = [
|
|||
"solana-metrics 0.15.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-validator"
|
||||
version = "0.15.0"
|
||||
dependencies = [
|
||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana 0.15.0",
|
||||
"solana-drone 0.15.0",
|
||||
"solana-logger 0.15.0",
|
||||
"solana-metrics 0.15.0",
|
||||
"solana-netutil 0.15.0",
|
||||
"solana-runtime 0.15.0",
|
||||
"solana-sdk 0.15.0",
|
||||
"solana-vote-api 0.15.0",
|
||||
"solana-vote-signer 0.15.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-vote-api"
|
||||
version = "0.15.0"
|
||||
|
|
|
@ -6,7 +6,7 @@ members = [
|
|||
"client",
|
||||
"core",
|
||||
"drone",
|
||||
"fullnode",
|
||||
"validator",
|
||||
"genesis",
|
||||
"gossip",
|
||||
"install",
|
||||
|
|
|
@ -12,7 +12,7 @@ To run a blockstreamer, include the argument `no-signer` and (optional)
|
|||
`blockstream` socket location:
|
||||
|
||||
```bash
|
||||
$ ./multinode-demo/fullnode-x.sh --no-signer --blockstream <SOCKET>
|
||||
$ ./multinode-demo/validator-x.sh --no-signer --blockstream <SOCKET>
|
||||
```
|
||||
|
||||
The stream will output a series of JSON objects:
|
||||
|
|
|
@ -47,8 +47,8 @@ nodes are started
|
|||
$ cargo build --all
|
||||
```
|
||||
|
||||
The network is initialized with a genesis ledger and fullnode configuration files.
|
||||
These files can be generated by running the following script.
|
||||
The network is initialized with a genesis ledger generated by running the
|
||||
following script.
|
||||
|
||||
```bash
|
||||
$ ./multinode-demo/setup.sh
|
||||
|
@ -69,7 +69,7 @@ $ ./multinode-demo/drone.sh
|
|||
|
||||
### Singlenode Testnet
|
||||
|
||||
Before you start a fullnode, make sure you know the IP address of the machine you
|
||||
Before you start a validator, make sure you know the IP address of the machine you
|
||||
want to be the bootstrap leader for the demo, and make sure that udp ports 8000-10000 are
|
||||
open on all the machines you want to test with.
|
||||
|
||||
|
@ -86,10 +86,10 @@ The drone does not need to be running for subsequent leader starts.
|
|||
### Multinode Testnet
|
||||
|
||||
To run a multinode testnet, after starting a leader node, spin up some
|
||||
additional full nodes in separate shells:
|
||||
additional validators in separate shells:
|
||||
|
||||
```bash
|
||||
$ ./multinode-demo/fullnode-x.sh
|
||||
$ ./multinode-demo/validator-x.sh
|
||||
```
|
||||
|
||||
To run a performance-enhanced full node on Linux,
|
||||
|
@ -99,7 +99,7 @@ your system:
|
|||
```bash
|
||||
$ ./fetch-perf-libs.sh
|
||||
$ SOLANA_CUDA=1 ./multinode-demo/bootstrap-leader.sh
|
||||
$ SOLANA_CUDA=1 ./multinode-demo/fullnode-x.sh
|
||||
$ SOLANA_CUDA=1 ./multinode-demo/validator.sh
|
||||
```
|
||||
|
||||
### Testnet Client Demo
|
||||
|
@ -145,7 +145,7 @@ Generally we are using `debug` for infrequent debug messages, `trace` for potent
|
|||
messages and `info` for performance-related logging.
|
||||
|
||||
You can also attach to a running process with GDB. The leader's process is named
|
||||
_solana-fullnode_:
|
||||
_solana-validator_:
|
||||
|
||||
```bash
|
||||
$ sudo gdb
|
||||
|
|
|
@ -58,7 +58,7 @@ $ solana-install deploy http://example.com/path/to/solana-release.tar.bz2 update
|
|||
$ solana-install init --pubkey 92DMonmBYXwEMHJ99c9ceRSpAmk9v6i3RdvDdXaVcrfj # <-- pubkey is obtained from whoever is deploying the updates
|
||||
$ export PATH=~/.local/share/solana-install/bin:$PATH
|
||||
$ solana-keygen ... # <-- runs the latest solana-keygen
|
||||
$ solana-install run solana-fullnode ... # <-- runs a fullnode, restarting it as necesary when an update is applied
|
||||
$ solana-install run solana-validator ... # <-- runs a validator, restarting it as necesary when an update is applied
|
||||
```
|
||||
|
||||
### On-chain Update Manifest
|
||||
|
|
|
@ -119,7 +119,7 @@ $ solana-gossip --entrypoint testnet.solana.com:8001 spy
|
|||
|
||||
Now configure a key pair for your validator by running:
|
||||
```bash
|
||||
$ solana-keygen -o fullnode-keypair.json
|
||||
$ solana-keygen -o validator-keypair.json
|
||||
```
|
||||
|
||||
Then use one of the following commands, depending on your installation
|
||||
|
@ -127,34 +127,34 @@ choice, to start the node:
|
|||
|
||||
If this is a `solana-install`-installation:
|
||||
```bash
|
||||
$ clear-fullnode-config.sh
|
||||
$ fullnode.sh --identity fullnode-keypair.json --poll-for-new-genesis-block testnet.solana.com
|
||||
$ clear-config.sh
|
||||
$ validator.sh --identity validator-keypair.json --poll-for-new-genesis-block testnet.solana.com
|
||||
```
|
||||
|
||||
Alternatively, the `solana-install run` command can be used to run the validator
|
||||
node while periodically checking for and applying software updates:
|
||||
```bash
|
||||
$ clear-fullnode-config.sh
|
||||
$ solana-install run fullnode.sh -- --identity fullnode-keypair.json --poll-for-new-genesis-block testnet.solana.com
|
||||
$ clear-config.sh
|
||||
$ solana-install run validator.sh -- --identity validator-keypair.json --poll-for-new-genesis-block testnet.solana.com
|
||||
```
|
||||
|
||||
If you built from source:
|
||||
```bash
|
||||
$ USE_INSTALL=1 ./multinode-demo/clear-fullnode-config.sh
|
||||
$ USE_INSTALL=1 ./multinode-demo/fullnode.sh --identity fullnode-keypair.json --poll-for-new-genesis-block testnet.solana.com
|
||||
$ USE_INSTALL=1 ./multinode-demo/clear-config.sh
|
||||
$ USE_INSTALL=1 ./multinode-demo/validator.sh --identity validator-keypair.json --poll-for-new-genesis-block testnet.solana.com
|
||||
```
|
||||
|
||||
#### 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, `fullnode.sh --dynamic-port-range 11000-11010 ...` will restrict the
|
||||
example, `validator.sh --dynamic-port-range 11000-11010 ...` will restrict the
|
||||
validator to ports 11000-11011.
|
||||
|
||||
### Validator Monitoring
|
||||
When `fullnode.sh` starts, it will output a fullnode configuration that looks
|
||||
When `validator.sh` starts, it will output a validator configuration that looks
|
||||
similar to:
|
||||
```bash
|
||||
======================[ Fullnode configuration ]======================
|
||||
======================[ Validator configuration ]======================
|
||||
node pubkey: 4ceWXsL3UJvn7NYZiRkw7NsryMpviaKBDYr8GK7J61Dm
|
||||
vote pubkey: 2ozWvfaXQd1X6uKh8jERoRGApDqSqcEy6fF1oN13LL2G
|
||||
ledger: ...
|
||||
|
@ -164,7 +164,7 @@ accounts: ...
|
|||
|
||||
The **node pubkey** for your validator can also be found by running:
|
||||
```bash
|
||||
$ solana-keygen pubkey fullnode-keypair.json
|
||||
$ solana-keygen pubkey validator-keypair.json
|
||||
```
|
||||
|
||||
From another console, confirm the IP address and **node pubkey** of your validator is visible in the
|
||||
|
@ -182,9 +182,9 @@ $ solana-wallet -n testnet.solana.com show-vote-account 2ozWvfaXQd1X6uKh8jERoRGA
|
|||
The vote pubkey for the validator can also be found by running:
|
||||
```bash
|
||||
# If this is a `solana-install`-installation run:
|
||||
$ solana-keygen pubkey ~/.local/share/solana/install/active_release/config-local/fullnode-vote-keypair.json
|
||||
$ solana-keygen pubkey ~/.local/share/solana/install/active_release/config-local/validator-vote-keypair.json
|
||||
# Otherwise run:
|
||||
$ solana-keygen pubkey ./config-local/fullnode-vote-keypair.json
|
||||
$ solana-keygen pubkey ./config-local/validator-vote-keypair.json
|
||||
```
|
||||
|
||||
### Sharing Metrics From Your Validator
|
||||
|
|
|
@ -27,7 +27,7 @@ Start a local cluster and run sanity on it
|
|||
nodes (at the cadence specified by -k). When disabled all
|
||||
nodes will be first killed then restarted (default: $rollingRestart)
|
||||
-b - Disable leader rotation
|
||||
-x - Add an extra fullnode (may be supplied multiple times)
|
||||
-x - Add an extra validator (may be supplied multiple times)
|
||||
-r - Select the RPC endpoint hosted by a node that starts as
|
||||
a validator node. If unspecified the RPC endpoint hosted by
|
||||
the bootstrap leader will be used.
|
||||
|
@ -81,7 +81,7 @@ nodes=(
|
|||
--enable-rpc-exit \
|
||||
--no-restart \
|
||||
--init-complete-file init-complete-node1.log"
|
||||
"multinode-demo/fullnode.sh \
|
||||
"multinode-demo/validator.sh \
|
||||
$maybeNoLeaderRotation \
|
||||
--enable-rpc-exit \
|
||||
--no-restart \
|
||||
|
@ -91,7 +91,7 @@ nodes=(
|
|||
|
||||
for i in $(seq 1 $extraNodes); do
|
||||
nodes+=(
|
||||
"multinode-demo/fullnode.sh \
|
||||
"multinode-demo/validator.sh \
|
||||
--no-restart \
|
||||
--label dyn$i \
|
||||
--init-complete-file init-complete-node$((2 + i)).log \
|
||||
|
@ -323,7 +323,7 @@ while [[ $iteration -le $iterations ]]; do
|
|||
cat log-transactionCount.txt
|
||||
) || flag_error
|
||||
|
||||
echo "--- RPC API: fullnode getTransactionCount ($iteration)"
|
||||
echo "--- RPC API: validator getTransactionCount ($iteration)"
|
||||
(
|
||||
set -x
|
||||
curl --retry 5 --retry-delay 2 --retry-connrefused \
|
||||
|
|
|
@ -25,7 +25,7 @@ CRATES=(
|
|||
runtime
|
||||
vote-signer
|
||||
core
|
||||
fullnode
|
||||
validator
|
||||
genesis
|
||||
gossip
|
||||
ledger-tool
|
||||
|
|
|
@ -60,33 +60,33 @@ echo --- Creating tarball
|
|||
# shellcheck source=/dev/null
|
||||
source ./target/perf-libs/env.sh
|
||||
(
|
||||
cd fullnode
|
||||
cd validator
|
||||
cargo +"$rust_stable" install --path . --features=cuda --root ../solana-release-cuda
|
||||
)
|
||||
cp solana-release-cuda/bin/solana-fullnode solana-release/bin/solana-fullnode-cuda
|
||||
cp solana-release-cuda/bin/solana-validator solana-release/bin/solana-validator-cuda
|
||||
cp -a scripts multinode-demo solana-release/
|
||||
|
||||
# Add a wrapper script for fullnode.sh
|
||||
# Add a wrapper script for validator.sh
|
||||
# TODO: Remove multinode/... from tarball
|
||||
cat > solana-release/bin/fullnode.sh <<'EOF'
|
||||
cat > solana-release/bin/validator.sh <<'EOF'
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
cd "$(dirname "$0")"/..
|
||||
export USE_INSTALL=1
|
||||
exec multinode-demo/fullnode.sh "$@"
|
||||
exec multinode-demo/validator.sh "$@"
|
||||
EOF
|
||||
chmod +x solana-release/bin/fullnode.sh
|
||||
chmod +x solana-release/bin/validator.sh
|
||||
|
||||
# Add a wrapper script for clear-fullnode-config.sh
|
||||
# Add a wrapper script for clear-config.sh
|
||||
# TODO: Remove multinode/... from tarball
|
||||
cat > solana-release/bin/clear-fullnode-config.sh <<'EOF'
|
||||
cat > solana-release/bin/clear-config.sh <<'EOF'
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
cd "$(dirname "$0")"/..
|
||||
export USE_INSTALL=1
|
||||
exec multinode-demo/clear-fullnode-config.sh "$@"
|
||||
exec multinode-demo/clear-validator-config.sh "$@"
|
||||
EOF
|
||||
chmod +x solana-release/bin/clear-fullnode-config.sh
|
||||
chmod +x solana-release/bin/clear-config.sh
|
||||
|
||||
tar jvcf solana-release-$TARGET.tar.bz2 solana-release/
|
||||
cp solana-release/bin/solana-install solana-install-$TARGET
|
||||
|
|
|
@ -53,8 +53,8 @@ fi
|
|||
|
||||
solana_bench_tps=$(solana_program bench-tps)
|
||||
solana_drone=$(solana_program drone)
|
||||
solana_fullnode=$(solana_program fullnode)
|
||||
solana_fullnode_cuda=$(solana_program fullnode-cuda)
|
||||
solana_validator=$(solana_program validator)
|
||||
solana_validator_cuda=$(solana_program validator-cuda)
|
||||
solana_genesis=$(solana_program genesis)
|
||||
solana_gossip=$(solana_program gossip)
|
||||
solana_keygen=$(solana_program keygen)
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Start a dynamically-configured full node
|
||||
#
|
||||
|
||||
here=$(dirname "$0")
|
||||
|
||||
exec "$here"/fullnode.sh --label x$$ "$@"
|
|
@ -19,7 +19,7 @@ fullnode_usage() {
|
|||
Fullnode Usage:
|
||||
usage: $0 [--blockstream PATH] [--init-complete-file FILE] [--label LABEL] [--stake LAMPORTS] [--no-voting] [--rpc-port port] [rsync network path to bootstrap leader configuration] [cluster entry point]
|
||||
|
||||
Start a full node or a replicator
|
||||
Start a validator or a replicator
|
||||
|
||||
--blockstream PATH - open blockstream at this unix domain socket location
|
||||
--init-complete-file FILE - create this file, if it doesn't already exist, once node initialization is complete
|
||||
|
@ -186,6 +186,9 @@ while [[ -n $1 ]]; do
|
|||
elif [[ $1 = --replicator ]]; then
|
||||
node_type=replicator
|
||||
shift
|
||||
elif [[ $1 = --validator ]]; then
|
||||
node_type=validator
|
||||
shift
|
||||
elif [[ $1 = --poll-for-new-genesis-block ]]; then
|
||||
poll_for_new_genesis_block=1
|
||||
shift
|
||||
|
@ -323,7 +326,7 @@ else
|
|||
fullnode_storage_pubkey=$($solana_keygen pubkey "$fullnode_storage_keypair_path")
|
||||
|
||||
cat <<EOF
|
||||
======================[ Fullnode configuration ]======================
|
||||
======================[ Validator configuration ]======================
|
||||
node pubkey: $fullnode_pubkey
|
||||
vote pubkey: $fullnode_vote_pubkey
|
||||
storage pubkey: $fullnode_storage_pubkey
|
||||
|
@ -340,9 +343,9 @@ EOF
|
|||
default_arg --accounts "$accounts_config_dir"
|
||||
|
||||
if [[ -n $SOLANA_CUDA ]]; then
|
||||
program=$solana_fullnode_cuda
|
||||
program=$solana_validator_cuda
|
||||
else
|
||||
program=$solana_fullnode
|
||||
program=$solana_validator
|
||||
fi
|
||||
|
||||
fi
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Start a relpicator
|
||||
#
|
||||
|
||||
here=$(dirname "$0")
|
||||
exec "$here"/fullnode.sh --replicator "$@"
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ here=$(dirname "$0")
|
|||
source "$here"/common.sh
|
||||
|
||||
set -e
|
||||
"$here"/clear-fullnode-config.sh
|
||||
"$here"/clear-config.sh
|
||||
|
||||
# Create genesis ledger
|
||||
$solana_keygen -o "$SOLANA_CONFIG_DIR"/mint-keypair.json
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Start a dynamically-configured validator
|
||||
#
|
||||
|
||||
here=$(dirname "$0")
|
||||
exec "$here"/validator.sh --label x$$ "$@"
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
here=$(dirname "$0")
|
||||
exec "$here"/fullnode.sh --validator "$@"
|
|
@ -16,7 +16,7 @@ set +x
|
|||
export RUST_LOG
|
||||
|
||||
# Use a very large stake (relative to the default multinode-demo/ stake of 43)
|
||||
# for the testnet fullnodes setup by net/. This make it less likely that
|
||||
# for the testnet validators setup by net/. This make it less likely that
|
||||
# low-staked ephemeral validator a random user may attach to testnet will cause
|
||||
# trouble
|
||||
#
|
||||
|
@ -71,8 +71,8 @@ local|tar)
|
|||
|
||||
case $nodeType in
|
||||
bootstrap-leader)
|
||||
if [[ -e /dev/nvidia0 && -x ~/.cargo/bin/solana-fullnode-cuda ]]; then
|
||||
echo Selecting solana-fullnode-cuda
|
||||
if [[ -e /dev/nvidia0 && -x ~/.cargo/bin/solana-validator-cuda ]]; then
|
||||
echo Selecting solana-validator-cuda
|
||||
export SOLANA_CUDA=1
|
||||
fi
|
||||
set -x
|
||||
|
@ -89,13 +89,13 @@ local|tar)
|
|||
--gossip-port "$entrypointIp":8001
|
||||
)
|
||||
|
||||
./multinode-demo/fullnode.sh --bootstrap-leader "${args[@]}" > fullnode.log 2>&1 &
|
||||
./multinode-demo/validator.sh --bootstrap-leader "${args[@]}" > fullnode.log 2>&1 &
|
||||
;;
|
||||
fullnode|blockstreamer)
|
||||
validator|blockstreamer)
|
||||
net/scripts/rsync-retry.sh -vPrc "$entrypointIp":~/.cargo/bin/ ~/.cargo/bin/
|
||||
|
||||
if [[ -e /dev/nvidia0 && -x ~/.cargo/bin/solana-fullnode-cuda ]]; then
|
||||
echo Selecting solana-fullnode-cuda
|
||||
if [[ -e /dev/nvidia0 && -x ~/.cargo/bin/solana-validator-cuda ]]; then
|
||||
echo Selecting solana-validator-cuda
|
||||
export SOLANA_CUDA=1
|
||||
fi
|
||||
|
||||
|
@ -117,7 +117,7 @@ local|tar)
|
|||
|
||||
set -x
|
||||
if [[ $skipSetup != true ]]; then
|
||||
./multinode-demo/clear-fullnode-config.sh
|
||||
./multinode-demo/clear-config.sh
|
||||
fi
|
||||
|
||||
if [[ $nodeType = blockstreamer ]]; then
|
||||
|
@ -144,7 +144,7 @@ local|tar)
|
|||
curl --head "$(curl ifconfig.io)"
|
||||
fi
|
||||
|
||||
./multinode-demo/fullnode.sh "${args[@]}" > fullnode.log 2>&1 &
|
||||
./multinode-demo/validator.sh "${args[@]}" > fullnode.log 2>&1 &
|
||||
;;
|
||||
*)
|
||||
echo "Error: unknown node type: $nodeType"
|
||||
|
|
|
@ -143,7 +143,7 @@ echo "--- $entrypointIp: validator sanity"
|
|||
if $validatorSanity; then
|
||||
(
|
||||
set -x -o pipefail
|
||||
timeout 10s ./multinode-demo/fullnode-x.sh --stake 0 \
|
||||
timeout 10s ./multinode-demo/validator-x.sh --stake 0 \
|
||||
"$entrypointRsyncUrl" \
|
||||
"$entrypointIp:8001" 2>&1 | tee validator-sanity.log
|
||||
) || {
|
||||
|
|
10
run.sh
10
run.sh
|
@ -12,7 +12,7 @@ cd "$(dirname "$0")/"
|
|||
PATH=$PWD/target/debug:$PATH
|
||||
|
||||
ok=true
|
||||
for program in solana-{drone,genesis,keygen,fullnode}; do
|
||||
for program in solana-{drone,genesis,keygen,validator}; do
|
||||
$program -V || ok=false
|
||||
done
|
||||
$ok || {
|
||||
|
@ -80,13 +80,13 @@ args=(
|
|||
if [[ -n $blockstreamSocket ]]; then
|
||||
args+=(--blockstream "$blockstreamSocket")
|
||||
fi
|
||||
solana-fullnode "${args[@]}" &
|
||||
fullnode=$!
|
||||
solana-validator "${args[@]}" &
|
||||
validator=$!
|
||||
|
||||
abort() {
|
||||
set +e
|
||||
kill "$drone" "$fullnode"
|
||||
kill "$drone" "$validator"
|
||||
}
|
||||
trap abort INT TERM EXIT
|
||||
|
||||
wait "$fullnode"
|
||||
wait "$validator"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-fullnode"
|
||||
name = "solana-validator"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.15.0"
|
||||
repository = "https://github.com/solana-labs/solana"
|
Loading…
Reference in New Issue