Go to file
Pankaj Garg cc24d2207c
Update SBF bench to account for delay visibility (#31501)
2023-05-04 17:17:02 -07:00
.buildkite ci: don't run test for openbook-dex temporarily (#31350) 2023-04-26 06:58:21 +08:00
.github ci: stop windows building on master temporarily (#31353) 2023-04-26 01:29:28 +00:00
account-decoder
accounts-bench
accounts-cluster-bench makes sockets in LegacyContactInfo private (#31248) 2023-04-21 15:39:16 +00:00
banking-bench
banks-client
banks-interface
banks-server delete rpc_banks_service.rs (#31369) 2023-04-27 18:26:44 +00:00
bench-streamer
bench-tps Bump tempfile from 3.4.0 to 3.5.0 (#31439) 2023-05-02 11:29:23 -07:00
bloom
bucket_map bucket_map: Length must be 1 if including header in get_slice() (#31445) 2023-05-03 10:44:58 -04:00
cd
ci ci: fix private pipeline agents (#31407) 2023-04-29 04:23:23 +08:00
clap-utils
clap-v3-utils
cli Add new CreateVoteAccount instruction-set builders (#31330) 2023-04-27 11:14:39 -06:00
cli-config
cli-output Add time field to solana vote-account rewards output (#31260) 2023-04-20 23:54:26 +02:00
client remove unused solana-net-utils dep from solana-client (#31372) 2023-04-27 16:14:43 +00:00
client-test
connection-cache
core remove unnecessary-struct-initialization (#31486) 2023-05-04 17:48:33 -05:00
docs [docs] add that loadedAddresses is undefined when using jsonParsed encoding (#31441) 2023-05-02 15:41:23 -05:00
dos removes pubkey from LegacyContactInfo public interface (#31375) 2023-04-28 12:05:15 +00:00
download-utils
entry
faucet ci: treewide: deny used_underscore_binding (#31319) 2023-04-27 10:10:16 +09:00
frozen-abi Bump syn from 1.0.109 to 2.0.5 (#31263) 2023-04-24 22:18:51 -07:00
genesis
genesis-utils
geyser-plugin-interface
geyser-plugin-manager Fixed missing Root notifications via geyser plugin framework (#31180) 2023-05-03 18:50:00 +08:00
gossip removes pubkey from LegacyContactInfo public interface (#31375) 2023-04-28 12:05:15 +00:00
install Cargo.toml: winapi: List used features (#31417) 2023-04-29 01:23:15 -07:00
keygen Bump tempfile from 3.4.0 to 3.5.0 (#31439) 2023-05-02 11:29:23 -07:00
ledger Remove metric counters from blockstore_processor (#31474) 2023-05-04 17:33:01 +00:00
ledger-tool Refactor ledger-tool moving some of functions to a separate module (#31359) 2023-04-27 14:11:04 -04:00
local-cluster removes pubkey from LegacyContactInfo public interface (#31375) 2023-04-28 12:05:15 +00:00
log-analyzer
logger
measure
memory-management
merkle-root-bench
merkle-tree
metrics add ssh connection check (#31472) 2023-05-03 20:22:30 -05:00
multinode-demo
net
net-shaper
net-utils
notifier
perf Rework tx sig verify batching (#31355) 2023-04-28 09:21:12 -07:00
poh
poh-bench
program-runtime Allow replacing tombstone with a non-tombstone (#31494) 2023-05-04 13:56:39 -07:00
program-test Refactoring - Remove redundant definition of `BuiltinProgram` (#31429) 2023-05-02 23:01:28 +02:00
programs Update SBF bench to account for delay visibility (#31501) 2023-05-04 17:17:02 -07:00
pubsub-client
quic-client
rayon-threadlimit
rbpf-cli Account data direct mapping (#28053) 2023-04-29 06:54:39 +10:00
remote-wallet
rpc Fixed missing Root notifications via geyser plugin framework (#31180) 2023-05-03 18:50:00 +08:00
rpc-client adds tpu_quic field to RpcContactInfo (#31310) 2023-04-22 20:18:58 +00:00
rpc-client-api adds tpu_quic field to RpcContactInfo (#31310) 2023-04-22 20:18:58 +00:00
rpc-client-nonce-utils
rpc-test ci: treewide: deny used_underscore_binding (#31319) 2023-04-27 10:10:16 +09:00
runtime Adds snapshot_utils::purge_bank_snapshot() (#31497) 2023-05-04 19:19:26 -04:00
scripts Add Solidity compiler to solana installer (#31184) 2023-05-03 07:10:00 -07:00
sdk Replace the feature ID for stake_raise_minimum_delegation_to_1_sol (#31463) 2023-05-03 13:51:15 -04:00
send-transaction-service Register SendTransactionService exit (#31261) 2023-04-20 18:23:14 -06:00
stake-accounts
storage-bigtable
storage-proto
streamer makes sockets in LegacyContactInfo private (#31248) 2023-04-21 15:39:16 +00:00
sys-tuner
system-test
test-validator Cleanup - Removes the CLI option "no-bpf-jit" (#31329) 2023-04-25 19:04:11 +02:00
thin-client
tokens ci: treewide: deny used_underscore_binding (#31319) 2023-04-27 10:10:16 +09:00
tpu-client
transaction-dos makes sockets in LegacyContactInfo private (#31248) 2023-04-21 15:39:16 +00:00
transaction-status Add new CreateVoteAccount instruction-set builders (#31330) 2023-04-27 11:14:39 -06:00
udp-client
upload-perf
validator removes pubkey from LegacyContactInfo public interface (#31375) 2023-04-28 12:05:15 +00:00
version
watchtower
web3.js
zk-token-sdk
.clippy.toml
.codecov.yml
.gitignore
.mergify.yml
.travis.yml
CONTRIBUTING.md
Cargo.lock Bump dialoguer from 0.10.2 to 0.10.4 (#31476) 2023-05-04 14:51:00 -07:00
Cargo.toml Bump dialoguer from 0.10.2 to 0.10.4 (#31476) 2023-05-04 14:51:00 -07:00
LICENSE
README.md
RELEASE.md
SECURITY.md
cargo
cargo-build-bpf
cargo-build-sbf
cargo-test-bpf
cargo-test-sbf
fetch-perf-libs.sh
fetch-spl.sh
nextest.toml ci: run stable tests partially (#31151) 2023-04-21 14:51:17 +08:00
run.sh
rust-toolchain.toml Upgrades Rust to 1.69.0 (#31336) 2023-04-25 10:22:38 -04:00
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.