Go to file
Brooks daea6722f6
Improves RPC path sanitation (#29931)
2023-01-26 23:49:02 -05:00
.buildkite chore: stop uploading test data to buildkite (#28411) 2022-10-17 00:48:06 +08:00
.github ci: fix commit range in push event (#29755) 2023-01-19 12:28:00 +08:00
account-decoder Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
accounts-bench Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
accounts-cluster-bench Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
banking-bench Add fully-reproducible online tracer for banking (#29196) 2023-01-25 21:54:38 +09:00
banks-client Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
banks-interface Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
banks-server Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
bench-streamer Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
bench-tps Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
bloom Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
bucket_map Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
cd Create continuous delivery directory and add readme with canary details. (#27683) 2022-09-13 14:33:49 -05:00
ci Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
clap-utils Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
clap-v3-utils Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
cli Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
cli-config Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
cli-output Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
client Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
client-test Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
core removes staked-nodes updater service excessive locks on gossip (#29936) 2023-01-26 23:31:35 +00:00
docs [docs] new JSON RPC API docs format (#29772) 2023-01-26 17:14:47 -06:00
dos Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
download-utils Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
entry Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
explorer chore:(deps): bump react-countup from 6.3.2 to 6.4.0 in /explorer (#29926) 2023-01-26 09:05:42 +00:00
faucet doc: Fix documentation warnings and add some links (#29887) 2023-01-25 23:15:58 -08:00
frozen-abi adds new contact-info with forward compatible sockets (#29596) 2023-01-26 17:02:18 +00:00
genesis solana-genesis: fix bpf-program value_name (#29903) 2023-01-25 13:05:35 -07:00
genesis-utils Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
geyser-plugin-interface geyser: add parent slot/blockhash to block (#29855) 2023-01-25 14:20:24 -08:00
geyser-plugin-manager geyser: add parent slot/blockhash to block (#29855) 2023-01-25 14:20:24 -08:00
gossip adds new contact-info with forward compatible sockets (#29596) 2023-01-26 17:02:18 +00:00
install Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
keygen Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
ledger doc: ledger: SlotMeta: Clarify `consumed` and `completed_data_indexes` (#29886) 2023-01-26 16:30:09 -08:00
ledger-tool Revert "Add run parent directory for accounts files (#29794)" (#29899) 2023-01-25 10:03:01 -08:00
local-cluster Revert "Add run parent directory for accounts files (#29794)" (#29899) 2023-01-25 10:03:01 -08:00
log-analyzer Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
logger Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
measure Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
memory-management Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
merkle-root-bench Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
merkle-tree Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
metrics Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
multinode-demo Added option to turn on UDP for TPU transaction and make UDP based TPU off by default (#27462) 2022-09-07 13:19:14 -07:00
net Use halt-at-slot to specify getting bank-hash for slot 0 (#29873) 2023-01-24 22:05:59 -06:00
net-shaper Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
net-utils Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
notifier Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
perf Move Deduper into a separate file (#29891) 2023-01-25 15:34:53 -06:00
poh Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
poh-bench Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
program-runtime Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
program-test program-test: Add token-2022 to default programs (#29878) 2023-01-26 01:52:55 +01:00
programs adds new contact-info with forward compatible sockets (#29596) 2023-01-26 17:02:18 +00:00
pubsub-client Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
quic-client Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
rayon-threadlimit Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
rbpf-cli Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
remote-wallet doc: Fix documentation warnings and add some links (#29887) 2023-01-25 23:15:58 -08:00
rpc Improves RPC path sanitation (#29931) 2023-01-26 23:49:02 -05:00
rpc-client Add Memcmp filter constructor and deprecate fields (#29923) 2023-01-26 14:50:15 -07:00
rpc-client-api Add Memcmp filter constructor and deprecate fields (#29923) 2023-01-26 14:50:15 -07:00
rpc-client-nonce-utils Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
rpc-test Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
runtime doc: Fix documentation warnings and add some links (#29887) 2023-01-25 23:15:58 -08:00
scripts make `scripts/cargo-fmt.sh` $PWD agnostic (#29919) 2023-01-26 04:03:39 +00:00
sdk doc: Fix documentation warnings and add some links (#29887) 2023-01-25 23:15:58 -08:00
send-transaction-service Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
stake-accounts Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
storage-bigtable Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
storage-proto Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
streamer Remove the specific QUIC connection entry that disconnected (#29883) 2023-01-25 16:14:25 -08:00
sys-tuner Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
system-test chore: all gce performance tests use n2-standard-16 (#28509) 2022-10-22 00:34:20 +08:00
test-validator Revert "Add run parent directory for accounts files (#29794)" (#29899) 2023-01-25 10:03:01 -08:00
thin-client Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
tokens Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
tpu-client Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
transaction-dos Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
transaction-status Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
udp-client Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
upload-perf Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
validator Revert "Add run parent directory for accounts files (#29794)" (#29899) 2023-01-25 10:03:01 -08:00
version Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
watchtower Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
web3.js chore: bump @typescript-eslint/parser from 5.40.1 to 5.47.1 in /web3.js (#29453) 2023-01-02 09:13:50 +00:00
web3.js-experimental [web3.js][experimental] Set up test/dev infra (#28950) 2022-11-23 18:25:02 -08:00
zk-token-sdk ledger: Remove `clippy::wrong_self_convention` (#29916) 2023-01-26 15:12:35 -08:00
.clippy.toml
.gitignore Ingest duplicate proofs sent through Gossip (#29227) 2023-01-19 13:00:56 -08:00
.mergify.yml Fix mergify, vis-a-vis missing dont-squash-my-commits team (#29909) 2023-01-25 20:59:18 -07:00
.travis.yml closed explorer travis.yml after giving workflow permisssion in github action 2022-01-31 13:39:20 +05:30
CONTRIBUTING.md Update CONTRIBUTING.md for crate creation. (#29637) 2023-01-25 22:23:37 -08:00
Cargo.lock adds new contact-info with forward compatible sockets (#29596) 2023-01-26 17:02:18 +00:00
Cargo.toml Revert "chore: workspace inheritance (#29509)" (#29892) 2023-01-25 15:50:41 +08:00
LICENSE up year in license 2022-02-01 08:29:29 -08:00
README.md Update docs to use ./cargo (#28798) 2022-11-14 14:08:56 -06:00
RELEASE.md RELEASE.md cleanup (#28007) 2022-09-24 20:30:25 -06:00
SECURITY.md security-policy: correct bounty split example 2023-01-17 16:19:38 -07:00
cargo Speed up net.sh builds (#16360) 2021-04-07 14:45:03 +08:00
cargo-build-bpf replace ./cargo with cargo in sbf/bpf build scripts (#29371) 2022-12-22 20:17:11 +01:00
cargo-build-sbf replace ./cargo with cargo in sbf/bpf build scripts (#29371) 2022-12-22 20:17:11 +01:00
cargo-test-bpf replace ./cargo with cargo in sbf/bpf build scripts (#29371) 2022-12-22 20:17:11 +01:00
cargo-test-sbf replace ./cargo with cargo in sbf/bpf build scripts (#29371) 2022-12-22 20:17:11 +01:00
codecov.yml chore: tell Codecov about the web3.js move, a few years later (#27633) 2022-09-06 22:25:51 -07:00
fetch-perf-libs.sh
fetch-spl.sh program-test: Add token-2022 to default programs (#29878) 2023-01-26 01:52:55 +01:00
run.sh add some guidance in place of `./run.sh` 2021-09-11 14:49:17 -06:00
rust-toolchain.toml Upgrades to Rust 1.66.1 (#29827) 2023-01-24 15:11:10 +08:00
rustfmt.toml Add rustfmt.toml and `cargo fmt` (#23238) 2022-02-19 13:32:29 +08:00
test-abi.sh Update frozen_abi hashes 2020-10-24 08:37:55 -07:00
vercel.json removing the "autoJobCancelation": false 2021-10-07 20:49:58 +05:30

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 Foundation's ("SF") 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 SF or developer resources that SF provides are for educational and inspirational purposes only. SF 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. As a project-based primarily on open-source software, it is possible that such sanctioned persons may nevertheless bypass prohibitions, obtain the code comprising the Solana blockchain protocol (or other project code or applications) and deploy, integrate, or otherwise use it. Accordingly, there is a risk to individuals that other persons using the Solana blockchain protocol may be sanctioned persons and that transactions with such persons would be a violation of U.S. export controls and sanctions law. This risk applies to individuals, organizations, and other ecosystem participants that deploy, integrate, or use the Solana blockchain protocol code directly (e.g., as a node operator), and individuals that transact on the Solana blockchain through light clients, third party interfaces, and/or wallet software.