Skip to content
/ solana Public
forked from anza-xyz/agave

Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.

License

Notifications You must be signed in to change notification settings

txtx/solana

This branch is 132 commits behind anza-xyz/agave:master.

Folders and files

NameName
Last commit message
Last commit date
Feb 24, 2025
Mar 7, 2025
Jan 27, 2025
Mar 6, 2025
Feb 17, 2025
Mar 2, 2025
Mar 10, 2025
Feb 18, 2025
Jan 9, 2025
Feb 26, 2025
Jul 2, 2024
Mar 5, 2025
Jan 6, 2025
Jan 15, 2025
Jan 8, 2025
Feb 14, 2025
Nov 25, 2024
Jan 16, 2025
Jan 23, 2025
Feb 28, 2025
Sep 13, 2022
Mar 10, 2025
Feb 17, 2025
Jan 10, 2025
Jan 10, 2025
Feb 25, 2025
Feb 28, 2025
Jan 29, 2025
Dec 9, 2024
Feb 4, 2025
Jan 10, 2025
Jan 6, 2025
Mar 10, 2025
Mar 7, 2025
Feb 3, 2025
Jan 27, 2025
Mar 10, 2025
Jan 13, 2025
Feb 3, 2025
Feb 4, 2025
Jan 21, 2025
Jan 30, 2025
Aug 9, 2023
Feb 19, 2025
Jan 3, 2025
Feb 25, 2025
Mar 10, 2025
Mar 6, 2025
Feb 25, 2025
Jan 20, 2025
Oct 29, 2024
Feb 28, 2025
Mar 10, 2025
Mar 6, 2025
Oct 15, 2024
Jul 9, 2024
Nov 7, 2024
Mar 12, 2024
Aug 9, 2023
Nov 14, 2024
Jan 13, 2025
Jan 14, 2025
May 14, 2024
Feb 17, 2025
Dec 16, 2024
Nov 25, 2024
Mar 6, 2025
Mar 3, 2025
Mar 27, 2024
Mar 4, 2025
Nov 13, 2024
Mar 10, 2025
Feb 27, 2025
Mar 10, 2025
Mar 7, 2025
Mar 6, 2025
Feb 23, 2023
Mar 3, 2024
Feb 26, 2025
Jan 10, 2025
Dec 6, 2024
Mar 6, 2025
Jan 10, 2025
Mar 5, 2025
Feb 10, 2025
Mar 10, 2025
Feb 21, 2025
Feb 8, 2025
Mar 10, 2025
Jul 9, 2024
Feb 3, 2025
Feb 3, 2025
Mar 3, 2025
Dec 4, 2024
Aug 23, 2024
Jan 16, 2025
Mar 10, 2025
Mar 3, 2024
Feb 6, 2025
Dec 5, 2024
Mar 5, 2025
Dec 6, 2024
Jan 17, 2025
Oct 29, 2024
Feb 14, 2025
Mar 4, 2025
Dec 6, 2024
Jan 13, 2025
Dec 9, 2024
Mar 6, 2025
Feb 14, 2025
Jan 16, 2025
Mar 4, 2025
Jun 20, 2024
Feb 10, 2025
Feb 28, 2025
Mar 6, 2025
Feb 23, 2023
Mar 10, 2025
Nov 11, 2024
Mar 6, 2025
Feb 12, 2025
Dec 9, 2024
Feb 27, 2023
Feb 12, 2025
Dec 9, 2024
Feb 7, 2025
Feb 6, 2025
Nov 27, 2024
Mar 10, 2023
Mar 6, 2025
Feb 11, 2025
Mar 4, 2025
Feb 6, 2025
Mar 10, 2025
Mar 10, 2025
May 31, 2023
Feb 18, 2025
Jul 17, 2024
Aug 16, 2024
Apr 7, 2021
Jan 27, 2025
Jan 27, 2025
Aug 28, 2020
Oct 15, 2024
Sep 15, 2023
Jan 3, 2024
Feb 4, 2025
Feb 19, 2022
May 17, 2024
Oct 7, 2021

Repository files navigation

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 libclang-dev

On Fedora:

$ sudo dnf install openssl-devel systemd-devel pkg-config zlib-devel llvm clang cmake make protobuf-devel protobuf-compiler perl-core libclang-dev

2. Download the source code.

$ git clone https://github.com/anza-xyz/agave.git
$ cd agave

3. Build.

$ ./cargo build

Note

Note that this builds a debug version that is not suitable for running a testnet or mainnet validator. Please read docs/src/cli/install.md for instructions to build a release version for test and production uses.

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!

About

Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 97.2%
  • Shell 2.0%
  • C 0.6%
  • Python 0.1%
  • C++ 0.1%
  • Makefile 0.0%