diff --git a/README.md b/README.md index c694330170..866a678f55 100644 --- a/README.md +++ b/README.md @@ -61,13 +61,19 @@ $ git clone https://github.com/solana-labs/solana.git $ cd solana ``` +Build + +```bash +$ cargo build --all +``` + Testing --- Run the test suite: ```bash -$ cargo test +$ cargo test --all ``` 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 ``` -Fullnode Debugging +Local Testnet --- -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. +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). -For example - -* 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 -set logging on -thread apply all bt -``` - -This will dump all the threads stack traces into gdb.txt - - -Testnet Debugging +Remote Testnets --- We maintain several testnets: diff --git a/book/src/getting-started.md b/book/src/getting-started.md index 77892af716..857aafe871 100644 --- a/book/src/getting-started.md +++ b/book/src/getting-started.md @@ -96,7 +96,6 @@ $ SOLANA_CUDA=1 ./multinode-demo/bootstrap-leader.sh $ SOLANA_CUDA=1 ./multinode-demo/fullnode-x.sh ``` - ### Testnet Client Demo 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 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 +set logging on +thread apply all bt +``` + +This will dump all the threads stack traces into gdb.txt + ## 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`. @@ -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) - ## Linux Snap A Linux [Snap](https://snapcraft.io/) is available, which can be used to easily