Go to file
Justin Starry 54775ffedf
feat: support restarting failed bpf loader deploys (#12163)
* feat: support restarting failed bpf loader deploys

* chore: add error message if program already exists
2020-09-23 22:54:27 +08:00
.buildkite
.github
.travis
account-decoder A-Z deps 2020-09-22 18:03:53 -06:00
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
bench-tps
ci
clap-utils Improve error message when .config/solana/id.json is not found 2020-09-18 16:29:12 -07:00
cli Simplify cli node version output, display semver only by default 2020-09-22 07:03:43 +00:00
cli-config
client Simplify cli node version output, display semver only by default 2020-09-22 07:03:43 +00:00
core Bump spl-token (#12395) 2020-09-22 17:08:54 -06:00
crate-features
docs Add docs for secp256k1 and instruction introspection. (#12369) 2020-09-21 13:50:23 -07:00
dos
download-utils
explorer add token type on token instructions + symbol on amount (#12398) 2020-09-23 07:51:54 -07:00
faucet
genesis
genesis-programs
gossip
install
keygen
ledger Add blockstore column to store performance sampling data (#12251) 2020-09-22 12:26:32 -07: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
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 Fix solana-tokens check_payer_balances for distribute-stake (#12380) 2020-09-23 02:39:05 +00:00
transaction-status A-Z deps 2020-09-22 18:03:53 -06:00
upload-perf
validator Bind to correct RPC addresses 2020-09-20 07:32:25 +00:00
version
vote-signer
watchtower
web3.js feat: support restarting failed bpf loader deploys (#12163) 2020-09-23 22:54:27 +08:00
.clippy.toml
.codecov.yml
.gitignore
.mergify.yml
.travis.yml
CONTRIBUTING.md
Cargo.lock Bump spl-token (#12395) 2020-09-22 17:08:54 -06:00
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.