Go to file
Dave 30d051da84
Bump librocksdb-sys to 0.8.3 and bindgen to 0.64.0 (#31580)
Fixes builds when using llvm16 systems

Would get error:
```
thread 'main' panicked at '"enum_(unnamed_at_rocksdb/include/rocksdb/c_h_981_1)" is not a valid Ident'
```
when attempting to build the bins.

Ref:
https://github.com/rust-rocksdb/rust-rocksdb/issues/713

Bumps librocksdb-sys to 0.8.3
and bindgen to 0.64.0
in the Cargo.lock
2023-05-11 23:29:43 -07:00
.buildkite
.github
account-decoder Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -07: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 gossip-service: Spy multiple nodes by pubkey at once (#31597) 2023-05-11 18:24:35 +02:00
banking-bench
banks-client
banks-interface
banks-server
bench-streamer
bench-tps removes hard-coded QUIC_PORT_OFFSET from connection-cache (#31541) 2023-05-09 13:46:17 +00: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 Update to nightly rustc to 2023-04-19 (#31381) 2023-05-11 15:48:13 +09:00
clap-utils
clap-v3-utils [zk-token-sdk, clap-v3-utils] Implement `EncodableKey` for encryption keys (#31496) 2023-05-10 06:37:29 +09:00
cli
cli-config
cli-output Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -07:00
client removes hard-coded QUIC_PORT_OFFSET from connection-cache (#31541) 2023-05-09 13:46:17 +00:00
client-test
connection-cache removes hard-coded QUIC_PORT_OFFSET from connection-cache (#31541) 2023-05-09 13:46:17 +00:00
core remove unused functions connecting hash calc and ancient append vec boundary (#31575) 2023-05-11 13:30:44 -07:00
docs Decommission rbpf-cli, replaced by solana-ledger-tool run subcommand (#31512) 2023-05-05 09:31:38 -07:00
dos gossip-service: Spy multiple nodes by pubkey at once (#31597) 2023-05-11 18:24:35 +02:00
download-utils
entry
faucet
frozen-abi
genesis Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -07:00
genesis-utils
geyser-plugin-interface
geyser-plugin-manager Add entry notification service for geyser (#31290) 2023-05-10 17:20:51 -06:00
gossip gossip-service: Spy multiple nodes by pubkey at once (#31597) 2023-05-11 18:24:35 +02: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 Add entry notification service for geyser (#31290) 2023-05-10 17:20:51 -06:00
ledger-tool Add entry notification service for geyser (#31290) 2023-05-10 17:20:51 -06:00
local-cluster Add entry notification service for geyser (#31290) 2023-05-10 17:20:51 -06:00
log-analyzer
logger
measure
memory-management
merkle-root-bench
merkle-tree
metrics Add canaries to metrics config (#31517) 2023-05-10 12:12:50 -05:00
multinode-demo
net
net-shaper
net-utils
notifier
perf
poh
poh-bench
program-runtime Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -07:00
program-test Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -07:00
programs Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -07:00
pubsub-client
quic-client removes hard-coded QUIC_PORT_OFFSET from connection-cache (#31541) 2023-05-09 13:46:17 +00:00
rayon-threadlimit
rbpf-cli Decommission rbpf-cli, replaced by solana-ledger-tool run subcommand (#31512) 2023-05-05 09:31:38 -07:00
remote-wallet
rpc Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -07:00
rpc-client Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -07:00
rpc-client-api
rpc-client-nonce-utils
rpc-test removes hard-coded QUIC_PORT_OFFSET from connection-cache (#31541) 2023-05-09 13:46:17 +00:00
runtime remove unused functions connecting hash calc and ancient append vec boundary (#31575) 2023-05-11 13:30:44 -07:00
scripts add and recommend script for reserving new package names on crates.io (#31416) 2023-05-08 09:31:24 -06:00
sdk Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -07:00
send-transaction-service
stake-accounts
storage-bigtable
storage-proto
streamer
sys-tuner
system-test Update queried metric to determine tps in system tests (#31531) 2023-05-08 10:37:23 -05:00
test-validator Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -07:00
thin-client
tokens Batch rpc calls in `solana-tokens distribute-spl-tokens` (#31419) 2023-05-11 01:55:58 +02:00
tpu-client removes hard-coded QUIC_PORT_OFFSET from connection-cache (#31541) 2023-05-09 13:46:17 +00:00
transaction-dos
transaction-status Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -07:00
udp-client removes hard-coded QUIC_PORT_OFFSET from connection-cache (#31541) 2023-05-09 13:46:17 +00:00
upload-perf
validator add block-sub argument to solana-test-validator (#31544) 2023-05-09 15:29:14 +00:00
version
watchtower
web3.js
zk-token-sdk Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -07:00
.clippy.toml
.codecov.yml
.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
CONTRIBUTING.md
Cargo.lock Bump librocksdb-sys to 0.8.3 and bindgen to 0.64.0 (#31580) 2023-05-11 23:29:43 -07:00
Cargo.toml Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -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
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.