Go to file
bji 940bd30ac9
Update maximum credits awarded per vote from 8 to 16 (#127)
This reduces the maximum penalty for voting after the grace period by
roughly 50%.  This new value was derived from looking at the effects
that TVC at max credits 8 would have for recent epochs (500+) and
noting that the effect was a bit extreme, up to and exceeding 10%
"bonus" for faster voters.  This change reduces that maximum bonus by
roughly half.

In addition, the TVC feature key has been changed.
2024-03-07 19:52:22 +00:00
.buildkite
.github windows: Use vcpkg for openssl dep (#73) 2024-03-05 12:28:12 +01:00
account-decoder
accounts-bench
accounts-cluster-bench
accounts-db [TieredStorage] Deprecate the use of account-hash in HotStorage (#93) 2024-03-06 18:51:50 -08:00
banking-bench
banks-client
banks-interface
banks-server
bench-streamer
bench-tps
bloom
bucket_map
cargo-registry
cd
ci
clap-utils
clap-v3-utils
cli
cli-config
cli-output Cli: improve vote-account vote-authority display (#95) 2024-03-06 07:23:32 +00:00
client Rename and uniquify QUIC thread names (#28) 2024-03-05 12:09:17 -06:00
client-test
connection-cache
core [SVM] Move RuntimeConfig to program-runtime (#96) 2024-03-07 10:16:16 -08:00
cost-model Combine builtin and BPF compute cost in cost model (#29) 2024-03-07 09:23:49 -06:00
docs
dos
download-utils
entry
faucet
frozen-abi frozen-abi: Remove proc_macro_hygiene featurization (#109) 2024-03-06 15:32:05 +01:00
genesis
genesis-utils
geyser-plugin-interface
geyser-plugin-manager Use tokio directly instead of jsonrpc_server_utils's re-export (#116) 2024-03-06 14:49:32 -06:00
gossip
install
keygen
ledger [SVM] Move RuntimeConfig to program-runtime (#96) 2024-03-07 10:16:16 -08:00
ledger-tool [SVM] Move RuntimeConfig to program-runtime (#96) 2024-03-07 10:16:16 -08:00
local-cluster
log-analyzer
logger
measure
memory-management
merkle-root-bench
merkle-tree
metrics
multinode-demo
net
net-shaper
net-utils Name previously unnamed thread pool threads (#104) 2024-03-06 17:03:02 -06:00
notifier
perf frozen-abi: Remove proc_macro_hygiene featurization (#109) 2024-03-06 15:32:05 +01:00
poh
poh-bench
program-runtime [SVM] Move RuntimeConfig to program-runtime (#96) 2024-03-07 10:16:16 -08:00
program-test [SVM] Move RuntimeConfig to program-runtime (#96) 2024-03-07 10:16:16 -08:00
programs Update maximum credits awarded per vote from 8 to 16 (#127) 2024-03-07 19:52:22 +00:00
pubsub-client
quic-client Rename and uniquify QUIC thread names (#28) 2024-03-05 12:09:17 -06:00
rayon-threadlimit
rbpf-cli
remote-wallet
rpc Rpc: deprecate `getStakeActivation` and make inactive_stake consistent (#69) 2024-03-04 19:21:30 -07:00
rpc-client
rpc-client-api
rpc-client-nonce-utils
rpc-test
runtime [SVM] Move RuntimeConfig to program-runtime (#96) 2024-03-07 10:16:16 -08:00
runtime-transaction
scripts Prep Anchor downstream CI job for v2 bump (#123) 2024-03-06 19:31:07 -07:00
sdk Update maximum credits awarded per vote from 8 to 16 (#127) 2024-03-07 19:52:22 +00:00
send-transaction-service
stake-accounts
storage-bigtable
storage-proto
streamer Rename and uniquify QUIC thread names (#28) 2024-03-05 12:09:17 -06:00
svm [SVM] Move RuntimeConfig to program-runtime (#96) 2024-03-07 10:16:16 -08:00
system-test
test-validator [SVM] Move RuntimeConfig to program-runtime (#96) 2024-03-07 10:16:16 -08:00
thin-client
tokens
tpu-client
transaction-dos
transaction-status
turbine adds api to obtain the parent node in the turbine retransmit tree (#115) 2024-03-07 17:56:40 +00:00
udp-client
unified-scheduler-logic
unified-scheduler-pool
upload-perf
validator [SVM] Move RuntimeConfig to program-runtime (#96) 2024-03-07 10:16:16 -08:00
version
vote
watchtower
web3.js
wen-restart
zk-keygen
zk-token-sdk
.clippy.toml
.codecov.yml
.gitignore
.mergify.yml
CHANGELOG.md
CONTRIBUTING.md
Cargo.lock [SVM] Move RuntimeConfig to program-runtime (#96) 2024-03-07 10:16:16 -08:00
Cargo.toml Use tokio directly instead of jsonrpc_server_utils's re-export (#116) 2024-03-06 14:49:32 -06: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!