Go to file
Jack May 65049bd112
Bump rust-bpf to v0.2.4 (#12361)
2020-09-20 23:10:50 +00:00
.buildkite
.github
.travis
account-decoder
accounts-bench
banking-bench
banks-client
banks-interface
banks-server SendTransactionServices now exit their thread on channel drop instead of by a flag 2020-09-18 17:29:10 +00:00
bench-exchange
bench-streamer Fix off-by-one max payload checks 2020-09-16 12:46:06 -07:00
bench-tps
ci Add Pack and COption to sdk (#12294) 2020-09-17 21:10:02 -06:00
clap-utils Improve error message when .config/solana/id.json is not found 2020-09-18 16:29:12 -07:00
cli Move TestValidator into its own module 2020-09-19 08:35:26 -07:00
cli-config
client Add get_token_account methods (#12346) 2020-09-18 20:45:13 -06:00
core Move TestValidator into its own module 2020-09-19 08:35:26 -07:00
crate-features
docs Document that testnet has a faucet 2020-09-19 08:41:58 -07:00
dos
download-utils
explorer common component for more readable slot numbers 2020-09-18 10:55:36 -07:00
faucet Fix off-by-one max payload checks 2020-09-16 12:46:06 -07:00
genesis
genesis-programs
gossip
install
keygen
ledger Persistent tower (#10718) 2020-09-19 14:03:54 +09:00
ledger-tool
local-cluster validator/ cleanup 2020-09-19 08:35:26 -07:00
log-analyzer
logger
measure
merkle-tree
metrics
multinode-demo Persistent tower (#10718) 2020-09-19 14:03:54 +09:00
net
net-shaper
net-utils
notifier
perf Fix off-by-one max payload checks 2020-09-16 12:46:06 -07:00
poh-bench
programs Cleanup and feature gate instruction processing (#12359) 2020-09-20 10:58:12 -07:00
ramp-tps
rayon-threadlimit
remote-wallet
runtime Cleanup and feature gate instruction processing (#12359) 2020-09-20 10:58:12 -07:00
scripts
sdk Bump rust-bpf to v0.2.4 (#12361) 2020-09-20 23:10:50 +00:00
stake-accounts
stake-monitor
stake-o-matic
storage-bigtable
streamer
sys-tuner
system-test
tokens Move TestValidator into its own module 2020-09-19 08:35:26 -07:00
transaction-status
upload-perf
validator Bind to correct RPC addresses 2020-09-20 07:32:25 +00:00
version
vote-signer
watchtower
web3.js chore: bump prettier from 2.1.1 to 2.1.2 in /web3.js (#12328) 2020-09-18 09:40:01 +00:00
.clippy.toml
.codecov.yml
.gitignore
.mergify.yml
.travis.yml
CONTRIBUTING.md
Cargo.lock
Cargo.toml
LICENSE
README.md
RELEASE.md
fetch-perf-libs.sh
fetch-spl.sh
run.sh Persistent tower (#10718) 2020-09-19 14:03:54 +09:00

README.md

Solana

Solana crate Solana documentation Build status codecov

Building

1. Install rustc, cargo and rustfmt.

$ curl https://sh.rustup.rs -sSf | sh
$ source $HOME/.cargo/env
$ rustup component add rustfmt

Please sure you are always using the latest stable rust version by running:

$ rustup update

On Linux systems you may need to install libssl-dev, pkg-config, zlib1g-dev, etc. On Ubuntu:

$ sudo apt-get update
$ sudo apt-get install libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang

2. Download the source code.

$ git clone https://github.com/solana-labs/solana.git
$ cd solana

3. Build.

$ cargo build

4. Run a minimal local cluster.

$ ./run.sh

Testing

Run the test suite:

$ cargo test

Starting a local testnet

Start your own testnet locally, instructions are in the online docs.

Accessing the remote testnet

  • testnet - public stable testnet accessible via devnet.solana.com. Runs 24/7

Benchmarking

First install the nightly build of rustc. cargo bench requires use of the unstable features only available in the nightly build.

$ rustup install nightly

Run the benchmarks:

$ cargo +nightly bench

Release Process

The release process for this project is described here.

Code coverage

To generate code coverage statistics:

$ scripts/coverage.sh
$ open target/cov/lcov-local/index.html

Why coverage? While most see coverage as a code quality metric, we see it primarily as a developer productivity metric. When a developer makes a change to the codebase, presumably it's a solution to some problem. Our unit-test suite is how we encode the set of problems the codebase solves. Running the test suite should indicate that your change didn't infringe on anyone else's solutions. Adding a test protects your solution from future changes. Say you don't understand why a line of code exists, try deleting it and running the unit-tests. The nearest test failure should tell you what problem was solved by that code. If no test fails, go ahead and submit a Pull Request that asks, "what problem is solved by this code?" On the other hand, if a test does fail and you can think of a better way to solve the same problem, a Pull Request with your solution would most certainly be welcome! Likewise, if rewriting a test can better communicate what code it's protecting, please send us that patch!

Disclaimer

All claims, content, designs, algorithms, estimates, roadmaps, specifications, and performance measurements described in this project are done with the author's best effort. It is up to the reader to check and validate their accuracy and truthfulness. Furthermore nothing in this project constitutes a solicitation for investment.