Go to file
Riordan Panayides 0b395f4630 Upgrade rpc tokio 2024-01-15 22:10:02 +00:00
.buildkite v1.16: ci: don't upload test result (#32586) 2023-07-21 17:40:56 +00:00
.github v1.16: ci: fix Windows build (backport of #33467) (#33469) 2023-09-29 14:28:54 -05:00
account-decoder v1.16: spl: Bump token-2022 and friends (backport of #33453) (#33465) 2023-10-03 00:37:22 +00:00
accounts-bench pass include_slot_in_hash through hash calcs to allow rehashing if hash is not stored (#31579) 2023-05-11 13:23:29 -07:00
accounts-cluster-bench v1.16: Clean up Spl type conversions (backport of #31845) (#31880) 2023-05-30 16:27:40 -06:00
banking-bench v1.16: deprecates Signature::new in favor of Signature::{try_,}from (backport of #32481) (#32510) 2023-07-18 21:04:13 +00:00
banks-client v1.16: ci: update cargo.toml (backport of #31934) (#31946) 2023-06-03 12:19:45 +08:00
banks-interface banks-client: Add `get_fee_for_message` (#31703) 2023-05-18 23:31:02 +02:00
banks-server v1.16: banks-server: Support versioned transactions (backport of #33005) (#33036) 2023-08-29 11:07:15 +02:00
bench-streamer uses Duration type instead of untyped ..._ms: u64 (#30971) 2023-03-31 15:42:49 +00:00
bench-tps separates out connection-cache metrics for different protocols (#31803) 2023-05-25 14:48:22 +00:00
bloom v1.16: deprecates Signature::new in favor of Signature::{try_,}from (backport of #32481) (#32510) 2023-07-18 21:04:13 +00:00
bucket_map avoid unnecessary disk bucket data file allocation (#31659) 2023-05-16 07:10:46 -07:00
cd
ci v1.16: ci: remove stable-perf from PR and push CI (backport of #33479) (#33499) 2023-10-04 04:02:08 +00:00
clap-utils Cli: add `find-program-derived-address` command (#30370) 2023-04-17 16:17:40 +09:00
clap-v3-utils [clap-v3-utils, sdk, zk-token-sdk] Split `EncodableKey` into `EncodableKey` + `SeedDerivable` (#31668) 2023-05-17 17:42:35 +09:00
cli v1.16: Make active stake consistent in split (backport of #33295) (#33319) 2023-09-20 15:04:51 -06:00
cli-config chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
cli-output v1.16: deprecates Signature::new in favor of Signature::{try_,}from (backport of #32481) (#32510) 2023-07-18 21:04:13 +00:00
client separates out quic streamer connection stats from different servers (#31797) 2023-05-25 16:54:24 +00:00
client-test refactor: highest_cluster_confirmed_root -> highest_super_majority_root (#31619) 2023-05-14 00:42:03 -07:00
connection-cache v1.16: improve quic-client packet send metrics (backport of #32864) (#32946) 2023-08-25 17:45:16 -05:00
core v1.16: Adds `--no-skip-initial-accounts-db-clean` *hidden* CLI flag (backport of #33664) (#33676) 2023-10-12 16:50:37 -04:00
docs v1.16: [docs] clarified `jsonParsed` fallback encoding for `simulateTransaction` (backport of #33324) (#33327) 2023-09-20 19:02:31 +00:00
dos separates out connection-cache metrics for different protocols (#31803) 2023-05-25 14:48:22 +00:00
download-utils Enforce a minimum of 1 on full and incremental snapshot retention (#30968) 2023-03-30 10:16:36 -05:00
entry Send messages to EntryNotifierService from blockstore_processor (#31305) 2023-05-23 19:48:41 -06:00
faucet ci: treewide: deny used_underscore_binding (#31319) 2023-04-27 10:10:16 +09:00
frozen-abi Bump block-buffer from 0.9.0 to 0.10.4 (#31606) 2023-05-18 11:47:27 -07:00
genesis Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -07:00
genesis-utils Reconfigure genesis hash download and check (#30949) 2023-04-10 11:46:56 -07:00
geyser-plugin-interface Update discord invite links (#30909) 2023-03-29 09:14:22 -07:00
geyser-plugin-manager v1.16: GeyserPluginService: Use common `exit` flag. (backport of #31915) (#31924) 2023-06-01 14:33:32 -07:00
gossip v1.16: adds extensions to contact-info (backport of #32309) (#32781) 2023-08-09 23:05:25 +00:00
install Cargo.toml: winapi: List used features (#31417) 2023-04-29 01:23:15 -07:00
keygen [keygen] Use workspace version for `tempfile` (#31722) 2023-05-19 10:50:00 +09:00
ledger v1.16: Adds `--no-skip-initial-accounts-db-clean` *hidden* CLI flag (backport of #33664) (#33676) 2023-10-12 16:50:37 -04:00
ledger-tool v1.16: Support a custom path for the accounts hash cache (backport of #33115) (#33120) 2023-09-02 03:49:20 +00:00
local-cluster v1.16: Adds `--no-skip-initial-accounts-db-clean` *hidden* CLI flag (backport of #33664) (#33676) 2023-10-12 16:50:37 -04:00
log-analyzer chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
logger chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
measure ci: deflake `Measurement` tests (#31812) 2023-05-25 12:46:46 -06:00
memory-management chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
merkle-root-bench chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
merkle-tree chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
metrics v1.16: Add support for optional metric values via Option<_> (backport of #31975) (#32675) 2023-08-01 12:53:05 -07:00
multinode-demo bench-tps: rename tx_count arg to tx-count for consistency (#31213) 2023-04-17 10:59:39 -07:00
net Adjust mmap and FD count for net scripts (#31728) 2023-05-19 18:13:11 +00:00
net-shaper chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
net-utils chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
notifier chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
perf v1.16: deprecates Signature::new in favor of Signature::{try_,}from (backport of #32481) (#32510) 2023-07-18 21:04:13 +00:00
poh Don't needlessly expose Slot from solana-poh (#31832) 2023-05-26 16:08:24 +09:00
poh-bench chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
program-runtime v1.16: Handle closing of the program in the same slot as deployment (backport of #33025) (#33027) 2023-08-28 17:11:19 +00:00
program-test v1.16: spl: Bump token-2022 and friends (backport of #33453) (#33465) 2023-10-03 00:37:22 +00:00
programs Fix - CPI interface `bool` masking (BP to v1.16) (#33624) 2023-10-10 16:09:18 +02:00
pubsub-client improve pubsub error handling (#31669) 2023-05-19 16:46:09 +00:00
quic-client v1.16: improve quic-client packet send metrics (backport of #32864) (#32946) 2023-08-25 17:45:16 -05:00
rayon-threadlimit chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
rbpf-cli rbpf-cli: fix deprecation notice (#31743) 2023-05-22 04:47:05 -05:00
remote-wallet v1.16: deprecates Signature::new in favor of Signature::{try_,}from (backport of #32481) (#32510) 2023-07-18 21:04:13 +00:00
rpc Upgrade rpc tokio 2024-01-15 22:10:02 +00:00
rpc-client v1.16: rpc-client: Encapsulate `set_message_for_confirmed_transactions` (backport of #32941) (#32952) 2023-08-23 16:03:41 +02:00
rpc-client-api adds tpu_quic field to RpcContactInfo (#31310) 2023-04-22 20:18:58 +00:00
rpc-client-nonce-utils chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
rpc-test v1.16: unpin tokio for various client crates (#33058) 2023-08-29 14:42:17 -06:00
runtime v1.16: Prevent delay_visibility_of_program_deployment feature from cache pruning (backport of #33689) (#33690) 2023-10-13 15:33:46 +00:00
scripts v1.16: Update Solang Solidity compiler to v0.3.2 (backport of #32975) (#32997) 2023-08-25 14:05:30 -05:00
sdk Bump version to v1.16.17 (#33571) 2023-10-06 22:40:08 +00:00
send-transaction-service v1.16: deprecates Signature::new in favor of Signature::{try_,}from (backport of #32481) (#32510) 2023-07-18 21:04:13 +00:00
stake-accounts chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
storage-bigtable bigtable: Adjust logging and condense counters (#31661) 2023-05-15 21:48:00 -05:00
storage-proto storage-proto: change rerun line format (#33687) 2023-10-13 17:06:30 -05:00
streamer v1.16: Remove a unnecessary sleep in run server (backport of #32216) (#32251) 2023-06-26 12:17:17 -07:00
system-test Update queried metric to determine tps in system tests (#31531) 2023-05-08 10:37:23 -05:00
test-validator specifies protocol in contact-info get-socket api (#31602) 2023-05-12 16:16:20 +00:00
thin-client Relax `Sized` bound for `Signers` in `Transaction` and `Client` (#30568) 2023-03-30 13:12:48 +00:00
tokens v1.16: Make active stake consistent in split (backport of #33295) (#33319) 2023-09-20 15:04:51 -06:00
tpu-client v1.16: tpu-client: Speed up performance by awaiting all futures at once (backport of #32945) (#32972) 2023-08-25 12:35:55 +02:00
transaction-dos makes sockets in LegacyContactInfo private (#31248) 2023-04-21 15:39:16 +00:00
transaction-status v1.16: spl: Bump token-2022 and friends (backport of #33453) (#33465) 2023-10-03 00:37:22 +00:00
udp-client removes hard-coded QUIC_PORT_OFFSET from connection-cache (#31541) 2023-05-09 13:46:17 +00:00
upload-perf chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
validator v1.16: Adds `--no-skip-initial-accounts-db-clean` *hidden* CLI flag (backport of #33664) (#33676) 2023-10-12 16:50:37 -04:00
version ci: test-checks.sh all sbf code & use nightly only (#30602) 2023-03-13 14:28:34 +09:00
watchtower Add --active-stake-alert-threshold to watchtower (#31858) 2023-05-29 23:33:11 +00:00
web3.js Add link to new web3.js repo (#30096) 2023-02-27 10:23:54 -06:00
zk-keygen v1.16: [zk-token-sdk] Make `ElGamalKeypair` fields private (backport of #32190) (#32235) 2023-06-25 14:08:23 +09:00
zk-token-sdk v1.16: [zk-token-sdk] Allow all zero auditor pubkey in proofs (backport of #33106) (#33112) 2023-09-01 12:31:58 -07:00
.clippy.toml
.codecov.yml Add .codecov.yml with checks disabled (#30666) 2023-03-10 20:11:22 +09:00
.gitignore
.mergify.yml ci: make mergify only remove automerge when PR hasn't been merged (#31574) 2023-05-12 12:50:26 +08:00
.travis.yml chore: remove Explorer build scripts from the Monorepo (#30262) 2023-02-10 17:25:32 -06:00
CONTRIBUTING.md contributing: Is your PR easy to say "yes" to? (#31059) 2023-04-06 08:43:22 -04:00
Cargo.lock Bump version to v1.16.17 (#33571) 2023-10-06 22:40:08 +00:00
Cargo.toml Upgrade tokio 2024-01-15 22:05:13 +00:00
LICENSE update license 2023-01-30 15:42:44 -05:00
README.md update disclaimer 2023-01-30 17:40:53 -05:00
RELEASE.md
SECURITY.md SECURITY.md: Require exploit PoC for submission consideration (#31113) 2023-04-11 19:32:48 -06:00
cargo
cargo-build-bpf
cargo-build-sbf
cargo-test-bpf
cargo-test-sbf
fetch-perf-libs.sh
fetch-spl.sh v1.16: spl: Bump token-2022 and friends (backport of #33453) (#33465) 2023-10-03 00:37:22 +00:00
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.