Use release as default (#6896)

This commit is contained in:
sakridge 2019-11-12 12:39:12 -08:00 committed by Michael Vines
parent 6d76c34291
commit 2523fa73cf
1 changed files with 11 additions and 10 deletions

View File

@ -27,16 +27,17 @@ $ git checkout $TAG
### Configuration Setup
Ensure important programs such as the vote program are built before any nodes are started
Ensure important programs such as the vote program are built before any nodes are started. Note that we are using the release build here for good performance.
If you want the debug build, use just `cargo build` and omit the `NDEBUG=1` part of the command.
```bash
$ cargo build
$ cargo build --release
```
The network is initialized with a genesis ledger generated by running the following script.
```bash
$ ./multinode-demo/setup.sh
$ NDEBUG=1 ./multinode-demo/setup.sh
```
### Drone
@ -46,7 +47,7 @@ In order for the validators and clients to work, we'll need to spin up a drone t
Start the drone with:
```bash
$ ./multinode-demo/drone.sh
$ NDEBUG=1 ./multinode-demo/drone.sh
```
### Singlenode Testnet
@ -56,7 +57,7 @@ Before you start a validator, make sure you know the IP address of the machine y
Now start the bootstrap leader in a separate shell:
```bash
$ ./multinode-demo/bootstrap-leader.sh
$ NDEBUG=1 ./multinode-demo/bootstrap-leader.sh
```
Wait a few seconds for the server to initialize. It will print "leader ready..." when it's ready to receive transactions. The leader will request some tokens from the drone if it doesn't have any. The drone does not need to be running for subsequent leader starts.
@ -66,15 +67,15 @@ Wait a few seconds for the server to initialize. It will print "leader ready..."
To run a multinode testnet, after starting a leader node, spin up some additional validators in separate shells:
```bash
$ ./multinode-demo/validator-x.sh
$ NDEBUG=1 ./multinode-demo/validator-x.sh
```
To run a performance-enhanced validator on Linux, [CUDA 10.0](https://developer.nvidia.com/cuda-downloads) must be installed on your system:
```bash
$ ./fetch-perf-libs.sh
$ SOLANA_CUDA=1 ./multinode-demo/bootstrap-leader.sh
$ SOLANA_CUDA=1 ./multinode-demo/validator.sh
$ NDEBUG=1 SOLANA_CUDA=1 ./multinode-demo/bootstrap-leader.sh
$ NDEBUG=1 SOLANA_CUDA=1 ./multinode-demo/validator.sh
```
### Testnet Client Demo
@ -84,7 +85,7 @@ Now that your singlenode or multinode testnet is up and running let's send it so
In a separate shell start the client:
```bash
$ ./multinode-demo/bench-tps.sh # runs against localhost by default
$ NDEBUG=1 ./multinode-demo/bench-tps.sh # runs against localhost by default
```
What just happened? The client demo spins up several threads to send 500,000 transactions to the testnet as quickly as it can. The client then pings the testnet periodically to see how many transactions it processed in that time. Take note that the demo intentionally floods the network with UDP packets, such that the network will almost certainly drop a bunch of them. This ensures the testnet has an opportunity to reach 710k TPS. The client demo completes after it has convinced itself the testnet won't process any additional transactions. You should see several TPS measurements printed to the screen. In the multinode variation, you'll see TPS measurements for each validator node as well.
@ -125,7 +126,7 @@ This will dump all the threads stack traces into gdb.txt
In this example the client connects to our public testnet. To run validators on the testnet you would need to open udp ports `8000-10000`.
```bash
$ ./multinode-demo/bench-tps.sh --entrypoint testnet.solana.com:8001 --drone testnet.solana.com:9900 --duration 60 --tx_count 50
$ NDEBUG=1 ./multinode-demo/bench-tps.sh --entrypoint testnet.solana.com:8001 --drone testnet.solana.com:9900 --duration 60 --tx_count 50
```
You can observe the effects of your client's transactions on our [dashboard](https://metrics.solana.com:3000/d/testnet/testnet-hud?orgId=2&from=now-30m&to=now&refresh=5s&var-testnet=testnet)