Go to file
Yihau Chen df3ef111f7
chore: workspace inheritance (#29893)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-02-23 22:01:54 +08:00
.buildkite chore: stop uploading test data to buildkite (#28411) 2022-10-17 00:48:06 +08:00
.github ci: extract vercel scope as an env (#30441) 2023-02-23 11:58:08 +08:00
account-decoder chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
accounts-bench chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
accounts-cluster-bench chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
banking-bench chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
banks-client chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
banks-interface chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
banks-server chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
bench-streamer chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
bench-tps chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
bloom chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
bucket_map chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
cd Create continuous delivery directory and add readme with canary details. (#27683) 2022-09-13 14:33:49 -05:00
ci chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
clap-utils chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
clap-v3-utils chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
cli chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
cli-config chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
cli-output chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
client chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
client-test chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
connection-cache Update homepage value for all crates (#30444) 2023-02-23 02:20:18 +00:00
core chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
docs ci: extract vercel scope as an env (#30441) 2023-02-23 11:58:08 +08:00
dos chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
download-utils chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
entry chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
faucet chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
frozen-abi chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
genesis chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
genesis-utils chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
geyser-plugin-interface chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
geyser-plugin-manager chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
gossip chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
install chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
keygen chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
ledger chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
ledger-tool chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
local-cluster chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08: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 chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08: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 chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
multinode-demo Add --allow-private-addr to bootstrap-validator.sh (#30163) 2023-02-22 09:54:15 -08:00
net add client-type cli option documentation (#30170) 2023-02-08 10:56:25 +01: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 chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
poh chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
poh-bench chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
program-runtime chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
program-test chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
programs chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
pubsub-client chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
quic-client chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
rayon-threadlimit chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
rbpf-cli chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
remote-wallet chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
rpc chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
rpc-client chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
rpc-client-api chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
rpc-client-nonce-utils chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
rpc-test chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
runtime chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
scripts chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
sdk chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
send-transaction-service chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
stake-accounts chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
storage-bigtable chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
storage-proto chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
streamer chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
sys-tuner chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
system-test chore: all gce performance tests use n2-standard-16 (#28509) 2022-10-22 00:34:20 +08:00
test-validator chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
thin-client chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
tokens chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
tpu-client chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
transaction-dos chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
transaction-status chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
udp-client chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
upload-perf chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
validator chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
version chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
watchtower chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
zk-token-sdk chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
.clippy.toml
.gitignore Ingest duplicate proofs sent through Gossip (#29227) 2023-01-19 13:00:56 -08:00
.mergify.yml chore: remove Explorer build scripts from the Monorepo (#30262) 2023-02-10 17:25:32 -06:00
.travis.yml chore: remove Explorer build scripts from the Monorepo (#30262) 2023-02-10 17:25:32 -06:00
CONTRIBUTING.md Update maintainers references (#29997) 2023-01-31 08:07:13 -05:00
Cargo.lock move AccountInfo bits from size to offset (#30408) 2023-02-21 10:08:37 -08:00
Cargo.toml chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08: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 RELEASE.md cleanup (#28007) 2022-09-24 20:30:25 -06:00
SECURITY.md Update security email address (#30445) 2023-02-22 15:55:57 -08:00
cargo
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
fetch-perf-libs.sh
fetch-spl.sh solana-genesis: add support for initializing upgradeable programs (#29994) 2023-01-31 11:15:42 -07:00
run.sh add some guidance in place of `./run.sh` 2021-09-11 14:49:17 -06:00
rust-toolchain.toml Upgrades Rust to 1.67.1 (#29947) 2023-02-17 14:08:27 -05:00
rustfmt.toml Add rustfmt.toml and `cargo fmt` (#23238) 2022-02-19 13:32:29 +08:00
test-abi.sh
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 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.