Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename solana-fullnode program to solana-validator #4411

Merged
merged 1 commit into from May 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 18 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -6,7 +6,7 @@ members = [
"client",
"core",
"drone",
"fullnode",
"validator",
"genesis",
"gossip",
"install",
Expand Down
2 changes: 1 addition & 1 deletion book/src/blockstreamer.md
Expand Up @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions book/src/getting-started.md
Expand Up @@ -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
Expand All @@ -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.

Expand All @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion book/src/installer.md
Expand Up @@ -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
Expand Down
26 changes: 13 additions & 13 deletions book/src/testnet-participation.md
Expand Up @@ -119,42 +119,42 @@ $ 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
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: ...
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions ci/localnet-sanity.sh
Expand Up @@ -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.
Expand Down Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion ci/publish-crate.sh
Expand Up @@ -25,7 +25,7 @@ CRATES=(
runtime
vote-signer
core
fullnode
validator
genesis
gossip
ledger-tool
Expand Down
20 changes: 10 additions & 10 deletions ci/publish-tarball.sh
Expand Up @@ -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
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions multinode-demo/common.sh
Expand Up @@ -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)
Expand Down
8 changes: 0 additions & 8 deletions multinode-demo/fullnode-x.sh

This file was deleted.

11 changes: 7 additions & 4 deletions multinode-demo/fullnode.sh
Expand Up @@ -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
Expand Down Expand Up @@ -165,6 +165,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
Expand Down Expand Up @@ -302,7 +305,7 @@ else
fullnode_vote_pubkey=$($solana_keygen pubkey "$fullnode_vote_keypair_path")

cat <<EOF
======================[ Fullnode configuration ]======================
======================[ Validator configuration ]======================
node pubkey: $fullnode_pubkey
vote pubkey: $fullnode_vote_pubkey
ledger: $ledger_config_dir
Expand All @@ -318,9 +321,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
Expand Down
5 changes: 0 additions & 5 deletions multinode-demo/replicator.sh
@@ -1,9 +1,4 @@
#!/usr/bin/env bash
#
# Start a relpicator
#

here=$(dirname "$0")
exec "$here"/fullnode.sh --replicator "$@"


2 changes: 1 addition & 1 deletion multinode-demo/setup.sh
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions multinode-demo/validator-x.sh
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
#
# Start a dynamically-configured validator
#

here=$(dirname "$0")
exec "$here"/validator.sh --label x$$ "$@"
4 changes: 4 additions & 0 deletions multinode-demo/validator.sh
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

here=$(dirname "$0")
exec "$here"/fullnode.sh --validator "$@"