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",
|
"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]]
|
[[package]]
|
||||||
name = "solana-genesis"
|
name = "solana-genesis"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
|
@ -2752,6 +2734,24 @@ dependencies = [
|
||||||
"solana-metrics 0.15.0",
|
"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]]
|
[[package]]
|
||||||
name = "solana-vote-api"
|
name = "solana-vote-api"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
|
|
|
@ -6,7 +6,7 @@ members = [
|
||||||
"client",
|
"client",
|
||||||
"core",
|
"core",
|
||||||
"drone",
|
"drone",
|
||||||
"fullnode",
|
"validator",
|
||||||
"genesis",
|
"genesis",
|
||||||
"gossip",
|
"gossip",
|
||||||
"install",
|
"install",
|
||||||
|
|
|
@ -12,7 +12,7 @@ To run a blockstreamer, include the argument `no-signer` and (optional)
|
||||||
`blockstream` socket location:
|
`blockstream` socket location:
|
||||||
|
|
||||||
```bash
|
```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:
|
The stream will output a series of JSON objects:
|
||||||
|
|
|
@ -47,8 +47,8 @@ nodes are started
|
||||||
$ cargo build --all
|
$ cargo build --all
|
||||||
```
|
```
|
||||||
|
|
||||||
The network is initialized with a genesis ledger and fullnode configuration files.
|
The network is initialized with a genesis ledger generated by running the
|
||||||
These files can be generated by running the following script.
|
following script.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ ./multinode-demo/setup.sh
|
$ ./multinode-demo/setup.sh
|
||||||
|
@ -69,7 +69,7 @@ $ ./multinode-demo/drone.sh
|
||||||
|
|
||||||
### Singlenode Testnet
|
### 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
|
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.
|
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
|
### Multinode Testnet
|
||||||
|
|
||||||
To run a multinode testnet, after starting a leader node, spin up some
|
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
|
```bash
|
||||||
$ ./multinode-demo/fullnode-x.sh
|
$ ./multinode-demo/validator-x.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
To run a performance-enhanced full node on Linux,
|
To run a performance-enhanced full node on Linux,
|
||||||
|
@ -99,7 +99,7 @@ your system:
|
||||||
```bash
|
```bash
|
||||||
$ ./fetch-perf-libs.sh
|
$ ./fetch-perf-libs.sh
|
||||||
$ SOLANA_CUDA=1 ./multinode-demo/bootstrap-leader.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
|
### 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.
|
messages and `info` for performance-related logging.
|
||||||
|
|
||||||
You can also attach to a running process with GDB. The leader's process is named
|
You can also attach to a running process with GDB. The leader's process is named
|
||||||
_solana-fullnode_:
|
_solana-validator_:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo gdb
|
$ 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
|
$ solana-install init --pubkey 92DMonmBYXwEMHJ99c9ceRSpAmk9v6i3RdvDdXaVcrfj # <-- pubkey is obtained from whoever is deploying the updates
|
||||||
$ export PATH=~/.local/share/solana-install/bin:$PATH
|
$ export PATH=~/.local/share/solana-install/bin:$PATH
|
||||||
$ solana-keygen ... # <-- runs the latest solana-keygen
|
$ 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
|
### 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:
|
Now configure a key pair for your validator by running:
|
||||||
```bash
|
```bash
|
||||||
$ solana-keygen -o fullnode-keypair.json
|
$ solana-keygen -o validator-keypair.json
|
||||||
```
|
```
|
||||||
|
|
||||||
Then use one of the following commands, depending on your installation
|
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:
|
If this is a `solana-install`-installation:
|
||||||
```bash
|
```bash
|
||||||
$ clear-fullnode-config.sh
|
$ clear-config.sh
|
||||||
$ fullnode.sh --identity fullnode-keypair.json --poll-for-new-genesis-block testnet.solana.com
|
$ 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
|
Alternatively, the `solana-install run` command can be used to run the validator
|
||||||
node while periodically checking for and applying software updates:
|
node while periodically checking for and applying software updates:
|
||||||
```bash
|
```bash
|
||||||
$ clear-fullnode-config.sh
|
$ clear-config.sh
|
||||||
$ solana-install run fullnode.sh -- --identity fullnode-keypair.json --poll-for-new-genesis-block testnet.solana.com
|
$ solana-install run validator.sh -- --identity validator-keypair.json --poll-for-new-genesis-block testnet.solana.com
|
||||||
```
|
```
|
||||||
|
|
||||||
If you built from source:
|
If you built from source:
|
||||||
```bash
|
```bash
|
||||||
$ USE_INSTALL=1 ./multinode-demo/clear-fullnode-config.sh
|
$ USE_INSTALL=1 ./multinode-demo/clear-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/validator.sh --identity validator-keypair.json --poll-for-new-genesis-block testnet.solana.com
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Controlling local network port allocation
|
#### Controlling local network port allocation
|
||||||
By default the validator will dynamically select available network ports in the
|
By default the validator will dynamically select available network ports in the
|
||||||
8000-10000 range, and may be overridden with `--dynamic-port-range`. For
|
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 to ports 11000-11011.
|
||||||
|
|
||||||
### Validator Monitoring
|
### 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:
|
similar to:
|
||||||
```bash
|
```bash
|
||||||
======================[ Fullnode configuration ]======================
|
======================[ Validator configuration ]======================
|
||||||
node pubkey: 4ceWXsL3UJvn7NYZiRkw7NsryMpviaKBDYr8GK7J61Dm
|
node pubkey: 4ceWXsL3UJvn7NYZiRkw7NsryMpviaKBDYr8GK7J61Dm
|
||||||
vote pubkey: 2ozWvfaXQd1X6uKh8jERoRGApDqSqcEy6fF1oN13LL2G
|
vote pubkey: 2ozWvfaXQd1X6uKh8jERoRGApDqSqcEy6fF1oN13LL2G
|
||||||
ledger: ...
|
ledger: ...
|
||||||
|
@ -164,7 +164,7 @@ accounts: ...
|
||||||
|
|
||||||
The **node pubkey** for your validator can also be found by running:
|
The **node pubkey** for your validator can also be found by running:
|
||||||
```bash
|
```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
|
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:
|
The vote pubkey for the validator can also be found by running:
|
||||||
```bash
|
```bash
|
||||||
# If this is a `solana-install`-installation run:
|
# 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:
|
# 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
|
### 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 (at the cadence specified by -k). When disabled all
|
||||||
nodes will be first killed then restarted (default: $rollingRestart)
|
nodes will be first killed then restarted (default: $rollingRestart)
|
||||||
-b - Disable leader rotation
|
-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
|
-r - Select the RPC endpoint hosted by a node that starts as
|
||||||
a validator node. If unspecified the RPC endpoint hosted by
|
a validator node. If unspecified the RPC endpoint hosted by
|
||||||
the bootstrap leader will be used.
|
the bootstrap leader will be used.
|
||||||
|
@ -81,7 +81,7 @@ nodes=(
|
||||||
--enable-rpc-exit \
|
--enable-rpc-exit \
|
||||||
--no-restart \
|
--no-restart \
|
||||||
--init-complete-file init-complete-node1.log"
|
--init-complete-file init-complete-node1.log"
|
||||||
"multinode-demo/fullnode.sh \
|
"multinode-demo/validator.sh \
|
||||||
$maybeNoLeaderRotation \
|
$maybeNoLeaderRotation \
|
||||||
--enable-rpc-exit \
|
--enable-rpc-exit \
|
||||||
--no-restart \
|
--no-restart \
|
||||||
|
@ -91,7 +91,7 @@ nodes=(
|
||||||
|
|
||||||
for i in $(seq 1 $extraNodes); do
|
for i in $(seq 1 $extraNodes); do
|
||||||
nodes+=(
|
nodes+=(
|
||||||
"multinode-demo/fullnode.sh \
|
"multinode-demo/validator.sh \
|
||||||
--no-restart \
|
--no-restart \
|
||||||
--label dyn$i \
|
--label dyn$i \
|
||||||
--init-complete-file init-complete-node$((2 + i)).log \
|
--init-complete-file init-complete-node$((2 + i)).log \
|
||||||
|
@ -323,7 +323,7 @@ while [[ $iteration -le $iterations ]]; do
|
||||||
cat log-transactionCount.txt
|
cat log-transactionCount.txt
|
||||||
) || flag_error
|
) || flag_error
|
||||||
|
|
||||||
echo "--- RPC API: fullnode getTransactionCount ($iteration)"
|
echo "--- RPC API: validator getTransactionCount ($iteration)"
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
curl --retry 5 --retry-delay 2 --retry-connrefused \
|
curl --retry 5 --retry-delay 2 --retry-connrefused \
|
||||||
|
|
|
@ -25,7 +25,7 @@ CRATES=(
|
||||||
runtime
|
runtime
|
||||||
vote-signer
|
vote-signer
|
||||||
core
|
core
|
||||||
fullnode
|
validator
|
||||||
genesis
|
genesis
|
||||||
gossip
|
gossip
|
||||||
ledger-tool
|
ledger-tool
|
||||||
|
|
|
@ -60,33 +60,33 @@ echo --- Creating tarball
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
source ./target/perf-libs/env.sh
|
source ./target/perf-libs/env.sh
|
||||||
(
|
(
|
||||||
cd fullnode
|
cd validator
|
||||||
cargo +"$rust_stable" install --path . --features=cuda --root ../solana-release-cuda
|
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/
|
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
|
# TODO: Remove multinode/... from tarball
|
||||||
cat > solana-release/bin/fullnode.sh <<'EOF'
|
cat > solana-release/bin/validator.sh <<'EOF'
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
cd "$(dirname "$0")"/..
|
cd "$(dirname "$0")"/..
|
||||||
export USE_INSTALL=1
|
export USE_INSTALL=1
|
||||||
exec multinode-demo/fullnode.sh "$@"
|
exec multinode-demo/validator.sh "$@"
|
||||||
EOF
|
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
|
# 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
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
cd "$(dirname "$0")"/..
|
cd "$(dirname "$0")"/..
|
||||||
export USE_INSTALL=1
|
export USE_INSTALL=1
|
||||||
exec multinode-demo/clear-fullnode-config.sh "$@"
|
exec multinode-demo/clear-validator-config.sh "$@"
|
||||||
EOF
|
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/
|
tar jvcf solana-release-$TARGET.tar.bz2 solana-release/
|
||||||
cp solana-release/bin/solana-install solana-install-$TARGET
|
cp solana-release/bin/solana-install solana-install-$TARGET
|
||||||
|
|
|
@ -53,8 +53,8 @@ fi
|
||||||
|
|
||||||
solana_bench_tps=$(solana_program bench-tps)
|
solana_bench_tps=$(solana_program bench-tps)
|
||||||
solana_drone=$(solana_program drone)
|
solana_drone=$(solana_program drone)
|
||||||
solana_fullnode=$(solana_program fullnode)
|
solana_validator=$(solana_program validator)
|
||||||
solana_fullnode_cuda=$(solana_program fullnode-cuda)
|
solana_validator_cuda=$(solana_program validator-cuda)
|
||||||
solana_genesis=$(solana_program genesis)
|
solana_genesis=$(solana_program genesis)
|
||||||
solana_gossip=$(solana_program gossip)
|
solana_gossip=$(solana_program gossip)
|
||||||
solana_keygen=$(solana_program keygen)
|
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:
|
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]
|
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
|
--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
|
--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
|
elif [[ $1 = --replicator ]]; then
|
||||||
node_type=replicator
|
node_type=replicator
|
||||||
shift
|
shift
|
||||||
|
elif [[ $1 = --validator ]]; then
|
||||||
|
node_type=validator
|
||||||
|
shift
|
||||||
elif [[ $1 = --poll-for-new-genesis-block ]]; then
|
elif [[ $1 = --poll-for-new-genesis-block ]]; then
|
||||||
poll_for_new_genesis_block=1
|
poll_for_new_genesis_block=1
|
||||||
shift
|
shift
|
||||||
|
@ -323,7 +326,7 @@ else
|
||||||
fullnode_storage_pubkey=$($solana_keygen pubkey "$fullnode_storage_keypair_path")
|
fullnode_storage_pubkey=$($solana_keygen pubkey "$fullnode_storage_keypair_path")
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
======================[ Fullnode configuration ]======================
|
======================[ Validator configuration ]======================
|
||||||
node pubkey: $fullnode_pubkey
|
node pubkey: $fullnode_pubkey
|
||||||
vote pubkey: $fullnode_vote_pubkey
|
vote pubkey: $fullnode_vote_pubkey
|
||||||
storage pubkey: $fullnode_storage_pubkey
|
storage pubkey: $fullnode_storage_pubkey
|
||||||
|
@ -340,9 +343,9 @@ EOF
|
||||||
default_arg --accounts "$accounts_config_dir"
|
default_arg --accounts "$accounts_config_dir"
|
||||||
|
|
||||||
if [[ -n $SOLANA_CUDA ]]; then
|
if [[ -n $SOLANA_CUDA ]]; then
|
||||||
program=$solana_fullnode_cuda
|
program=$solana_validator_cuda
|
||||||
else
|
else
|
||||||
program=$solana_fullnode
|
program=$solana_validator
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
|
||||||
# Start a relpicator
|
|
||||||
#
|
|
||||||
|
|
||||||
here=$(dirname "$0")
|
here=$(dirname "$0")
|
||||||
exec "$here"/fullnode.sh --replicator "$@"
|
exec "$here"/fullnode.sh --replicator "$@"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ here=$(dirname "$0")
|
||||||
source "$here"/common.sh
|
source "$here"/common.sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
"$here"/clear-fullnode-config.sh
|
"$here"/clear-config.sh
|
||||||
|
|
||||||
# Create genesis ledger
|
# Create genesis ledger
|
||||||
$solana_keygen -o "$SOLANA_CONFIG_DIR"/mint-keypair.json
|
$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
|
export RUST_LOG
|
||||||
|
|
||||||
# Use a very large stake (relative to the default multinode-demo/ stake of 43)
|
# 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
|
# low-staked ephemeral validator a random user may attach to testnet will cause
|
||||||
# trouble
|
# trouble
|
||||||
#
|
#
|
||||||
|
@ -71,8 +71,8 @@ local|tar)
|
||||||
|
|
||||||
case $nodeType in
|
case $nodeType in
|
||||||
bootstrap-leader)
|
bootstrap-leader)
|
||||||
if [[ -e /dev/nvidia0 && -x ~/.cargo/bin/solana-fullnode-cuda ]]; then
|
if [[ -e /dev/nvidia0 && -x ~/.cargo/bin/solana-validator-cuda ]]; then
|
||||||
echo Selecting solana-fullnode-cuda
|
echo Selecting solana-validator-cuda
|
||||||
export SOLANA_CUDA=1
|
export SOLANA_CUDA=1
|
||||||
fi
|
fi
|
||||||
set -x
|
set -x
|
||||||
|
@ -89,13 +89,13 @@ local|tar)
|
||||||
--gossip-port "$entrypointIp":8001
|
--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/
|
net/scripts/rsync-retry.sh -vPrc "$entrypointIp":~/.cargo/bin/ ~/.cargo/bin/
|
||||||
|
|
||||||
if [[ -e /dev/nvidia0 && -x ~/.cargo/bin/solana-fullnode-cuda ]]; then
|
if [[ -e /dev/nvidia0 && -x ~/.cargo/bin/solana-validator-cuda ]]; then
|
||||||
echo Selecting solana-fullnode-cuda
|
echo Selecting solana-validator-cuda
|
||||||
export SOLANA_CUDA=1
|
export SOLANA_CUDA=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ local|tar)
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
if [[ $skipSetup != true ]]; then
|
if [[ $skipSetup != true ]]; then
|
||||||
./multinode-demo/clear-fullnode-config.sh
|
./multinode-demo/clear-config.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $nodeType = blockstreamer ]]; then
|
if [[ $nodeType = blockstreamer ]]; then
|
||||||
|
@ -144,7 +144,7 @@ local|tar)
|
||||||
curl --head "$(curl ifconfig.io)"
|
curl --head "$(curl ifconfig.io)"
|
||||||
fi
|
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"
|
echo "Error: unknown node type: $nodeType"
|
||||||
|
|
|
@ -143,7 +143,7 @@ echo "--- $entrypointIp: validator sanity"
|
||||||
if $validatorSanity; then
|
if $validatorSanity; then
|
||||||
(
|
(
|
||||||
set -x -o pipefail
|
set -x -o pipefail
|
||||||
timeout 10s ./multinode-demo/fullnode-x.sh --stake 0 \
|
timeout 10s ./multinode-demo/validator-x.sh --stake 0 \
|
||||||
"$entrypointRsyncUrl" \
|
"$entrypointRsyncUrl" \
|
||||||
"$entrypointIp:8001" 2>&1 | tee validator-sanity.log
|
"$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
|
PATH=$PWD/target/debug:$PATH
|
||||||
|
|
||||||
ok=true
|
ok=true
|
||||||
for program in solana-{drone,genesis,keygen,fullnode}; do
|
for program in solana-{drone,genesis,keygen,validator}; do
|
||||||
$program -V || ok=false
|
$program -V || ok=false
|
||||||
done
|
done
|
||||||
$ok || {
|
$ok || {
|
||||||
|
@ -80,13 +80,13 @@ args=(
|
||||||
if [[ -n $blockstreamSocket ]]; then
|
if [[ -n $blockstreamSocket ]]; then
|
||||||
args+=(--blockstream "$blockstreamSocket")
|
args+=(--blockstream "$blockstreamSocket")
|
||||||
fi
|
fi
|
||||||
solana-fullnode "${args[@]}" &
|
solana-validator "${args[@]}" &
|
||||||
fullnode=$!
|
validator=$!
|
||||||
|
|
||||||
abort() {
|
abort() {
|
||||||
set +e
|
set +e
|
||||||
kill "$drone" "$fullnode"
|
kill "$drone" "$validator"
|
||||||
}
|
}
|
||||||
trap abort INT TERM EXIT
|
trap abort INT TERM EXIT
|
||||||
|
|
||||||
wait "$fullnode"
|
wait "$validator"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "solana-fullnode"
|
name = "solana-validator"
|
||||||
description = "Blockchain, Rebuilt for Scale"
|
description = "Blockchain, Rebuilt for Scale"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
Loading…
Reference in New Issue