solana-labs/solana
Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
Healthy across all four use cases
weakest axisPermissive license, no critical CVEs, actively maintained — safe to depend on.
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
No critical CVEs, sane security posture — runnable as-is.
- ✓36+ active contributors
- ✓Distributed ownership (top contributor 8% of recent commits)
- ✓Apache-2.0 licensed
Show all 6 evidence items →Show less
- ✓CI configured
- ✓Tests present
- ⚠Stale — last commit 1y ago
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Healthy" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/solana-labs/solana)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/solana-labs/solana on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: solana-labs/solana
Generated by RepoPilot · 2026-05-09 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/solana-labs/solana shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
GO — Healthy across all four use cases
- 36+ active contributors
- Distributed ownership (top contributor 8% of recent commits)
- Apache-2.0 licensed
- CI configured
- Tests present
- ⚠ Stale — last commit 1y ago
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live solana-labs/solana
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/solana-labs/solana.
What it runs against: a local clone of solana-labs/solana — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in solana-labs/solana | Confirms the artifact applies here, not a fork |
| 2 | License is still Apache-2.0 | Catches relicense before you depend on it |
| 3 | Default branch master exists | Catches branch renames |
| 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 5 | Last commit ≤ 500 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of solana-labs/solana. If you don't
# have one yet, run these first:
#
# git clone https://github.com/solana-labs/solana.git
# cd solana
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of solana-labs/solana and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "solana-labs/solana(\\.git)?\\b" \\
&& ok "origin remote is solana-labs/solana" \\
|| miss "origin remote is not solana-labs/solana (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(Apache-2\\.0)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"Apache-2\\.0\"" package.json 2>/dev/null) \\
&& ok "license is Apache-2.0" \\
|| miss "license drift — was Apache-2.0 at generation time"
# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
&& ok "default branch master exists" \\
|| miss "default branch master no longer exists"
# 4. Critical files exist
test -f "Cargo.toml" \\
&& ok "Cargo.toml" \\
|| miss "missing critical file: Cargo.toml"
test -f "accounts-db/src/accounts_db.rs" \\
&& ok "accounts-db/src/accounts_db.rs" \\
|| miss "missing critical file: accounts-db/src/accounts_db.rs"
test -f "core/src/lib.rs" \\
&& ok "core/src/lib.rs" \\
|| miss "missing critical file: core/src/lib.rs"
test -f "banking-stage/src/lib.rs" \\
&& ok "banking-stage/src/lib.rs" \\
|| miss "missing critical file: banking-stage/src/lib.rs"
test -f "accounts-db/src/accounts_index.rs" \\
&& ok "accounts-db/src/accounts_index.rs" \\
|| miss "missing critical file: accounts-db/src/accounts_index.rs"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 500 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~470d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/solana-labs/solana"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
Solana is a web-scale blockchain implementation optimized for high-throughput, low-latency transaction processing through Proof-of-History (PoH) consensus. This archived repository contains the validator implementation that powered Solana's mainnet, supporting ~65k TPS with sub-second finality for decentralized applications. It is now superseded by Agave (anza-xyz/agave), the community-maintained validator fork. Monorepo with 44+ Rust workspace members under root (no subdirectory nesting). Core components: core/ (validator engine), runtime/ (transaction executor), ledger/ (state storage via accounts-db), program-runtime/ (on-chain VM), gossip/ (P2P layer), programs/ (built-in programs: stake, vote, system, config, bpf_loader). CI via Buildkite (.buildkite/scripts/) with build artifacts and coverage, plus GitHub Actions workflows (.github/workflows/) for testing and release automation.
👥Who it's for
Solana validator operators, core blockchain developers, and SPL (Solana Program Library) developers who need to understand or modify the validator consensus layer, transaction processing pipeline, and on-chain program execution. Anyone forking this archive to run a custom Solana instance or contribute to blockchain infrastructure.
🌱Maturity & risk
This repository is archived and no longer the canonical Solana validator implementation (moved to Agave in 2024). However, it was production-grade for years: 20M+ lines of Rust, extensive CI via Buildkite with coverage tracking, comprehensive test suites (./cargo test), and well-documented release processes. The verdict: production-ready code in archived state—suitable for reference, forks, or historical study, but not for new validator deployments.
High maintenance burden due to 44 workspace crates with deep interdependencies (accounts-db, runtime, ledger, gossip, program-runtime). No longer receiving security patches or breaking-change management from Labs. Rust version constraints in ci/rust-version.sh are fixed per branch; upgrading is non-trivial. Massive C/C++ FFI surface (BPF VM, cryptography, syscalls) increases compilation friction. Single-repository-itis: changes in core/ affect 20+ downstream crates.
Active areas of work
This repository is in archive state as of the README update stating 'Agave, the Solana validator implementation from Anza: https://github.com/anza-xyz/agave' is the active fork. No new commits expected. Historical Buildkite and GitHub Actions pipelines (cargo.yml, downstream-project-anchor.yml) show prior activity testing against SPL and Anchor ecosystems.
🚀Get running
git clone https://github.com/solana-labs/solana.git
cd solana
rustup update # Ensure latest stable Rust
# On Ubuntu: sudo apt-get install libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang cmake protobuf-compiler
./cargo build
./cargo test
Daily commands:
Dev build: ./cargo build. Run validator locally: see inline docs at docs.solanalabs.com (linked in README). Run tests: ./cargo test. Run benchmarks: rustup install nightly && cargo +nightly bench. Local testnet: instructions embedded in docs (not shell scripts in repo root).
🗺️Map of the codebase
Cargo.toml— Root workspace configuration defining all 60+ member crates; essential for understanding the entire Solana validator architecture and build system.accounts-db/src/accounts_db.rs— Core accounts database implementation managing on-chain account state storage and retrieval; fundamental to transaction processing.core/src/lib.rs— Entry point for the Solana validator implementation; orchestrates consensus, transaction processing, and network integration.banking-stage/src/lib.rs— Transaction processing pipeline that queues, executes, and commits transactions to accounts; critical for throughput.accounts-db/src/accounts_index.rs— In-memory account lookup index providing O(1) address-to-slot mapping; essential for validator performance.gossip/src/lib.rs— Peer-to-peer gossip protocol for cluster communication and validator discovery; foundation of distributed consensus.entry/src/lib.rs— Entry/ledger data structure representing verified transactions; the immutable append log of the blockchain.
🧩Components & responsibilities
- Gossip (Rust, UDP multicast, CRDT) — Peer discovery, transaction/block propagation, cluster topology maintenance
- Failure mode: Network partition → validators diverge on leader schedule; dishonest peers propagate invalid transactions
- Consensus (PoH + BFT voting) (Proof of History, Delegated Proof of Stake, VDF hashing) — Leader selection via stake weight, block production rate limiting via PoH, validator confirmation via vote transactions
- Failure mode: 51% stake colluding → can revert finalized
🛠️How to make changes
Add a new RPC endpoint
- Define the RPC method interface in banks-interface/src/lib.rs with input/output types (
banks-interface/src/lib.rs) - Implement the method in banks-server/src/main.rs handling the request (
banks-server/src/main.rs) - Add corresponding client method in client/src/rpc_client.rs for easy access (
client/src/rpc_client.rs) - Write integration tests in client/tests/ exercising the new endpoint (
client/tests/integration_tests.rs)
Add account state parser for new token program
- Create new file account-decoder/src/parse_<program>.rs with AccountState and Parser structs (
account-decoder/src/parse_token.rs) - Register parser in account-decoder/src/parse_account_data.rs dispatch logic (
account-decoder/src/parse_account_data.rs) - Add tests to the parser module for various state layouts (
account-decoder/src/parse_<program>.rs)
Add new cluster-level benchmark
- Create benchmark binary in accounts-cluster-bench/src/main.rs or new bench-* crate (
accounts-cluster-bench/src/main.rs) - Register in Cargo.toml workspace members if new crate (
Cargo.toml) - Add Buildkite script in .buildkite/scripts/build-bench.sh for CI execution (
.buildkite/scripts/build-bench.sh)
Optimize accounts storage performance
- Add benchmark in accounts-db/benches/ measuring accounts_db operations (
accounts-db/benches/accounts.rs) - Modify hot path in accounts-db/src/accounts_db.rs with optimization (
accounts-db/src/accounts_db.rs) - Run accounts-db/benches/accounts.rs before/after to validate improvement (
accounts-db/benches/accounts.rs)
🔧Why these technologies
- Rust — Memory safety without GC, high performance for consensus-critical path, zero-cost abstractions
- Proof of History (PoH) — Cryptographic timestamping reduces consensus complexity vs traditional Byzantine Fault Tolerance; enables naive parallelism
- Append-only ledger (entry log) — Immutable blockchain history enables efficient pruning via snapshots while maintaining auditability
- In-memory accounts index — Avoids disk I/O on hot path for account lookups during transaction execution
- Gossip protocol — Peer-to-peer push-based propagation scales horizontally without central coordinator
⚖️Trade-offs already made
-
Accounts stored in append vecs (immutable per file) rather than k-v database
- Why: Sequential I/O patterns for better throughput; snapshots enable aggressive pruning
- Consequence: Requires careful index management and versioning; harder to update single accounts
-
Single-threaded transaction execution per bank
- Why: Avoids serialization overhead and complexity of concurrent state access
- Consequence: Transaction throughput capped by single core; requires pipelining across slots
-
PoH as global clock vs BFT rounds
- Why: Simpler consensus protocol with lower latency
- Consequence: Requires synchronized hardware clocks; vulnerability to 51% stake time-warp attacks
-
Archived state (non-goal to retain full history)
- Why: Snapshot-based pruning reduces validator storage requirements
- Consequence: Historical chain state not queryable; requires external indexers for full history
🚫Non-goals (don't propose these)
- Full historical account state queryability (only recent/snapshot state retained on validators)
- Instant finality (eventual consistency with probabilistic finality as validators commit)
- Cross-shard communication (no built-in horizontal sharding; state partitioning via address spaces)
- Smart contract hot-reload (programs immutable once deployed; must redeploy for changes)
🪤Traps & gotchas
- Rust version pinning:
ci/rust-version.shspecifies exact versions per branch; mismatching causes build failures. 2. Protobuf compilation: requiresprotocin PATH; missing causes cryptic link errors. 3. C/C++ system dependencies (libssl-dev, llvm, clang): partial install breaks incremental rebuilds. 4. BPF program toolchain:programs/bpf_loader/requires Solana's custom LLVM; standard LLVM incompatible. 5. Accounts-db has mutable global state; some tests require single-threaded execution or serial ordering.
🏗️Architecture
💡Concepts to learn
- Proof-of-History (PoH) — Core Solana consensus mechanism: leader produces chain of hashes proving events happened in order; eliminates need for voting rounds and enables high throughput. Implemented in poh/ crate.
- RBPF (Rust eBPF Virtual Machine) — Executes on-chain programs (BPF bytecode) with bounds checking and metering; fundamental to Solana's composable program model. Implemented in program-runtime/src/.
- Accounts Model (vs. UTXO) — Solana uses account state (like Ethereum) not UTXO; each account stores lamports (native tokens) + program state. Parallel execution depends on account-level read/write conflict detection.
- CRDS (Conflict-free Replicated Data Structure) — Gossip subsystem uses CRDS to merge validator metadata without coordination; eventual consistency for cluster topology. Implemented in gossip/src/crds.rs.
- Tower Consensus (Longest Finalized Chain) — Solana validators finalize slots based on supermajority vote; tower stores vote history to prevent equivocation. Implemented in core/src/tower.rs.
- Accounts-DB (RocksDB + Merkle) — Persistent account storage with fast lookups and incremental snapshots; Merkle tree roots for state verification across validators. Bottleneck for throughput; see accounts-db/ for optimization.
- Transaction Signature Verification (Ed25519) — Every transaction must be signed and verified before execution; Solana batches signature verification for performance. Syscalls in program-runtime use hardware acceleration where available.
🔗Related repos
anza-xyz/agave— Active fork and successor to solana-labs/solana; where all new validator development occurs post-2024. Start here if deploying a new validator.solana-labs/spl— Solana Program Library: on-chain programs for tokens (SPL Token), stake pools, governance, etc. Companion ecosystem to the validator.coral-xyz/anchor— Framework for writing Solana programs (replaces raw BPF syscall usage); extensively tested against this validator via downstream-project-anchor.yml CI.metaplex-foundation/metaplex— Production dApp ecosystem (NFTs, DeFi) running on Solana; reference for how programs interact with validator's RPC and transaction processing.solana-labs/web3.js— JavaScript RPC client library; pairs with validator's rpc-client-api for application interaction and cluster queries.
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add comprehensive integration tests for account-decoder parse functions
The account-decoder crate has multiple parse_*.rs modules (parse_token.rs, parse_stake.rs, parse_vote.rs, parse_sysvar.rs, etc.) but lacks corresponding integration tests. Given this is a critical component for RPC nodes decoding account data, comprehensive tests would catch regressions early and document expected behavior for downstream consumers.
- [ ] Create account-decoder/tests/ directory with integration test file
- [ ] Add test fixtures for each parser module (token, stake, vote, sysvar, nonce, config)
- [ ] Write tests covering both valid and invalid account data for each parser
- [ ] Verify tests run in CI by adding to .github/workflows/cargo.yml if needed
Add Buildkite test coverage reporting for downstream projects (Anchor, SPL)
The repo has .buildkite/coverage-in-disk.sh and .buildkite/scripts/ for coverage, but downstream project workflows (.github/workflows/downstream-project-*.yml) don't report coverage metrics to Codecov. This prevents tracking if Solana changes break downstream test coverage and makes it harder to catch regressions that only appear in consuming projects.
- [ ] Examine .buildkite/coverage-in-disk.sh and .codecov.yml configuration
- [ ] Update .github/workflows/downstream-project-spl.yml to capture and upload coverage for SPL crates
- [ ] Update .github/workflows/downstream-project-anchor.yml to capture and upload coverage for Anchor
- [ ] Add codecov badge or summary step showing downstream project coverage in workflow summaries
Create missing unit tests for geyser-plugin-manager and geyser-plugin-interface
The geyser plugin system is critical infrastructure for validators and ecosystem tools (indexers, RPC providers), but there's no visible test coverage in the file structure for geyser-plugin-manager. Given the architectural importance and complexity of plugin loading/lifecycle, unit tests would improve reliability and serve as documentation for plugin developers.
- [ ] Review geyser-plugin-manager/src/ to identify core functions without tests
- [ ] Create geyser-plugin-manager/tests/ with integration tests for plugin loading, initialization, and error handling
- [ ] Add unit tests in geyser-plugin-manager/src/lib.rs for critical path logic (plugin discovery, validation)
- [ ] Document test coverage in geyser-plugin-manager/README.md if it exists
🌿Good first issues
- Add integration tests for BPF program syscall sandboxing in program-runtime: program-runtime/src/ lacks dedicated syscall boundary tests; edge cases in memory isolation untested. Write tests validating that programs cannot read/write outside their heap.
- Document cluster state machine transitions in core/src/consensus.rs: Tower consensus and slot finalization logic is dense; no flowchart or doc comments mapping states → transitions. Add rustdoc with examples and state diagram.
- Add missing test coverage for gossip topology updates in gossip/src/crds.rs: CRDS (Conflict-free Replicated Data Structure) handle adds/removals but test_crds.rs lacks full coverage of edge cases (duplicate inserts, version conflicts, TTL expiry).
⭐Top contributors
Click to expand
Top contributors
- @steviez — 8 commits
- @yhchiang-sol — 7 commits
- @gregcusack — 7 commits
- @brooksprumo — 7 commits
- @dmakarov — 5 commits
📝Recent commits
Click to expand
Recent commits
7700cb3— chore: readme (nickfrosty)de3c798— chore: readme (nickfrosty)27eff84— Revert "Allow configuration of replay thread pools from CLI (#236)" (willhickey)973d05c— Allow configuration of replay thread pools from CLI (#236) (steviez)1d89ea0— Rename LoadedPrograms to ProgramCache for readability (#339) (dmakarov)2273098— [TieredStorage] Store account address range (#172) (yhchiang-sol)e97d359— [TieredStorage] Refactor TieredStorage::new_readonly() code path (#195) (yhchiang-sol)81c8ed7— rpc-sts: add config options for stake-weighted qos (#197) (t-nelson)3043334— Revert deprecate executable feature (#309) (HaoranYi)78f033d— Move code to check_program_modification_slot out of SVM (#329) (pgarg66)
🔒Security observations
The solana-labs/solana repository is now archived with no active maintenance as of March 2024. This is a CRITICAL finding as it means no security patches will be applied. The codebase shows evidence of complex build infrastructure and cryptographic operations that require ongoing security scrutiny. Users should immediately migrate to the maintained Anza agave fork. Existing concerns include potential credential exposure in build scripts (solana-private.sh), large dependency surface area (80+ crates), and the need for robust secret management in CI
- Critical · Repository Archived - No Active Security Maintenance —
SECURITY.md, README.md. The solana-labs/solana repository is archived as of 2024-03-02. Active development has moved to the Anza fork (agave). This means no security patches or updates will be provided for vulnerabilities discovered in this codebase. The security policy now redirects to the agave repository. Fix: Migrate to the maintained Anza agave fork (https://github.com/anza-xyz/agave) for continued security support and updates. Do not use this archived repository for production systems. - High · Build Infrastructure Security Concerns —
.buildkite/scripts/, .buildkite/solana-private.sh. Multiple build scripts (.buildkite/scripts/) execute shell commands with elevated privileges. The solana-private.sh file suggests private keys or secrets may be embedded in build processes. No visibility into script contents, but build infrastructure of this scale typically requires careful credential management. Fix: Audit all build scripts for hardcoded credentials, use secure credential injection (e.g., environment variables, secret management systems), rotate any exposed credentials, and implement principle of least privilege in CI/CD. - High · Potential Credential Exposure in Configuration —
.buildkite/solana-private.sh. File named 'solana-private.sh' in build pipeline suggests private keys or sensitive configuration may be committed to version control or exposed in build logs. Fix: Remove this file from version control immediately if it contains credentials. Use .gitignore to prevent future commits. Rotate any exposed credentials. Implement secret scanning in CI/CD pipelines to detect and prevent credential leaks. - Medium · Large Monorepo Dependency Management Risk —
Cargo.toml, Cargo.lock, workspace configuration. This is a large workspace with 80+ member crates. The Cargo.lock file indicates locked dependencies, but the sheer scale increases the attack surface. No vulnerability scanning configuration visible (e.g., cargo-audit, dependabot integration exists but configuration not shown). Fix: Implement automated dependency scanning (cargo-audit in CI/CD), regularly update dependencies, maintain an SBOM, and conduct periodic security audits of high-risk dependencies. Consider using tools like cargo-deny for policy enforcement. - Medium · GitHub Actions Workflow Security —
.github/workflows/. Multiple GitHub Actions workflows present (.github/workflows/). Without visibility into their contents, common risks include: insecure use of secrets, third-party action vulnerabilities, privilege escalation in CI/CD, and insufficient validation of external triggers. Fix: Audit all workflows for: using official actions with pinned versions, proper secret handling, minimal permissions principle, validation of external inputs, and regular security updates of workflow dependencies. - Medium · Cryptographic Code in Blockchain Context —
programs/zk-token-proof, programs/ed25519-tests, various crypto operations. Solana is a blockchain platform handling cryptographic operations. Multiple cryptography-related modules exist (zk-token-proof, ed25519-tests, etc.). Without code review, potential issues could include improper random number generation, timing attacks, or cryptographic implementation flaws. Fix: Conduct formal security audits of all cryptographic code by external experts, use well-established cryptographic libraries, implement constant-time operations where needed, and subject to regular third-party audits. - Low · Documentation Security Policy Redirect —
SECURITY.md. SECURITY.md redirects to external repository (agave). While necessary due to archival, this could be confusing for security researchers or users finding vulnerabilities in the archived repo. Fix: Keep clear documentation about the archival status. Ensure the SECURITY.md prominently displays the archival date and migration path. Consider setting up automated redirects or deprecation notices across platforms.
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.