Go to file
Jeff Washington (jwash) d4a6e00ffc
rework find_entry_mut for missing case (#30833)
* rework find_entry_mut for missing case

* clippy
2023-03-21 14:09:17 -07:00
.buildkite ci: silence ci test output while recording in full (#30654) 2023-03-16 22:17:29 +09:00
.github
account-decoder Upgrade to token-2022 0.6.0 (#30353) 2023-03-10 10:32:19 +09:00
accounts-bench
accounts-cluster-bench Update accounts-cluster-bench to work against public clusters (#30781) 2023-03-20 09:46:06 -06:00
banking-bench
banks-client
banks-interface
banks-server
bench-streamer
bench-tps updates tempfile to 3.4.0 (#30727) 2023-03-15 18:25:35 -06:00
bloom
bucket_map rework find_entry_mut for missing case (#30833) 2023-03-21 14:09:17 -07:00
cd
ci ci: silence ci test output while recording in full (#30654) 2023-03-16 22:17:29 +09:00
clap-utils
clap-v3-utils
cli Make redelegate signer more optional (#30734) 2023-03-15 22:59:56 -06:00
cli-config
cli-output Revert "Add new vote state version that replaces Lockout with LandedV… (#30817) 2023-03-21 22:54:13 +08:00
client Update accounts-cluster-bench to work against public clusters (#30781) 2023-03-20 09:46:06 -06:00
client-test Track max_complete_rewards_slot for use in rpc, bigtable (#30698) 2023-03-14 12:08:48 -06:00
connection-cache Bump indexmap from 1.9.1 to 1.9.2 (#30815) 2023-03-21 09:42:07 -06:00
core Makes snapshot_utils aware of Incremental Accounts Hash (#30804) 2023-03-21 16:34:30 +00:00
docs fix: fixed and/or removed forum links (#30775) 2023-03-20 13:58:41 -05:00
dos
download-utils
entry
faucet
frozen-abi
genesis replaced chunks with tuples in validator (#30499) 2023-03-07 14:32:42 +01:00
genesis-utils
geyser-plugin-interface
geyser-plugin-manager Geyser Runtime Reload (#30352) 2023-03-16 17:03:00 -07:00
gossip
install test: add test_load_serde_yaml_v_0_8_config (#30558) 2023-03-03 12:44:02 +08:00
keygen
ledger Fix SlotMeta connected tracking (#28069) 2023-03-21 20:17:58 +08:00
ledger-tool Clean orphaned account snapshot dirs (#30645) 2023-03-17 15:22:10 -07:00
local-cluster Makes snapshot_utils aware of Incremental Accounts Hash (#30804) 2023-03-21 16:34:30 +00:00
log-analyzer
logger
measure measure: Measure::end_as{ns,us,ms,s,duration} (#30762) 2023-03-17 12:26:06 -07:00
memory-management
merkle-root-bench
merkle-tree
metrics metrics: datapoint macro: Allow trailing comma (#30317) 2023-03-17 12:57:46 -07:00
multinode-demo
net Tweak net.sh docs for primordial stakes (#30586) 2023-03-04 00:28:10 +01:00
net-shaper
net-utils
notifier
perf generalizes deduper to work with any hashable type (#30753) 2023-03-20 18:04:46 +00:00
poh
poh-bench
program-runtime Revert "add default_cost as mandatory field for Builtin (#30639)" (#30749) 2023-03-16 11:21:06 -05:00
program-test Revert "add default_cost as mandatory field for Builtin (#30639)" (#30749) 2023-03-16 11:21:06 -05:00
programs Adds test for programs which read from a program account (#30803) 2023-03-21 18:12:19 +01:00
pubsub-client
quic-client Quic server batching (#30330) 2023-03-16 21:50:57 +08:00
rayon-threadlimit
rbpf-cli Bump solana_rbpf to v0.2.40 (#30668) 2023-03-10 19:05:29 +01:00
remote-wallet
rpc Track max_complete_rewards_slot for use in rpc, bigtable (#30698) 2023-03-14 12:08:48 -06:00
rpc-client
rpc-client-api
rpc-client-nonce-utils
rpc-test
runtime Do not log detailed epoch stakes (#30825) 2023-03-21 14:43:06 -05:00
scripts ci: silence ci test output while recording in full (#30654) 2023-03-16 22:17:29 +09:00
sdk Revert "Add new vote state version that replaces Lockout with LandedV… (#30817) 2023-03-21 22:54:13 +08:00
send-transaction-service
stake-accounts
storage-bigtable
storage-proto Replace hardcoded loaded accounts size limit with compute budget instruction (#30506) 2023-03-08 19:41:45 -06:00
streamer Quic server batching (#30330) 2023-03-16 21:50:57 +08:00
sys-tuner
system-test
test-validator Geyser Runtime Reload (#30352) 2023-03-16 17:03:00 -07:00
thin-client
tokens
tpu-client
transaction-dos
transaction-status Upgrade to token-2022 0.6.0 (#30353) 2023-03-10 10:32:19 +09:00
udp-client
upload-perf
validator Clean orphaned account snapshot dirs (#30645) 2023-03-17 15:22:10 -07:00
version ci: test-checks.sh all sbf code & use nightly only (#30602) 2023-03-13 14:28:34 +09:00
watchtower
web3.js
zk-token-sdk [zk-token-sdk] Add option to create proof context state in the proof verification program (#29996) 2023-03-16 07:35:20 +09:00
.clippy.toml
.codecov.yml Add .codecov.yml with checks disabled (#30666) 2023-03-10 20:11:22 +09:00
.gitignore
.mergify.yml CI: Remove mergify backport config for v1.13 (#30520) 2023-03-07 11:10:23 -06:00
.travis.yml
CONTRIBUTING.md
Cargo.lock Bump arrayref from 0.3.6 to 0.3.7 (#30814) 2023-03-21 09:42:27 -06:00
Cargo.toml Bump arrayref from 0.3.6 to 0.3.7 (#30814) 2023-03-21 09:42:27 -06:00
LICENSE
README.md
RELEASE.md
SECURITY.md security.txt - pinging admins is a good way to get banned (#30567) 2023-03-01 14:01:15 -07:00
cargo
cargo-build-bpf
cargo-build-sbf
cargo-test-bpf
cargo-test-sbf
fetch-perf-libs.sh
fetch-spl.sh Upgrade to token-2022 0.6.0 (#30353) 2023-03-10 10:32:19 +09:00
run.sh
rust-toolchain.toml
rustfmt.toml
test-abi.sh
vercel.json

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

When building the master branch, please make sure you are using the latest stable rust version by running:

$ rustup update

When building a specific release branch, you should check the rust version in ci/rust-version.sh and if necessary, install that version by running:

$ rustup install VERSION

Note that if this is not the latest rust version on your machine, cargo commands may require an override in order to use the correct version.

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

On Ubuntu:

$ sudo apt-get update
$ sudo apt-get install libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang cmake make libprotobuf-dev protobuf-compiler

On Fedora:

$ sudo dnf install openssl-devel systemd-devel pkg-config zlib-devel llvm clang cmake make protobuf-devel protobuf-compiler perl-core

2. Download the source code.

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

3. Build.

$ ./cargo build

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 development cluster

  • devnet - stable public cluster for development accessible via devnet.solana.com. Runs 24/7. Learn more about the public clusters

Benchmarking

First, install the nightly build of rustc. cargo bench requires the 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 Solana Labs, Inc. (“SL”) good faith efforts. It is up to the reader to check and validate their accuracy and truthfulness. Furthermore, nothing in this project constitutes a solicitation for investment.

Any content produced by SL or developer resources that SL provides are for educational and inspirational purposes only. SL does not encourage, induce or sanction the deployment, integration or use of any such applications (including the code comprising the Solana blockchain protocol) in violation of applicable laws or regulations and hereby prohibits any such deployment, integration or use. This includes the use of any such applications by the reader (a) in violation of export control or sanctions laws of the United States or any other applicable jurisdiction, (b) if the reader is located in or ordinarily resident in a country or territory subject to comprehensive sanctions administered by the U.S. Office of Foreign Assets Control (OFAC), or (c) if the reader is or is working on behalf of a Specially Designated National (SDN) or a person subject to similar blocking or denied party prohibitions.

The reader should be aware that U.S. export control and sanctions laws prohibit U.S. persons (and other persons that are subject to such laws) from transacting with persons in certain countries and territories or that are on the SDN list. Accordingly, there is a risk to individuals that other persons using any of the code contained in this repo, or a derivation thereof, may be sanctioned persons and that transactions with such persons would be a violation of U.S. export controls and sanctions law.