Go to file
Jeff Washington (jwash) 568a4b1ca0
move AccountInfo bits from size to offset (#30408)
* move AccountInfo bits from size to offset

* feedback
2023-02-21 10:08:37 -08:00
.buildkite
.github ci: Do not produce build artifacts when run in a fork (#30294) 2023-02-14 00:31:44 -08:00
account-decoder
accounts-bench
accounts-cluster-bench embeds the new gossip ContactInfo in ClusterInfo (#30022) 2023-02-10 20:07:45 +00:00
banking-bench
banks-client
banks-interface
banks-server
bench-streamer
bench-tps Node identity for bench (#29929) 2023-02-18 09:52:48 +01:00
bloom
bucket_map
cd
ci Upgrades Rust to 1.67.1 (#29947) 2023-02-17 14:08:27 -05:00
clap-utils
clap-v3-utils
cli Bump solana_rbpf to v0.2.39 (#30398) 2023-02-21 18:43:34 +01:00
cli-config
cli-output Simplify some comparisons using (a1, a2).cmp(&(b1, b2)) (#30321) 2023-02-15 05:11:48 +00:00
client consolidates quic/udp dispatch macros (#30249) 2023-02-11 12:24:27 +00:00
client-test Bump futures-util from 0.3.25 to 0.3.26 (#30240) 2023-02-10 13:46:16 -07:00
connection-cache Bump futures-util from 0.3.25 to 0.3.26 (#30240) 2023-02-10 13:46:16 -07:00
core Removes unnecessary derives from Accounts{Delta}Hash (#30392) 2023-02-20 16:00:53 -05:00
docs hide commonly misused `--no-port-check` validator arg (#30306) 2023-02-16 13:34:45 -07:00
dos embeds the new gossip ContactInfo in ClusterInfo (#30022) 2023-02-10 20:07:45 +00:00
download-utils
entry entry: Split `start_verify_transactions` into `*_{cpu,gpu}` (#29962) 2023-02-13 11:52:01 -08:00
faucet Use Ipv4Addr constants in socketaddr! (#30095) 2023-02-02 16:48:21 -07:00
frozen-abi Bump sha2 from 0.10.5 to 0.10.6 (#30215) 2023-02-09 12:18:09 -07:00
genesis solana-genesis help nit: bpf->sbf (#30411) 2023-02-20 17:07:47 -07:00
genesis-utils
geyser-plugin-interface Update geyser interface to not require write locks (#30380) 2023-02-17 13:55:02 -08:00
geyser-plugin-manager Update geyser interface to not require write locks (#30380) 2023-02-17 13:55:02 -08:00
gossip Make clippy to be happy (#30394) 2023-02-17 20:51:18 +01:00
install
keygen
ledger Bump serde_bytes from 0.11.8 to 0.11.9 (#30362) 2023-02-16 10:08:32 -07:00
ledger-tool Inline format args (#30364) 2023-02-16 17:00:43 +00:00
local-cluster local-cluster test: Do not delete files that are in use by node (#30389) 2023-02-17 17:15:08 +00:00
log-analyzer
logger
measure measure_us! use Instant and duration_to_us internally (#30339) 2023-02-15 12:43:47 -08:00
memory-management
merkle-root-bench
merkle-tree
metrics
multinode-demo
net add client-type cli option documentation (#30170) 2023-02-08 10:56:25 +01:00
net-shaper
net-utils typo (#30393) 2023-02-21 09:59:45 -06:00
notifier
perf chore: Use `i` over `ix` variable name when naming worker threads (#30206) 2023-02-09 01:24:57 +00:00
poh use measure_us, remove incorrect name (#30254) 2023-02-13 11:15:01 -08:00
poh-bench
program-runtime Bump solana_rbpf to v0.2.39 (#30398) 2023-02-21 18:43:34 +01:00
program-test Adds stable layout types to pass to the runtime (#30192) 2023-02-16 08:16:25 -05:00
programs move AccountInfo bits from size to offset (#30408) 2023-02-21 10:08:37 -08:00
pubsub-client improve pubsub error handling (#29969) 2023-02-17 10:27:22 -07:00
quic-client removes dynamic cast and dynamic dispatch from connection-cache (#30128) 2023-02-09 00:50:44 +00:00
rayon-threadlimit
rbpf-cli Bump solana_rbpf to v0.2.39 (#30398) 2023-02-21 18:43:34 +01:00
remote-wallet
rpc embeds the new gossip ContactInfo in ClusterInfo (#30022) 2023-02-10 20:07:45 +00:00
rpc-client
rpc-client-api Apply clippy fixes for future rust upgrade (#30363) 2023-02-16 16:12:51 +00:00
rpc-client-nonce-utils
rpc-test Bump futures-util from 0.3.25 to 0.3.26 (#30240) 2023-02-10 13:46:16 -07:00
runtime move AccountInfo bits from size to offset (#30408) 2023-02-21 10:08:37 -08:00
scripts
sdk Bump sbf-tools version (#30397) 2023-02-21 15:23:48 +01:00
send-transaction-service removes dynamic cast and dynamic dispatch from connection-cache (#30128) 2023-02-09 00:50:44 +00:00
stake-accounts
storage-bigtable chore: remove storage-bigtable/build-proto/Cargo.lock (#30273) 2023-02-14 01:36:39 +08:00
storage-proto
streamer Bump futures-util from 0.3.25 to 0.3.26 (#30240) 2023-02-10 13:46:16 -07:00
sys-tuner
system-test
test-validator TestValidator nits (#30410) 2023-02-20 16:24:29 -07:00
thin-client Cleanup tempoary pub modules (#30268) 2023-02-10 20:35:09 -08:00
tokens
tpu-client Cleanup tempoary pub modules (#30268) 2023-02-10 20:35:09 -08:00
transaction-dos embeds the new gossip ContactInfo in ClusterInfo (#30022) 2023-02-10 20:07:45 +00:00
transaction-status chore: bump borsh to 0.9.3 (#29606) 2023-02-11 22:15:46 +08:00
udp-client removes dynamic cast and dynamic dispatch from connection-cache (#30128) 2023-02-09 00:50:44 +00:00
upload-perf
validator Revert "change test validator from non upgradable bpf loader to upgra… (#30409) 2023-02-20 16:23:20 -07:00
version
watchtower
zk-token-sdk
.clippy.toml
.gitignore
.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
Cargo.lock move AccountInfo bits from size to offset (#30408) 2023-02-21 10:08:37 -08:00
Cargo.toml
LICENSE
README.md
RELEASE.md
SECURITY.md chore: remove Explorer build scripts from the Monorepo (#30262) 2023-02-10 17:25:32 -06:00
cargo
cargo-build-bpf
cargo-build-sbf
cargo-test-bpf
cargo-test-sbf
fetch-perf-libs.sh
fetch-spl.sh
run.sh
rust-toolchain.toml Upgrades Rust to 1.67.1 (#29947) 2023-02-17 14:08:27 -05: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.