├── net ├── azure.sh ├── colo.sh ├── ec2.sh ├── .gitignore ├── README.md ├── remote │ └── README.md └── scripts │ ├── colo_nodes │ ├── enable-nvidia-persistence-mode.sh │ ├── install-at.sh │ ├── install-jq.sh │ ├── install-ag.sh │ ├── install-iftop.sh │ ├── install-rsync.sh │ ├── localtime.sh │ ├── rsync-retry.sh │ ├── install-libssl.sh │ ├── remove-docker-interface.sh │ ├── network-config.sh │ ├── install-perf.sh │ ├── disable-background-upgrades.sh │ └── mount-additional-disk.sh ├── docs ├── static │ ├── .nojekyll │ ├── img │ │ ├── favicon.ico │ │ ├── p_ex_supply.png │ │ ├── porep_reward.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── p_ex_interest.png │ │ ├── p_ex_schedule.png │ │ ├── p_total_supply.png │ │ ├── rt-tx-journey.png │ │ ├── apple-touch-icon.png │ │ ├── ramp-tps-rounds.png │ │ ├── rt-tpu-jito-labs.png │ │ ├── p_ex_staked_yields.png │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ ├── data-plane-propagation.png │ │ ├── p_ex_relative_dilution.png │ │ ├── p_ex_staked_dilution.png │ │ ├── p_ex_unstaked_dilution.png │ │ ├── p_inflation_schedule.png │ │ ├── p_total_supply_ranges.png │ │ ├── rt-dropped-via-rpc-pool.png │ │ ├── economic_design_infl_230719.png │ │ ├── p_ex_adjusted_staked_yields.png │ │ ├── ledger-live-install-solana-app.png │ │ ├── ledger-live-latest-version-installed.png │ │ ├── ledger-live-update-available-v0.2.2.png │ │ ├── rt-dropped-minority-fork-post-process.png │ │ ├── rt-dropped-minority-fork-pre-process.png │ │ ├── p_inflation_schedule_ranges_w_comments.png │ │ └── p_ex_staked_supply_w_range_initial_stake.png │ └── katex │ │ ├── fonts │ │ ├── KaTeX_Main-Bold.ttf │ │ ├── KaTeX_Main-Bold.woff │ │ ├── KaTeX_AMS-Regular.ttf │ │ ├── KaTeX_AMS-Regular.woff │ │ ├── KaTeX_AMS-Regular.woff2 │ │ ├── KaTeX_Fraktur-Bold.ttf │ │ ├── KaTeX_Fraktur-Bold.woff │ │ ├── KaTeX_Main-Bold.woff2 │ │ ├── KaTeX_Main-Italic.ttf │ │ ├── KaTeX_Main-Italic.woff │ │ ├── KaTeX_Main-Italic.woff2 │ │ ├── KaTeX_Main-Regular.ttf │ │ ├── KaTeX_Main-Regular.woff │ │ ├── KaTeX_Math-Italic.ttf │ │ ├── KaTeX_Math-Italic.woff │ │ ├── KaTeX_Math-Italic.woff2 │ │ ├── KaTeX_Size1-Regular.ttf │ │ ├── KaTeX_Size2-Regular.ttf │ │ ├── KaTeX_Size3-Regular.ttf │ │ ├── KaTeX_Size4-Regular.ttf │ │ ├── KaTeX_Fraktur-Bold.woff2 │ │ ├── KaTeX_Fraktur-Regular.ttf │ │ ├── KaTeX_Main-BoldItalic.ttf │ │ ├── KaTeX_Main-Regular.woff2 │ │ ├── KaTeX_Math-BoldItalic.ttf │ │ ├── KaTeX_SansSerif-Bold.ttf │ │ ├── KaTeX_SansSerif-Bold.woff │ │ ├── KaTeX_Script-Regular.ttf │ │ ├── KaTeX_Script-Regular.woff │ │ ├── KaTeX_Size1-Regular.woff │ │ ├── KaTeX_Size1-Regular.woff2 │ │ ├── KaTeX_Size2-Regular.woff │ │ ├── KaTeX_Size2-Regular.woff2 │ │ ├── KaTeX_Size3-Regular.woff │ │ ├── KaTeX_Size3-Regular.woff2 │ │ ├── KaTeX_Size4-Regular.woff │ │ ├── KaTeX_Size4-Regular.woff2 │ │ ├── KaTeX_Caligraphic-Bold.ttf │ │ ├── KaTeX_Caligraphic-Bold.woff │ │ ├── KaTeX_Caligraphic-Bold.woff2 │ │ ├── KaTeX_Fraktur-Regular.woff │ │ ├── KaTeX_Fraktur-Regular.woff2 │ │ ├── KaTeX_Main-BoldItalic.woff │ │ ├── KaTeX_Main-BoldItalic.woff2 │ │ ├── KaTeX_Math-BoldItalic.woff │ │ ├── KaTeX_Math-BoldItalic.woff2 │ │ ├── KaTeX_SansSerif-Bold.woff2 │ │ ├── KaTeX_SansSerif-Italic.ttf │ │ ├── KaTeX_SansSerif-Italic.woff │ │ ├── KaTeX_SansSerif-Italic.woff2 │ │ ├── KaTeX_SansSerif-Regular.ttf │ │ ├── KaTeX_SansSerif-Regular.woff │ │ ├── KaTeX_Script-Regular.woff2 │ │ ├── KaTeX_Typewriter-Regular.ttf │ │ ├── KaTeX_Caligraphic-Regular.ttf │ │ ├── KaTeX_Caligraphic-Regular.woff │ │ ├── KaTeX_SansSerif-Regular.woff2 │ │ ├── KaTeX_Typewriter-Regular.woff │ │ ├── KaTeX_Typewriter-Regular.woff2 │ │ └── KaTeX_Caligraphic-Regular.woff2 │ │ └── contrib │ │ ├── copy-tex.min.css │ │ └── copy-tex.css ├── .prettierignore ├── babel.config.js ├── art │ ├── forks-pruned.bob │ ├── forks-pruned2.bob │ ├── forks.bob │ └── transaction.bob ├── src │ ├── runtime │ │ ├── zk-docs │ │ │ ├── zero_proof.pdf │ │ │ ├── pubkey_proof.pdf │ │ │ ├── twisted_elgamal.pdf │ │ │ ├── ciphertext_validity.pdf │ │ │ ├── percentage_with_cap.pdf │ │ │ ├── ciphertext_ciphertext_equality.pdf │ │ │ └── ciphertext_commitment_equality.pdf │ │ └── programs.md │ ├── operations │ │ ├── _category_.json │ │ ├── guides │ │ │ └── _category_.json │ │ ├── best-practices │ │ │ └── _category_.json │ │ └── index.md │ ├── cli │ │ ├── examples │ │ │ ├── _category_.json │ │ │ └── deploy-a-program.md │ │ └── wallets │ │ │ ├── _category_.json │ │ │ └── hardware │ │ │ └── _category_.json │ ├── architecture.md │ ├── theme │ │ └── Footer │ │ │ └── styles.module.css │ ├── proposals │ │ └── snapshot-verification.md │ └── implemented-proposals │ │ └── index.md ├── .eslintignore ├── .prettierrc.json ├── offline-cmd-md-links.sh ├── .gitignore └── .eslintrc ├── ci ├── test-docs.sh ├── test-stable-sbf.sh ├── .gitignore ├── stable │ ├── common.sh │ ├── run-localnet.sh │ ├── run-all.sh │ └── run-local-cluster-partially.sh ├── test-downstream-builds.sh ├── check-install-all.sh ├── docker-run-default-image.sh ├── test-abi.sh ├── downstream-projects │ ├── run-spl.sh │ ├── run-openbook-dex.sh │ ├── run-all.sh │ └── common.sh ├── test.sh ├── test-shuttle.sh ├── _ ├── shellcheck.sh ├── common │ ├── limit-threads.sh │ └── shared-functions.sh ├── format-url.sh ├── channel_restriction.sh ├── docker │ └── README.md ├── test-verify-packets-gossip.sh └── crate-version.sh ├── cli ├── .gitignore └── tests │ └── fixtures │ ├── noop.so │ ├── alt_bn128.so │ ├── noop_large.so │ └── build.sh ├── metrics ├── scripts │ ├── .gitignore │ ├── grafana-provisioning │ │ └── dashboards │ │ │ └── dashboard.yml │ ├── stop.sh │ └── grafana.ini └── .gitignore ├── poh ├── .gitignore └── src │ └── lib.rs ├── programs ├── sbf │ ├── c │ │ ├── .gitignore │ │ └── src │ │ │ ├── sbf_to_sbf │ │ │ ├── helper.h │ │ │ ├── helper.c │ │ │ └── entrypoint.c │ │ │ ├── panic │ │ │ └── panic.c │ │ │ ├── bench_alu │ │ │ └── test_bench_alu.c │ │ │ ├── multiple_static │ │ │ └── multiple_static.c │ │ │ ├── relative_call │ │ │ └── relative_call.c │ │ │ ├── noop++ │ │ │ └── noop++.cc │ │ │ ├── noop │ │ │ └── noop.c │ │ │ ├── struct_pass │ │ │ └── struct_pass.c │ │ │ ├── remaining_compute_units │ │ │ └── remaining_compute_units.c │ │ │ ├── struct_ret │ │ │ └── struct_ret.c │ │ │ └── read_program │ │ │ └── read_program.c │ ├── .gitignore │ └── rust │ │ ├── 128bit_dep │ │ └── Cargo.toml │ │ ├── param_passing_dep │ │ └── Cargo.toml │ │ ├── invoke_dep │ │ └── Cargo.toml │ │ ├── realloc_invoke_dep │ │ └── Cargo.toml │ │ ├── mem_dep │ │ └── Cargo.toml │ │ ├── many_args_dep │ │ └── Cargo.toml │ │ ├── dep_crate │ │ └── Cargo.toml │ │ ├── invoked_dep │ │ └── Cargo.toml │ │ ├── realloc_dep │ │ └── Cargo.toml │ │ ├── iter │ │ └── Cargo.toml │ │ ├── 128bit │ │ └── Cargo.toml │ │ ├── membuiltins │ │ └── Cargo.toml │ │ ├── rand │ │ └── src │ │ │ └── lib.rs │ │ ├── noop │ │ ├── src │ │ │ └── lib.rs │ │ └── Cargo.toml │ │ ├── curve25519 │ │ └── Cargo.toml │ │ ├── alloc │ │ └── Cargo.toml │ │ ├── param_passing │ │ └── Cargo.toml │ │ ├── call_depth │ │ └── Cargo.toml │ │ ├── many_args │ │ ├── src │ │ │ └── helper.rs │ │ └── Cargo.toml │ │ ├── upgraded │ │ └── src │ │ │ └── lib.rs │ │ ├── alt_bn128 │ │ └── Cargo.toml │ │ ├── poseidon │ │ └── Cargo.toml │ │ ├── spoof1_system │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ │ ├── upgradeable │ │ └── src │ │ │ └── lib.rs │ │ ├── divide_by_zero │ │ └── Cargo.toml │ │ ├── external_spend │ │ └── Cargo.toml │ │ ├── alt_bn128_compression │ │ └── Cargo.toml │ │ └── account_mem │ │ └── Cargo.toml ├── bpf_loader │ └── test_elfs │ │ ├── makefile │ │ ├── out │ │ ├── noop_aligned.so │ │ ├── noop_unaligned.so │ │ ├── sbpfv3_return_err.so │ │ ├── sbpfv3_return_ok.so │ │ └── sbpfv0_verifier_err.so │ │ └── src │ │ ├── noop_aligned │ │ └── noop_aligned.c │ │ └── noop_unaligned │ │ └── noop_unaligned.c ├── bpf-loader-tests │ └── noop.so ├── system │ └── src │ │ └── lib.rs ├── compute-budget │ ├── src │ │ └── lib.rs │ └── Cargo.toml └── vote │ └── src │ └── lib.rs ├── rpc ├── .gitignore └── src │ ├── max_slots.rs │ ├── rpc │ └── account_resolver.rs │ └── filter.rs ├── zk-token-sdk ├── .gitignore ├── src │ ├── zk_token_elgamal │ │ └── mod.rs │ ├── encryption │ │ └── decode_u32_precomputation_for_G.bincode │ ├── sigma_proofs │ │ ├── grouped_ciphertext_validity_proof │ │ │ └── mod.rs │ │ └── batched_grouped_ciphertext_validity_proof │ │ │ └── mod.rs │ ├── instruction │ │ ├── grouped_ciphertext_validity │ │ │ └── mod.rs │ │ ├── batched_grouped_ciphertext_validity │ │ │ └── mod.rs │ │ └── errors.rs │ └── zk_token_proof_program.rs └── README.md ├── client └── .gitignore ├── core ├── .gitignore ├── src │ ├── bls_sigverify │ │ └── mod.rs │ ├── repair │ │ ├── request_response.rs │ │ └── mod.rs │ └── banking_stage │ │ └── transaction_scheduler │ │ ├── scheduler_error.rs │ │ └── batch_id_generator.rs └── benches │ └── gen_keys.rs ├── curves ├── curve25519 │ ├── .gitignore │ └── src │ │ ├── errors.rs │ │ └── lib.rs ├── bls12-381 │ └── src │ │ ├── lib.rs │ │ ├── scalar.rs │ │ └── errors.rs └── curve-traits │ └── Cargo.toml ├── faucet ├── .gitignore └── src │ └── lib.rs ├── genesis └── .gitignore ├── gossip ├── .gitignore └── src │ └── crds_gossip_error.rs ├── install ├── .gitignore ├── src │ ├── main.rs │ └── build_env.rs ├── build.rs └── install-help.sh ├── keygen └── .gitignore ├── ledger ├── .gitignore ├── src │ └── entry_notifier_interface.rs └── proptest-regressions │ └── blockstore_meta.txt ├── measure ├── .gitignore ├── src │ └── lib.rs └── Cargo.toml ├── notifier └── .gitignore ├── rpc-test └── .gitignore ├── runtime ├── .gitignore └── src │ ├── bank │ └── builtins │ │ └── mod.rs │ ├── vote_sender_types.rs │ ├── snapshot_utils │ └── snapshot_interval.rs │ ├── static_ids.rs │ └── runtime_config.rs ├── storage-bigtable ├── proto │ └── google.protobuf.rs ├── build-proto │ ├── .gitignore │ ├── README.md │ ├── build.sh │ └── Cargo.toml └── init-bigtable.sh ├── version ├── .gitignore └── build.rs ├── accounts-cluster-bench └── .gitignore ├── banking-bench └── .gitignore ├── client-test └── .gitignore ├── lattice-hash └── src │ └── lib.rs ├── ledger-tool ├── .gitignore └── src │ ├── ledger_path.rs │ └── error.rs ├── local-cluster ├── .gitignore └── src │ └── lib.rs ├── merkle-tree ├── .gitignore └── src │ └── lib.rs ├── net-utils └── .gitignore ├── tpu-client ├── .gitignore └── src │ ├── nonblocking │ └── mod.rs │ └── lib.rs ├── watchtower └── .gitignore ├── bench-streamer └── .gitignore ├── docker-solana ├── .gitignore └── README.md ├── platform-tools-sdk ├── sbf │ ├── c │ │ ├── inc │ │ │ ├── wchar.h │ │ │ ├── sys │ │ │ │ └── param.h │ │ │ ├── stdlib.h │ │ │ ├── deserialize_deprecated.h │ │ │ ├── stdio.h │ │ │ ├── string.h │ │ │ ├── sol │ │ │ │ └── inc │ │ │ │ │ ├── last_restart_slot.inc │ │ │ │ │ ├── big_mod_exp.inc │ │ │ │ │ ├── sha.inc │ │ │ │ │ ├── blake3.inc │ │ │ │ │ ├── compute_units.inc │ │ │ │ │ └── keccak.inc │ │ │ └── solana_sdk.h │ │ └── sbf.ld │ ├── scripts │ │ ├── objcopy.sh │ │ ├── package.sh │ │ └── strip.sh │ ├── .gitignore │ └── env.sh ├── cargo-build-sbf │ ├── .gitignore │ └── tests │ │ └── crates │ │ ├── noop │ │ └── src │ │ │ └── lib.rs │ │ ├── workspace-metadata │ │ └── src │ │ │ └── lib.rs │ │ ├── fail │ │ ├── src │ │ │ └── lib.rs │ │ └── Cargo.toml │ │ └── package-metadata │ │ └── src │ │ └── lib.rs └── gen-headers │ └── Cargo.toml ├── rayon-threadlimit ├── .gitignore └── Cargo.toml ├── tokens ├── .gitignore └── src │ ├── lib.rs │ └── stake.rs ├── transaction-dos └── .gitignore ├── rpc-client └── src │ ├── nonblocking │ └── mod.rs │ └── lib.rs ├── rust-toolchain.toml ├── system-test ├── stability-testcases │ ├── .gitignore │ └── gossip-dos-test.yml ├── abi-testcases │ ├── .gitignore │ └── mixed-validator-test.yml ├── netem-configs │ └── complete-loss-two-partitions ├── testnet-automation-json-parser-missing.py ├── deprecated-testcases │ ├── colo-cpu-only-perf.yml │ └── colo-gpu-perf.yml └── stake-operations-testcases │ └── stake_test_automation.sh ├── udp-client └── src │ └── nonblocking │ └── mod.rs ├── verified-packet-receiver └── src │ └── lib.rs ├── pubsub-client └── src │ ├── nonblocking │ └── mod.rs │ └── lib.rs ├── quic-client └── src │ └── nonblocking │ └── mod.rs ├── validator ├── .gitignore ├── src │ └── commands │ │ ├── run │ │ └── mod.rs │ │ └── monitor │ │ └── mod.rs └── solana-test-validator ├── connection-cache └── src │ ├── nonblocking │ ├── mod.rs │ └── client_connection.rs │ └── lib.rs ├── geyser-plugin-interface └── src │ └── lib.rs ├── vercel.json ├── bench-tps ├── .gitignore ├── tests │ └── fixtures │ │ └── spl_instruction_padding.so └── src │ └── lib.rs ├── dos └── src │ └── lib.rs ├── banks-server └── src │ └── lib.rs ├── rustfmt.toml ├── syscalls └── gen-syscall-list │ ├── src │ └── main.rs │ └── Cargo.toml ├── svm-measure ├── src │ └── lib.rs └── Cargo.toml ├── svm ├── src │ └── transaction_processing_callback.rs └── tests │ └── example-programs │ ├── clock-sysvar │ ├── clock_sysvar_program.so │ ├── Cargo.toml │ └── src │ │ └── lib.rs │ ├── hello-solana │ ├── hello_solana_program.so │ ├── Cargo.toml │ └── src │ │ └── lib.rs │ ├── simple-transfer │ ├── simple_transfer_program.so │ └── Cargo.toml │ ├── write-to-account │ ├── write_to_account_program.so │ └── Cargo.toml │ └── transfer-from-account │ ├── transfer_from_account_program.so │ └── Cargo.toml ├── web3.js └── README.md ├── .buildkite ├── scripts │ ├── test-all.sh │ ├── func-assert-eq.sh │ └── trigger-github-actions-windows-build.sh ├── pipeline-upload.sh └── solana-private.sh ├── vortexor └── src │ └── lib.rs ├── program-test └── tests │ └── fixtures │ └── noop_program.so ├── program-binaries └── src │ └── programs │ ├── spl_memo-1.0.0.so │ ├── spl_memo-3.0.0.so │ ├── spl_token-3.5.0.so │ ├── core_bpf_config-3.0.0.so │ ├── core_bpf_stake-1.0.0.so │ ├── spl_token_2022-8.0.0.so │ ├── core_bpf_feature_gate-0.0.1.so │ ├── spl_associated_token_account-1.1.1.so │ └── core_bpf_address_lookup_table-3.0.0.so ├── .cargo └── config.toml ├── rpc-client-types └── src │ ├── error_object.rs │ └── lib.rs ├── sdk └── README.md ├── svm-transaction └── src │ ├── lib.rs │ ├── svm_transaction.rs │ └── svm_transaction │ └── sanitized_transaction.rs ├── svm-rent-calculator ├── src │ ├── lib.rs │ └── rent_state.rs └── Cargo.toml ├── entry └── src │ └── lib.rs ├── zk-sdk └── README.md ├── .github ├── scripts │ ├── downstream-project-spl-install-deps.sh │ ├── check-changelog.sh │ ├── install-proto.sh │ └── purge-ubuntu-runner.sh ├── PULL_REQUEST_TEMPLATE.md ├── workflows │ ├── label-actions.yml │ ├── add-team-to-ghsa.yml │ ├── changelog-label.yml │ └── downstream-project-spl-nightly.yml ├── ISSUE_TEMPLATE │ └── 1-core-contributor.md └── RELEASE_TEMPLATE.md ├── multinode-demo ├── validator-x.sh └── faucet.sh ├── tls-utils ├── README ├── src │ ├── crypto_provider.rs │ └── lib.rs └── Cargo.toml ├── zk-keygen └── README.md ├── clap-utils └── src │ ├── compute_unit_price.rs │ └── memo.rs ├── remote-wallet ├── src │ └── lib.rs └── README.md ├── compute-budget └── src │ └── lib.rs ├── accounts-db ├── src │ ├── is_zero_lamport.rs │ ├── io_uring │ │ └── mod.rs │ ├── accounts_hash.rs │ └── is_loadable.rs └── store-histogram │ └── Cargo.toml ├── rbpf-cli ├── src │ └── main.rs └── Cargo.toml ├── bloom └── src │ └── lib.rs ├── compute-budget-instruction └── src │ └── lib.rs ├── banking-stage-ingress-types ├── src │ └── lib.rs └── Cargo.toml ├── transaction-view └── src │ ├── transaction_version.rs │ ├── result.rs │ ├── transaction_data.rs │ └── lib.rs ├── runtime-transaction └── src │ ├── lib.rs │ └── instruction_data_len.rs ├── storage-proto ├── README.md └── proto │ └── entries.proto ├── streamer └── src │ ├── nonblocking │ └── mod.rs │ └── lib.rs ├── .codecov.yml ├── scripts ├── spl-token-cli-version.sh ├── read-cargo-variable.sh ├── iftop.sh ├── dcou-tainted-packages.sh ├── fd-monitor.sh ├── ulimit-n.sh ├── oom-score-adj.sh ├── net-shaper.sh └── cargo-clippy.sh ├── rpc-client-api └── src │ └── lib.rs ├── bucket_map └── src │ ├── bucket_item.rs │ └── lib.rs ├── wen-restart ├── src │ └── lib.rs └── build.rs ├── memory-management ├── src │ └── lib.rs └── Cargo.toml ├── perf ├── build.rs └── benches │ └── recycler.rs ├── cost-model └── src │ ├── cost_tracker_post_analysis.rs │ └── lib.rs ├── thread-manager └── examples │ ├── core_contention_contending_set.toml │ └── core_contention_dedicated_set.toml ├── low-pass-filter └── Cargo.toml ├── cargo-test-sbf ├── svm-feature-set └── Cargo.toml ├── geyser-plugin-manager └── src │ └── lib.rs ├── votor-messages └── src │ └── lib.rs ├── vote └── src │ └── lib.rs ├── account-decoder └── src │ └── validator_info.rs ├── clap-v3-utils └── src │ └── memo.rs ├── cargo-build-sbf ├── cli-output └── src │ └── lib.rs ├── fee └── Cargo.toml ├── send-transaction-service └── src │ └── lib.rs ├── svm-log-collector └── Cargo.toml ├── bls-cert-verify └── src │ └── lib.rs ├── svm-callback └── Cargo.toml ├── xdp └── Cargo.toml ├── svm-timings └── Cargo.toml ├── svm-type-overrides └── Cargo.toml ├── io-uring └── Cargo.toml ├── .gitignore └── votor └── src └── lib.rs /net/azure.sh: -------------------------------------------------------------------------------- 1 | gce.sh -------------------------------------------------------------------------------- /net/colo.sh: -------------------------------------------------------------------------------- 1 | gce.sh -------------------------------------------------------------------------------- /net/ec2.sh: -------------------------------------------------------------------------------- 1 | gce.sh -------------------------------------------------------------------------------- /docs/static/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ci/test-docs.sh: -------------------------------------------------------------------------------- 1 | test-stable.sh -------------------------------------------------------------------------------- /ci/test-stable-sbf.sh: -------------------------------------------------------------------------------- 1 | test-stable.sh -------------------------------------------------------------------------------- /cli/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /metrics/scripts/.gitignore: -------------------------------------------------------------------------------- 1 | /lib/ 2 | -------------------------------------------------------------------------------- /net/.gitignore: -------------------------------------------------------------------------------- 1 | /config/ 2 | /log 3 | -------------------------------------------------------------------------------- /poh/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /programs/sbf/c/.gitignore: -------------------------------------------------------------------------------- 1 | /out/ 2 | -------------------------------------------------------------------------------- /rpc/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /zk-token-sdk/.gitignore: -------------------------------------------------------------------------------- 1 | /farf/ 2 | -------------------------------------------------------------------------------- /client/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /core/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /curves/curve25519/.gitignore: -------------------------------------------------------------------------------- 1 | /farf/ 2 | -------------------------------------------------------------------------------- /faucet/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /genesis/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /gossip/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /install/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /keygen/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /ledger/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /measure/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /metrics/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /notifier/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /rpc-test/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /runtime/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /storage-bigtable/proto/google.protobuf.rs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /version/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /accounts-cluster-bench/.gitignore: -------------------------------------------------------------------------------- 1 | /farf/ 2 | -------------------------------------------------------------------------------- /banking-bench/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /client-test/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /lattice-hash/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod lt_hash; 2 | -------------------------------------------------------------------------------- /ledger-tool/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /local-cluster/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /merkle-tree/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /net-utils/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /net/README.md: -------------------------------------------------------------------------------- 1 | ../docs/src/contributing/testnet.md -------------------------------------------------------------------------------- /programs/sbf/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /tpu-client/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /watchtower/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /bench-streamer/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /docker-solana/.gitignore: -------------------------------------------------------------------------------- 1 | cargo-install/ 2 | usr/ 3 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/c/inc/wchar.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | -------------------------------------------------------------------------------- /rayon-threadlimit/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /tokens/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | *.csv 3 | /farf/ 4 | -------------------------------------------------------------------------------- /transaction-dos/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/c/inc/sys/param.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | -------------------------------------------------------------------------------- /rpc-client/src/nonblocking/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod rpc_client; 2 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "1.86.0" 3 | -------------------------------------------------------------------------------- /system-test/stability-testcases/.gitignore: -------------------------------------------------------------------------------- 1 | /releases/ 2 | -------------------------------------------------------------------------------- /tpu-client/src/nonblocking/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod tpu_client; 2 | -------------------------------------------------------------------------------- /udp-client/src/nonblocking/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod udp_client; 2 | -------------------------------------------------------------------------------- /verified-packet-receiver/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod receiver; 2 | -------------------------------------------------------------------------------- /faucet/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod faucet; 2 | pub mod faucet_mock; 3 | -------------------------------------------------------------------------------- /pubsub-client/src/nonblocking/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod pubsub_client; 2 | -------------------------------------------------------------------------------- /quic-client/src/nonblocking/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod quic_client; 2 | -------------------------------------------------------------------------------- /validator/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /farf/ 3 | /test-ledger/ 4 | -------------------------------------------------------------------------------- /docs/.prettierignore: -------------------------------------------------------------------------------- 1 | .docusaurus 2 | build 3 | html 4 | static 5 | -------------------------------------------------------------------------------- /storage-bigtable/build-proto/.gitignore: -------------------------------------------------------------------------------- 1 | googleapis/ 2 | target/ 3 | -------------------------------------------------------------------------------- /connection-cache/src/nonblocking/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod client_connection; 2 | -------------------------------------------------------------------------------- /geyser-plugin-interface/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod geyser_plugin_interface; 2 | -------------------------------------------------------------------------------- /net/remote/README.md: -------------------------------------------------------------------------------- 1 | Scripts that run on the remote testnet nodes 2 | -------------------------------------------------------------------------------- /runtime/src/bank/builtins/mod.rs: -------------------------------------------------------------------------------- 1 | pub(crate) mod core_bpf_migration; 2 | -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "github": { 3 | "silent": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /bench-tps/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /config/ 3 | /config-local/ 4 | /farf/ 5 | -------------------------------------------------------------------------------- /dos/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | pub mod cli; 3 | -------------------------------------------------------------------------------- /ci/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | /package-lock.json 3 | /snapcraft.credentials 4 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/c/inc/stdlib.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /platform-tools-sdk/cargo-build-sbf/.gitignore: -------------------------------------------------------------------------------- 1 | /tests/crates/*/target/ 2 | Cargo.lock 3 | -------------------------------------------------------------------------------- /system-test/abi-testcases/.gitignore: -------------------------------------------------------------------------------- 1 | /baseline-run.sh 2 | /config/ 3 | /releases/ 4 | -------------------------------------------------------------------------------- /install/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() -> Result<(), String> { 2 | agave_install::main() 3 | } 4 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/c/inc/deserialize_deprecated.h: -------------------------------------------------------------------------------- 1 | #include -------------------------------------------------------------------------------- /banks-server/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | pub mod banks_server; 3 | -------------------------------------------------------------------------------- /net/scripts/colo_nodes: -------------------------------------------------------------------------------- 1 | billiards|216.24.140.153|10.1.1.24|16|64|SATA|2000|NVME|1000|2|Denver 2 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | imports_granularity = "One" 2 | format_strings = true 3 | group_imports = "One" 4 | -------------------------------------------------------------------------------- /cli/tests/fixtures/noop.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/cli/tests/fixtures/noop.so -------------------------------------------------------------------------------- /docs/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/favicon.ico -------------------------------------------------------------------------------- /measure/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | pub mod macros; 3 | pub mod measure; 4 | -------------------------------------------------------------------------------- /syscalls/gen-syscall-list/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | /* I do all my work in `../build.rs` */ 3 | } 4 | -------------------------------------------------------------------------------- /core/src/bls_sigverify/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod bls_sigverifier; 2 | pub mod bls_sigverify_service; 3 | pub mod stats; 4 | -------------------------------------------------------------------------------- /svm-measure/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | pub mod macros; 3 | pub mod measure; 4 | -------------------------------------------------------------------------------- /cli/tests/fixtures/alt_bn128.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/cli/tests/fixtures/alt_bn128.so -------------------------------------------------------------------------------- /cli/tests/fixtures/noop_large.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/cli/tests/fixtures/noop_large.so -------------------------------------------------------------------------------- /docs/static/img/p_ex_supply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/p_ex_supply.png -------------------------------------------------------------------------------- /docs/static/img/porep_reward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/porep_reward.png -------------------------------------------------------------------------------- /programs/bpf_loader/test_elfs/makefile: -------------------------------------------------------------------------------- 1 | SBF_SDK := ../../../platform-tools-sdk/sbf/c 2 | include $(SBF_SDK)/sbf.mk 3 | -------------------------------------------------------------------------------- /docs/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve("@docusaurus/core/lib/babel/preset")], 3 | }; 4 | -------------------------------------------------------------------------------- /docs/static/img/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/favicon-16x16.png -------------------------------------------------------------------------------- /docs/static/img/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/favicon-32x32.png -------------------------------------------------------------------------------- /docs/static/img/p_ex_interest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/p_ex_interest.png -------------------------------------------------------------------------------- /docs/static/img/p_ex_schedule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/p_ex_schedule.png -------------------------------------------------------------------------------- /docs/static/img/p_total_supply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/p_total_supply.png -------------------------------------------------------------------------------- /docs/static/img/rt-tx-journey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/rt-tx-journey.png -------------------------------------------------------------------------------- /programs/bpf-loader-tests/noop.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/programs/bpf-loader-tests/noop.so -------------------------------------------------------------------------------- /svm/src/transaction_processing_callback.rs: -------------------------------------------------------------------------------- 1 | pub use solana_svm_callback::{AccountState, TransactionProcessingCallback}; 2 | -------------------------------------------------------------------------------- /tpu-client/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | 3 | pub mod nonblocking; 4 | pub mod tpu_client; 5 | -------------------------------------------------------------------------------- /web3.js/README.md: -------------------------------------------------------------------------------- 1 | # `@solana/web3.js` 2 | 3 | Moved to its own repo @ https://github.com/solana-labs/solana-web3.js 4 | -------------------------------------------------------------------------------- /zk-token-sdk/src/zk_token_elgamal/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod convert; 2 | pub mod decryption; 3 | pub mod ops; 4 | pub mod pod; 5 | -------------------------------------------------------------------------------- /docs/art/forks-pruned.bob: -------------------------------------------------------------------------------- 1 | 1 2 | | 3 | 2 4 | /| 5 | / | 6 | | | 7 | | 4 8 | | 9 | 5 10 | -------------------------------------------------------------------------------- /docs/static/img/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/static/img/ramp-tps-rounds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/ramp-tps-rounds.png -------------------------------------------------------------------------------- /docs/static/img/rt-tpu-jito-labs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/rt-tpu-jito-labs.png -------------------------------------------------------------------------------- /pubsub-client/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | 3 | pub mod nonblocking; 4 | pub mod pubsub_client; 5 | -------------------------------------------------------------------------------- /validator/src/commands/run/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod args; 2 | pub mod execute; 3 | 4 | pub use {args::add_args, execute::execute}; 5 | -------------------------------------------------------------------------------- /docs/src/runtime/zk-docs/zero_proof.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/src/runtime/zk-docs/zero_proof.pdf -------------------------------------------------------------------------------- /docs/static/img/p_ex_staked_yields.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/p_ex_staked_yields.png -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/c/inc/stdio.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | typedef void *FILE; 3 | 4 | int printf(const char * restrictformat, ... ); 5 | -------------------------------------------------------------------------------- /.buildkite/scripts/test-all.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | here=$(dirname "$0") 4 | 5 | find "$here" -name '*.test.sh' -exec {} \; 6 | -------------------------------------------------------------------------------- /docs/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | build 3 | static 4 | html 5 | 6 | # FIXME 7 | src/pages/index.js 8 | src/theme/Footer/index.js 9 | -------------------------------------------------------------------------------- /docs/art/forks-pruned2.bob: -------------------------------------------------------------------------------- 1 | 1 2 | | 3 | 3 4 | |\ 5 | | \ 6 | | | 7 | | | 8 | | | 9 | 6 | 10 | | 11 | 7 12 | -------------------------------------------------------------------------------- /docs/src/runtime/zk-docs/pubkey_proof.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/src/runtime/zk-docs/pubkey_proof.pdf -------------------------------------------------------------------------------- /docs/static/img/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/android-chrome-192x192.png -------------------------------------------------------------------------------- /docs/static/img/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/android-chrome-512x512.png -------------------------------------------------------------------------------- /docs/static/img/data-plane-propagation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/data-plane-propagation.png -------------------------------------------------------------------------------- /docs/static/img/p_ex_relative_dilution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/p_ex_relative_dilution.png -------------------------------------------------------------------------------- /docs/static/img/p_ex_staked_dilution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/p_ex_staked_dilution.png -------------------------------------------------------------------------------- /docs/static/img/p_ex_unstaked_dilution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/p_ex_unstaked_dilution.png -------------------------------------------------------------------------------- /docs/static/img/p_inflation_schedule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/p_inflation_schedule.png -------------------------------------------------------------------------------- /docs/static/img/p_total_supply_ranges.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/p_total_supply_ranges.png -------------------------------------------------------------------------------- /merkle-tree/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | 3 | pub mod merkle_tree; 4 | pub use merkle_tree::MerkleTree; 5 | -------------------------------------------------------------------------------- /vortexor/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod cli; 2 | pub mod rpc_load_balancer; 3 | pub mod sender; 4 | pub mod stake_updater; 5 | pub mod vortexor; 6 | -------------------------------------------------------------------------------- /ci/stable/common.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | export RUST_BACKTRACE=1 5 | export RUSTFLAGS="-D warnings" 6 | 7 | source ci/_ 8 | -------------------------------------------------------------------------------- /docs/src/runtime/zk-docs/twisted_elgamal.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/src/runtime/zk-docs/twisted_elgamal.pdf -------------------------------------------------------------------------------- /docs/static/img/rt-dropped-via-rpc-pool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/rt-dropped-via-rpc-pool.png -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Main-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Main-Bold.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Main-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Main-Bold.woff -------------------------------------------------------------------------------- /program-test/tests/fixtures/noop_program.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/program-test/tests/fixtures/noop_program.so -------------------------------------------------------------------------------- /docs/static/img/economic_design_infl_230719.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/economic_design_infl_230719.png -------------------------------------------------------------------------------- /docs/static/img/p_ex_adjusted_staked_yields.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/p_ex_adjusted_staked_yields.png -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_AMS-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_AMS-Regular.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_AMS-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_AMS-Regular.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_AMS-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_AMS-Regular.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Fraktur-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Fraktur-Bold.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Fraktur-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Fraktur-Bold.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Main-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Main-Bold.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Main-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Main-Italic.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Main-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Main-Italic.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Main-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Main-Italic.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Main-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Main-Regular.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Main-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Main-Regular.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Math-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Math-Italic.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Math-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Math-Italic.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Math-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Math-Italic.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Size1-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Size1-Regular.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Size2-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Size2-Regular.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Size3-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Size3-Regular.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Size4-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Size4-Regular.ttf -------------------------------------------------------------------------------- /program-binaries/src/programs/spl_memo-1.0.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/program-binaries/src/programs/spl_memo-1.0.0.so -------------------------------------------------------------------------------- /program-binaries/src/programs/spl_memo-3.0.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/program-binaries/src/programs/spl_memo-3.0.0.so -------------------------------------------------------------------------------- /docs/src/runtime/zk-docs/ciphertext_validity.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/src/runtime/zk-docs/ciphertext_validity.pdf -------------------------------------------------------------------------------- /docs/src/runtime/zk-docs/percentage_with_cap.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/src/runtime/zk-docs/percentage_with_cap.pdf -------------------------------------------------------------------------------- /docs/static/katex/contrib/copy-tex.min.css: -------------------------------------------------------------------------------- 1 | .katex,.katex-display{user-select:all;-moz-user-select:all;-webkit-user-select:all;-ms-user-select:all} 2 | -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Fraktur-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Fraktur-Bold.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Fraktur-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Fraktur-Regular.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Main-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Main-BoldItalic.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Main-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Main-Regular.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Math-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Math-BoldItalic.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_SansSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_SansSerif-Bold.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_SansSerif-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_SansSerif-Bold.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Script-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Script-Regular.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Script-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Script-Regular.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Size1-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Size1-Regular.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Size1-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Size1-Regular.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Size2-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Size2-Regular.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Size2-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Size2-Regular.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Size3-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Size3-Regular.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Size3-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Size3-Regular.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Size4-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Size4-Regular.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Size4-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Size4-Regular.woff2 -------------------------------------------------------------------------------- /program-binaries/src/programs/spl_token-3.5.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/program-binaries/src/programs/spl_token-3.5.0.so -------------------------------------------------------------------------------- /programs/bpf_loader/test_elfs/out/noop_aligned.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/programs/bpf_loader/test_elfs/out/noop_aligned.so -------------------------------------------------------------------------------- /bench-tps/tests/fixtures/spl_instruction_padding.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/bench-tps/tests/fixtures/spl_instruction_padding.so -------------------------------------------------------------------------------- /docs/static/img/ledger-live-install-solana-app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/ledger-live-install-solana-app.png -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Caligraphic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Caligraphic-Bold.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Caligraphic-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Caligraphic-Bold.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Caligraphic-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Caligraphic-Bold.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Fraktur-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Fraktur-Regular.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Fraktur-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Fraktur-Regular.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Main-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Main-BoldItalic.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Main-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Main-BoldItalic.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Math-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Math-BoldItalic.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Math-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Math-BoldItalic.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_SansSerif-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_SansSerif-Bold.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_SansSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_SansSerif-Italic.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_SansSerif-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_SansSerif-Italic.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_SansSerif-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_SansSerif-Italic.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_SansSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_SansSerif-Regular.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_SansSerif-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_SansSerif-Regular.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Script-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Script-Regular.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Typewriter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Typewriter-Regular.ttf -------------------------------------------------------------------------------- /programs/bpf_loader/test_elfs/out/noop_unaligned.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/programs/bpf_loader/test_elfs/out/noop_unaligned.so -------------------------------------------------------------------------------- /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [target.x86_64-unknown-linux-gnu] 2 | # When building for linux, target the minimal supported CPU 3 | rustflags = ["-Ctarget-cpu=x86-64-v2"] 4 | -------------------------------------------------------------------------------- /docs/src/operations/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "position": 4, 3 | "label": "Operating a Validator", 4 | "collapsible": true, 5 | "collapsed": true 6 | } 7 | -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Caligraphic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Caligraphic-Regular.ttf -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Caligraphic-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Caligraphic-Regular.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_SansSerif-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_SansSerif-Regular.woff2 -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Typewriter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Typewriter-Regular.woff -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Typewriter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Typewriter-Regular.woff2 -------------------------------------------------------------------------------- /install/src/build_env.rs: -------------------------------------------------------------------------------- 1 | pub const TARGET: &str = env!("TARGET"); 2 | pub const BUILD_SECONDS_SINCE_UNIX_EPOCH: &str = env!("BUILD_SECONDS_SINCE_UNIX_EPOCH"); 3 | -------------------------------------------------------------------------------- /program-binaries/src/programs/core_bpf_config-3.0.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/program-binaries/src/programs/core_bpf_config-3.0.0.so -------------------------------------------------------------------------------- /program-binaries/src/programs/core_bpf_stake-1.0.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/program-binaries/src/programs/core_bpf_stake-1.0.0.so -------------------------------------------------------------------------------- /program-binaries/src/programs/spl_token_2022-8.0.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/program-binaries/src/programs/spl_token_2022-8.0.0.so -------------------------------------------------------------------------------- /programs/bpf_loader/test_elfs/out/sbpfv3_return_err.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/programs/bpf_loader/test_elfs/out/sbpfv3_return_err.so -------------------------------------------------------------------------------- /programs/bpf_loader/test_elfs/out/sbpfv3_return_ok.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/programs/bpf_loader/test_elfs/out/sbpfv3_return_ok.so -------------------------------------------------------------------------------- /rpc-client-types/src/error_object.rs: -------------------------------------------------------------------------------- 1 | #[derive(Deserialize, Debug)] 2 | pub struct RpcErrorObject { 3 | pub code: i64, 4 | pub message: String, 5 | } 6 | -------------------------------------------------------------------------------- /storage-bigtable/build-proto/README.md: -------------------------------------------------------------------------------- 1 | Helper project to build Rust bindings for BigTable, to avoid requiring all 2 | Solana developers have protoc installed 3 | -------------------------------------------------------------------------------- /docs/static/img/ledger-live-latest-version-installed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/ledger-live-latest-version-installed.png -------------------------------------------------------------------------------- /docs/static/img/ledger-live-update-available-v0.2.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/ledger-live-update-available-v0.2.2.png -------------------------------------------------------------------------------- /docs/static/img/rt-dropped-minority-fork-post-process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/rt-dropped-minority-fork-post-process.png -------------------------------------------------------------------------------- /docs/static/img/rt-dropped-minority-fork-pre-process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/rt-dropped-minority-fork-pre-process.png -------------------------------------------------------------------------------- /docs/static/katex/fonts/KaTeX_Caligraphic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/katex/fonts/KaTeX_Caligraphic-Regular.woff2 -------------------------------------------------------------------------------- /programs/bpf_loader/test_elfs/out/sbpfv0_verifier_err.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/programs/bpf_loader/test_elfs/out/sbpfv0_verifier_err.so -------------------------------------------------------------------------------- /sdk/README.md: -------------------------------------------------------------------------------- 1 | # PLEASE READ: This repo no longer contains the Solana SDK 2 | 3 | The solana-sdk is currently developed at https://github.com/anza-xyz/solana-sdk 4 | -------------------------------------------------------------------------------- /svm-transaction/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod instruction; 2 | pub mod message_address_table_lookup; 3 | pub mod svm_message; 4 | pub mod svm_transaction; 5 | 6 | mod tests; 7 | -------------------------------------------------------------------------------- /docs/src/runtime/zk-docs/ciphertext_ciphertext_equality.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/src/runtime/zk-docs/ciphertext_ciphertext_equality.pdf -------------------------------------------------------------------------------- /docs/src/runtime/zk-docs/ciphertext_commitment_equality.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/src/runtime/zk-docs/ciphertext_commitment_equality.pdf -------------------------------------------------------------------------------- /docs/static/img/p_inflation_schedule_ranges_w_comments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/p_inflation_schedule_ranges_w_comments.png -------------------------------------------------------------------------------- /svm-rent-calculator/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Solana SVM Rent Calculator. 2 | //! 3 | //! Rent management for SVM. 4 | 5 | pub mod rent_state; 6 | pub mod svm_rent_calculator; 7 | -------------------------------------------------------------------------------- /docs/static/img/p_ex_staked_supply_w_range_initial_stake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/docs/static/img/p_ex_staked_supply_w_range_initial_stake.png -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/c/inc/string.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #define memcpy sol_memcpy 5 | #define memset sol_memset 6 | #define strlen sol_strlen 7 | -------------------------------------------------------------------------------- /program-binaries/src/programs/core_bpf_feature_gate-0.0.1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/program-binaries/src/programs/core_bpf_feature_gate-0.0.1.so -------------------------------------------------------------------------------- /docs/src/cli/examples/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "position": 4.5, 3 | "label": "Command Examples", 4 | "collapsible": true, 5 | "collapsed": false, 6 | "link": null 7 | } 8 | -------------------------------------------------------------------------------- /docs/src/cli/wallets/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "position": 3.5, 3 | "label": "Command-line Wallets", 4 | "collapsible": true, 5 | "collapsed": false, 6 | "link": null 7 | } 8 | -------------------------------------------------------------------------------- /docs/src/operations/guides/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "position": 8, 3 | "label": "Validator Guides", 4 | "collapsible": true, 5 | "collapsed": true, 6 | "link": null 7 | } 8 | -------------------------------------------------------------------------------- /entry/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | pub mod block_component; 3 | pub mod entry; 4 | pub mod entry_marker; 5 | pub mod poh; 6 | 7 | extern crate log; 8 | -------------------------------------------------------------------------------- /svm/tests/example-programs/clock-sysvar/clock_sysvar_program.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/svm/tests/example-programs/clock-sysvar/clock_sysvar_program.so -------------------------------------------------------------------------------- /svm/tests/example-programs/hello-solana/hello_solana_program.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/svm/tests/example-programs/hello-solana/hello_solana_program.so -------------------------------------------------------------------------------- /docs/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "tabWidth": 2, 4 | "semi": true, 5 | "singleQuote": false, 6 | "proseWrap": "always", 7 | "printWidth": 80 8 | } 9 | -------------------------------------------------------------------------------- /docs/src/cli/wallets/hardware/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "position": 5, 3 | "label": "Hardware Wallets", 4 | "collapsible": false, 5 | "collapsed": false, 6 | "link": null 7 | } 8 | -------------------------------------------------------------------------------- /docs/src/operations/best-practices/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "position": 7, 3 | "label": "Best Practices", 4 | "collapsible": true, 5 | "collapsed": true, 6 | "link": null 7 | } 8 | -------------------------------------------------------------------------------- /net/scripts/enable-nvidia-persistence-mode.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "--- Enabling nvidia persistence mode" 4 | if ! nvidia-smi -pm ENABLED; then 5 | echo "^^^ +++" 6 | fi 7 | -------------------------------------------------------------------------------- /program-binaries/src/programs/spl_associated_token_account-1.1.1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/program-binaries/src/programs/spl_associated_token_account-1.1.1.so -------------------------------------------------------------------------------- /validator/solana-test-validator: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | here="$(dirname "$0")" 4 | set -x 5 | exec cargo run --manifest-path="$here"/Cargo.toml --bin solana-test-validator -- "$@" 6 | -------------------------------------------------------------------------------- /zk-sdk/README.md: -------------------------------------------------------------------------------- 1 | # PLEASE READ: This repo no longer contains the Solana ZK-SDK 2 | 3 | The solana-zk-sdk is currently developed at https://github.com/solana-program/zk-elgamal-proof. 4 | -------------------------------------------------------------------------------- /zk-token-sdk/src/encryption/decode_u32_precomputation_for_G.bincode: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/zk-token-sdk/src/encryption/decode_u32_precomputation_for_G.bincode -------------------------------------------------------------------------------- /.github/scripts/downstream-project-spl-install-deps.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | sudo apt-get update 5 | sudo apt-get install libudev-dev libclang-dev protobuf-compiler -y 6 | -------------------------------------------------------------------------------- /ci/test-downstream-builds.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cd "$(dirname "$0")/.." 4 | 5 | export CI_LOCAL_RUN=true 6 | 7 | set -ex 8 | 9 | ci/downstream-projects/run-all.sh 10 | -------------------------------------------------------------------------------- /multinode-demo/validator-x.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Start a dynamically-configured validator 4 | # 5 | 6 | here=$(dirname "$0") 7 | exec "$here"/validator.sh --label x$$ "$@" 8 | -------------------------------------------------------------------------------- /program-binaries/src/programs/core_bpf_address_lookup_table-3.0.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/program-binaries/src/programs/core_bpf_address_lookup_table-3.0.0.so -------------------------------------------------------------------------------- /rpc/src/max_slots.rs: -------------------------------------------------------------------------------- 1 | use std::sync::atomic::AtomicU64; 2 | 3 | #[derive(Default)] 4 | pub struct MaxSlots { 5 | pub retransmit: AtomicU64, 6 | pub shred_insert: AtomicU64, 7 | } 8 | -------------------------------------------------------------------------------- /svm/tests/example-programs/simple-transfer/simple_transfer_program.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/svm/tests/example-programs/simple-transfer/simple_transfer_program.so -------------------------------------------------------------------------------- /tls-utils/README: -------------------------------------------------------------------------------- 1 | A collection of utility functions and structures needed to bridge the conceptual gap between conventional TLS security models in protocols like QUIC and Agave use cases 2 | -------------------------------------------------------------------------------- /svm/tests/example-programs/write-to-account/write_to_account_program.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/svm/tests/example-programs/write-to-account/write_to_account_program.so -------------------------------------------------------------------------------- /zk-keygen/README.md: -------------------------------------------------------------------------------- 1 | # PLEASE READ: This repo no longer contains the Solana ZK-KEYGEN 2 | 3 | The solana-zk-keygen is currently developed at . 4 | -------------------------------------------------------------------------------- /clap-utils/src/compute_unit_price.rs: -------------------------------------------------------------------------------- 1 | #[deprecated(since = "2.0.0", note = "Please use `compute_budget` instead")] 2 | pub use crate::compute_budget::{compute_unit_price_arg, COMPUTE_UNIT_PRICE_ARG}; 3 | -------------------------------------------------------------------------------- /curves/bls12-381/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects, clippy::op_ref)] 2 | //! Syscall operations for bls12-381 3 | 4 | pub mod errors; 5 | pub mod g1; 6 | pub mod g2; 7 | pub mod scalar; 8 | -------------------------------------------------------------------------------- /curves/bls12-381/src/scalar.rs: -------------------------------------------------------------------------------- 1 | use bytemuck_derive::{Pod, Zeroable}; 2 | 3 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Pod, Zeroable)] 4 | #[repr(transparent)] 5 | pub struct PodScalar(pub [u8; 32]); 6 | -------------------------------------------------------------------------------- /net/scripts/install-at.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | set -ex 4 | 5 | [[ $(uname) = Linux ]] || exit 1 6 | [[ $USER = root ]] || exit 1 7 | 8 | apt-get update 9 | apt-get --assume-yes install at 10 | -------------------------------------------------------------------------------- /programs/sbf/c/src/sbf_to_sbf/helper.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief Example C-based SBF program that prints out the parameters 3 | * passed to it 4 | */ 5 | #include 6 | 7 | void helper_function(void); 8 | -------------------------------------------------------------------------------- /tokens/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | pub mod arg_parser; 3 | pub mod args; 4 | pub mod commands; 5 | mod db; 6 | pub mod spl_token; 7 | pub mod stake; 8 | pub mod token_display; 9 | -------------------------------------------------------------------------------- /curves/curve25519/src/errors.rs: -------------------------------------------------------------------------------- 1 | use thiserror::Error; 2 | 3 | #[derive(Error, Clone, Debug, Eq, PartialEq)] 4 | pub enum Curve25519Error { 5 | #[error("pod conversion failed")] 6 | PodConversion, 7 | } 8 | -------------------------------------------------------------------------------- /net/scripts/install-jq.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # jq setup 4 | # 5 | set -ex 6 | 7 | [[ $(uname) = Linux ]] || exit 1 8 | [[ $USER = root ]] || exit 1 9 | 10 | apt-get --assume-yes install jq 11 | -------------------------------------------------------------------------------- /remote-wallet/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | #![allow(dead_code)] 3 | pub mod ledger; 4 | pub mod ledger_error; 5 | pub mod locator; 6 | pub mod remote_keypair; 7 | pub mod remote_wallet; 8 | -------------------------------------------------------------------------------- /svm/tests/example-programs/transfer-from-account/transfer_from_account_program.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anza-xyz/alpenglow/HEAD/svm/tests/example-programs/transfer-from-account/transfer_from_account_program.so -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | #### Problem 2 | 3 | 4 | #### Summary of Changes 5 | 6 | 7 | Fixes # 8 | 9 | 10 | -------------------------------------------------------------------------------- /core/src/repair/request_response.rs: -------------------------------------------------------------------------------- 1 | pub trait RequestResponse { 2 | type Response: ?Sized; 3 | fn num_expected_responses(&self) -> u32; 4 | fn verify_response(&self, response: &Self::Response) -> bool; 5 | } 6 | -------------------------------------------------------------------------------- /curves/curve25519/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects, clippy::op_ref)] 2 | //! Syscall operations for curve25519 3 | 4 | pub mod edwards; 5 | pub mod errors; 6 | pub mod ristretto; 7 | pub mod scalar; 8 | -------------------------------------------------------------------------------- /compute-budget/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Solana compute budget types and default configurations. 2 | #![cfg_attr(feature = "frozen-abi", feature(min_specialization))] 3 | 4 | pub mod compute_budget; 5 | pub mod compute_budget_limits; 6 | -------------------------------------------------------------------------------- /net/scripts/install-ag.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | set -ex 4 | 5 | [[ $(uname) = Linux ]] || exit 1 6 | [[ $USER = root ]] || exit 1 7 | 8 | apt-get update 9 | apt-get --assume-yes install silversearcher-ag 10 | -------------------------------------------------------------------------------- /net/scripts/install-iftop.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Rsync setup 4 | # 5 | set -ex 6 | 7 | [[ $(uname) = Linux ]] || exit 1 8 | [[ $USER = root ]] || exit 1 9 | 10 | apt-get --assume-yes install iftop 11 | -------------------------------------------------------------------------------- /net/scripts/install-rsync.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Rsync setup 4 | # 5 | set -ex 6 | 7 | [[ $(uname) = Linux ]] || exit 1 8 | [[ $USER = root ]] || exit 1 9 | 10 | apt-get --assume-yes install rsync 11 | -------------------------------------------------------------------------------- /accounts-db/src/is_zero_lamport.rs: -------------------------------------------------------------------------------- 1 | /// A trait to see if an account's balance is zero lamports or not. 2 | pub trait IsZeroLamport { 3 | /// Is this a zero-lamport account? 4 | fn is_zero_lamport(&self) -> bool; 5 | } 6 | -------------------------------------------------------------------------------- /bench-tps/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | pub mod bench; 3 | pub mod cli; 4 | pub mod keypairs; 5 | mod log_transaction_service; 6 | mod perf_utils; 7 | mod rpc_with_retry_utils; 8 | pub mod send_batch; 9 | -------------------------------------------------------------------------------- /docs/art/forks.bob: -------------------------------------------------------------------------------- 1 | 1 2 | |\ 3 | 2 \ 4 | /| | 5 | / | 3 6 | | | |\ 7 | | 4 | \ 8 | | | | 9 | 5 | | 10 | | | 11 | 6 | 12 | | 13 | 7 14 | -------------------------------------------------------------------------------- /rbpf-cli/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | println!( 3 | r##"rbpf-cli is replaced by agave-ledger-tool program run subcommand. 4 | Please, use 'agave-ledger-tool program run --help' for more information."## 5 | ); 6 | } 7 | -------------------------------------------------------------------------------- /bloom/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(feature = "frozen-abi", feature(min_specialization))] 2 | pub mod bloom; 3 | 4 | #[cfg_attr(feature = "frozen-abi", macro_use)] 5 | #[cfg(feature = "frozen-abi")] 6 | extern crate solana_frozen_abi_macro; 7 | -------------------------------------------------------------------------------- /ci/check-install-all.sh: -------------------------------------------------------------------------------- 1 | source scripts/spl-token-cli-version.sh 2 | if [[ -z $splTokenCliVersion ]]; then 3 | echo "On the stable channel, splTokenCliVersion must be set in scripts/spl-token-cli-version.sh" 4 | exit 1 5 | fi 6 | -------------------------------------------------------------------------------- /docs/src/runtime/programs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Native Programs in the Solana Runtime" 3 | pagination_label: Runtime Native Programs 4 | sidebar_label: Native Programs 5 | --- 6 | 7 | [Redirect](https://solana.com/docs/core/accounts) 8 | -------------------------------------------------------------------------------- /gossip/src/crds_gossip_error.rs: -------------------------------------------------------------------------------- 1 | #[derive(PartialEq, Eq, Debug)] 2 | pub enum CrdsGossipError { 3 | NoPeers, 4 | PushMessageTimeout, 5 | PushMessageOldVersion, 6 | BadPruneDestination, 7 | PruneMessageTimeout, 8 | } 9 | -------------------------------------------------------------------------------- /svm/tests/example-programs/clock-sysvar/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "clock-sysvar-program" 3 | version = "3.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | 8 | [lib] 9 | crate-type = ["cdylib", "rlib"] 10 | 11 | [workspace] -------------------------------------------------------------------------------- /svm/tests/example-programs/hello-solana/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "hello-solana-program" 3 | version = "3.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | 8 | [lib] 9 | crate-type = ["cdylib", "rlib"] 10 | 11 | [workspace] -------------------------------------------------------------------------------- /system-test/abi-testcases/mixed-validator-test.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - command: "system-test/abi-testcases/mixed-validator-test.sh" 3 | label: "Mixed Validator Test" 4 | artifact_paths: 5 | - "system-test/abi-testcases/logs/*" 6 | -------------------------------------------------------------------------------- /system-test/stability-testcases/gossip-dos-test.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - command: "system-test/stability-testcases/gossip-dos-test.sh" 3 | label: "Gossip DoS Test" 4 | artifact_paths: 5 | - "system-test/stability-testcases/logs/*" 6 | -------------------------------------------------------------------------------- /compute-budget-instruction/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | 3 | mod builtin_programs_filter; 4 | pub mod compute_budget_instruction_details; 5 | mod compute_budget_program_id_filter; 6 | pub mod instructions_processor; 7 | -------------------------------------------------------------------------------- /local-cluster/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | pub mod cluster; 3 | pub mod cluster_tests; 4 | pub mod integration_tests; 5 | pub mod local_cluster; 6 | mod local_cluster_snapshot_utils; 7 | pub mod validator_configs; 8 | -------------------------------------------------------------------------------- /net/scripts/localtime.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Setup timezone 4 | # 5 | set -ex 6 | 7 | [[ $(uname) = Linux ]] || exit 1 8 | [[ $USER = root ]] || exit 1 9 | 10 | ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime 11 | -------------------------------------------------------------------------------- /rpc-client-types/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | 3 | pub mod config; 4 | pub mod error_object; 5 | pub mod filter; 6 | pub mod request; 7 | pub mod response; 8 | 9 | #[macro_use] 10 | extern crate serde_derive; 11 | -------------------------------------------------------------------------------- /svm/tests/example-programs/simple-transfer/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "simple-transfer-program" 3 | version = "3.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | 8 | [lib] 9 | crate-type = ["cdylib", "rlib"] 10 | 11 | [workspace] -------------------------------------------------------------------------------- /svm/tests/example-programs/transfer-from-account/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "transfer-from-account" 3 | version = "3.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | 8 | [lib] 9 | crate-type = ["cdylib", "rlib"] 10 | 11 | [workspace] -------------------------------------------------------------------------------- /svm/tests/example-programs/write-to-account/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "write-to-account" 3 | version = "3.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | 8 | [lib] 9 | crate-type = ["cdylib", "rlib"] 10 | 11 | [workspace] 12 | -------------------------------------------------------------------------------- /zk-token-sdk/src/sigma_proofs/grouped_ciphertext_validity_proof/mod.rs: -------------------------------------------------------------------------------- 1 | mod handles_2; 2 | mod handles_3; 3 | 4 | pub use { 5 | handles_2::GroupedCiphertext2HandlesValidityProof, 6 | handles_3::GroupedCiphertext3HandlesValidityProof, 7 | }; 8 | -------------------------------------------------------------------------------- /banking-stage-ingress-types/src/lib.rs: -------------------------------------------------------------------------------- 1 | use {crossbeam_channel::Receiver, solana_perf::packet::PacketBatch, std::sync::Arc}; 2 | 3 | pub type BankingPacketBatch = Arc>; 4 | pub type BankingPacketReceiver = Receiver; 5 | -------------------------------------------------------------------------------- /docs/src/cli/examples/deploy-a-program.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Deploy a Solana Program with the CLI 3 | pagination_label: "Solana CLI: Deploy a Program" 4 | sidebar_label: Deploy a Program 5 | --- 6 | 7 | [Redirect](https://solana.com/docs/programs/deploying) 8 | -------------------------------------------------------------------------------- /net/scripts/rsync-retry.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # rsync wrapper that retries a few times on failure 4 | # 5 | 6 | for i in $(seq 1 5); do 7 | ( 8 | set -x 9 | rsync "$@" 10 | ) && exit 0 11 | echo Retry "$i"... 12 | done 13 | -------------------------------------------------------------------------------- /runtime/src/vote_sender_types.rs: -------------------------------------------------------------------------------- 1 | use { 2 | crossbeam_channel::{Receiver, Sender}, 3 | solana_vote::vote_parser::ParsedVote, 4 | }; 5 | 6 | pub type ReplayVoteSender = Sender; 7 | pub type ReplayVoteReceiver = Receiver; 8 | -------------------------------------------------------------------------------- /connection-cache/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | 3 | pub mod client_connection; 4 | pub mod connection_cache; 5 | pub mod connection_cache_stats; 6 | pub mod nonblocking; 7 | 8 | #[macro_use] 9 | extern crate solana_metrics; 10 | -------------------------------------------------------------------------------- /docs/src/architecture.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Agave Validator Architecture 3 | sidebar_position: 0 4 | sidebar_label: Overview 5 | pagination_label: Agave Validator Architecture 6 | --- 7 | 8 | In this section, we will describe the architecture of the Agave Validator. 9 | -------------------------------------------------------------------------------- /transaction-view/src/transaction_version.rs: -------------------------------------------------------------------------------- 1 | /// A byte that represents the version of the transaction. 2 | #[derive(Copy, Clone, Debug, Default)] 3 | #[repr(u8)] 4 | pub enum TransactionVersion { 5 | #[default] 6 | Legacy = u8::MAX, 7 | V0 = 0, 8 | } 9 | -------------------------------------------------------------------------------- /ci/docker-run-default-image.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 6 | 7 | # shellcheck disable=SC1091 8 | source "$here/docker/env.sh" 9 | 10 | exec "$here/docker-run.sh" "${CI_DOCKER_IMAGE:?}" "$@" 11 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/scripts/objcopy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | sbf_sdk=$(cd "$(dirname "$0")/.." && pwd) 4 | # shellcheck source=platform-tools-sdk/sbf/env.sh 5 | source "$sbf_sdk"/env.sh 6 | exec "$sbf_sdk"/dependencies/platform-tools/llvm/bin/llvm-objcopy "$@" 7 | -------------------------------------------------------------------------------- /runtime-transaction/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | 3 | mod instruction_data_len; 4 | pub(crate) mod instruction_meta; 5 | pub mod runtime_transaction; 6 | pub mod signature_details; 7 | pub mod transaction_meta; 8 | pub mod transaction_with_meta; 9 | -------------------------------------------------------------------------------- /storage-proto/README.md: -------------------------------------------------------------------------------- 1 | # Storage Protobufs 2 | 3 | The `solana-storage-proto` structs used in `src/convert.rs` and elsewhere are 4 | auto-generated from protobuf definitions on build. To update these structs, 5 | simply make the desired edits to `proto/*.proto` files. 6 | -------------------------------------------------------------------------------- /zk-token-sdk/src/sigma_proofs/batched_grouped_ciphertext_validity_proof/mod.rs: -------------------------------------------------------------------------------- 1 | mod handles_2; 2 | mod handles_3; 3 | 4 | pub use { 5 | handles_2::BatchedGroupedCiphertext2HandlesValidityProof, 6 | handles_3::BatchedGroupedCiphertext3HandlesValidityProof, 7 | }; 8 | -------------------------------------------------------------------------------- /programs/sbf/c/src/sbf_to_sbf/helper.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief Example C-based SBF program that prints out the parameters 3 | * passed to it 4 | */ 5 | #include 6 | #include "helper.h" 7 | 8 | void helper_function(void) { 9 | sol_log(__FILE__); 10 | } 11 | -------------------------------------------------------------------------------- /streamer/src/nonblocking/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod connection_rate_limiter; 2 | pub mod quic; 3 | #[cfg(feature = "dev-context-only-utils")] 4 | pub mod recvmmsg; 5 | pub mod sendmmsg; 6 | mod stream_throttle; 7 | #[cfg(feature = "dev-context-only-utils")] 8 | pub mod testing_utilities; 9 | -------------------------------------------------------------------------------- /.codecov.yml: -------------------------------------------------------------------------------- 1 | comment: 2 | behavior: default 3 | layout: diff 4 | require_changes: false 5 | coverage: 6 | precision: 1 7 | range: 8 | - 50.0 9 | - 100.0 10 | round: down 11 | status: 12 | patch: false 13 | project: false 14 | github_checks: false 15 | -------------------------------------------------------------------------------- /cli/tests/fixtures/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -ex 3 | 4 | cd "$(dirname "$0")" 5 | 6 | make -C ../../../programs/sbf/c/ 7 | cp ../../../programs/sbf/c/out/noop.so . 8 | cat noop.so noop.so noop.so > noop_large.so 9 | cp ../../../programs/sbf/c/out/alt_bn128.so . 10 | -------------------------------------------------------------------------------- /programs/sbf/c/src/panic/panic.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief Example C-based SBF program that prints out the parameters 3 | * passed to it 4 | */ 5 | #include 6 | 7 | extern uint64_t entrypoint(const uint8_t *input) { 8 | sol_panic(); 9 | return SUCCESS; 10 | } 11 | -------------------------------------------------------------------------------- /scripts/spl-token-cli-version.sh: -------------------------------------------------------------------------------- 1 | # populate this on the stable branch 2 | splTokenCliVersion= 3 | 4 | maybeSplTokenCliVersionArg= 5 | if [[ -n "$splTokenCliVersion" ]]; then 6 | # shellcheck disable=SC2034 7 | maybeSplTokenCliVersionArg="--version $splTokenCliVersion" 8 | fi 9 | -------------------------------------------------------------------------------- /metrics/scripts/grafana-provisioning/dashboards/dashboard.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | - name: 'InfluxDB' 5 | orgId: 1 6 | folder: '' 7 | type: file 8 | disableDeletion: false 9 | editable: true 10 | options: 11 | path: /etc/grafana/provisioning/dashboards -------------------------------------------------------------------------------- /rpc-client-api/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | 3 | pub mod client_error; 4 | pub mod custom_error; 5 | pub mod response; 6 | pub use solana_rpc_client_types::{config, error_object, filter, request}; 7 | 8 | #[macro_use] 9 | extern crate serde_derive; 10 | -------------------------------------------------------------------------------- /storage-bigtable/build-proto/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | cd "$(dirname "$0")" 5 | 6 | cargo="$(readlink -f "../../cargo")" 7 | 8 | if [[ ! -d googleapis ]]; then 9 | git clone https://github.com/googleapis/googleapis.git 10 | fi 11 | 12 | exec "$cargo" run 13 | -------------------------------------------------------------------------------- /ci/test-abi.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Easily run the ABI tests for the entire repo or a subset 4 | # 5 | 6 | here="$(dirname "$0")" 7 | cargo="$(readlink -f "${here}/../cargo")" 8 | 9 | set -x 10 | exec "$cargo" nightly test --features frozen-abi --lib -- test_abi_ --nocapture 11 | -------------------------------------------------------------------------------- /zk-token-sdk/README.md: -------------------------------------------------------------------------------- 1 | # zk-token-sdk (DEPRECATED) 2 | 3 | **This crate is deprecated and no longer maintained.** 4 | 5 | This crate has been replaced by the [zk-sdk](https://github.com/solana-program/zk-elgamal-proof) crate. 6 | 7 | For the latest updates and features, please use the new crate. 8 | -------------------------------------------------------------------------------- /bucket_map/src/bucket_item.rs: -------------------------------------------------------------------------------- 1 | #![cfg(feature = "dev-context-only-utils")] 2 | use {crate::RefCount, solana_pubkey::Pubkey}; 3 | 4 | #[derive(Debug, Default, Clone)] 5 | pub struct BucketItem { 6 | pub pubkey: Pubkey, 7 | pub ref_count: RefCount, 8 | pub slot_list: Vec, 9 | } 10 | -------------------------------------------------------------------------------- /bucket_map/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | mod bucket; 3 | pub mod bucket_api; 4 | mod bucket_item; 5 | pub mod bucket_map; 6 | mod bucket_stats; 7 | mod bucket_storage; 8 | mod index_entry; 9 | mod restart; 10 | pub type MaxSearch = u8; 11 | pub type RefCount = u64; 12 | -------------------------------------------------------------------------------- /ci/stable/run-localnet.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | here="$(dirname "$0")" 5 | 6 | export RUST_LOG="solana_metrics=warn,info,$RUST_LOG" 7 | 8 | echo --- ci/localnet-sanity.sh 9 | "$here"/../localnet-sanity.sh -x 10 | 11 | echo --- ci/run-sanity.sh 12 | "$here"/../run-sanity.sh -x -------------------------------------------------------------------------------- /core/benches/gen_keys.rs: -------------------------------------------------------------------------------- 1 | #![feature(test)] 2 | 3 | extern crate test; 4 | 5 | use {solana_core::gen_keys::GenKeys, test::Bencher}; 6 | 7 | #[bench] 8 | fn bench_gen_keys(b: &mut Bencher) { 9 | let mut rnd = GenKeys::new([0u8; 32]); 10 | b.iter(|| rnd.gen_n_keypairs(1000)); 11 | } 12 | -------------------------------------------------------------------------------- /net/scripts/install-libssl.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -ex 3 | 4 | [[ $(uname) = Linux ]] || exit 1 5 | [[ $USER = root ]] || exit 1 6 | 7 | # Install libssl-dev to be compatible with binaries built on an Ubuntu machine... 8 | apt-get update 9 | apt-get --assume-yes install libssl-dev 10 | -------------------------------------------------------------------------------- /ci/downstream-projects/run-spl.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | here="$(dirname "$0")" 5 | 6 | #shellcheck source=ci/downstream-projects/func-spl.sh 7 | source "$here"/func-spl.sh 8 | 9 | #shellcheck source=ci/downstream-projects/common.sh 10 | source "$here"/common.sh 11 | 12 | _ spl 13 | -------------------------------------------------------------------------------- /docs/src/operations/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Operating a Validator 3 | sidebar_position: 0 4 | --- 5 | 6 | This section describes how to run an Agave validator node. 7 | 8 | There are several clusters available to connect to; see [Choosing a Cluster](../cli/examples/choose-a-cluster.md) for an overview of each. 9 | -------------------------------------------------------------------------------- /programs/system/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | pub mod system_instruction; 3 | pub mod system_processor; 4 | 5 | use solana_sdk_ids::system_program; 6 | pub use { 7 | solana_nonce_account::{get_system_account_kind, SystemAccountKind}, 8 | system_program::id, 9 | }; 10 | -------------------------------------------------------------------------------- /.github/workflows/label-actions.yml: -------------------------------------------------------------------------------- 1 | name: "Issue Label Actions" 2 | 3 | on: 4 | issues: 5 | types: [labeled, unlabeled] 6 | 7 | permissions: 8 | contents: read 9 | issues: write 10 | 11 | jobs: 12 | action: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: dessant/label-actions@v4 16 | -------------------------------------------------------------------------------- /wen-restart/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub(crate) mod solana { 2 | pub(crate) mod wen_restart_proto { 3 | include!(concat!(env!("OUT_DIR"), "/solana.wen_restart_proto.rs")); 4 | } 5 | } 6 | 7 | pub(crate) mod heaviest_fork_aggregate; 8 | pub(crate) mod last_voted_fork_slots_aggregate; 9 | pub mod wen_restart; 10 | -------------------------------------------------------------------------------- /ci/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Get the directory of the current script 4 | script_dir_by_bash_source=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) 5 | 6 | script_dir_by_0=$(cd "$(dirname "$0")" && pwd) 7 | 8 | echo "script_dir_by_bash_source = $script_dir_by_bash_source" 9 | echo "script_dir_by_0 = $script_dir_by_0" 10 | -------------------------------------------------------------------------------- /programs/compute-budget/src/lib.rs: -------------------------------------------------------------------------------- 1 | use solana_program_runtime::declare_process_instruction; 2 | 3 | pub const DEFAULT_COMPUTE_UNITS: u64 = 150; 4 | 5 | declare_process_instruction!(Entrypoint, DEFAULT_COMPUTE_UNITS, |_invoke_context| { 6 | // Do nothing, compute budget instructions handled by the runtime 7 | Ok(()) 8 | }); 9 | -------------------------------------------------------------------------------- /programs/sbf/c/src/bench_alu/test_bench_alu.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "bench_alu.c" 3 | 4 | Test(bench_alu, sanity) { 5 | uint64_t input[] = {500, 0}; 6 | 7 | cr_assert_eq(entrypoint((uint8_t *) input), SUCCESS); 8 | 9 | cr_assert_eq(input[0], 500); 10 | cr_assert_eq(input[1], 5); 11 | } 12 | -------------------------------------------------------------------------------- /ci/downstream-projects/run-openbook-dex.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | here="$(dirname "$0")" 5 | 6 | #shellcheck source=ci/downstream-projects/func-openbook-dex.sh 7 | source "$here"/func-openbook-dex.sh 8 | 9 | #shellcheck source=ci/downstream-projects/common.sh 10 | source "$here"/common.sh 11 | 12 | _ openbook_dex 13 | -------------------------------------------------------------------------------- /memory-management/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![deny(clippy::arithmetic_side_effects)] 2 | pub mod aligned_memory; 3 | 4 | /// Returns true if `ptr` is aligned to `align`. 5 | pub fn is_memory_aligned(ptr: usize, align: usize) -> bool { 6 | ptr.checked_rem(align) 7 | .map(|remainder| remainder == 0) 8 | .unwrap_or(false) 9 | } 10 | -------------------------------------------------------------------------------- /poh/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | pub mod poh_controller; 3 | pub mod poh_recorder; 4 | pub mod poh_service; 5 | pub mod record_channels; 6 | pub mod transaction_recorder; 7 | 8 | #[macro_use] 9 | extern crate solana_metrics; 10 | 11 | #[cfg(test)] 12 | #[macro_use] 13 | extern crate assert_matches; 14 | -------------------------------------------------------------------------------- /.buildkite/scripts/func-assert-eq.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | assert_eq() { 4 | local test_name=$1 5 | local want=$2 6 | local got=$3 7 | 8 | if [[ "$want" = "$got" ]]; then 9 | echo "✅ $test_name" 10 | else 11 | cat < 2 | 3 | static const char msg[] = "This is a message"; 4 | static const char msg2[] = "This is a different message"; 5 | 6 | extern uint64_t entrypoint(const uint8_t *input) { 7 | sol_log((char*)msg); 8 | sol_log((char*)msg2); 9 | return SUCCESS; 10 | } 11 | -------------------------------------------------------------------------------- /runtime/src/snapshot_utils/snapshot_interval.rs: -------------------------------------------------------------------------------- 1 | use std::num::NonZeroU64; 2 | 3 | /// The interval in between taking snapshots 4 | #[derive(Debug, Copy, Clone, Eq, PartialEq)] 5 | pub enum SnapshotInterval { 6 | /// Snapshots are disabled 7 | Disabled, 8 | /// Snapshots are taken every this many slots 9 | Slots(NonZeroU64), 10 | } 11 | -------------------------------------------------------------------------------- /core/src/banking_stage/transaction_scheduler/scheduler_error.rs: -------------------------------------------------------------------------------- 1 | use thiserror::Error; 2 | 3 | #[derive(Debug, Error)] 4 | pub enum SchedulerError { 5 | #[error("Sending channel disconnected: {0}")] 6 | DisconnectedSendChannel(&'static str), 7 | #[error("Recv channel disconnected: {0}")] 8 | DisconnectedRecvChannel(&'static str), 9 | } 10 | -------------------------------------------------------------------------------- /metrics/scripts/stop.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Stops local metrics 4 | # 5 | 6 | set -e 7 | 8 | for container in influxdb grafana; do 9 | if [ "$(docker ps -q -a -f name=$container)" ]; then 10 | echo Stopping $container 11 | ( 12 | set +e 13 | docker rm -f $container 14 | exit 0 15 | ) 16 | fi 17 | done 18 | -------------------------------------------------------------------------------- /transaction-view/src/result.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, PartialEq, Eq)] 2 | #[repr(u8)] // repr(u8) is used to ensure that the enum is represented as a single byte in memory. 3 | pub enum TransactionViewError { 4 | ParseError, 5 | SanitizeError, 6 | AddressLookupMismatch, 7 | } 8 | 9 | pub type Result = core::result::Result; 10 | -------------------------------------------------------------------------------- /storage-proto/proto/entries.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package solana.storage.Entries; 4 | 5 | message Entries { 6 | repeated Entry entries = 1; 7 | } 8 | 9 | message Entry { 10 | uint32 index = 1; 11 | uint64 num_hashes = 2; 12 | bytes hash = 3; 13 | uint64 num_transactions = 4; 14 | uint32 starting_transaction_index = 5; 15 | } 16 | -------------------------------------------------------------------------------- /programs/sbf/c/src/sbf_to_sbf/entrypoint.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief Example C-based SBF program that prints out the parameters 3 | * passed to it 4 | */ 5 | #include 6 | #include "helper.h" 7 | 8 | extern uint64_t entrypoint(const uint8_t *input) { 9 | sol_log(__FILE__); 10 | helper_function(); 11 | sol_log(__FILE__); 12 | return SUCCESS; 13 | } 14 | -------------------------------------------------------------------------------- /programs/sbf/rust/128bit_dep/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-128bit-dep" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [dependencies] 12 | -------------------------------------------------------------------------------- /streamer/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | pub mod evicting_sender; 3 | pub mod msghdr; 4 | pub mod nonblocking; 5 | pub mod packet; 6 | pub mod quic; 7 | pub mod recvmmsg; 8 | pub mod sendmmsg; 9 | pub mod socket; 10 | pub mod streamer; 11 | 12 | #[macro_use] 13 | extern crate log; 14 | 15 | #[macro_use] 16 | extern crate solana_metrics; 17 | -------------------------------------------------------------------------------- /net/scripts/remove-docker-interface.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -ex 3 | # 4 | # Some instances have docker running and docker0 network interface confuses 5 | # gossip and airdrops fail. As a workaround for now simply remove the docker0 6 | # interface 7 | # 8 | 9 | [[ $(uname) = Linux ]] || exit 1 10 | [[ $USER = root ]] || exit 1 11 | 12 | ip link delete docker0 || true 13 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/.gitignore: -------------------------------------------------------------------------------- 1 | /dependencies/criterion* 2 | /dependencies/hashbrown* 3 | /dependencies/llvm-native* 4 | /dependencies/rust-bpf-sysroot* 5 | /dependencies/bpf-tools* 6 | /dependencies/platform-tools* 7 | /dependencies/sbf-tools* 8 | /dependencies/xargo* 9 | /dependencies/bin* 10 | /dependencies/.crates.toml 11 | /dependencies/.crates2.json 12 | /syscalls.txt 13 | -------------------------------------------------------------------------------- /syscalls/gen-syscall-list/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "gen-syscall-list" 3 | publish = false 4 | version = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [build-dependencies] 12 | regex = { workspace = true } 13 | -------------------------------------------------------------------------------- /metrics/scripts/grafana.ini: -------------------------------------------------------------------------------- 1 | [users] 2 | auto_assign_org = true 3 | auto_assign_org_role = Editor 4 | viewers_can_edit = false 5 | 6 | [auth.anonymous] 7 | enabled = true 8 | 9 | [alerting] 10 | enabled = true 11 | # Makes it possible to turn off alert rule execution but alerting UI is visible 12 | ;execute_alerts = true 13 | 14 | [explore] 15 | enabled = false 16 | -------------------------------------------------------------------------------- /programs/sbf/c/src/relative_call/relative_call.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief test program that generates SBF PC relative call instructions 3 | */ 4 | #include 5 | 6 | void __attribute__ ((noinline)) helper() { 7 | sol_log(__func__); 8 | } 9 | 10 | extern uint64_t entrypoint(const uint8_t *input) { 11 | sol_log(__func__); 12 | helper(); 13 | return SUCCESS; 14 | } 15 | -------------------------------------------------------------------------------- /programs/sbf/rust/param_passing_dep/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-param-passing-dep" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [dependencies] 12 | -------------------------------------------------------------------------------- /ci/_: -------------------------------------------------------------------------------- 1 | # Buildkite log management helper 2 | # 3 | # See https://buildkite.com/docs/pipelines/managing-log-output 4 | # 5 | # |source| me 6 | # 7 | 8 | base_dir=$(realpath --strip "$(dirname "$0")/..") 9 | 10 | _() { 11 | if [[ $(pwd) = $base_dir ]]; then 12 | echo "--- $*" > /dev/stderr 13 | else 14 | echo "--- $* (wd: $(pwd))" > /dev/stderr 15 | fi 16 | "$@" 17 | } 18 | -------------------------------------------------------------------------------- /ci/shellcheck.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Reference: https://github.com/koalaman/shellcheck/wiki/Directive 4 | set -e 5 | 6 | cd "$(dirname "$0")/.." 7 | ( 8 | set -x 9 | git ls-files -- '.buildkite/hooks' '*.sh' ':(exclude)ci/semver_bash' \ 10 | | xargs ci/docker-run.sh koalaman/shellcheck:v0.8.0 --color=always --external-sources --shell=bash 11 | ) 12 | echo --- ok 13 | -------------------------------------------------------------------------------- /curves/bls12-381/src/errors.rs: -------------------------------------------------------------------------------- 1 | use thiserror::Error; 2 | 3 | #[derive(Error, Clone, Debug, Eq, PartialEq)] 4 | pub enum BlsError { 5 | #[error("encoding failed")] 6 | BadEncoding, 7 | #[error("point is not on curve")] 8 | PointNotOnCurve, 9 | #[error("point is not in group")] 10 | PointNotInGroup, 11 | #[error("scalar failed")] 12 | BadScalar, 13 | } 14 | -------------------------------------------------------------------------------- /perf/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] 3 | { 4 | if is_x86_feature_detected!("avx") { 5 | println!("cargo:rustc-cfg=build_target_feature_avx"); 6 | } 7 | if is_x86_feature_detected!("avx2") { 8 | println!("cargo:rustc-cfg=build_target_feature_avx2"); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /programs/sbf/rust/invoke_dep/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-invoke-dep" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["lib"] 13 | -------------------------------------------------------------------------------- /tls-utils/src/crypto_provider.rs: -------------------------------------------------------------------------------- 1 | use rustls::{crypto::CryptoProvider, NamedGroup}; 2 | 3 | pub fn crypto_provider() -> CryptoProvider { 4 | let mut provider = rustls::crypto::ring::default_provider(); 5 | // Disable all key exchange algorithms except X25519 6 | provider 7 | .kx_groups 8 | .retain(|kx| kx.name() == NamedGroup::X25519); 9 | provider 10 | } 11 | -------------------------------------------------------------------------------- /cost-model/src/cost_tracker_post_analysis.rs: -------------------------------------------------------------------------------- 1 | use {solana_pubkey::Pubkey, std::collections::HashMap}; 2 | 3 | /// Trait to help with post-analysis of a given block 4 | pub trait CostTrackerPostAnalysis { 5 | /// Only use in post-analyze to avoid lock contention 6 | /// Do not use in the hot path 7 | fn get_cost_by_writable_accounts(&self) -> &HashMap; 8 | } 9 | -------------------------------------------------------------------------------- /svm-transaction/src/svm_transaction.rs: -------------------------------------------------------------------------------- 1 | use {crate::svm_message::SVMMessage, solana_signature::Signature}; 2 | 3 | mod sanitized_transaction; 4 | 5 | pub trait SVMTransaction: SVMMessage { 6 | /// Get the first signature of the message. 7 | fn signature(&self) -> &Signature; 8 | 9 | /// Get all the signatures of the message. 10 | fn signatures(&self) -> &[Signature]; 11 | } 12 | -------------------------------------------------------------------------------- /thread-manager/examples/core_contention_contending_set.toml: -------------------------------------------------------------------------------- 1 | [native_configs] 2 | 3 | [rayon_configs] 4 | 5 | [tokio_configs.axum1] 6 | worker_threads = 8 7 | max_blocking_threads = 1 8 | core_allocation.DedicatedCoreSet = { min = 0, max = 8 } 9 | 10 | [tokio_configs.axum2] 11 | worker_threads = 8 12 | max_blocking_threads = 1 13 | core_allocation.DedicatedCoreSet = { min = 0, max = 8 } 14 | -------------------------------------------------------------------------------- /thread-manager/examples/core_contention_dedicated_set.toml: -------------------------------------------------------------------------------- 1 | [native_configs] 2 | 3 | [rayon_configs] 4 | 5 | [tokio_configs.axum1] 6 | worker_threads = 4 7 | max_blocking_threads = 1 8 | core_allocation.DedicatedCoreSet = { min = 0, max = 4 } 9 | 10 | [tokio_configs.axum2] 11 | worker_threads = 4 12 | max_blocking_threads = 1 13 | core_allocation.DedicatedCoreSet = { min = 4, max = 8 } 14 | -------------------------------------------------------------------------------- /.github/scripts/check-changelog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -uo pipefail 3 | 4 | CHANGELOG_FILE="CHANGELOG.md" 5 | echo "Checking: git diff --exit-code origin/${BASE_REF} -- ${CHANGELOG_FILE}" 6 | 7 | if git diff --exit-code "origin/${BASE_REF}" -- "${CHANGELOG_FILE}"; then 8 | >&2 echo "Error: this pull request requires an entry in $CHANGELOG_FILE, but no entry was found" 9 | exit 1 10 | fi 11 | -------------------------------------------------------------------------------- /zk-token-sdk/src/instruction/grouped_ciphertext_validity/mod.rs: -------------------------------------------------------------------------------- 1 | mod handles_2; 2 | mod handles_3; 3 | 4 | pub use { 5 | handles_2::{ 6 | GroupedCiphertext2HandlesValidityProofContext, GroupedCiphertext2HandlesValidityProofData, 7 | }, 8 | handles_3::{ 9 | GroupedCiphertext3HandlesValidityProofContext, GroupedCiphertext3HandlesValidityProofData, 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /low-pass-filter/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "agave-low-pass-filter" 3 | description = "Low Pass Filter" 4 | version = { workspace = true } 5 | repository = { workspace = true } 6 | homepage = { workspace = true } 7 | license = { workspace = true } 8 | edition = { workspace = true } 9 | 10 | [lib] 11 | path = "src/lib.rs" 12 | 13 | [features] 14 | agave-unstable-api = [] 15 | 16 | [dependencies] 17 | -------------------------------------------------------------------------------- /programs/sbf/rust/realloc_invoke_dep/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-realloc-invoke-dep" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["lib"] 13 | -------------------------------------------------------------------------------- /system-test/netem-configs/complete-loss-two-partitions: -------------------------------------------------------------------------------- 1 | { 2 | "partitions":[ 3 | 50, 4 | 50 5 | ], 6 | "interconnects":[ 7 | { 8 | "a":0, 9 | "b":1, 10 | "config":"loss 100%" 11 | }, 12 | { 13 | "a":1, 14 | "b":0, 15 | "config":"loss 100%" 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /docs/src/theme/Footer/styles.module.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | .footerLogoLink { 9 | opacity: 0.5; 10 | transition: opacity 0.15s ease-in-out; 11 | } 12 | 13 | .footerLogoLink:hover { 14 | opacity: 1; 15 | } 16 | -------------------------------------------------------------------------------- /programs/sbf/rust/mem_dep/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-mem-dep" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["lib"] 13 | 14 | [dependencies] 15 | -------------------------------------------------------------------------------- /scripts/read-cargo-variable.sh: -------------------------------------------------------------------------------- 1 | # source this file 2 | 3 | readCargoVariable() { 4 | declare variable="$1" 5 | declare Cargo_toml="$2" 6 | 7 | while read -r name equals value _; do 8 | if [[ $name = "$variable" && $equals = = ]]; then 9 | echo "${value//\"/}" 10 | return 11 | fi 12 | done < <(cat "$Cargo_toml") 13 | echo "Unable to locate $variable in $Cargo_toml" 1>&2 14 | } 15 | -------------------------------------------------------------------------------- /cargo-test-sbf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | here=$(dirname "$0") 4 | 5 | maybe_sbf_sdk="--sbf-sdk $here/platform-tools-sdk/sbf" 6 | for a in "$@"; do 7 | if [[ $a = --sbf-sdk ]]; then 8 | maybe_sbf_sdk= 9 | fi 10 | done 11 | 12 | export CARGO_BUILD_SBF="$here"/cargo-build-sbf 13 | set -x 14 | exec cargo run --manifest-path "$here"/platform-tools-sdk/cargo-test-sbf/Cargo.toml -- $maybe_sbf_sdk "$@" 15 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/c/inc/sol/inc/last_restart_slot.inc: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /** 3 | * @brief Solana Last Restart Slot system call 4 | */ 5 | 6 | #include 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | /** 13 | * Get Last Restart Slot 14 | */ 15 | @SYSCALL u64 sol_get_last_restart_slot(uint8_t *result); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | /**@}*/ 22 | -------------------------------------------------------------------------------- /scripts/iftop.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Reports network bandwidth usage 4 | # 5 | set -e 6 | 7 | [[ $(uname) == Linux ]] || exit 0 8 | 9 | cd "$(dirname "$0")" 10 | 11 | sudo= 12 | if sudo true; then 13 | sudo="sudo -n" 14 | fi 15 | # shellcheck disable=SC2086 16 | exec $sudo iftop -i "$(ifconfig | grep mtu | grep -iv loopback | grep -i running | awk 'BEGIN { FS = ":" } ; {print $1}')" -nNbBP -t -L 1000 17 | -------------------------------------------------------------------------------- /svm-feature-set/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-svm-feature-set" 3 | description = "Solana SVM Feature Set" 4 | version = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | readme = false 11 | 12 | [dependencies] 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /geyser-plugin-manager/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod accounts_update_notifier; 2 | pub mod block_metadata_notifier; 3 | pub mod block_metadata_notifier_interface; 4 | pub mod entry_notifier; 5 | pub mod geyser_plugin_manager; 6 | pub mod geyser_plugin_service; 7 | pub mod slot_status_notifier; 8 | pub mod slot_status_observer; 9 | pub mod transaction_notifier; 10 | 11 | pub use geyser_plugin_manager::GeyserPluginManagerRequest; 12 | -------------------------------------------------------------------------------- /ledger/src/entry_notifier_interface.rs: -------------------------------------------------------------------------------- 1 | use {solana_clock::Slot, solana_entry::entry::EntrySummary, std::sync::Arc}; 2 | 3 | pub trait EntryNotifier { 4 | fn notify_entry( 5 | &self, 6 | slot: Slot, 7 | index: usize, 8 | entry: &EntrySummary, 9 | starting_transaction_index: usize, 10 | ); 11 | } 12 | 13 | pub type EntryNotifierArc = Arc; 14 | -------------------------------------------------------------------------------- /votor-messages/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Alpenglow vote message types 2 | #![cfg_attr(feature = "frozen-abi", feature(min_specialization))] 3 | #![deny(missing_docs)] 4 | 5 | pub mod consensus_message; 6 | pub mod fraction; 7 | pub mod migration; 8 | pub mod reward_certificate; 9 | pub mod vote; 10 | 11 | #[cfg_attr(feature = "frozen-abi", macro_use)] 12 | #[cfg(feature = "frozen-abi")] 13 | extern crate solana_frozen_abi_macro; 14 | -------------------------------------------------------------------------------- /cost-model/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(feature = "frozen-abi", feature(min_specialization))] 2 | #![allow(clippy::arithmetic_side_effects)] 3 | 4 | pub mod block_cost_limits; 5 | pub mod cost_model; 6 | pub mod cost_tracker; 7 | pub mod cost_tracker_post_analysis; 8 | pub mod transaction_cost; 9 | 10 | #[cfg_attr(feature = "frozen-abi", macro_use)] 11 | #[cfg(feature = "frozen-abi")] 12 | extern crate solana_frozen_abi_macro; 13 | -------------------------------------------------------------------------------- /docs/offline-cmd-md-links.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CLI_USAGE_RELPATH="../cli/usage.md" 4 | 5 | SED_OMIT_NONMATCHING=$'\nt\nd' 6 | SED_CMD="s:^#### solana-(.*):* [\`\\1\`](${CLI_USAGE_RELPATH}#solana-\\1):${SED_OMIT_NONMATCHING}" 7 | 8 | OFFLINE_CMDS=$(grep -E '#### solana-|--signer ' src/cli/usage.md | grep -B1 -- --signer | sed -Ee "$SED_CMD") 9 | 10 | # Omit deprecated 11 | grep -vE '\b(pay)\b' <<<"$OFFLINE_CMDS" 12 | -------------------------------------------------------------------------------- /install/build.rs: -------------------------------------------------------------------------------- 1 | use std::time::SystemTime; 2 | 3 | fn main() { 4 | println!( 5 | "cargo:rustc-env=TARGET={}", 6 | std::env::var("TARGET").unwrap() 7 | ); 8 | println!( 9 | "cargo:rustc-env=BUILD_SECONDS_SINCE_UNIX_EPOCH={}", 10 | SystemTime::now() 11 | .duration_since(SystemTime::UNIX_EPOCH) 12 | .unwrap() 13 | .as_secs(), 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /ci/common/limit-threads.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # limit jobs to 4gb/thread 6 | if [[ -f "/proc/meminfo" ]]; then 7 | JOBS=$(grep MemTotal /proc/meminfo | awk '{printf "%.0f", ($2 / (4 * 1024 * 1024))}') 8 | else 9 | JOBS=$(sysctl hw.memsize | awk '{printf "%.0f", ($2 / (4 * 1024**3))}') 10 | fi 11 | 12 | NPROC=$(nproc) 13 | JOBS=$((JOBS > NPROC ? NPROC : JOBS)) 14 | 15 | export NPROC 16 | export JOBS 17 | -------------------------------------------------------------------------------- /ci/downstream-projects/run-all.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | here="$(dirname "$0")" 5 | 6 | #shellcheck source=ci/downstream-projects/func-spl.sh 7 | source "$here"/func-spl.sh 8 | 9 | #shellcheck source=ci/downstream-projects/func-openbook-dex.sh 10 | source "$here"/func-openbook-dex.sh 11 | 12 | #shellcheck source=ci/downstream-projects/common.sh 13 | source "$here"/common.sh 14 | 15 | _ spl 16 | _ openbook_dex 17 | -------------------------------------------------------------------------------- /ci/format-url.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Formats a URL to be clickable from a Buildkite log 4 | # 5 | 6 | if [[ $# -eq 0 ]]; then 7 | echo "Usage: $0 url" 8 | exit 1 9 | fi 10 | 11 | if [[ -z $BUILDKITE ]]; then 12 | echo "$1" 13 | else 14 | # shellcheck disable=SC2001 15 | URL="$(echo "$1" | sed 's/;/%3b/g')" # Escape ; 16 | 17 | printf '\033]1339;url=' 18 | echo -n "$URL" 19 | printf '\a\n' 20 | fi 21 | -------------------------------------------------------------------------------- /rbpf-cli/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rbpf-cli" 3 | description = "Decommissioned CLI to test and analyze SBF programs" 4 | keywords = ["SBF", "interpreter", "JIT"] 5 | publish = false 6 | version = { workspace = true } 7 | authors = { workspace = true } 8 | repository = { workspace = true } 9 | homepage = { workspace = true } 10 | license = { workspace = true } 11 | edition = { workspace = true } 12 | 13 | [dependencies] 14 | -------------------------------------------------------------------------------- /scripts/dcou-tainted-packages.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # shellcheck disable=SC2034 # This file is intended to be `source`d 4 | declare dcou_tainted_packages=( 5 | agave-ledger-tool 6 | agave-store-histogram 7 | agave-store-tool 8 | solana-accounts-cluster-bench 9 | solana-banking-bench 10 | solana-bench-tps 11 | solana-dos 12 | solana-local-cluster 13 | solana-transaction-dos 14 | solana-vortexor 15 | ) 16 | -------------------------------------------------------------------------------- /vote/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(feature = "frozen-abi", feature(min_specialization))] 2 | #![allow(clippy::arithmetic_side_effects)] 3 | 4 | pub mod vote_account; 5 | pub mod vote_parser; 6 | pub mod vote_state_view; 7 | pub mod vote_transaction; 8 | 9 | #[cfg_attr(feature = "frozen-abi", macro_use)] 10 | #[cfg(feature = "frozen-abi")] 11 | extern crate solana_frozen_abi_macro; 12 | 13 | #[macro_use] 14 | extern crate serde_derive; 15 | -------------------------------------------------------------------------------- /accounts-db/src/io_uring/mod.rs: -------------------------------------------------------------------------------- 1 | #![cfg(target_os = "linux")] 2 | 3 | pub mod dir_remover; 4 | pub mod file_creator; 5 | pub mod memory; 6 | pub mod sequential_file_reader; 7 | 8 | // Based on Linux 9 | const IO_PRIO_CLASS_SHIFT: u16 = 13; 10 | const IO_PRIO_CLASS_BE: u16 = 2; 11 | const IO_PRIO_LEVEL_HIGHEST: u16 = 0; 12 | const IO_PRIO_BE_HIGHEST: u16 = IO_PRIO_CLASS_BE << IO_PRIO_CLASS_SHIFT | IO_PRIO_LEVEL_HIGHEST; 13 | -------------------------------------------------------------------------------- /ci/channel_restriction.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Only proceed if we are on one of the channels passed in, or a tag build 4 | # 5 | 6 | set -ex 7 | 8 | [[ -n $CI_TAG ]] && exit 0 9 | 10 | eval "$(ci/channel-info.sh)" 11 | 12 | for acceptable_channel in "$@"; do 13 | if [[ "$CHANNEL" == "$acceptable_channel" ]]; then 14 | exit 0 15 | fi 16 | done 17 | 18 | echo "Not running from one of the following channels: $*" 19 | exit 1 20 | -------------------------------------------------------------------------------- /ci/common/shared-functions.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | need_to_upload_test_result() { 4 | local branches=( 5 | "$EDGE_CHANNEL" 6 | "$BETA_CHANNEL" 7 | "$STABLE_CHANNEL" 8 | ) 9 | 10 | for n in "${branches[@]}"; do 11 | if [[ "$CI_BRANCH" == "$n" ]]; then 12 | return 0 13 | fi 14 | done 15 | 16 | return 1 17 | } 18 | 19 | exit_if_error() { 20 | if [[ "$1" -ne 0 ]]; then 21 | exit "$1" 22 | fi 23 | } 24 | -------------------------------------------------------------------------------- /curves/curve-traits/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-curve-traits" 3 | description = "Solana Curve Traits" 4 | documentation = "https://docs.rs/solana-curve-traits" 5 | version = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | license = { workspace = true } 10 | edition = { workspace = true } 11 | 12 | [dependencies] 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /programs/sbf/rust/many_args_dep/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-many-args-dep" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [dependencies] 12 | solana-msg = { workspace = true } 13 | solana-program = { workspace = true } 14 | -------------------------------------------------------------------------------- /runtime/src/static_ids.rs: -------------------------------------------------------------------------------- 1 | use { 2 | solana_pubkey::Pubkey, 3 | spl_generic_token::{associated_token_account, token, token_2022}, 4 | }; 5 | 6 | /// Vector of static token & mint IDs 7 | pub static STATIC_IDS: std::sync::LazyLock> = std::sync::LazyLock::new(|| { 8 | vec![ 9 | associated_token_account::id(), 10 | token::id(), 11 | token::native_mint::id(), 12 | token_2022::id(), 13 | ] 14 | }); 15 | -------------------------------------------------------------------------------- /zk-token-sdk/src/instruction/batched_grouped_ciphertext_validity/mod.rs: -------------------------------------------------------------------------------- 1 | mod handles_2; 2 | mod handles_3; 3 | 4 | pub use { 5 | handles_2::{ 6 | BatchedGroupedCiphertext2HandlesValidityProofContext, 7 | BatchedGroupedCiphertext2HandlesValidityProofData, 8 | }, 9 | handles_3::{ 10 | BatchedGroupedCiphertext3HandlesValidityProofContext, 11 | BatchedGroupedCiphertext3HandlesValidityProofData, 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /core/src/banking_stage/transaction_scheduler/batch_id_generator.rs: -------------------------------------------------------------------------------- 1 | use crate::banking_stage::scheduler_messages::TransactionBatchId; 2 | 3 | #[derive(Default)] 4 | pub struct BatchIdGenerator { 5 | next_id: u64, 6 | } 7 | 8 | impl BatchIdGenerator { 9 | pub fn next(&mut self) -> TransactionBatchId { 10 | let id = self.next_id; 11 | self.next_id = self.next_id.wrapping_sub(1); 12 | TransactionBatchId::new(id) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /remote-wallet/README.md: -------------------------------------------------------------------------------- 1 | Solana Remote Wallet 2 | === 3 | 4 | Library for interacting with "remote" wallets, meaning any wallet where the private key bytes are not directly available, 5 | such as Ledger devices. 6 | 7 | ## Ledger udev-rules 8 | 9 | In order to use a Ledger device on Linux machines, users must apply certain udev rules. These are available at the 10 | [udev-rules repository](https://github.com/LedgerHQ/udev-rules) maintained by the Ledger team. 11 | -------------------------------------------------------------------------------- /account-decoder/src/validator_info.rs: -------------------------------------------------------------------------------- 1 | pub const MAX_SHORT_FIELD_LENGTH: usize = 80; 2 | pub const MAX_LONG_FIELD_LENGTH: usize = 300; 3 | /// Maximum size of validator configuration data (`ValidatorInfo`). 4 | pub const MAX_VALIDATOR_INFO: u64 = 576; 5 | 6 | solana_pubkey::declare_id!("Va1idator1nfo111111111111111111111111111111"); 7 | 8 | #[derive(Debug, Deserialize, PartialEq, Eq, Serialize, Default)] 9 | pub struct ValidatorInfo { 10 | pub info: String, 11 | } 12 | -------------------------------------------------------------------------------- /clap-v3-utils/src/memo.rs: -------------------------------------------------------------------------------- 1 | use {crate::ArgConstant, clap::Arg}; 2 | 3 | pub const MEMO_ARG: ArgConstant<'static> = ArgConstant { 4 | name: "memo", 5 | long: "--with-memo", 6 | help: "Specify a memo string to include in the transaction.", 7 | }; 8 | 9 | pub fn memo_arg<'a>() -> Arg<'a> { 10 | Arg::new(MEMO_ARG.name) 11 | .long(MEMO_ARG.long) 12 | .takes_value(true) 13 | .value_name("MEMO") 14 | .help(MEMO_ARG.help) 15 | } 16 | -------------------------------------------------------------------------------- /.buildkite/pipeline-upload.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This script is used to upload the full buildkite pipeline. The steps defined 4 | # in the buildkite UI should simply be: 5 | # 6 | # steps: 7 | # - command: ".buildkite/pipeline-upload.sh" 8 | # 9 | 10 | set -e 11 | cd "$(dirname "$0")"/.. 12 | source ci/_ 13 | 14 | _ ci/buildkite-pipeline.sh pipeline.yml 15 | echo +++ pipeline 16 | cat pipeline.yml 17 | 18 | _ buildkite-agent pipeline upload pipeline.yml 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/1-core-contributor.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Core Contributor Issue 3 | about: Create a report describing a problem and a proposed solution 4 | title: '' 5 | assignees: '' 6 | --- 7 | 8 | #### Problem 9 | 14 | 15 | #### Proposed Solution 16 | -------------------------------------------------------------------------------- /.github/scripts/install-proto.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | os_name="$1" 6 | 7 | case "$os_name" in 8 | "Windows") 9 | choco install protoc 10 | export PROTOC='C:\ProgramData\chocolatey\lib\protoc\tools\bin\protoc.exe' 11 | ;; 12 | "macOS") 13 | brew install protobuf 14 | ;; 15 | "Linux") 16 | if grep "Alpine" /etc/os-release ; then 17 | apk add protoc 18 | fi 19 | ;; 20 | *) 21 | echo "Unknown Operating System" 22 | ;; 23 | esac 24 | -------------------------------------------------------------------------------- /platform-tools-sdk/cargo-build-sbf/tests/crates/noop/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Example Rust-based SBF noop program 2 | 3 | use { 4 | solana_account_info::AccountInfo, solana_program_error::ProgramResult, solana_pubkey::Pubkey, 5 | }; 6 | 7 | solana_program_entrypoint::entrypoint!(process_instruction); 8 | fn process_instruction( 9 | _program_id: &Pubkey, 10 | _accounts: &[AccountInfo], 11 | _instruction_data: &[u8], 12 | ) -> ProgramResult { 13 | Ok(()) 14 | } 15 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/scripts/package.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -ex 3 | 4 | cd "$(dirname "$0")"/../../.. 5 | 6 | echo --- Creating sbf-sdk tarball 7 | 8 | rm -rf sbf-sdk.tar.bz2 sbf-sdk/ 9 | mkdir sbf-sdk/ 10 | cp LICENSE sbf-sdk/ 11 | 12 | ( 13 | ci/crate-version.sh platform-tools-sdk/cargo-build-sbf/Cargo.toml 14 | git rev-parse HEAD 15 | ) > sbf-sdk/version.txt 16 | 17 | cp -a platform-tools-sdk/sbf/* sbf-sdk/ 18 | 19 | tar jvcf sbf-sdk.tar.bz2 sbf-sdk/ 20 | -------------------------------------------------------------------------------- /programs/sbf/c/src/noop++/noop++.cc: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief Example C++ based SBF program that prints out the parameters 3 | * passed to it 4 | */ 5 | #include 6 | 7 | extern uint64_t entrypoint(const uint8_t *input) { 8 | SolAccountInfo ka[1]; 9 | SolParameters params = (SolParameters) { .ka = ka }; 10 | 11 | if (!sol_deserialize(input, ¶ms, SOL_ARRAY_SIZE(ka))) { 12 | return ERROR_INVALID_ARGUMENT; 13 | } 14 | 15 | return SUCCESS; 16 | } 17 | -------------------------------------------------------------------------------- /programs/sbf/c/src/noop/noop.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief Example C based SBF program that prints out the parameters 3 | * passed to it 4 | */ 5 | #include 6 | 7 | 8 | extern uint64_t entrypoint(const uint8_t *input) { 9 | SolAccountInfo ka[1]; 10 | SolParameters params = (SolParameters) { .ka = ka }; 11 | 12 | if (!sol_deserialize(input, ¶ms, SOL_ARRAY_SIZE(ka))) { 13 | return ERROR_INVALID_ARGUMENT; 14 | } 15 | 16 | return SUCCESS; 17 | } 18 | -------------------------------------------------------------------------------- /scripts/fd-monitor.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Reports open file descriptors for the current user 4 | # 5 | set -e 6 | 7 | [[ $(uname) == Linux ]] || exit 0 8 | 9 | cd "$(dirname "$0")" 10 | 11 | # shellcheck source=scripts/configure-metrics.sh 12 | source configure-metrics.sh 13 | 14 | while true; do 15 | count=$(lsof -u $UID | wc -l) 16 | ./metrics-write-datapoint.sh "open-files,hostname=$HOSTNAME count=$count" 17 | sleep 10 18 | done 19 | 20 | exit 1 21 | -------------------------------------------------------------------------------- /system-test/testnet-automation-json-parser-missing.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys, json 3 | 4 | data=json.load(sys.stdin) 5 | 6 | # this code is designed for influx queries where 'no data' means 0 7 | if 'results' in data: 8 | for result in data['results']: 9 | val = "0" 10 | if 'series' in result: 11 | val = str(result['series'][0]['values'][0][1]) 12 | print(val) 13 | else: 14 | print("No results returned from CURL request") 15 | -------------------------------------------------------------------------------- /.buildkite/solana-private.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This script is used to upload the full buildkite pipeline. The steps defined 4 | # in the buildkite UI should simply be: 5 | # 6 | # steps: 7 | # - command: ".buildkite/pipeline-upload.sh" 8 | # 9 | 10 | set -e 11 | cd "$(dirname "$0")"/.. 12 | source ci/_ 13 | 14 | _ ci/buildkite-solana-private.sh pipeline.yml 15 | echo +++ pipeline 16 | cat pipeline.yml 17 | 18 | _ buildkite-agent pipeline upload pipeline.yml 19 | -------------------------------------------------------------------------------- /accounts-db/src/accounts_hash.rs: -------------------------------------------------------------------------------- 1 | use solana_lattice_hash::lt_hash::LtHash; 2 | 3 | /// Lattice hash of an account 4 | #[derive(Debug, Clone, Eq, PartialEq)] 5 | pub struct AccountLtHash(pub LtHash); 6 | 7 | /// The AccountLtHash for a zero-lamport account 8 | pub const ZERO_LAMPORT_ACCOUNT_LT_HASH: AccountLtHash = AccountLtHash(LtHash::identity()); 9 | 10 | /// Lattice hash of all accounts 11 | #[derive(Debug, Clone, Eq, PartialEq)] 12 | pub struct AccountsLtHash(pub LtHash); 13 | -------------------------------------------------------------------------------- /ci/stable/run-all.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail 3 | 4 | here="$(dirname "$0")" 5 | 6 | #shellcheck source=ci/common/shared-functions.sh 7 | source "$here"/../common/shared-functions.sh 8 | 9 | #shellcheck source=ci/common/limit-threads.sh 10 | source "$here"/../common/limit-threads.sh 11 | 12 | #shellcheck source=ci/stable/common.sh 13 | source "$here"/common.sh 14 | 15 | _ ci/intercept.sh cargo test --jobs "$JOBS" --workspace --tests --verbose -- --nocapture 16 | -------------------------------------------------------------------------------- /clap-utils/src/memo.rs: -------------------------------------------------------------------------------- 1 | use {crate::ArgConstant, clap::Arg}; 2 | 3 | pub const MEMO_ARG: ArgConstant<'static> = ArgConstant { 4 | name: "memo", 5 | long: "--with-memo", 6 | help: "Specify a memo string to include in the transaction.", 7 | }; 8 | 9 | pub fn memo_arg<'a, 'b>() -> Arg<'a, 'b> { 10 | Arg::with_name(MEMO_ARG.name) 11 | .long(MEMO_ARG.long) 12 | .takes_value(true) 13 | .value_name("MEMO") 14 | .help(MEMO_ARG.help) 15 | } 16 | -------------------------------------------------------------------------------- /measure/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-measure" 3 | description = "Blockchain, Rebuilt for Scale" 4 | documentation = "https://docs.rs/solana-measure" 5 | readme = "../README.md" 6 | version = { workspace = true } 7 | authors = { workspace = true } 8 | repository = { workspace = true } 9 | homepage = { workspace = true } 10 | license = { workspace = true } 11 | edition = { workspace = true } 12 | 13 | [package.metadata.docs.rs] 14 | targets = ["x86_64-unknown-linux-gnu"] 15 | -------------------------------------------------------------------------------- /platform-tools-sdk/cargo-build-sbf/tests/crates/workspace-metadata/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Example Rust-based SBF noop program 2 | 3 | use { 4 | solana_account_info::AccountInfo, solana_program_error::ProgramResult, solana_pubkey::Pubkey, 5 | }; 6 | 7 | solana_program_entrypoint::entrypoint!(process_instruction); 8 | fn process_instruction( 9 | _program_id: &Pubkey, 10 | _accounts: &[AccountInfo], 11 | _instruction_data: &[u8], 12 | ) -> ProgramResult { 13 | Ok(()) 14 | } 15 | -------------------------------------------------------------------------------- /platform-tools-sdk/gen-headers/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "gen-headers" 3 | publish = false 4 | version = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [[bin]] 12 | name = "gen-headers" 13 | path = "src/main.rs" 14 | 15 | [dependencies] 16 | log = { workspace = true, features = ["std"] } 17 | regex = { workspace = true } 18 | -------------------------------------------------------------------------------- /programs/sbf/c/src/struct_pass/struct_pass.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | struct foo {const uint8_t *input;}; 4 | void foo(const uint8_t *input, struct foo foo) ; 5 | 6 | extern uint64_t entrypoint(const uint8_t *input) { 7 | struct foo f; 8 | f.input = input; 9 | foo(input, f); 10 | return SUCCESS; 11 | } 12 | 13 | void foo(const uint8_t *input, struct foo foo) { 14 | sol_log_64(0, 0, 0, (uint64_t)input, (uint64_t)foo.input); 15 | sol_assert(input == foo.input); 16 | } 17 | -------------------------------------------------------------------------------- /svm/tests/example-programs/hello-solana/src/lib.rs: -------------------------------------------------------------------------------- 1 | use { 2 | solana_account_info::AccountInfo, solana_msg::msg, solana_program_entrypoint::entrypoint, 3 | solana_program_error::ProgramResult, solana_pubkey::Pubkey, 4 | }; 5 | 6 | entrypoint!(process_instruction); 7 | 8 | fn process_instruction( 9 | _program_id: &Pubkey, 10 | _accounts: &[AccountInfo], 11 | _instruction_data: &[u8], 12 | ) -> ProgramResult { 13 | msg!("Hello, Solana!"); 14 | 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /zk-token-sdk/src/instruction/errors.rs: -------------------------------------------------------------------------------- 1 | #[cfg(not(target_os = "solana"))] 2 | use thiserror::Error; 3 | 4 | #[derive(Error, Clone, Debug, Eq, PartialEq)] 5 | #[cfg(not(target_os = "solana"))] 6 | pub enum InstructionError { 7 | #[error("decryption error")] 8 | Decryption, 9 | #[error("missing ciphertext")] 10 | MissingCiphertext, 11 | #[error("illegal amount bit length")] 12 | IllegalAmountBitLength, 13 | #[error("arithmetic overflow")] 14 | Overflow, 15 | } 16 | -------------------------------------------------------------------------------- /ledger/proptest-regressions/blockstore_meta.txt: -------------------------------------------------------------------------------- 1 | # Seeds for failure cases proptest has generated in the past. It is 2 | # automatically read and these particular cases re-run before any 3 | # novel cases are generated. 4 | # 5 | # It is recommended to check this file in to source control so that 6 | # everyone who runs the test benefits from these saved cases. 7 | cc d28b14f167a3950cfc2a5b82dff1e15c65e9ac23a5c249f812e69af96c3489ed # shrinks to coding_indices = 0..0, data_indices = 2984..15152, slot = 0 8 | -------------------------------------------------------------------------------- /svm-transaction/src/svm_transaction/sanitized_transaction.rs: -------------------------------------------------------------------------------- 1 | use { 2 | crate::svm_transaction::SVMTransaction, solana_signature::Signature, 3 | solana_transaction::sanitized::SanitizedTransaction, 4 | }; 5 | 6 | impl SVMTransaction for SanitizedTransaction { 7 | fn signature(&self) -> &Signature { 8 | SanitizedTransaction::signature(self) 9 | } 10 | 11 | fn signatures(&self) -> &[Signature] { 12 | SanitizedTransaction::signatures(self) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /version/build.rs: -------------------------------------------------------------------------------- 1 | use std::process::Command; 2 | 3 | fn main() { 4 | if let Ok(git_output) = Command::new("git").args(["rev-parse", "HEAD"]).output() { 5 | if git_output.status.success() { 6 | if let Ok(git_commit_hash) = String::from_utf8(git_output.stdout) { 7 | let trimmed_hash = git_commit_hash.trim().to_string(); 8 | println!("cargo:rustc-env=AGAVE_GIT_COMMIT_HASH={trimmed_hash}"); 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /programs/sbf/rust/dep_crate/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-dep-crate" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | byteorder = { workspace = true } 16 | solana-program-entrypoint = { workspace = true } 17 | -------------------------------------------------------------------------------- /programs/sbf/rust/invoked_dep/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-invoked-dep" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [dependencies] 12 | solana-instruction = { workspace = true } 13 | solana-pubkey = { workspace = true } 14 | 15 | [lib] 16 | crate-type = ["lib"] 17 | -------------------------------------------------------------------------------- /programs/sbf/rust/realloc_dep/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-realloc-dep" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [dependencies] 12 | solana-instruction = { workspace = true } 13 | solana-pubkey = { workspace = true } 14 | 15 | [lib] 16 | crate-type = ["lib"] 17 | -------------------------------------------------------------------------------- /svm-measure/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-svm-measure" 3 | description = "Timing measurement utilities for SVM" 4 | documentation = "https://docs.rs/solana-svm-measure" 5 | readme = "../README.md" 6 | version = { workspace = true } 7 | authors = { workspace = true } 8 | repository = { workspace = true } 9 | homepage = { workspace = true } 10 | license = { workspace = true } 11 | edition = { workspace = true } 12 | 13 | [package.metadata.docs.rs] 14 | targets = ["x86_64-unknown-linux-gnu"] 15 | -------------------------------------------------------------------------------- /svm-rent-calculator/src/rent_state.rs: -------------------------------------------------------------------------------- 1 | //! Account rent state. 2 | 3 | /// Rent state of a Solana account. 4 | #[derive(Debug, PartialEq, Eq)] 5 | pub enum RentState { 6 | /// account.lamports == 0 7 | Uninitialized, 8 | /// 0 < account.lamports < rent-exempt-minimum 9 | RentPaying { 10 | lamports: u64, // account.lamports() 11 | data_size: usize, // account.data().len() 12 | }, 13 | /// account.lamports >= rent-exempt-minimum 14 | RentExempt, 15 | } 16 | -------------------------------------------------------------------------------- /.github/scripts/purge-ubuntu-runner.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | sudo rm -rf /usr/share/dotnet 4 | sudo rm -rf /usr/share/swift 5 | sudo rm -rf /usr/share/mysql 6 | sudo rm -rf /usr/share/az_* 7 | sudo rm -rf /usr/share/postgresql-common 8 | 9 | sudo rm -rf /opt/ghc 10 | sudo rm -rf /opt/az 11 | sudo rm -rf /opt/pipx 12 | sudo rm -rf /opt/microsoft 13 | sudo rm -rf /opt/google 14 | sudo rm -rf /opt/hostedtoolcache 15 | 16 | sudo rm -rf /usr/local/lib/android 17 | sudo rm -rf /usr/local/lib/heroku 18 | -------------------------------------------------------------------------------- /install/install-help.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | cd "$(dirname "$0")"/.. 5 | cargo="$(readlink -f "./cargo")" 6 | 7 | "$cargo" build --package agave-install 8 | export PATH=$PWD/target/debug:$PATH 9 | 10 | echo "\`\`\`manpage" 11 | agave-install --help 12 | echo "\`\`\`" 13 | echo "" 14 | 15 | commands=(init info deploy update run) 16 | 17 | for x in "${commands[@]}"; do 18 | echo "\`\`\`manpage" 19 | agave-install "${x}" --help 20 | echo "\`\`\`" 21 | echo "" 22 | done 23 | -------------------------------------------------------------------------------- /platform-tools-sdk/cargo-build-sbf/tests/crates/fail/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Example Rust-based SBF noop program 2 | 3 | use { 4 | solana_account_info::AccountInfo, solana_program_error::ProgramResult, solana_pubkey::Pubkey, 5 | }; 6 | 7 | solana_program_entrypoint::entrypoint!(process_instruction); 8 | fn process_instruction( 9 | _program_id: &Pubkey, 10 | _accounts: &[AccountInfo], 11 | _instruction_data: &[u8], 12 | ) -> ProgramResult { 13 | // error to make build fail: no return value 14 | } 15 | -------------------------------------------------------------------------------- /programs/bpf_loader/test_elfs/src/noop_aligned/noop_aligned.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief Example C based SBF program that prints out the parameters 3 | * passed to it 4 | */ 5 | #include 6 | 7 | 8 | extern uint64_t entrypoint(const uint8_t *input) { 9 | SolAccountInfo ka[2]; 10 | SolParameters params = (SolParameters) { .ka = ka }; 11 | 12 | if (!sol_deserialize(input, ¶ms, SOL_ARRAY_SIZE(ka))) { 13 | return ERROR_INVALID_ARGUMENT; 14 | } 15 | 16 | return SUCCESS; 17 | } 18 | -------------------------------------------------------------------------------- /scripts/ulimit-n.sh: -------------------------------------------------------------------------------- 1 | # |source| this file 2 | # 3 | # Adjust the maximum number of files that may be opened to as large as possible. 4 | # 5 | 6 | maxOpenFds=65000 7 | 8 | if [[ $(ulimit -n) -lt $maxOpenFds ]]; then 9 | ulimit -n $maxOpenFds 2>/dev/null || { 10 | echo "Error: nofiles too small: $(ulimit -n). Failed to run \"ulimit -n $maxOpenFds\""; 11 | if [[ $(uname) = Darwin ]]; then 12 | echo "Try running |sudo launchctl limit maxfiles 65536 200000| first" 13 | fi 14 | } 15 | fi 16 | -------------------------------------------------------------------------------- /cargo-build-sbf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | here=$(dirname "$0") 4 | 5 | maybe_sbf_sdk="--sbf-sdk $here/platform-tools-sdk/sbf" 6 | for a in "$@"; do 7 | if [[ $a = --sbf-sdk ]]; then 8 | maybe_sbf_sdk= 9 | fi 10 | done 11 | 12 | set -ex 13 | if [[ ! -f "$here"/platform-tools-sdk/sbf/syscalls.txt ]]; then 14 | cargo build --manifest-path "$here"/syscalls/gen-syscall-list/Cargo.toml 15 | fi 16 | exec cargo run --manifest-path "$here"/platform-tools-sdk/cargo-build-sbf/Cargo.toml -- $maybe_sbf_sdk "$@" 17 | -------------------------------------------------------------------------------- /connection-cache/src/nonblocking/client_connection.rs: -------------------------------------------------------------------------------- 1 | //! Trait defining async send functions, to be used for UDP or QUIC sending 2 | 3 | use {async_trait::async_trait, solana_transaction_error::TransportResult, std::net::SocketAddr}; 4 | 5 | #[async_trait] 6 | pub trait ClientConnection { 7 | fn server_addr(&self) -> &SocketAddr; 8 | 9 | async fn send_data(&self, buffer: &[u8]) -> TransportResult<()>; 10 | 11 | async fn send_data_batch(&self, buffers: &[Vec]) -> TransportResult<()>; 12 | } 13 | -------------------------------------------------------------------------------- /programs/vote/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(feature = "frozen-abi", feature(min_specialization))] 2 | 3 | pub mod vote_processor; 4 | pub mod vote_state; 5 | 6 | #[cfg_attr(feature = "metrics", macro_use)] 7 | #[cfg(feature = "metrics")] 8 | extern crate solana_metrics; 9 | 10 | #[cfg(feature = "frozen-abi")] 11 | extern crate solana_frozen_abi_macro; 12 | 13 | pub use solana_vote_interface::{ 14 | authorized_voters, error as vote_error, instruction as vote_instruction, 15 | program::{check_id, id}, 16 | }; 17 | -------------------------------------------------------------------------------- /rpc-client/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | 3 | pub mod http_sender; 4 | pub mod mock_sender; 5 | pub mod nonblocking; 6 | pub mod rpc_client; 7 | pub mod rpc_sender; 8 | pub mod spinner; 9 | 10 | pub mod mock_sender_for_cli { 11 | /// Magic `SIGNATURE` value used by `solana-cli` unit tests. 12 | /// Please don't use this constant. 13 | pub const SIGNATURE: &str = 14 | "43yNSFC6fYTuPgTNFFhF4axw7AfWxB2BPdurme8yrsWEYwm8299xh8n6TAHjGymiSub1XtyxTNyd9GBfY2hxoBw8"; 15 | } 16 | -------------------------------------------------------------------------------- /cli-output/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | mod cli_output; 3 | pub mod cli_version; 4 | pub mod display; 5 | pub use cli_output::*; 6 | 7 | pub trait QuietDisplay: std::fmt::Display { 8 | fn write_str(&self, w: &mut dyn std::fmt::Write) -> std::fmt::Result { 9 | write!(w, "{self}") 10 | } 11 | } 12 | 13 | pub trait VerboseDisplay: std::fmt::Display { 14 | fn write_str(&self, w: &mut dyn std::fmt::Write) -> std::fmt::Result { 15 | write!(w, "{self}") 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /fee/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-fee" 3 | description = "Solana fee calculation" 4 | documentation = "https://docs.rs/solana-fee" 5 | version = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | license = { workspace = true } 10 | edition = { workspace = true } 11 | 12 | [dependencies] 13 | agave-feature-set = { workspace = true } 14 | solana-fee-structure = { workspace = true } 15 | solana-svm-transaction = { workspace = true } 16 | -------------------------------------------------------------------------------- /send-transaction-service/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | pub mod send_transaction_service; 3 | pub mod send_transaction_service_stats; 4 | #[cfg(any(test, feature = "dev-context-only-utils"))] 5 | pub mod test_utils; 6 | pub mod tpu_info; 7 | pub mod transaction_client; 8 | 9 | pub use { 10 | send_transaction_service_stats::SendTransactionServiceStats, 11 | transaction_client::{CurrentLeaderInfo, LEADER_INFO_REFRESH_RATE_MS}, 12 | }; 13 | 14 | #[macro_use] 15 | extern crate solana_metrics; 16 | -------------------------------------------------------------------------------- /accounts-db/store-histogram/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "agave-store-histogram" 3 | description = "Tool to calculate account storage histogram" 4 | publish = false 5 | version = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | license = { workspace = true } 10 | edition = { workspace = true } 11 | 12 | [features] 13 | dev-context-only-utils = [] 14 | 15 | [dependencies] 16 | clap = { workspace = true } 17 | solana-version = { workspace = true } 18 | -------------------------------------------------------------------------------- /svm-log-collector/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-svm-log-collector" 3 | description = "Solana log collector" 4 | documentation = "https://docs.rs/solana-svm-log-collector" 5 | version = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | license = { workspace = true } 10 | edition = { workspace = true } 11 | 12 | [package.metadata.docs.rs] 13 | targets = ["x86_64-unknown-linux-gnu"] 14 | 15 | [dependencies] 16 | log = { workspace = true } 17 | -------------------------------------------------------------------------------- /ci/downstream-projects/common.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | source ci/_ 5 | source ci/semver_bash/semver.sh 6 | source scripts/patch-crates.sh 7 | source scripts/read-cargo-variable.sh 8 | 9 | SOLANA_VER=$(readCargoVariable version Cargo.toml) 10 | export SOLANA_VER 11 | export SOLANA_DIR=$PWD 12 | export CARGO="$SOLANA_DIR"/cargo 13 | export CARGO_BUILD_SBF="$SOLANA_DIR"/cargo-build-sbf 14 | export CARGO_TEST_SBF="$SOLANA_DIR"/cargo-test-sbf 15 | 16 | mkdir -p target/downstream-projects 17 | cd target/downstream-projects 18 | -------------------------------------------------------------------------------- /docker-solana/README.md: -------------------------------------------------------------------------------- 1 | ## Minimal Solana Docker image 2 | This image is automatically updated by CI 3 | 4 | https://hub.docker.com/r/anzaxyz/agave/ 5 | 6 | ### Usage: 7 | Run the latest beta image: 8 | ```bash 9 | $ docker run --rm -p 8899:8899 --ulimit nofile=1000000 anzaxyz/agave:beta 10 | ``` 11 | 12 | Run the latest edge image: 13 | ```bash 14 | $ docker run --rm -p 8899:8899 --ulimit nofile=1000000 anzaxyz/agave:edge 15 | ``` 16 | 17 | Port *8899* is the JSON RPC port, which is used by clients to communicate with the network. 18 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/c/inc/sol/inc/big_mod_exp.inc: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /** 3 | * @brief Solana big_mod_exp system call 4 | **/ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | /** 11 | * Big integer modular exponentiation 12 | * 13 | * @param bytes Pointer to BigModExpParam struct 14 | * @param result 32 byte array to hold the result 15 | * @return 0 if executed successfully 16 | */ 17 | @SYSCALL uint64_t sol_big_mod_exp(const uint8_t *, uint8_t *); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | /**@}*/ 24 | -------------------------------------------------------------------------------- /programs/sbf/rust/iter/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-iter" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | solana-program = { workspace = true } 16 | solana-program-entrypoint = { workspace = true } 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /rpc/src/rpc/account_resolver.rs: -------------------------------------------------------------------------------- 1 | use { 2 | solana_account::AccountSharedData, solana_pubkey::Pubkey, solana_runtime::bank::Bank, 3 | std::collections::HashMap, 4 | }; 5 | 6 | pub(crate) fn get_account_from_overwrites_or_bank( 7 | pubkey: &Pubkey, 8 | bank: &Bank, 9 | overwrite_accounts: Option<&HashMap>, 10 | ) -> Option { 11 | overwrite_accounts 12 | .and_then(|accounts| accounts.get(pubkey).cloned()) 13 | .or_else(|| bank.get_account(pubkey)) 14 | } 15 | -------------------------------------------------------------------------------- /transaction-view/src/transaction_data.rs: -------------------------------------------------------------------------------- 1 | /// Trait for accessing transaction data from an abstract byte container. 2 | pub trait TransactionData { 3 | /// Returns a reference to the serialized transaction data. 4 | fn data(&self) -> &[u8]; 5 | } 6 | 7 | impl TransactionData for &[u8] { 8 | #[inline] 9 | fn data(&self) -> &[u8] { 10 | self 11 | } 12 | } 13 | 14 | impl TransactionData for std::sync::Arc> { 15 | #[inline] 16 | fn data(&self) -> &[u8] { 17 | self.as_ref() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /accounts-db/src/is_loadable.rs: -------------------------------------------------------------------------------- 1 | use crate::is_zero_lamport::IsZeroLamport; 2 | 3 | /// A trait to see if an account is loadable or not. 4 | pub trait IsLoadable { 5 | /// Is this account loadable? 6 | fn is_loadable(&self) -> bool; 7 | } 8 | 9 | impl IsLoadable for T { 10 | fn is_loadable(&self) -> bool { 11 | // Don't ever load zero lamport accounts into runtime because 12 | // the existence of zero-lamport accounts are never deterministic!! 13 | !self.is_zero_lamport() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /banking-stage-ingress-types/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "agave-banking-stage-ingress-types" 3 | description = "Agave banking stage ingress types" 4 | documentation = "https://docs.rs/agave-banking-stage-ingress-types" 5 | version = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | license = { workspace = true } 10 | edition = { workspace = true } 11 | 12 | [dependencies] 13 | crossbeam-channel = { workspace = true } 14 | solana-perf = { workspace = true } 15 | -------------------------------------------------------------------------------- /runtime-transaction/src/instruction_data_len.rs: -------------------------------------------------------------------------------- 1 | use {solana_pubkey::Pubkey, solana_svm_transaction::instruction::SVMInstruction}; 2 | 3 | #[derive(Default)] 4 | pub struct InstructionDataLenBuilder { 5 | value: u16, 6 | } 7 | 8 | impl InstructionDataLenBuilder { 9 | pub fn process_instruction(&mut self, _program_id: &Pubkey, instruction: &SVMInstruction) { 10 | self.value = self.value.saturating_add(instruction.data.len() as u16); 11 | } 12 | 13 | pub fn build(self) -> u16 { 14 | self.value 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.buildkite/scripts/trigger-github-actions-windows-build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | echo "branch: $BUILDKITE_BRANCH" 6 | echo "commit: $BUILDKITE_COMMIT" 7 | 8 | curl -L \ 9 | -X POST \ 10 | -H "Accept: application/vnd.github+json" \ 11 | -H "Authorization: Bearer $GITHUB_TOKEN" \ 12 | -H "X-GitHub-Api-Version: 2022-11-28" \ 13 | https://api.github.com/repos/anza-xyz/agave/actions/workflows/publish-windows-tarball.yml/dispatches \ 14 | -d '{"ref":"'"$BUILDKITE_BRANCH"'","inputs":{"commit":"'"$BUILDKITE_COMMIT"'"}}' 15 | -------------------------------------------------------------------------------- /docs/static/katex/contrib/copy-tex.css: -------------------------------------------------------------------------------- 1 | /* Force selection of entire .katex/.katex-display blocks, so that we can 2 | * copy/paste the entire source code. If you omit this CSS, partial 3 | * selections of a formula will work, but will copy the ugly HTML 4 | * representation instead of the LaTeX source code. (Full selections will 5 | * still produce the LaTeX source code.) 6 | */ 7 | .katex, 8 | .katex-display { 9 | user-select: all; 10 | -moz-user-select: all; 11 | -webkit-user-select: all; 12 | -ms-user-select: all; 13 | } 14 | -------------------------------------------------------------------------------- /programs/sbf/rust/128bit/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-128bit" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | solana-program-entrypoint = { workspace = true } 16 | solana-sbf-rust-128bit-dep = { workspace = true } 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /ci/docker/README.md: -------------------------------------------------------------------------------- 1 | Docker image containing rust, rust nightly and some preinstalled packages used in CI 2 | 3 | This image is manually maintained: 4 | 5 | #### CLI 6 | 7 | 1. Edit 8 | 1. `ci/rust-version.sh` for rust and rust nightly version 9 | 2. `ci/docker/env.sh` for some environment variables 10 | 3. `ci/docker/Dockerfile` for some other packages 11 | 2. Ensure you're a member of the [Anza Docker Hub Organization](https://hub.docker.com/u/anzaxyz) and already `docker login` 12 | 3. Run `ci/docker/build.sh` to build/publish the new image 13 | -------------------------------------------------------------------------------- /programs/sbf/rust/membuiltins/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-membuiltins" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | solana-program-entrypoint = { workspace = true } 16 | solana-sbf-rust-mem-dep = { workspace = true } 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /programs/sbf/rust/rand/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Example Rust-based SBF program that tests rand behavior 2 | 3 | #![allow(unreachable_code)] 4 | 5 | use { 6 | solana_account_info::AccountInfo, solana_msg::msg, solana_program_error::ProgramResult, 7 | solana_pubkey::Pubkey, 8 | }; 9 | 10 | solana_program_entrypoint::entrypoint_no_alloc!(process_instruction); 11 | fn process_instruction( 12 | _program_id: &Pubkey, 13 | _accounts: &[AccountInfo], 14 | _instruction_data: &[u8], 15 | ) -> ProgramResult { 16 | msg!("rand"); 17 | Ok(()) 18 | } 19 | -------------------------------------------------------------------------------- /net/scripts/network-config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -ex 3 | 4 | [[ $(uname) = Linux ]] || exit 1 5 | [[ $USER = root ]] || exit 1 6 | 7 | sudo sysctl -w net.core.rmem_max=134217728 8 | 9 | sudo sysctl -w net.core.wmem_max=134217728 10 | 11 | # Increase memory mapped files limit 12 | sudo sysctl -w vm.max_map_count=1000000 13 | 14 | # Increase number of allowed open file descriptors 15 | echo "* - nofile 1000000" | sudo tee -a /etc/security/limits.conf 16 | 17 | echo "MaxAuthTries 60" | sudo tee -a /etc/ssh/sshd_config 18 | sudo systemctl restart ssh 19 | -------------------------------------------------------------------------------- /programs/bpf_loader/test_elfs/src/noop_unaligned/noop_unaligned.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief Example C based SBF program that prints out the parameters 3 | * passed to it 4 | */ 5 | 6 | #include 7 | #include 8 | 9 | extern uint64_t entrypoint(const uint8_t *input) { 10 | SolAccountInfo ka[2]; 11 | SolParameters params = (SolParameters) { .ka = ka }; 12 | 13 | if (!sol_deserialize_deprecated(input, ¶ms, SOL_ARRAY_SIZE(ka))) { 14 | return ERROR_INVALID_ARGUMENT; 15 | } 16 | 17 | return SUCCESS; 18 | } 19 | -------------------------------------------------------------------------------- /platform-tools-sdk/cargo-build-sbf/tests/crates/package-metadata/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Example Rust-based SBF noop program 2 | 3 | use { 4 | solana_account_info::AccountInfo, solana_program_error::ProgramResult, solana_pubkey::Pubkey, 5 | }; 6 | 7 | solana_package_metadata::declare_id_with_package_metadata!("solana.program-id"); 8 | solana_program_entrypoint::entrypoint!(process_instruction); 9 | fn process_instruction( 10 | _program_id: &Pubkey, 11 | _accounts: &[AccountInfo], 12 | _instruction_data: &[u8], 13 | ) -> ProgramResult { 14 | Ok(()) 15 | } 16 | -------------------------------------------------------------------------------- /bls-cert-verify/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! This crate implements the Alpenglow certificate verification logic. 2 | //! 3 | //! It is shared between at least: 4 | //! - The BLS Sigverifier 5 | //! - The Verification for Certs in Block Markers (from runtime) 6 | //! 7 | //! It can verify votor-messages signed with BLS keys, or just pure bitmaps 8 | //! conforming to create solana-signer-store format. 9 | //! It also checks the aggregate stake if a given threshold is given. 10 | //! To make the dependencies lighter, stake distribution should be passed in. 11 | 12 | pub mod cert_verify; 13 | -------------------------------------------------------------------------------- /multinode-demo/faucet.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Starts an instance of solana-faucet 4 | # 5 | here=$(dirname "$0") 6 | 7 | # shellcheck source=multinode-demo/common.sh 8 | source "$here"/common.sh 9 | 10 | [[ -f "$SOLANA_CONFIG_DIR"/faucet.json ]] || { 11 | echo "$SOLANA_CONFIG_DIR/faucet.json not found, create it by running:" 12 | echo 13 | echo " ${here}/setup.sh" 14 | exit 1 15 | } 16 | 17 | set -x 18 | # shellcheck disable=SC2086 # Don't want to double quote $solana_faucet 19 | exec $solana_faucet --keypair "$SOLANA_CONFIG_DIR"/faucet.json "$@" 20 | -------------------------------------------------------------------------------- /programs/sbf/rust/noop/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Example Rust-based SBF noop program 2 | 3 | use { 4 | solana_account_info::AccountInfo, solana_program_error::ProgramResult, solana_pubkey::Pubkey, 5 | }; 6 | 7 | // This program intentionally uses `entrypoint!` instead of `entrypoint_no_alloc!` 8 | // to handle any number of accounts. 9 | solana_program_entrypoint::entrypoint!(process_instruction); 10 | fn process_instruction( 11 | _program_id: &Pubkey, 12 | _accounts: &[AccountInfo], 13 | _instruction_data: &[u8], 14 | ) -> ProgramResult { 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /ledger-tool/src/ledger_path.rs: -------------------------------------------------------------------------------- 1 | use std::{ 2 | fs, 3 | path::{Path, PathBuf}, 4 | process::exit, 5 | }; 6 | 7 | pub const LEDGER_TOOL_DIRECTORY: &str = "ledger_tool"; 8 | 9 | // Canonicalize ledger path to avoid issues with symlink creation 10 | pub fn canonicalize_ledger_path(ledger_path: &Path) -> PathBuf { 11 | fs::canonicalize(ledger_path).unwrap_or_else(|err| { 12 | eprintln!( 13 | "Unable to access ledger path '{}': {}", 14 | ledger_path.display(), 15 | err 16 | ); 17 | exit(1); 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /svm-callback/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-svm-callback" 3 | description = "Solana SVM callback" 4 | version = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | readme = false 11 | 12 | [dependencies] 13 | solana-account = { workspace = true } 14 | solana-clock = { workspace = true } 15 | solana-precompile-error = { workspace = true } 16 | solana-pubkey = { workspace = true } 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /transaction-view/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Parsing helpers only need to be public for benchmarks. 2 | #[cfg(feature = "dev-context-only-utils")] 3 | pub mod bytes; 4 | #[cfg(not(feature = "dev-context-only-utils"))] 5 | mod bytes; 6 | 7 | mod address_table_lookup_frame; 8 | mod instructions_frame; 9 | mod message_header_frame; 10 | pub mod resolved_transaction_view; 11 | pub mod result; 12 | mod sanitize; 13 | mod signature_frame; 14 | pub mod static_account_keys_frame; 15 | pub mod transaction_data; 16 | mod transaction_frame; 17 | pub mod transaction_version; 18 | pub mod transaction_view; 19 | -------------------------------------------------------------------------------- /ci/test-verify-packets-gossip.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | here=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) 5 | 6 | if ! git lfs --version &>/dev/null; then 7 | echo "Git LFS is not installed. Please install Git LFS to proceed." 8 | exit 1 9 | fi 10 | 11 | rm -rf "$here"/solana-packets 12 | git clone https://github.com/anza-xyz/solana-packets.git "$here"/solana-packets 13 | GOSSIP_WIRE_FORMAT_PACKETS="$here/solana-packets/GOSSIP_PACKETS" cargo test --package solana-gossip -- wire_format_tests::tests::test_gossip_wire_format --exact --show-output 14 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/c/sbf.ld: -------------------------------------------------------------------------------- 1 | PHDRS 2 | { 3 | text PT_LOAD ; 4 | rodata PT_LOAD ; 5 | data PT_LOAD ; 6 | dynamic PT_DYNAMIC ; 7 | } 8 | 9 | SECTIONS 10 | { 11 | . = SIZEOF_HEADERS; 12 | .text : { *(.text*) } :text 13 | .rodata : { *(.rodata*) } :rodata 14 | .data.rel.ro : { *(.data.rel.ro*) } :rodata 15 | .dynamic : { *(.dynamic) } :dynamic 16 | .dynsym : { *(.dynsym) } :data 17 | .dynstr : { *(.dynstr) } :data 18 | .rel.dyn : { *(.rel.dyn) } :data 19 | /DISCARD/ : { 20 | *(.eh_frame*) 21 | *(.gnu.hash*) 22 | *(.hash*) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /programs/sbf/rust/curve25519/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-curve25519" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | solana-curve25519 = { workspace = true } 16 | solana-msg = { workspace = true } 17 | solana-program-entrypoint = { workspace = true } 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /xdp/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "agave-xdp" 3 | description = "Agave XDP implementation" 4 | version = { workspace = true } 5 | repository = { workspace = true } 6 | homepage = { workspace = true } 7 | license = { workspace = true } 8 | edition = { workspace = true } 9 | publish = true 10 | 11 | [dependencies] 12 | crossbeam-channel = { workspace = true } 13 | libc = { workspace = true } 14 | log = { workspace = true } 15 | thiserror = { workspace = true } 16 | 17 | [target.'cfg(target_os = "linux")'.dependencies] 18 | aya = { workspace = true } 19 | caps = { workspace = true } 20 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/env.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Configures the SBF SDK environment 3 | # 4 | 5 | if [ -z "$sbf_sdk" ]; then 6 | sbf_sdk=. 7 | fi 8 | 9 | # Ensure the sdk is installed 10 | "$sbf_sdk"/scripts/install.sh 11 | 12 | # Use the SDK's version of llvm to build the compiler-builtins for SBF 13 | export CC="$sbf_sdk/dependencies/platform-tools/llvm/bin/clang" 14 | export AR="$sbf_sdk/dependencies/platform-tools/llvm/bin/llvm-ar" 15 | export OBJDUMP="$sbf_sdk/dependencies/platform-tools/llvm/bin/llvm-objdump" 16 | export OBJCOPY="$sbf_sdk/dependencies/platform-tools/llvm/bin/llvm-objcopy" 17 | -------------------------------------------------------------------------------- /perf/benches/recycler.rs: -------------------------------------------------------------------------------- 1 | use { 2 | bencher::{benchmark_group, benchmark_main, Bencher}, 3 | solana_perf::{packet::PacketBatchRecycler, recycler::Recycler}, 4 | }; 5 | 6 | fn bench_recycler(b: &mut Bencher) { 7 | solana_logger::setup(); 8 | 9 | let recycler: PacketBatchRecycler = Recycler::default(); 10 | 11 | for _ in 0..1000 { 12 | let _packet = recycler.allocate(""); 13 | } 14 | 15 | b.iter(move || { 16 | let _packet = recycler.allocate(""); 17 | }); 18 | } 19 | 20 | benchmark_group!(benches, bench_recycler); 21 | benchmark_main!(benches); 22 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | .vercel 11 | /static/img/*.svg 12 | /static/img/*.png 13 | vercel.json 14 | 15 | # use npm and package-lock.json 16 | yarn.lock 17 | 18 | # Misc 19 | .DS_Store 20 | .env 21 | .env.local 22 | .env.development.local 23 | .env.test.local 24 | .env.production.local 25 | 26 | npm-debug.log* 27 | yarn-debug.log* 28 | yarn-error.log* 29 | 30 | # Documentation build artifacts 31 | /html/ 32 | /src/tests.ok 33 | /src/cli/usage.md 34 | /src/.gitbook/assets/*.svg 35 | -------------------------------------------------------------------------------- /docs/src/proposals/snapshot-verification.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Snapshot Verification 3 | --- 4 | 5 | ## Problem 6 | 7 | Snapshot verification of the account states is implemented, but the bank hash of the snapshot which is used to verify is falsifiable. 8 | 9 | ## Solution 10 | 11 | While a validator is processing transactions to catch up to the cluster from the snapshot, use incoming vote transactions and the commitment calculator to confirm that the cluster is indeed building on the snapshotted bank hash. Once a threshold commitment level is reached, accept the snapshot as valid and start voting. 12 | -------------------------------------------------------------------------------- /rayon-threadlimit/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-rayon-threadlimit" 3 | description = "solana-rayon-threadlimit" 4 | documentation = "https://docs.rs/solana-rayon-threadlimit" 5 | readme = "../README.md" 6 | version = { workspace = true } 7 | authors = { workspace = true } 8 | repository = { workspace = true } 9 | homepage = { workspace = true } 10 | license = { workspace = true } 11 | edition = { workspace = true } 12 | 13 | [package.metadata.docs.rs] 14 | targets = ["x86_64-unknown-linux-gnu"] 15 | 16 | [dependencies] 17 | log = { workspace = true } 18 | num_cpus = { workspace = true } 19 | -------------------------------------------------------------------------------- /svm-timings/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-svm-timings" 3 | description = "Solana Execution Timings" 4 | documentation = "https://docs.rs/solana-svm-timings" 5 | version = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | license = { workspace = true } 10 | edition = { workspace = true } 11 | 12 | [package.metadata.docs.rs] 13 | targets = ["x86_64-unknown-linux-gnu"] 14 | 15 | [dependencies] 16 | eager = { workspace = true } 17 | enum-iterator = { workspace = true } 18 | solana-pubkey = { workspace = true } 19 | -------------------------------------------------------------------------------- /svm-type-overrides/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-svm-type-overrides" 3 | description = "Type overrides for specialized testing" 4 | version = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [features] 12 | shuttle-test = ["dep:shuttle"] 13 | executor = ["dep:futures"] 14 | 15 | [dependencies] 16 | futures = { workspace = true, optional = true } 17 | rand = { workspace = true } 18 | shuttle = { workspace = true, optional = true } 19 | -------------------------------------------------------------------------------- /ci/crate-version.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Outputs the current crate version from a given Cargo.toml 4 | # 5 | set -e 6 | 7 | Cargo_toml=$1 8 | [[ -n $Cargo_toml ]] || { 9 | echo "Usage: $0 path/to/Cargo.toml" 10 | exit 0 11 | } 12 | 13 | [[ -r $Cargo_toml ]] || { 14 | echo "Error: unable to read $Cargo_toml" 15 | exit 1 16 | } 17 | 18 | while read -r name equals value _; do 19 | if [[ $name = version && $equals = = ]]; then 20 | echo "${value//\"/}" 21 | exit 0 22 | fi 23 | done < <(cat "$Cargo_toml") 24 | 25 | echo Unable to locate version in Cargo.toml 1>&2 26 | exit 1 27 | -------------------------------------------------------------------------------- /docs/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true 5 | }, 6 | "parser": "babel-eslint", 7 | "rules": { 8 | "strict": 0, 9 | "no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], 10 | "no-trailing-spaces": ["error", { "skipBlankLines": true }] 11 | }, 12 | "settings": { 13 | "react": { 14 | "version": "detect", // React version. "detect" automatically picks the version you have installed. 15 | } 16 | }, 17 | "extends": [ 18 | "eslint:recommended", 19 | "plugin:react/recommended" 20 | ] 21 | } -------------------------------------------------------------------------------- /docs/art/transaction.bob: -------------------------------------------------------------------------------- 1 | 2 | +------------+-----------------------------------------------------+ 3 | | | Message | 4 | | |----------+-------------+-------------+--------------| 5 | | | | | | | 6 | | Signatures | | Account | Recent | | 7 | | | Header | addresses | blockhash | Instructions | 8 | | | | | | | 9 | +------------+----------+-------------+-------------+--------------+ -------------------------------------------------------------------------------- /rpc/src/filter.rs: -------------------------------------------------------------------------------- 1 | use { 2 | solana_account::{AccountSharedData, ReadableAccount}, 3 | solana_rpc_client_api::filter::RpcFilterType, 4 | spl_generic_token::{token::GenericTokenAccount, token_2022::Account}, 5 | }; 6 | 7 | pub fn filter_allows(filter: &RpcFilterType, account: &AccountSharedData) -> bool { 8 | match filter { 9 | RpcFilterType::DataSize(size) => account.data().len() as u64 == *size, 10 | RpcFilterType::Memcmp(compare) => compare.bytes_match(account.data()), 11 | RpcFilterType::TokenAccountState => Account::valid_account_data(account.data()), 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.github/workflows/add-team-to-ghsa.yml: -------------------------------------------------------------------------------- 1 | name: Add Security Team to GHSAs 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: "0 * * * *" 7 | 8 | jobs: 9 | add-team-to-ghsa: 10 | if: github.repository == 'anza-xyz/agave' 11 | runs-on: ubuntu-24.04 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v5 15 | with: 16 | ref: master 17 | - name: Run script 18 | shell: bash 19 | env: 20 | GH_TOKEN: ${{ secrets.GHSA_ADD_SECURITY_INCIDENT_RESPONSE }} 21 | run: | 22 | .github/scripts/add-team-to-ghsa.sh 23 | -------------------------------------------------------------------------------- /.github/workflows/changelog-label.yml: -------------------------------------------------------------------------------- 1 | name: Require changelog entry 2 | 3 | on: 4 | pull_request: 5 | types: [opened, synchronize, reopened, labeled, unlabeled] 6 | 7 | jobs: 8 | check-changelog: 9 | if: contains(github.event.pull_request.labels.*.name, 'changelog') 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v5 14 | with: 15 | fetch-depth: 0 16 | - name: Check if changes to CHANGELOG.md 17 | shell: bash 18 | env: 19 | BASE_REF: ${{ github.event.pull_request.base.ref }} 20 | run: .github/scripts/check-changelog.sh 21 | -------------------------------------------------------------------------------- /programs/sbf/rust/alloc/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-alloc" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | solana-msg = { workspace = true } 16 | solana-program = { workspace = true } 17 | solana-program-entrypoint = { workspace = true } 18 | solana-sysvar = { workspace = true } 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /programs/sbf/rust/param_passing/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-param-passing" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | solana-program = { workspace = true } 16 | solana-program-entrypoint = { workspace = true } 17 | solana-sbf-rust-param-passing-dep = { workspace = true } 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /scripts/oom-score-adj.sh: -------------------------------------------------------------------------------- 1 | # |source| this file 2 | # 3 | # Adjusts the OOM score for the specified process. Linux only 4 | # 5 | # usage: oom_score_adj [pid] [score] 6 | # 7 | oom_score_adj() { 8 | declare pid=$1 9 | declare score=$2 10 | if [[ $(uname) != Linux ]]; then 11 | return 12 | fi 13 | 14 | echo "$score" > "/proc/$pid/oom_score_adj" || true 15 | declare currentScore 16 | currentScore=$(cat "/proc/$pid/oom_score_adj" || true) 17 | if [[ $score != "$currentScore" ]]; then 18 | echo "Failed to set oom_score_adj to $score for pid $pid (current score: $currentScore)" 19 | fi 20 | } 21 | -------------------------------------------------------------------------------- /tokens/src/stake.rs: -------------------------------------------------------------------------------- 1 | use { 2 | crate::{args::StakeArgs, commands::Error}, 3 | solana_rpc_client::rpc_client::RpcClient, 4 | solana_stake_interface::state::StakeStateV2, 5 | }; 6 | 7 | pub fn update_stake_args(client: &RpcClient, args: &mut Option) -> Result<(), Error> { 8 | if let Some(stake_args) = args { 9 | if let Some(sender_args) = &mut stake_args.sender_stake_args { 10 | let rent = client.get_minimum_balance_for_rent_exemption(StakeStateV2::size_of())?; 11 | sender_args.rent_exempt_reserve = Some(rent); 12 | } 13 | } 14 | Ok(()) 15 | } 16 | -------------------------------------------------------------------------------- /core/src/repair/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod ancestor_hashes_service; 2 | pub mod cluster_slot_state_verifier; 3 | pub mod duplicate_repair_status; 4 | pub(crate) mod malicious_repair_handler; 5 | pub mod outstanding_requests; 6 | pub mod packet_threshold; 7 | pub(crate) mod quic_endpoint; 8 | pub mod repair_generic_traversal; 9 | pub mod repair_handler; 10 | pub mod repair_response; 11 | pub mod repair_service; 12 | pub mod repair_weight; 13 | pub mod repair_weighted_traversal; 14 | pub mod request_response; 15 | pub mod result; 16 | pub mod serve_repair; 17 | pub mod serve_repair_service; 18 | pub(crate) mod standard_repair_handler; 19 | -------------------------------------------------------------------------------- /io-uring/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "agave-io-uring" 3 | description = "Agave io_uring wrapper" 4 | documentation = "https://docs.rs/agave-io-uring" 5 | version = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | license = { workspace = true } 10 | edition = { workspace = true } 11 | 12 | [dependencies] 13 | libc = { workspace = true } 14 | log = { workspace = true } 15 | slab = { workspace = true } 16 | smallvec = { workspace = true } 17 | 18 | [target.'cfg(target_os = "linux")'.dependencies] 19 | io-uring = { workspace = true } 20 | -------------------------------------------------------------------------------- /platform-tools-sdk/cargo-build-sbf/tests/crates/fail/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fail" 3 | version = "3.1.0" 4 | description = "Solana SBF test program written in Rust" 5 | authors = ["Anza Maintainers "] 6 | repository = "https://github.com/anza-xyz/agave" 7 | license = "Apache-2.0" 8 | homepage = "https://anza.xyz" 9 | edition = "2021" 10 | publish = false 11 | 12 | [dependencies] 13 | solana-account-info = "=2.3.0" 14 | solana-program-entrypoint = "=2.3.0" 15 | solana-program-error = "=2.2.2" 16 | solana-pubkey = "=2.4.0" 17 | 18 | [lib] 19 | crate-type = ["cdylib"] 20 | 21 | [workspace] 22 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/c/inc/sol/inc/sha.inc: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /** 3 | * @brief Solana sha system call 4 | */ 5 | 6 | #include 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | /** 13 | * Length of a sha256 hash result 14 | */ 15 | #define SHA256_RESULT_LENGTH 32 16 | 17 | /** 18 | * Sha256 19 | * 20 | * @param bytes Array of byte arrays 21 | * @param bytes_len Number of byte arrays 22 | * @param result 32 byte array to hold the result 23 | */ 24 | @SYSCALL uint64_t sol_sha256(const SolBytes *, int, uint8_t *); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | /**@}*/ 31 | -------------------------------------------------------------------------------- /scripts/net-shaper.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Start/Stop network shaper 4 | # 5 | set -e 6 | 7 | [[ $(uname) == Linux ]] || exit 0 8 | 9 | cd "$(dirname "$0")" 10 | 11 | sudo= 12 | if sudo true; then 13 | sudo="sudo -n" 14 | fi 15 | 16 | set -x 17 | 18 | iface="$(ip link show | grep mtu | grep -iv loopback | grep "state UP" | awk 'BEGIN { FS = ": " } ; {print $2}')" 19 | 20 | if [[ "$1" = cleanup ]]; then 21 | $sudo ~solana/.cargo/bin/solana-net-shaper cleanup -f "$2" -s "$3" -p "$4" -i "$iface" 22 | else 23 | $sudo ~solana/.cargo/bin/solana-net-shaper shape -f "$2" -s "$3" -p "$4" -i "$iface" 24 | fi 25 | -------------------------------------------------------------------------------- /storage-bigtable/init-bigtable.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Configures a BigTable instance with the expected tables 4 | # 5 | 6 | set -e 7 | 8 | instance=solana-ledger 9 | 10 | cbt=( 11 | cbt 12 | -instance 13 | "$instance" 14 | ) 15 | if [[ -n $BIGTABLE_EMULATOR_HOST ]]; then 16 | cbt+=(-project emulator) 17 | fi 18 | 19 | for table in blocks entries tx tx-by-addr; do 20 | ( 21 | set -x 22 | "${cbt[@]}" createtable $table 23 | "${cbt[@]}" createfamily $table x 24 | "${cbt[@]}" setgcpolicy $table x maxversions=1 25 | "${cbt[@]}" setgcpolicy $table x maxage=360d 26 | ) 27 | done 28 | -------------------------------------------------------------------------------- /wen-restart/build.rs: -------------------------------------------------------------------------------- 1 | use std::io::Result; 2 | 3 | fn main() -> Result<()> { 4 | const PROTOC_ENVAR: &str = "PROTOC"; 5 | if std::env::var(PROTOC_ENVAR).is_err() { 6 | #[cfg(not(windows))] 7 | std::env::set_var(PROTOC_ENVAR, protobuf_src::protoc()); 8 | } 9 | 10 | let proto_base_path = std::path::PathBuf::from("proto"); 11 | let proto = proto_base_path.join("wen_restart.proto"); 12 | println!("cargo:rerun-if-changed={}", proto.display()); 13 | 14 | // Generate rust files from protos. 15 | prost_build::compile_protos(&[proto], &[proto_base_path])?; 16 | Ok(()) 17 | } 18 | -------------------------------------------------------------------------------- /net/scripts/install-perf.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # perf setup 4 | # 5 | set -ex 6 | 7 | [[ $(uname) = Linux ]] || exit 1 8 | [[ $USER = root ]] || exit 1 9 | 10 | # install perf 11 | apt-get --assume-yes install linux-tools-common linux-tools-generic "linux-tools-$(uname -r)" 12 | 13 | # setup permissions 14 | # Impose no scope and access restrictions on using perf_events performance monitoring 15 | echo -1 | tee /proc/sys/kernel/perf_event_paranoid 16 | # Allow recording kernel reference relocation symbol to avoid skewing symbol resolution if relocation was used 17 | echo 0 | tee /proc/sys/kernel/kptr_restrict 18 | -------------------------------------------------------------------------------- /programs/sbf/rust/call_depth/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-call-depth" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | solana-msg = { workspace = true } 16 | solana-program = { workspace = true } 17 | solana-program-entrypoint = { workspace = true } 18 | solana-sysvar = { workspace = true } 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /.github/RELEASE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Release v0.X.Y 2 | 3 | fun blurb about the name, what's in the release 4 | 5 | ## Major Features And Improvements 6 | 7 | * bulleted 8 | * list of features and improvements 9 | 10 | ## Breaking Changes 11 | 12 | * bulleted 13 | * list 14 | * of 15 | * protocol changes/breaks 16 | * API breaks 17 | * CLI changes 18 | * etc. 19 | 20 | ## Bug Fixes and Other Changes 21 | 22 | * can be pulled from commit log, or synthesized 23 | 24 | ## Thanks to our Contributors 25 | 26 | This release contains contributions from many people at Solana, as well as: 27 | 28 | pull from commit log 29 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/c/inc/sol/inc/blake3.inc: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /** 3 | * @brief Solana Blake3 system call 4 | */ 5 | 6 | #include 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | /** 13 | * Length of a Blake3 hash result 14 | */ 15 | #define BLAKE3_RESULT_LENGTH 32 16 | 17 | /** 18 | * Blake3 19 | * 20 | * @param bytes Array of byte arrays 21 | * @param bytes_len Number of byte arrays 22 | * @param result 32 byte array to hold the result 23 | */ 24 | @SYSCALL uint64_t sol_blake3(const SolBytes *, int, const uint8_t *); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | /**@}*/ 31 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/c/inc/sol/inc/compute_units.inc: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /** 3 | * @brief Solana logging utilities 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | /** 15 | * Prints a string to stdout 16 | */ 17 | @SYSCALL uint64_t sol_remaining_compute_units(); 18 | 19 | #ifdef SOL_TEST 20 | /** 21 | * Stub functions when building tests 22 | */ 23 | 24 | uint64_t sol_remaining_compute_units() { 25 | return UINT64_MAX; 26 | } 27 | #endif 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | /**@}*/ 34 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/c/inc/sol/inc/keccak.inc: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /** 3 | * @brief Solana keccak system call 4 | **/ 5 | 6 | #include 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | /** 13 | * Length of a Keccak hash result 14 | */ 15 | #define KECCAK_RESULT_LENGTH 32 16 | 17 | /** 18 | * Keccak 19 | * 20 | * @param bytes Array of byte arrays 21 | * @param bytes_len Number of byte arrays 22 | * @param result 32 byte array to hold the result 23 | */ 24 | @SYSCALL uint64_t sol_keccak256(const SolBytes *, int, uint8_t *); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | /**@}*/ 31 | -------------------------------------------------------------------------------- /programs/sbf/rust/many_args/src/helper.rs: -------------------------------------------------------------------------------- 1 | //! Example Rust-based SBF program tests loop iteration 2 | 3 | #![allow(clippy::arithmetic_side_effects)] 4 | 5 | use solana_program::log::{sol_log, sol_log_64}; 6 | 7 | pub fn many_args( 8 | arg1: u64, 9 | arg2: u64, 10 | arg3: u64, 11 | arg4: u64, 12 | arg5: u64, 13 | arg6: u64, 14 | arg7: u64, 15 | arg8: u64, 16 | arg9: u64, 17 | ) -> u64 { 18 | sol_log("same package"); 19 | sol_log_64(arg1, arg2, arg3, arg4, arg5); 20 | sol_log_64(arg6, arg7, arg8, arg9, 0); 21 | arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 22 | } 23 | -------------------------------------------------------------------------------- /programs/sbf/rust/noop/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-noop" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | solana-account-info = { workspace = true } 16 | solana-program-entrypoint = { workspace = true } 17 | solana-program-error = { workspace = true } 18 | solana-pubkey = { workspace = true } 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /net/scripts/disable-background-upgrades.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -ex 3 | # 4 | # Prevent background upgrades that block |apt-get| 5 | # 6 | # This approach is pretty uncompromising. An alternative solution that doesn't 7 | # involve deleting system files would be welcome. 8 | 9 | [[ $(uname) = Linux ]] || exit 1 10 | [[ $USER = root ]] || exit 1 11 | 12 | rm -rf /usr/lib/apt/apt.systemd.daily 13 | rm -rf /usr/bin/unattended-upgrade 14 | killall apt.systemd.daily || true 15 | killall unattended-upgrade || true 16 | 17 | while fuser /var/lib/dpkg/lock; do 18 | echo Waiting for lock release... 19 | sleep 1 20 | done 21 | 22 | -------------------------------------------------------------------------------- /programs/sbf/rust/upgraded/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Example Rust-based SBF upgraded program 2 | 3 | use { 4 | solana_account_info::AccountInfo, solana_msg::msg, solana_program_error::ProgramResult, 5 | solana_pubkey::Pubkey, solana_sysvar::clock, 6 | }; 7 | 8 | solana_program_entrypoint::entrypoint_no_alloc!(process_instruction); 9 | fn process_instruction( 10 | _program_id: &Pubkey, 11 | accounts: &[AccountInfo], 12 | _instruction_data: &[u8], 13 | ) -> ProgramResult { 14 | msg!("Upgraded program"); 15 | assert_eq!(accounts.len(), 1); 16 | assert_eq!(*accounts[0].key, clock::id()); 17 | Err(43.into()) 18 | } 19 | -------------------------------------------------------------------------------- /programs/sbf/rust/alt_bn128/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-alt-bn128" 3 | description = "Solana BPF test program written in Rust" 4 | version = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | array-bytes = { workspace = true } 16 | solana-bn254 = { workspace = true } 17 | solana-msg = { workspace = true } 18 | solana-program-entrypoint = { workspace = true } 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /programs/sbf/rust/many_args/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-many-args" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | solana-msg = { workspace = true } 16 | solana-program = { workspace = true } 17 | solana-program-entrypoint = { workspace = true } 18 | solana-sbf-rust-many-args-dep = { workspace = true } 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /programs/sbf/rust/poseidon/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-poseidon" 3 | description = "Solana SBF test program written in Rust" 4 | version = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | array-bytes = { workspace = true } 16 | solana-msg = { workspace = true } 17 | solana-poseidon = { workspace = true } 18 | solana-program-entrypoint = { workspace = true } 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /storage-bigtable/build-proto/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | description = "Blockchain, Rebuilt for Scale" 3 | name = "proto" 4 | publish = false 5 | version = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | license = { workspace = true } 10 | edition = { workspace = true } 11 | 12 | [dependencies] 13 | tonic-build = { workspace = true } 14 | 15 | # windows users should install the protobuf compiler manually and set the PROTOC 16 | # envar to point to the installed binary 17 | [target."cfg(not(windows))".dependencies] 18 | protobuf-src = { workspace = true } 19 | -------------------------------------------------------------------------------- /net/scripts/mount-additional-disk.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -x 3 | 4 | mount_point=/mnt/extra-disk 5 | disk=sdb 6 | if ! lsblk | grep -q ${disk} ; then 7 | echo "${disk} does not exist" 8 | else 9 | sudo mount /dev/"$disk" "$mount_point" || true 10 | if mount | grep -q ${disk} ; then 11 | echo "${disk} is mounted" 12 | else 13 | sudo mkfs.ext4 -F /dev/"$disk" 14 | sudo mkdir -p "$mount_point" 15 | sudo mount /dev/"$disk" "$mount_point" 16 | sudo chmod a+w "$mount_point" 17 | if ! mount | grep -q ${mount_point} ; then 18 | echo "${disk} failed to mount!" 19 | exit 1 20 | fi 21 | fi 22 | fi 23 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/scripts/strip.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | so=$1 4 | if [[ ! -r $so ]]; then 5 | echo "Error: file not found: $so" 6 | exit 1 7 | fi 8 | so_stripped=$2 9 | if [[ -z $so_stripped ]]; then 10 | echo "Usage: $0 unstripped.so stripped.so" 11 | exit 1 12 | fi 13 | 14 | sbf_sdk=$(cd "$(dirname "$0")/.." && pwd) 15 | # shellcheck source=platform-tools-sdk/sbf/env.sh 16 | source "$sbf_sdk"/env.sh 17 | 18 | set -e 19 | out_dir=$(dirname "$so_stripped") 20 | if [[ ! -d $out_dir ]]; then 21 | mkdir -p "$out_dir" 22 | fi 23 | "$sbf_sdk"/dependencies/platform-tools/llvm/bin/llvm-objcopy --strip-all "$so" "$so_stripped" 24 | -------------------------------------------------------------------------------- /programs/sbf/c/src/remaining_compute_units/remaining_compute_units.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief sol_remaining_compute_units Syscall test 3 | */ 4 | #include 5 | #include 6 | 7 | extern uint64_t entrypoint(const uint8_t *input) { 8 | char buffer[200]; 9 | 10 | int i = 0; 11 | for (; i < 100000; ++i) { 12 | if (i % 500 == 0) { 13 | uint64_t remaining = sol_remaining_compute_units(); 14 | snprintf(buffer, 200, "remaining compute units: %d", (int)remaining); 15 | sol_log(buffer); 16 | if (remaining < 25000) { 17 | break; 18 | } 19 | } 20 | } 21 | 22 | return SUCCESS; 23 | } 24 | -------------------------------------------------------------------------------- /programs/sbf/rust/spoof1_system/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-spoof1-system" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | solana-account-info = { workspace = true } 16 | solana-program-entrypoint = { workspace = true } 17 | solana-program-error = { workspace = true } 18 | solana-pubkey = { workspace = true } 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /programs/sbf/rust/upgradeable/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Example Rust-based SBF upgradeable program 2 | 3 | use { 4 | solana_account_info::AccountInfo, solana_msg::msg, solana_program_error::ProgramResult, 5 | solana_pubkey::Pubkey, solana_sysvar::clock, 6 | }; 7 | 8 | solana_program_entrypoint::entrypoint_no_alloc!(process_instruction); 9 | fn process_instruction( 10 | _program_id: &Pubkey, 11 | accounts: &[AccountInfo], 12 | _instruction_data: &[u8], 13 | ) -> ProgramResult { 14 | msg!("Upgradeable program"); 15 | assert_eq!(accounts.len(), 1); 16 | assert_eq!(*accounts[0].key, clock::id()); 17 | Err(42.into()) 18 | } 19 | -------------------------------------------------------------------------------- /zk-token-sdk/src/zk_token_proof_program.rs: -------------------------------------------------------------------------------- 1 | //! The native ZK Token proof program. 2 | //! 3 | //! The program verifies a number of zero-knowledge proofs that are tailored to work with Pedersen 4 | //! commitments and ElGamal encryption over the elliptic curve curve25519. A general overview of 5 | //! the program as well as the technical details of some of the proof instructions can be found in 6 | //! the [`ZK Token proof`] documentation. 7 | //! 8 | //! [`ZK Token proof`]: https://docs.anza.xyz/runtime/zk-elgamal-proof 9 | 10 | // Program Id of the ZkToken Proof program 11 | pub use solana_sdk_ids::zk_token_proof_program::{check_id, id, ID}; 12 | -------------------------------------------------------------------------------- /platform-tools-sdk/sbf/c/inc/solana_sdk.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /** 3 | * @brief Solana C-based SBF program types and utility functions 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | /**@}*/ 24 | -------------------------------------------------------------------------------- /programs/sbf/rust/divide_by_zero/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-divide-by-zero" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | solana-account-info = { workspace = true } 16 | solana-program-entrypoint = { workspace = true } 17 | solana-program-error = { workspace = true } 18 | solana-pubkey = { workspace = true } 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /programs/sbf/rust/external_spend/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-external-spend" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | solana-account-info = { workspace = true } 16 | solana-program-entrypoint = { workspace = true } 17 | solana-program-error = { workspace = true } 18 | solana-pubkey = { workspace = true } 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /tls-utils/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-tls-utils" 3 | description = "Solana TLS utilities" 4 | documentation = "https://docs.rs/solana-tls-utils" 5 | version = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | license = { workspace = true } 10 | edition = { workspace = true } 11 | 12 | [dependencies] 13 | rustls = { workspace = true, features = ["ring"] } 14 | solana-keypair = { workspace = true } 15 | solana-pubkey = { workspace = true } 16 | solana-signer = { workspace = true } 17 | x509-parser = { workspace = true } 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /programs/compute-budget/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-compute-budget-program" 3 | description = "Solana Compute Budget program" 4 | documentation = "https://docs.rs/solana-compute-budget-program" 5 | version = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | license = { workspace = true } 10 | edition = { workspace = true } 11 | 12 | [package.metadata.docs.rs] 13 | targets = ["x86_64-unknown-linux-gnu"] 14 | 15 | [lib] 16 | crate-type = ["lib"] 17 | name = "solana_compute_budget_program" 18 | 19 | [dependencies] 20 | solana-program-runtime = { workspace = true } 21 | -------------------------------------------------------------------------------- /programs/sbf/c/src/struct_ret/struct_ret.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /** 4 | * Custom error for when struct doesn't add to 12 5 | */ 6 | #define INCORRECT_SUM 1 7 | 8 | struct test_struct { uint64_t x; uint64_t y; uint64_t z;}; 9 | 10 | static struct test_struct __attribute__ ((noinline)) test_function(void) { 11 | struct test_struct s; 12 | s.x = 3; 13 | s.y = 4; 14 | s.z = 5; 15 | return s; 16 | } 17 | 18 | extern uint64_t entrypoint(const uint8_t* input) { 19 | struct test_struct s = test_function(); 20 | sol_log("foobar"); 21 | if (s.x + s.y + s.z == 12 ) { 22 | return SUCCESS; 23 | } 24 | return INCORRECT_SUM; 25 | } 26 | -------------------------------------------------------------------------------- /validator/src/commands/monitor/mod.rs: -------------------------------------------------------------------------------- 1 | use { 2 | crate::{commands::Result, dashboard::Dashboard}, 3 | clap::{App, ArgMatches, SubCommand}, 4 | std::{path::Path, time::Duration}, 5 | }; 6 | 7 | pub fn command<'a>() -> App<'a, 'a> { 8 | SubCommand::with_name("monitor").about("Monitor the validator") 9 | } 10 | 11 | pub fn execute(_matches: &ArgMatches, ledger_path: &Path) -> Result<()> { 12 | monitor_validator(ledger_path) 13 | } 14 | 15 | pub fn monitor_validator(ledger_path: &Path) -> Result<()> { 16 | let dashboard = Dashboard::new(ledger_path, None, None); 17 | dashboard.run(Duration::from_secs(2)); 18 | 19 | Ok(()) 20 | } 21 | -------------------------------------------------------------------------------- /ledger-tool/src/error.rs: -------------------------------------------------------------------------------- 1 | use {solana_ledger::blockstore::BlockstoreError, thiserror::Error}; 2 | 3 | pub type Result = std::result::Result; 4 | 5 | #[derive(Error, Debug)] 6 | pub enum LedgerToolError { 7 | #[error("{0}")] 8 | Blockstore(#[from] BlockstoreError), 9 | 10 | #[error("{0}")] 11 | SerdeJson(#[from] serde_json::Error), 12 | 13 | #[error("{0}")] 14 | TransactionEncode(#[from] solana_transaction_status::EncodeError), 15 | 16 | #[error("{0}")] 17 | Io(#[from] std::io::Error), 18 | 19 | #[error("{0}")] 20 | Generic(String), 21 | 22 | #[error("{0}")] 23 | BadArgument(String), 24 | } 25 | -------------------------------------------------------------------------------- /programs/sbf/rust/alt_bn128_compression/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-alt-bn128-compression" 3 | description = "Solana BPF test program written in Rust" 4 | version = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | array-bytes = { workspace = true } 16 | solana-bn254 = { workspace = true } 17 | solana-msg = { workspace = true } 18 | solana-program-entrypoint = { workspace = true } 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /.github/workflows/downstream-project-spl-nightly.yml: -------------------------------------------------------------------------------- 1 | name: Downstream Project - SPL (Nightly) 2 | 3 | on: 4 | schedule: 5 | - cron: "0 3 * * *" 6 | 7 | jobs: 8 | main: 9 | if: github.repository == 'anza-xyz/agave' 10 | strategy: 11 | fail-fast: false 12 | matrix: 13 | branch: 14 | - master 15 | uses: ./.github/workflows/downstream-project-spl.yml 16 | with: 17 | branch: ${{ matrix.branch }} 18 | 19 | error_reporting: 20 | needs: 21 | - main 22 | if: failure() 23 | uses: ./.github/workflows/error-reporting.yml 24 | secrets: 25 | WEBHOOK: ${{ secrets.SLACK_ERROR_REPORTING_WEBHOOK }} 26 | -------------------------------------------------------------------------------- /programs/sbf/c/src/read_program/read_program.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern uint64_t entrypoint(const uint8_t *input) { 4 | SolAccountInfo ka[1]; 5 | SolParameters params = (SolParameters){.ka = ka}; 6 | 7 | sol_log(__FILE__); 8 | 9 | if (!sol_deserialize(input, ¶ms, SOL_ARRAY_SIZE(ka))) { 10 | return ERROR_INVALID_ARGUMENT; 11 | } 12 | 13 | sol_assert(params.ka_num == 1); 14 | sol_assert(!sol_memcmp(params.ka[0].data, params.data, params.data_len)); 15 | sol_assert(params.ka[0].is_signer == false); 16 | sol_assert(params.ka[0].is_writable == false); 17 | sol_assert(params.ka[0].executable == true); 18 | 19 | return SUCCESS; 20 | } 21 | -------------------------------------------------------------------------------- /runtime/src/runtime_config.rs: -------------------------------------------------------------------------------- 1 | use solana_compute_budget::compute_budget::ComputeBudget; 2 | 3 | #[cfg(feature = "frozen-abi")] 4 | impl ::solana_frozen_abi::abi_example::AbiExample for RuntimeConfig { 5 | fn example() -> Self { 6 | // RuntimeConfig is not Serialize so just rely on Default. 7 | RuntimeConfig::default() 8 | } 9 | } 10 | 11 | /// Encapsulates flags that can be used to tweak the runtime behavior. 12 | #[derive(Debug, Default, Clone)] 13 | pub struct RuntimeConfig { 14 | pub compute_budget: Option, 15 | pub log_messages_bytes_limit: Option, 16 | pub transaction_account_lock_limit: Option, 17 | } 18 | -------------------------------------------------------------------------------- /tls-utils/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Collection of TLS related code fragments that end up popping up everywhere where quic is used. 2 | //! Aggregated here to avoid bugs due to conflicting implementations of the same functionality. 3 | 4 | mod config; 5 | pub use config::*; 6 | 7 | mod crypto_provider; 8 | pub use crypto_provider::*; 9 | 10 | mod tls_certificates; 11 | pub use tls_certificates::*; 12 | 13 | mod quic_client_certificate; 14 | pub use quic_client_certificate::*; 15 | 16 | mod skip_server_verification; 17 | pub use skip_server_verification::SkipServerVerification; 18 | 19 | mod skip_client_verification; 20 | pub use skip_client_verification::SkipClientVerification; 21 | -------------------------------------------------------------------------------- /ci/stable/run-local-cluster-partially.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | here="$(dirname "$0")" 5 | 6 | #shellcheck source=ci/common/shared-functions.sh 7 | source "$here"/../common/shared-functions.sh 8 | 9 | #shellcheck source=ci/stable/common.sh 10 | source "$here"/common.sh 11 | 12 | INDEX=${1:-"$BUILDKITE_PARALLEL_JOB"} 13 | : "${INDEX:?}" 14 | 15 | LIMIT=${2:-"$BUILDKITE_PARALLEL_JOB_COUNT"} 16 | : "${LIMIT:?}" 17 | 18 | _ cargo nextest run \ 19 | --profile ci \ 20 | --config-file ./nextest.toml \ 21 | --package solana-local-cluster \ 22 | --test local_cluster \ 23 | --partition hash:"$((INDEX + 1))/$LIMIT" \ 24 | --test-threads=1 \ 25 | --no-tests=warn -------------------------------------------------------------------------------- /system-test/deprecated-testcases/colo-cpu-only-perf.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - command: "system-test/testnet-automation.sh" 3 | label: "COLO performance testnet CPU only" 4 | env: 5 | UPLOAD_RESULTS_TO_SLACK: "true" 6 | UPLOAD_RESULTS_TO_DISCORD: "true" 7 | CLOUD_PROVIDER: "colo" 8 | TESTNET_TAG: "colo-perf-cpu-only" 9 | ENABLE_GPU: "false" 10 | TEST_DURATION_SECONDS: 600 11 | NUMBER_OF_VALIDATOR_NODES: 4 12 | NUMBER_OF_CLIENT_NODES: 2 13 | CLIENT_OPTIONS: "bench-tps=2=--tx_count 20000 --thread-batch-sleep-ms 250" 14 | ADDITIONAL_FLAGS: "" 15 | TEST_TYPE: "fixed_duration" 16 | agents: 17 | queue: "colo-deploy" 18 | -------------------------------------------------------------------------------- /system-test/deprecated-testcases/colo-gpu-perf.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - command: "system-test/testnet-automation.sh" 3 | label: "COLO performance testnet GPU enabled" 4 | env: 5 | UPLOAD_RESULTS_TO_SLACK: "true" 6 | UPLOAD_RESULTS_TO_DISCORD: "true" 7 | CLOUD_PROVIDER: "colo" 8 | TESTNET_TAG: "colo-perf-gpu-enabled" 9 | ENABLE_GPU: "true" 10 | TEST_DURATION_SECONDS: 600 11 | NUMBER_OF_VALIDATOR_NODES: 4 12 | NUMBER_OF_CLIENT_NODES: 2 13 | CLIENT_OPTIONS: "bench-tps=2=--tx_count 20000 --thread-batch-sleep-ms 250" 14 | ADDITIONAL_FLAGS: "" 15 | TEST_TYPE: "fixed_duration" 16 | agents: 17 | queue: "colo-deploy" 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | farf/ 2 | target/ 3 | /solana-release/ 4 | /solana-release.tar.bz2 5 | /solana-metrics/ 6 | /solana-metrics.tar.bz2 7 | /test-ledger/ 8 | 9 | **/*.rs.bk 10 | .cargo 11 | 12 | /config/ 13 | 14 | .cache 15 | 16 | # log files 17 | *.log 18 | log-*.txt 19 | log-*/ 20 | !log-collector/ 21 | !log-analyzer/* 22 | !log-utils/ 23 | 24 | # intellij files 25 | .idea/ 26 | /solana.iml 27 | /.vscode/ 28 | 29 | # fetch-core-bpf.sh artifacts 30 | /core-bpf-genesis-args.sh 31 | /core-bpf-*.so 32 | 33 | # fetch-spl.sh artifacts 34 | /spl-genesis-args.sh 35 | /spl-*.so 36 | 37 | .DS_Store 38 | # scripts that may be generated by cargo *-bpf commands 39 | **/cargo-*-bpf-child-script-*.sh 40 | -------------------------------------------------------------------------------- /docs/src/implemented-proposals/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Implemented Design Proposals 3 | sidebar_position: 1 4 | sidebar_label: Overview 5 | --- 6 | 7 | These architectural proposals have been accepted and implemented by the Solana maintainers. Any designs that may be subject to future change are noted in the specific proposal page. 8 | 9 | ## Not Yet Implemented 10 | 11 | Design proposals that have been accepted but not yet implemented are found in [Accepted Proposals](../proposals/accepted-design-proposals.md). 12 | 13 | ## Submit a New Proposal 14 | 15 | To submit a new design proposal, consult this guide on [how to submit a design proposal](../proposals.md#submit-a-design-proposal). 16 | -------------------------------------------------------------------------------- /programs/sbf/rust/spoof1_system/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::arithmetic_side_effects)] 2 | 3 | use { 4 | solana_account_info::AccountInfo, solana_program_error::ProgramResult, solana_pubkey::Pubkey, 5 | }; 6 | 7 | solana_program_entrypoint::entrypoint_no_alloc!(process_instruction); 8 | fn process_instruction( 9 | _program_id: &Pubkey, 10 | accounts: &[AccountInfo], 11 | _instruction_data: &[u8], 12 | ) -> ProgramResult { 13 | let from = &accounts[0]; 14 | let to = &accounts[1]; 15 | 16 | let to_balance = to.lamports(); 17 | **to.lamports.borrow_mut() = to_balance + from.lamports(); 18 | **from.lamports.borrow_mut() = 0u64; 19 | 20 | Ok(()) 21 | } 22 | -------------------------------------------------------------------------------- /scripts/cargo-clippy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Runs `cargo clippy` in all individual workspaces in the repository. 4 | # 5 | # We have a number of clippy parameters that we want to enforce across the 6 | # code base. They are defined here. 7 | # 8 | # This script is run by the CI, so if you want to replicate what the CI is 9 | # doing, better run this script, rather than calling `cargo clippy` manually. 10 | # 11 | # TODO It would be nice to provide arguments to narrow clippy checks to a single 12 | # workspace and/or package. To speed up the interactive workflow. 13 | 14 | set -o errexit 15 | 16 | here="$(dirname "$0")" 17 | 18 | # nightly 19 | "$here/cargo-clippy-nightly.sh" 20 | -------------------------------------------------------------------------------- /programs/sbf/rust/account_mem/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-sbf-rust-account-mem" 3 | version = { workspace = true } 4 | description = { workspace = true } 5 | authors = { workspace = true } 6 | repository = { workspace = true } 7 | homepage = { workspace = true } 8 | license = { workspace = true } 9 | edition = { workspace = true } 10 | 11 | [lib] 12 | crate-type = ["cdylib"] 13 | 14 | [dependencies] 15 | solana-account-info = { workspace = true } 16 | solana-program-entrypoint = { workspace = true } 17 | solana-program-error = { workspace = true } 18 | solana-program-memory = { workspace = true } 19 | solana-pubkey = { workspace = true } 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /system-test/stake-operations-testcases/stake_test_automation.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | # shellcheck disable=SC1090 6 | # shellcheck disable=SC1091 7 | source "$(dirname "$0")"/../automation_utils.sh 8 | 9 | RESULT_FILE="$1" 10 | 11 | # Runs offline stake operations tests against a running cluster launched from the automation framework 12 | bootstrapper_ip_address="$(get_bootstrap_validator_ip_address)" 13 | entrypoint=http://"${bootstrapper_ip_address}":8899 14 | PATH="$REPO_ROOT"/solana-release/bin:$PATH "$REPO_ROOT"/system-test/stake-operations-testcases/offline_stake_operations.sh "$entrypoint" 15 | 16 | echo "Offline Stake Operations Test Succeeded" >>"$RESULT_FILE" 17 | -------------------------------------------------------------------------------- /svm-rent-calculator/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-svm-rent-calculator" 3 | description = "Solana SVM Rent Calculator" 4 | documentation = "https://docs.rs/solana-svm-rent-calculator" 5 | version = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | license = { workspace = true } 10 | edition = { workspace = true } 11 | 12 | [dependencies] 13 | solana-account = { workspace = true } 14 | solana-pubkey = { workspace = true } 15 | solana-rent = { workspace = true } 16 | solana-sdk-ids = { workspace = true } 17 | solana-transaction-context = { workspace = true } 18 | solana-transaction-error = { workspace = true } 19 | -------------------------------------------------------------------------------- /svm/tests/example-programs/clock-sysvar/src/lib.rs: -------------------------------------------------------------------------------- 1 | use { 2 | solana_account_info::AccountInfo, 3 | solana_program::program::set_return_data, 4 | solana_program_entrypoint::entrypoint, 5 | solana_program_error::ProgramResult, 6 | solana_pubkey::Pubkey, 7 | solana_sysvar::{clock::Clock, Sysvar}, 8 | }; 9 | 10 | entrypoint!(process_instruction); 11 | 12 | fn process_instruction( 13 | _program_id: &Pubkey, 14 | _accounts: &[AccountInfo], 15 | _instruction_data: &[u8], 16 | ) -> ProgramResult { 17 | let time_now = Clock::get().unwrap().unix_timestamp; 18 | let return_data = time_now.to_be_bytes(); 19 | set_return_data(&return_data); 20 | Ok(()) 21 | } 22 | -------------------------------------------------------------------------------- /votor/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(feature = "frozen-abi", feature(min_specialization))] 2 | 3 | pub mod commitment; 4 | pub mod common; 5 | pub mod consensus_metrics; 6 | pub mod consensus_pool; 7 | mod consensus_pool_service; 8 | pub mod event; 9 | mod event_handler; 10 | pub mod root_utils; 11 | mod staked_validators_cache; 12 | mod timer_manager; 13 | pub mod vote_history; 14 | pub mod vote_history_storage; 15 | pub mod voting_service; 16 | pub mod voting_utils; 17 | pub mod votor; 18 | 19 | #[macro_use] 20 | extern crate log; 21 | 22 | extern crate serde_derive; 23 | 24 | #[cfg_attr(feature = "frozen-abi", macro_use)] 25 | #[cfg(feature = "frozen-abi")] 26 | extern crate solana_frozen_abi_macro; 27 | --------------------------------------------------------------------------------