Local testnet info (#2174)
This commit is contained in:
parent
4a2933b0b6
commit
fe5566d642
45
README.md
45
README.md
|
@ -61,13 +61,19 @@ $ git clone https://github.com/solana-labs/solana.git
|
||||||
$ cd solana
|
$ cd solana
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Build
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ cargo build --all
|
||||||
|
```
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
---
|
---
|
||||||
|
|
||||||
Run the test suite:
|
Run the test suite:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cargo test
|
$ cargo test --all
|
||||||
```
|
```
|
||||||
|
|
||||||
To emulate all the tests that will run on a Pull Request, run:
|
To emulate all the tests that will run on a Pull Request, run:
|
||||||
|
@ -76,43 +82,12 @@ To emulate all the tests that will run on a Pull Request, run:
|
||||||
$ ./ci/run-local.sh
|
$ ./ci/run-local.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Fullnode Debugging
|
Local Testnet
|
||||||
---
|
---
|
||||||
|
|
||||||
There are some useful debug messages in the code, you can enable them on a per-module and per-level
|
Start your own testnet locally, instructions are in the book [Solana: Blockchain Rebuild for Scale: Getting Started](https://solana-labs.github.io/solana/getting-started.html).
|
||||||
basis. Before running a leader or validator set the normal RUST\_LOG environment variable.
|
|
||||||
|
|
||||||
For example
|
Remote Testnets
|
||||||
|
|
||||||
* To enable `info` everywhere and `debug` only in the solana::banking_stage module:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ export RUST_LOG=info,solana::banking_stage=debug
|
|
||||||
```
|
|
||||||
|
|
||||||
* To enable BPF program logging:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ export RUST_LOG=solana_bpf_loader
|
|
||||||
```
|
|
||||||
|
|
||||||
Generally we are using `debug` for infrequent debug messages, `trace` for potentially frequent
|
|
||||||
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_:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ sudo gdb
|
|
||||||
attach <PID>
|
|
||||||
set logging on
|
|
||||||
thread apply all bt
|
|
||||||
```
|
|
||||||
|
|
||||||
This will dump all the threads stack traces into gdb.txt
|
|
||||||
|
|
||||||
|
|
||||||
Testnet Debugging
|
|
||||||
---
|
---
|
||||||
|
|
||||||
We maintain several testnets:
|
We maintain several testnets:
|
||||||
|
|
|
@ -96,7 +96,6 @@ $ SOLANA_CUDA=1 ./multinode-demo/bootstrap-leader.sh
|
||||||
$ SOLANA_CUDA=1 ./multinode-demo/fullnode-x.sh
|
$ SOLANA_CUDA=1 ./multinode-demo/fullnode-x.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Testnet Client Demo
|
### Testnet Client Demo
|
||||||
|
|
||||||
Now that your singlenode or multinode testnet is up and running let's send it
|
Now that your singlenode or multinode testnet is up and running let's send it
|
||||||
|
@ -117,6 +116,40 @@ demo completes after it has convinced itself the testnet won't process any addit
|
||||||
transactions. You should see several TPS measurements printed to the screen. In the
|
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.
|
multinode variation, you'll see TPS measurements for each validator node as well.
|
||||||
|
|
||||||
|
### Testnet Debugging
|
||||||
|
|
||||||
|
There are some useful debug messages in the code, you can enable them on a per-module and per-level
|
||||||
|
basis. Before running a leader or validator set the normal RUST\_LOG environment variable.
|
||||||
|
|
||||||
|
For example
|
||||||
|
|
||||||
|
* To enable `info` everywhere and `debug` only in the solana::banking_stage module:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ export RUST_LOG=solana=info,solana::banking_stage=debug
|
||||||
|
```
|
||||||
|
|
||||||
|
* To enable BPF program logging:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ export RUST_LOG=solana_bpf_loader=trace
|
||||||
|
```
|
||||||
|
|
||||||
|
Generally we are using `debug` for infrequent debug messages, `trace` for potentially frequent
|
||||||
|
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_:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ sudo gdb
|
||||||
|
attach <PID>
|
||||||
|
set logging on
|
||||||
|
thread apply all bt
|
||||||
|
```
|
||||||
|
|
||||||
|
This will dump all the threads stack traces into gdb.txt
|
||||||
|
|
||||||
## Public Testnet
|
## Public Testnet
|
||||||
|
|
||||||
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`.
|
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`.
|
||||||
|
@ -127,7 +160,6 @@ $ ./multinode-demo/client.sh --network $(dig +short testnet.solana.com):8001 --d
|
||||||
|
|
||||||
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)
|
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)
|
||||||
|
|
||||||
|
|
||||||
## Linux Snap
|
## Linux Snap
|
||||||
|
|
||||||
A Linux [Snap](https://snapcraft.io/) is available, which can be used to easily
|
A Linux [Snap](https://snapcraft.io/) is available, which can be used to easily
|
||||||
|
|
Loading…
Reference in New Issue