Go to file
Yueh-Hsuan Chiang 5334efd63c
Byte-blocks utils for TieredStorage (1/N) (#31815)
#### Summary of Changes
This PR includes the util structs for writing byte blocks, which will be used
by the TieredStorage writer (currently used in the prototype #30626).

The PR only includes the Raw encoding format.  Will add more in subsequent PRs.

#### Test Plan
Tested in mnb with the prototype implementation of the tiered-storage (#30626)
Unit tests are also included in this PR.
2023-05-30 14:14:29 -07:00
.buildkite ci: separate bench tests (#31763) 2023-05-25 21:39:17 +08:00
.github
account-decoder Clean up Spl type conversions (#31845) 2023-05-30 14:34:38 -06: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 Clean up Spl type conversions (#31845) 2023-05-30 14:34:38 -06:00
banking-bench separates out connection-cache metrics for different protocols (#31803) 2023-05-25 14:48:22 +00:00
banks-client banks-client: Add `get_fee_for_message` (#31703) 2023-05-18 23:31:02 +02:00
banks-interface banks-client: Add `get_fee_for_message` (#31703) 2023-05-18 23:31:02 +02:00
banks-server banks-client: Add `get_fee_for_message` (#31703) 2023-05-18 23:31:02 +02:00
bench-streamer
bench-tps separates out connection-cache metrics for different protocols (#31803) 2023-05-25 14:48:22 +00:00
bloom
bucket_map avoid unnecessary disk bucket data file allocation (#31659) 2023-05-16 07:10:46 -07:00
cd
ci Explain use of nightly clippy over whole monorepo (#31833) 2023-05-26 16:43:14 +09:00
clap-utils
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 allow stake tests to wait for rewards payout (#31821) 2023-05-30 08:56:02 -05:00
cli-config
cli-output Bumps base64 from 0.13.1 to 0.21.0. (#31522) 2023-05-11 11:34:58 -07: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 separates out connection-cache metrics for different protocols (#31803) 2023-05-25 14:48:22 +00:00
core Handle errors when sending a snapshot package during shutdown (#31873) 2023-05-30 16:06:10 -04:00
docs Add snapshots arguments to the ledger tool command because numerous o… (#31847) 2023-05-27 15:03:59 +00:00
dos separates out connection-cache metrics for different protocols (#31803) 2023-05-25 14:48:22 +00:00
download-utils
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
geyser-plugin-interface
geyser-plugin-manager Add entry notification service for geyser (#31290) 2023-05-10 17:20:51 -06:00
gossip adds quic tvu port to contact-info (#31614) 2023-05-15 15:13:21 +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 Clean up Spl type conversions (#31845) 2023-05-30 14:34:38 -06:00
ledger-tool fix cli args (#31804) 2023-05-25 07:47:00 -07:00
local-cluster separates out connection-cache metrics for different protocols (#31803) 2023-05-25 14:48:22 +00:00
log-analyzer
logger
measure ci: deflake `Measurement` tests (#31812) 2023-05-25 12:46:46 -06:00
memory-management
merkle-root-bench
merkle-tree
metrics remove lock from metrics agent singleton (#31785) 2023-05-24 12:31:08 -07:00
multinode-demo
net Adjust mmap and FD count for net scripts (#31728) 2023-05-19 18:13:11 +00:00
net-shaper
net-utils
notifier
perf check simple vote could have 1 or 2 signatures when creating sanitized transaction (#31807) 2023-05-25 15:45:15 -05:00
poh Don't needlessly expose Slot from solana-poh (#31832) 2023-05-26 16:08:24 +09:00
poh-bench
program-runtime More metrics for LoadedPrograms cache (#31735) 2023-05-22 07:53:54 -07:00
program-test Refactor - Merges `BuiltinPrograms` into `LoadedPrograms` (#31654) 2023-05-18 22:18:28 +02:00
programs Bump version to 1.17 (#31806) 2023-05-30 15:04:47 -05:00
pubsub-client improve pubsub error handling (#31669) 2023-05-19 16:46:09 +00:00
quic-client separates out quic streamer connection stats from different servers (#31797) 2023-05-25 16:54:24 +00:00
rayon-threadlimit
rbpf-cli rbpf-cli: fix deprecation notice (#31743) 2023-05-22 04:47:05 -05:00
remote-wallet
rpc Clean up Spl type conversions (#31845) 2023-05-30 14:34:38 -06: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 separates out connection-cache metrics for different protocols (#31803) 2023-05-25 14:48:22 +00:00
runtime Byte-blocks utils for TieredStorage (1/N) (#31815) 2023-05-30 14:14:29 -07:00
scripts Update Solang Solidity compiler to v0.3.0 (#31756) 2023-05-23 12:58:02 +01:00
sdk Bump version to 1.17 (#31806) 2023-05-30 15:04:47 -05:00
send-transaction-service separates out connection-cache metrics for different protocols (#31803) 2023-05-25 14:48:22 +00:00
stake-accounts
storage-bigtable bigtable: Adjust logging and condense counters (#31661) 2023-05-15 21:48:00 -05:00
storage-proto Banking worker (#30970) 2023-05-25 10:16:04 -07:00
streamer Flkay quic test in check_block_multiple_connections (#31871) 2023-05-30 12:43:07 -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
tokens Clean up Spl type conversions (#31845) 2023-05-30 14:34:38 -06:00
tpu-client separates out connection-cache metrics for different protocols (#31803) 2023-05-25 14:48:22 +00:00
transaction-dos
transaction-status Clean up Spl type conversions (#31845) 2023-05-30 14:34:38 -06:00
udp-client removes hard-coded QUIC_PORT_OFFSET from connection-cache (#31541) 2023-05-09 13:46:17 +00:00
upload-perf
validator Clean up Spl type conversions (#31845) 2023-05-30 14:34:38 -06:00
version
watchtower Add --active-stake-alert-threshold to watchtower (#31858) 2023-05-29 23:33:11 +00:00
web3.js
zk-keygen Fixed typo: worskapce ==> workspace (#31790) 2023-05-24 05:27:46 +00:00
zk-token-sdk [zk-token-sdk] Refactor `zk-token-elgamal` conversion code for `elgamal` and `pedersen` pod types (#31846) 2023-05-29 12:32:53 +09:00
.clippy.toml
.codecov.yml
.gitignore
.mergify.yml Add Mergify rules for v1.16 backport (#31875) 2023-05-30 15:07:05 -05:00
.travis.yml
CONTRIBUTING.md
Cargo.lock Bump version to 1.17 (#31806) 2023-05-30 15:04:47 -05:00
Cargo.toml Bump version to 1.17 (#31806) 2023-05-30 15:04:47 -05: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.