diff --git a/.buildkite/hooks/post-checkout b/.buildkite/hooks/post-checkout index f41f238e0e6414..54779337e32300 100644 --- a/.buildkite/hooks/post-checkout +++ b/.buildkite/hooks/post-checkout @@ -4,37 +4,3 @@ CI_BUILD_START=$(date +%s) export CI_BUILD_START source ci/env.sh - -# -# Kill any running docker containers, which are potentially left over from the -# previous CI job -# -( - echo "+++ Killing stale docker containers" - while read -r line; do - read -r id image _ <<<"$line" - - if [[ $image =~ "solanalabs/rust" ]]; then - if docker kill "$id" >/dev/null; then - echo "kill $id $image" - fi - continue - fi - done < <(docker ps | tail -n +2) -) - -# Processes from previously aborted CI jobs seem to loiter, unclear why as one -# would expect the buildkite-agent to clean up all child processes of the -# aborted CI job. -# But as a workaround for now manually kill some known loiterers. These -# processes will all have the `init` process as their PPID: -( - victims= - for name in bash cargo docker solana; do - victims="$victims $(pgrep -u "$(id -u)" -P 1 -d \ $name)" - done - for victim in $victims; do - echo "Killing pid $victim" - kill -9 "$victim" || true - done -) diff --git a/.buildkite/scripts/build-bench.sh b/.buildkite/scripts/build-bench.sh index a19e4291bc1426..a4468d9b8f49ac 100755 --- a/.buildkite/scripts/build-bench.sh +++ b/.buildkite/scripts/build-bench.sh @@ -13,7 +13,7 @@ build_steps() { { "name": "$1", "command": "$2", - "timeout_in_minutes": 30, + "timeout_in_minutes": 60, "agent": "$agent", "retry": 3 } @@ -22,5 +22,5 @@ EOF # shellcheck disable=SC2016 group "bench" \ - "$(build_steps "bench-part-1" ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_nightly_docker_image ci/bench/part1.sh")" \ - "$(build_steps "bench-part-2" ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_nightly_docker_image ci/bench/part2.sh")" + "$(build_steps "bench-part-1" "ci/bench/part1.sh")" \ + "$(build_steps "bench-part-2" "ci/bench/part2.sh")" diff --git a/.buildkite/scripts/build-stable.sh b/.buildkite/scripts/build-stable.sh index e1d774e1669ab8..294a7c33b85610 100755 --- a/.buildkite/scripts/build-stable.sh +++ b/.buildkite/scripts/build-stable.sh @@ -12,7 +12,7 @@ partitions=$( cat <"] repository = "https://github.com/solana-labs/solana" homepage = "https://solanalabs.com/" @@ -307,86 +307,86 @@ smallvec = "1.13.2" smpl_jwt = "0.7.1" socket2 = "0.5.5" soketto = "0.7" -solana-account-decoder = { path = "account-decoder", version = "=1.18.27" } -solana-accounts-db = { path = "accounts-db", version = "=1.18.27" } -solana-address-lookup-table-program = { path = "programs/address-lookup-table", version = "=1.18.27" } -solana-banks-client = { path = "banks-client", version = "=1.18.27" } -solana-banks-interface = { path = "banks-interface", version = "=1.18.27" } -solana-banks-server = { path = "banks-server", version = "=1.18.27" } -solana-bench-tps = { path = "bench-tps", version = "=1.18.27" } -solana-bloom = { path = "bloom", version = "=1.18.27" } -solana-bpf-loader-program = { path = "programs/bpf_loader", version = "=1.18.27" } -solana-bucket-map = { path = "bucket_map", version = "=1.18.27" } -agave-cargo-registry = { path = "cargo-registry", version = "=1.18.27" } -solana-clap-utils = { path = "clap-utils", version = "=1.18.27" } -solana-clap-v3-utils = { path = "clap-v3-utils", version = "=1.18.27" } -solana-cli = { path = "cli", version = "=1.18.27" } -solana-cli-config = { path = "cli-config", version = "=1.18.27" } -solana-cli-output = { path = "cli-output", version = "=1.18.27" } -solana-client = { path = "client", version = "=1.18.27" } -solana-compute-budget-program = { path = "programs/compute-budget", version = "=1.18.27" } -solana-config-program = { path = "programs/config", version = "=1.18.27" } -solana-connection-cache = { path = "connection-cache", version = "=1.18.27", default-features = false } -solana-core = { path = "core", version = "=1.18.27" } -solana-cost-model = { path = "cost-model", version = "=1.18.27" } -solana-download-utils = { path = "download-utils", version = "=1.18.27" } -solana-entry = { path = "entry", version = "=1.18.27" } -solana-faucet = { path = "faucet", version = "=1.18.27" } -solana-frozen-abi = { path = "frozen-abi", version = "=1.18.27" } -solana-frozen-abi-macro = { path = "frozen-abi/macro", version = "=1.18.27" } -solana-genesis = { path = "genesis", version = "=1.18.27" } -solana-genesis-utils = { path = "genesis-utils", version = "=1.18.27" } -agave-geyser-plugin-interface = { path = "geyser-plugin-interface", version = "=1.18.27" } -solana-geyser-plugin-manager = { path = "geyser-plugin-manager", version = "=1.18.27" } -solana-gossip = { path = "gossip", version = "=1.18.27" } -solana-ledger = { path = "ledger", version = "=1.18.27" } -solana-loader-v4-program = { path = "programs/loader-v4", version = "=1.18.27" } -solana-local-cluster = { path = "local-cluster", version = "=1.18.27" } -solana-logger = { path = "logger", version = "=1.18.27" } -solana-measure = { path = "measure", version = "=1.18.27" } -solana-merkle-tree = { path = "merkle-tree", version = "=1.18.27" } -solana-metrics = { path = "metrics", version = "=1.18.27" } -solana-net-utils = { path = "net-utils", version = "=1.18.27" } +solana-account-decoder = { path = "account-decoder", version = "=1.18.29" } +solana-accounts-db = { path = "accounts-db", version = "=1.18.29" } +solana-address-lookup-table-program = { path = "programs/address-lookup-table", version = "=1.18.29" } +solana-banks-client = { path = "banks-client", version = "=1.18.29" } +solana-banks-interface = { path = "banks-interface", version = "=1.18.29" } +solana-banks-server = { path = "banks-server", version = "=1.18.29" } +solana-bench-tps = { path = "bench-tps", version = "=1.18.29" } +solana-bloom = { path = "bloom", version = "=1.18.29" } +solana-bpf-loader-program = { path = "programs/bpf_loader", version = "=1.18.29" } +solana-bucket-map = { path = "bucket_map", version = "=1.18.29" } +agave-cargo-registry = { path = "cargo-registry", version = "=1.18.29" } +solana-clap-utils = { path = "clap-utils", version = "=1.18.29" } +solana-clap-v3-utils = { path = "clap-v3-utils", version = "=1.18.29" } +solana-cli = { path = "cli", version = "=1.18.29" } +solana-cli-config = { path = "cli-config", version = "=1.18.29" } +solana-cli-output = { path = "cli-output", version = "=1.18.29" } +solana-client = { path = "client", version = "=1.18.29" } +solana-compute-budget-program = { path = "programs/compute-budget", version = "=1.18.29" } +solana-config-program = { path = "programs/config", version = "=1.18.29" } +solana-connection-cache = { path = "connection-cache", version = "=1.18.29", default-features = false } +solana-core = { path = "core", version = "=1.18.29" } +solana-cost-model = { path = "cost-model", version = "=1.18.29" } +solana-download-utils = { path = "download-utils", version = "=1.18.29" } +solana-entry = { path = "entry", version = "=1.18.29" } +solana-faucet = { path = "faucet", version = "=1.18.29" } +solana-frozen-abi = { path = "frozen-abi", version = "=1.18.29" } +solana-frozen-abi-macro = { path = "frozen-abi/macro", version = "=1.18.29" } +solana-genesis = { path = "genesis", version = "=1.18.29" } +solana-genesis-utils = { path = "genesis-utils", version = "=1.18.29" } +agave-geyser-plugin-interface = { path = "geyser-plugin-interface", version = "=1.18.29" } +solana-geyser-plugin-manager = { path = "geyser-plugin-manager", version = "=1.18.29" } +solana-gossip = { path = "gossip", version = "=1.18.29" } +solana-ledger = { path = "ledger", version = "=1.18.29" } +solana-loader-v4-program = { path = "programs/loader-v4", version = "=1.18.29" } +solana-local-cluster = { path = "local-cluster", version = "=1.18.29" } +solana-logger = { path = "logger", version = "=1.18.29" } +solana-measure = { path = "measure", version = "=1.18.29" } +solana-merkle-tree = { path = "merkle-tree", version = "=1.18.29" } +solana-metrics = { path = "metrics", version = "=1.18.29" } +solana-net-utils = { path = "net-utils", version = "=1.18.29" } solana-nohash-hasher = "0.2.1" -solana-notifier = { path = "notifier", version = "=1.18.27" } -solana-perf = { path = "perf", version = "=1.18.27" } -solana-poh = { path = "poh", version = "=1.18.27" } -solana-program = { path = "sdk/program", version = "=1.18.27" } -solana-program-runtime = { path = "program-runtime", version = "=1.18.27" } -solana-program-test = { path = "program-test", version = "=1.18.27" } -solana-pubsub-client = { path = "pubsub-client", version = "=1.18.27" } -solana-quic-client = { path = "quic-client", version = "=1.18.27" } -solana-rayon-threadlimit = { path = "rayon-threadlimit", version = "=1.18.27" } -solana-remote-wallet = { path = "remote-wallet", version = "=1.18.27", default-features = false } -solana-unified-scheduler-logic = { path = "unified-scheduler-logic", version = "=1.18.27" } -solana-unified-scheduler-pool = { path = "unified-scheduler-pool", version = "=1.18.27" } -solana-rpc = { path = "rpc", version = "=1.18.27" } -solana-rpc-client = { path = "rpc-client", version = "=1.18.27", default-features = false } -solana-rpc-client-api = { path = "rpc-client-api", version = "=1.18.27" } -solana-rpc-client-nonce-utils = { path = "rpc-client-nonce-utils", version = "=1.18.27" } -solana-runtime = { path = "runtime", version = "=1.18.27" } -solana-runtime-transaction = { path = "runtime-transaction", version = "=1.18.27" } -solana-sdk = { path = "sdk", version = "=1.18.27" } -solana-sdk-macro = { path = "sdk/macro", version = "=1.18.27" } -solana-send-transaction-service = { path = "send-transaction-service", version = "=1.18.27" } -solana-stake-program = { path = "programs/stake", version = "=1.18.27" } -solana-storage-bigtable = { path = "storage-bigtable", version = "=1.18.27" } -solana-storage-proto = { path = "storage-proto", version = "=1.18.27" } -solana-streamer = { path = "streamer", version = "=1.18.27" } -solana-system-program = { path = "programs/system", version = "=1.18.27" } -solana-test-validator = { path = "test-validator", version = "=1.18.27" } -solana-thin-client = { path = "thin-client", version = "=1.18.27" } -solana-tpu-client = { path = "tpu-client", version = "=1.18.27", default-features = false } -solana-transaction-status = { path = "transaction-status", version = "=1.18.27" } -solana-turbine = { path = "turbine", version = "=1.18.27" } -solana-udp-client = { path = "udp-client", version = "=1.18.27" } -solana-version = { path = "version", version = "=1.18.27" } -solana-vote = { path = "vote", version = "=1.18.27" } -solana-vote-program = { path = "programs/vote", version = "=1.18.27" } -solana-wen-restart = { path = "wen-restart", version = "=1.18.27" } -solana-zk-keygen = { path = "zk-keygen", version = "=1.18.27" } -solana-zk-token-proof-program = { path = "programs/zk-token-proof", version = "=1.18.27" } -solana-zk-token-sdk = { path = "zk-token-sdk", version = "=1.18.27" } +solana-notifier = { path = "notifier", version = "=1.18.29" } +solana-perf = { path = "perf", version = "=1.18.29" } +solana-poh = { path = "poh", version = "=1.18.29" } +solana-program = { path = "sdk/program", version = "=1.18.29" } +solana-program-runtime = { path = "program-runtime", version = "=1.18.29" } +solana-program-test = { path = "program-test", version = "=1.18.29" } +solana-pubsub-client = { path = "pubsub-client", version = "=1.18.29" } +solana-quic-client = { path = "quic-client", version = "=1.18.29" } +solana-rayon-threadlimit = { path = "rayon-threadlimit", version = "=1.18.29" } +solana-remote-wallet = { path = "remote-wallet", version = "=1.18.29", default-features = false } +solana-unified-scheduler-logic = { path = "unified-scheduler-logic", version = "=1.18.29" } +solana-unified-scheduler-pool = { path = "unified-scheduler-pool", version = "=1.18.29" } +solana-rpc = { path = "rpc", version = "=1.18.29" } +solana-rpc-client = { path = "rpc-client", version = "=1.18.29", default-features = false } +solana-rpc-client-api = { path = "rpc-client-api", version = "=1.18.29" } +solana-rpc-client-nonce-utils = { path = "rpc-client-nonce-utils", version = "=1.18.29" } +solana-runtime = { path = "runtime", version = "=1.18.29" } +solana-runtime-transaction = { path = "runtime-transaction", version = "=1.18.29" } +solana-sdk = { path = "sdk", version = "=1.18.29" } +solana-sdk-macro = { path = "sdk/macro", version = "=1.18.29" } +solana-send-transaction-service = { path = "send-transaction-service", version = "=1.18.29" } +solana-stake-program = { path = "programs/stake", version = "=1.18.29" } +solana-storage-bigtable = { path = "storage-bigtable", version = "=1.18.29" } +solana-storage-proto = { path = "storage-proto", version = "=1.18.29" } +solana-streamer = { path = "streamer", version = "=1.18.29" } +solana-system-program = { path = "programs/system", version = "=1.18.29" } +solana-test-validator = { path = "test-validator", version = "=1.18.29" } +solana-thin-client = { path = "thin-client", version = "=1.18.29" } +solana-tpu-client = { path = "tpu-client", version = "=1.18.29", default-features = false } +solana-transaction-status = { path = "transaction-status", version = "=1.18.29" } +solana-turbine = { path = "turbine", version = "=1.18.29" } +solana-udp-client = { path = "udp-client", version = "=1.18.29" } +solana-version = { path = "version", version = "=1.18.29" } +solana-vote = { path = "vote", version = "=1.18.29" } +solana-vote-program = { path = "programs/vote", version = "=1.18.29" } +solana-wen-restart = { path = "wen-restart", version = "=1.18.29" } +solana-zk-keygen = { path = "zk-keygen", version = "=1.18.29" } +solana-zk-token-proof-program = { path = "programs/zk-token-proof", version = "=1.18.29" } +solana-zk-token-sdk = { path = "zk-token-sdk", version = "=1.18.29" } solana_rbpf = "=0.8.3" spl-associated-token-account = "=2.3.0" spl-instruction-padding = "0.1" diff --git a/README.md b/README.md index bbaeb3d019a658..a77a130a032cb5 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,8 @@ -

- - Solana - -

+# X1: Tachyon Validator Node -[![Solana crate](https://img.shields.io/crates/v/solana-core.svg)](https://crates.io/crates/solana-core) -[![Solana documentation](https://docs.rs/solana-core/badge.svg)](https://docs.rs/solana-core) -[![Build status](https://badge.buildkite.com/8cc350de251d61483db98bdfc895b9ea0ac8ffa4a32ee850ed.svg?branch=master)](https://buildkite.com/solana-labs/solana/builds?branch=master) -[![codecov](https://codecov.io/gh/solana-labs/solana/branch/master/graph/badge.svg)](https://codecov.io/gh/solana-labs/solana) +## Building -# Building - -## **1. Install rustc, cargo and rustfmt.** +### **1. Install rustc, cargo and rustfmt.** ```bash $ curl https://sh.rustup.rs -sSf | sh @@ -44,20 +35,20 @@ On Fedora: $ sudo dnf install openssl-devel systemd-devel pkg-config zlib-devel llvm clang cmake make protobuf-devel protobuf-compiler perl-core ``` -## **2. Download the source code.** +### **2. Download the source code.** ```bash -$ git clone https://github.com/solana-labs/solana.git -$ cd solana +$ git clone https://github.com/x1-labs/tachyon.git +$ cd tachyon ``` -## **3. Build.** +### **3. Build.** ```bash $ ./cargo build ``` -# Testing +## Testing **Run the test suite:** @@ -65,16 +56,12 @@ $ ./cargo build $ ./cargo test ``` -### Starting a local testnet - -Start your own testnet locally, instructions are in the [online docs](https://docs.solanalabs.com/clusters/benchmark). - -### Accessing the remote development cluster +#### Accessing the remote testnet cluster -* `devnet` - stable public cluster for development accessible via -devnet.solana.com. Runs 24/7. Learn more about the [public clusters](https://docs.solanalabs.com/clusters) +* `testnet` - stable public cluster for development accessible via +https://xolana.xen.network -# Benchmarking +## Benchmarking First, install the nightly build of rustc. `cargo bench` requires the use of the unstable features only available in the nightly build. @@ -89,11 +76,11 @@ Run the benchmarks: $ cargo +nightly bench ``` -# Release Process +## Release Process The release process for this project is described [here](RELEASE.md). -# Code coverage +## Code coverage To generate code coverage statistics: diff --git a/RELEASE.md b/RELEASE.md index c5aa5d540b1191..2ee2022f59f309 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,4 +1,4 @@ -# Solana Release process +# Tachyon Release process ## Branches and Tags @@ -143,7 +143,7 @@ appearing. To check for progress: * The `solana-secondary` Buildkite pipeline handles creating the Linux and macOS release artifacts and updated crates. Look for a job under the tag name of the release: https://buildkite.com/solana-labs/solana-secondary. * The Windows release artifacts are produced by GitHub Actions. Look for a job under the tag name of the release: https://github.com/solana-labs/solana/actions. -[Crates.io](https://crates.io/crates/solana) should have an updated Solana version. This can take 2-3 hours, and sometimes fails in the `solana-secondary` job. +[Crates.io tachyon-validator](https://crates.io/crates/tachyon-validator) should have an updated tachyon-validator version. This can take 2-3 hours, and sometimes fails in the `agave-secondary` job. If this happens and the error is non-fatal, click "Retry" on the "publish crate" job ### Update software on testnet.solana.com diff --git a/ci/buildkite-pipeline-in-disk.sh b/ci/buildkite-pipeline-in-disk.sh index 2ce8af0432106b..d21111c33fe70f 100755 --- a/ci/buildkite-pipeline-in-disk.sh +++ b/ci/buildkite-pipeline-in-disk.sh @@ -114,8 +114,8 @@ EOF trigger_secondary_step() { cat >> "$output_file" <<"EOF" - - name: "Trigger Build on solana-secondary" - trigger: "solana-secondary" + - name: "Trigger Build on x1-agave-secondary" + trigger: "x1-agave-secondary" branches: "!pull/*" async: true build: @@ -289,7 +289,7 @@ if [[ -n $BUILDKITE_TAG ]]; then start_pipeline "Tag pipeline for $BUILDKITE_TAG" annotate --style info --context release-tag \ - "https://github.com/anza-xyz/agave/releases/$BUILDKITE_TAG" + "https://github.com/FairCrypto/agave-xolana/releases/$BUILDKITE_TAG" # Jump directly to the secondary build to publish release artifacts quickly trigger_secondary_step @@ -307,7 +307,7 @@ if [[ $BUILDKITE_BRANCH =~ ^pull ]]; then # Add helpful link back to the corresponding Github Pull Request annotate --style info --context pr-backlink \ - "Github Pull Request: https://github.com/anza-xyz/agave/$BUILDKITE_BRANCH" + "Github Pull Request: https://github.com/FairCrypto/agave-xolana/$BUILDKITE_BRANCH" if [[ $GITHUB_USER = "dependabot[bot]" ]]; then command_step dependabot "ci/dependabot-pr.sh" 5 diff --git a/ci/buildkite-pipeline.sh b/ci/buildkite-pipeline.sh index fe41771766a493..66cb2ce08c07f0 100755 --- a/ci/buildkite-pipeline.sh +++ b/ci/buildkite-pipeline.sh @@ -6,16 +6,22 @@ set -e cd "$(dirname "$0")"/.. +source ci/env.sh + output_file=${1:-/dev/stderr} if [[ -n $CI_PULL_REQUEST ]]; then - # filter pr number from ci branch. - [[ $CI_BRANCH =~ pull/([0-9]+)/head ]] - pr_number=${BASH_REMATCH[1]} - echo "get affected files from PR: $pr_number" + if [[ -n $BUILDKITE_PULL_REQUEST ]]; then + pr_number=$BUILDKITE_PULL_REQUEST + else + # filter pr number from ci branch. + [[ $CI_BRANCH =~ pull/([0-9]+)/head ]] + pr_number=${BASH_REMATCH[1]} + fi + echo "get affected files from PR: $pr_number" # get affected files - readarray -t affected_files < <(gh pr diff --name-only "$pr_number") + readarray -t affected_files < <(GH_TOKEN="$(buildkite-agent secret get GH_TOKEN)" gh pr diff --name-only "$pr_number") if [[ ${#affected_files[*]} -eq 0 ]]; then echo "Unable to determine the files affected by this PR" exit 1 @@ -118,11 +124,35 @@ command_step() { EOF } +docker_command_step() { + cat >> "$output_file" <> "$output_file" <<"EOF" - - name: "Trigger Build on agave-secondary" - trigger: "agave-secondary" + - name: "Trigger Build on x1-agave-secondary" + trigger: "x1-agave-secondary" branches: "!pull/*" async: true soft_fail: true @@ -140,9 +170,10 @@ wait_step() { } all_test_steps() { - command_step checks1 ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_nightly_docker_image ci/test-checks.sh" 20 check - command_step checks2 ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_nightly_docker_image ci/test-dev-context-only-utils.sh check-bins" 15 check - command_step checks3 ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_nightly_docker_image ci/test-dev-context-only-utils.sh check-all-targets" 15 check + . ci/rust-version.sh + docker_command_step checks1 "ci/test-checks.sh" $rust_nightly_docker_image 20 check + docker_command_step checks2 "ci/test-dev-context-only-utils.sh check-bins" $rust_nightly_docker_image 20 check + docker_command_step checks3 "ci/test-dev-context-only-utils.sh check-all-targets" $rust_nightly_docker_image 20 check wait_step # Full test suite @@ -156,7 +187,7 @@ all_test_steps() { ^ci/rust-version.sh \ ^ci/test-docs.sh \ ; then - command_step doctest ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_stable_docker_image ci/test-docs.sh" 15 + docker_command_step doctest "ci/test-docs.sh" $rust_nightly_docker_image 15 else annotate --style info --context test-docs \ "Docs skipped as no .rs files were modified" @@ -182,7 +213,20 @@ all_test_steps() { cargo-test-sbf$ \ ; then cat >> "$output_file" <<"EOF" - - command: ". ci/rust-version.sh; ci/docker-run.sh $$rust_stable_docker_image ci/test-stable-sbf.sh" + - command: "ci/test-stable-sbf.sh" + plugins: + - docker#v5.12.0: + image: "$rust_nightly_docker_image" + workdir: /solana + propagate-environment: true + propagate-uid-gid: true + environment: + - "RUSTC_WRAPPER=/usr/local/cargo/bin/sccache" + - AWS_SECRET_ACCESS_KEY + - AWS_ACCESS_KEY_ID + - SCCACHE_BUCKET + - SCCACHE_REGION + - SCCACHE_S3_KEY_PREFIX name: "stable-sbf" timeout_in_minutes: 35 artifact_paths: "sbf-dumps.tar.bz2" @@ -226,7 +270,7 @@ EOF ^ci/test-stable.sh \ ^sdk/ \ ; then - command_step wasm ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_stable_docker_image ci/test-wasm.sh" 20 + docker_command_step wasm "ci/test-wasm.sh" $rust_nightly_docker_image 20 else annotate --style info \ "wasm skipped as no relevant files were modified" @@ -258,7 +302,7 @@ EOF ^ci/test-coverage.sh \ ^scripts/coverage.sh \ ; then - command_step coverage ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_nightly_docker_image ci/test-coverage.sh" 80 + docker_command_step coverage "ci/test-coverage.sh" $rust_nightly_docker_image 80 else annotate --style info --context test-coverage \ "Coverage skipped as no .rs files were modified" @@ -296,7 +340,7 @@ pull_or_push_steps() { if [ -z "$diff_other_than_version_bump" ]; then echo "Diff only contains version bump." - command_step checks ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_nightly_docker_image ci/test-checks.sh" 20 + docker_command_step checks "ci/test-checks.sh" $rust_nightly_docker_image 20 exit 0 fi fi @@ -315,7 +359,7 @@ if [[ -n $BUILDKITE_TAG ]]; then start_pipeline "Tag pipeline for $BUILDKITE_TAG" annotate --style info --context release-tag \ - "https://github.com/anza-xyz/agave/releases/$BUILDKITE_TAG" + "https://github.com/FairCrypto/agave-xolana/releases/$BUILDKITE_TAG" # Jump directly to the secondary build to publish release artifacts quickly trigger_secondary_step @@ -333,7 +377,7 @@ if [[ $BUILDKITE_BRANCH =~ ^pull ]]; then # Add helpful link back to the corresponding Github Pull Request annotate --style info --context pr-backlink \ - "Github Pull Request: https://github.com/anza-xyz/agave/$BUILDKITE_BRANCH" + "Github Pull Request: https://github.com/FairCrypto/agave-xolana/$BUILDKITE_BRANCH" if [[ $GITHUB_USER = "dependabot[bot]" ]]; then command_step dependabot "ci/dependabot-pr.sh" 5 diff --git a/ci/buildkite-solana-private.sh b/ci/buildkite-solana-private.sh index 51876cfeeea60e..6154a51cba0bf9 100755 --- a/ci/buildkite-solana-private.sh +++ b/ci/buildkite-solana-private.sh @@ -116,8 +116,8 @@ EOF # trigger_secondary_step() { # cat >> "$output_file" <<"EOF" -# - name: "Trigger Build on solana-secondary" -# trigger: "solana-secondary" +# - name: "Trigger Build on x1-agave-secondary" +# trigger: "x1-agave-secondary" # branches: "!pull/*" # async: true # build: @@ -287,7 +287,7 @@ if [[ $BUILDKITE_BRANCH =~ ^pull ]]; then # Add helpful link back to the corresponding Github Pull Request annotate --style info --context pr-backlink \ - "Github Pull Request: https://github.com/anza-xyz/agave/$BUILDKITE_BRANCH" + "Github Pull Request: https://github.com/FairCrypto/agave-xolana/$BUILDKITE_BRANCH" if [[ $GITHUB_USER = "dependabot[bot]" ]]; then command_step dependabot "ci/dependabot-pr.sh" 5 diff --git a/ci/channel-info.sh b/ci/channel-info.sh index 2bb808365653c6..400152728cb1a7 100755 --- a/ci/channel-info.sh +++ b/ci/channel-info.sh @@ -11,7 +11,7 @@ here="$(dirname "$0")" # shellcheck source=ci/semver_bash/semver.sh source "$here"/semver_bash/semver.sh -remote=https://github.com/anza-xyz/agave.git +remote=https://github.com/FairCrypto/agave-xolana.git # Fetch all vX.Y.Z tags # diff --git a/ci/dependabot-pr.sh b/ci/dependabot-pr.sh index 8638a7d52578e7..967425d52b048c 100755 --- a/ci/dependabot-pr.sh +++ b/ci/dependabot-pr.sh @@ -21,7 +21,7 @@ fi echo --- "(FAILING) Backpropagating dependabot-triggered Cargo.lock updates" name="dependabot-buildkite" -api_base="https://api.github.com/repos/anza-xyz/agave/pulls" +api_base="https://api.github.com/repos/FairCrypto/agave-xolana/pulls" pr_num=$(echo "$BUILDKITE_BRANCH" | grep -Eo '[0-9]+') branch=$(curl -s "$api_base/$pr_num" | python3 -c 'import json,sys;print(json.load(sys.stdin)["head"]["ref"])') diff --git a/ci/do-audit.sh b/ci/do-audit.sh index 1f4ed5e294e6ff..3a12f1e137f0a4 100755 --- a/ci/do-audit.sh +++ b/ci/do-audit.sh @@ -47,6 +47,17 @@ cargo_audit_ignores=( # the server to exit cleanly on accepting a tcp/tls stream. # Ignoring because we do not use this functionality. --ignore RUSTSEC-2024-0376 + + # Crate: idna + # Version: 0.1.5 + # Title: `idna` accepts Punycode labels that do not produce any non-ASCII when decoded + # Date: 2024-12-09 + # ID: RUSTSEC-2024-0421 + # URL: https://rustsec.org/advisories/RUSTSEC-2024-0421 + # Solution: Upgrade to >=1.0.0 + # need to solve this depentant tree: + # jsonrpc-core-client v18.0.0 -> jsonrpc-client-transports v18.0.0 -> url v1.7.2 -> idna v0.1.5 + --ignore RUSTSEC-2024-0421 ) scripts/cargo-for-all-lock-files.sh audit "${cargo_audit_ignores[@]}" | $dep_tree_filter # we want the `cargo audit` exit code, not `$dep_tree_filter`'s diff --git a/ci/env.sh b/ci/env.sh index 24e2fb9a0c3ba0..b04709b5393cf8 100644 --- a/ci/env.sh +++ b/ci/env.sh @@ -21,6 +21,14 @@ if [[ -n $CI ]]; then export CI_REPO_SLUG=$TRAVIS_REPO_SLUG export CI_TAG=$TRAVIS_TAG elif [[ -n $BUILDKITE ]]; then + AWS_ACCESS_KEY_ID="$(buildkite-agent secret get AWS_ACCESS_KEY_ID)" + AWS_SECRET_ACCESS_KEY="$(buildkite-agent secret get AWS_SECRET_ACCESS_KEY)" + SCCACHE_BUCKET="$(buildkite-agent secret get SCCACHE_BUCKET)" + SCCACHE_REGION="$(buildkite-agent secret get SCCACHE_REGION)" + export AWS_ACCESS_KEY_ID + export AWS_SECRET_ACCESS_KEY + export SCCACHE_BUCKET + export SCCACHE_REGION export CI_BRANCH=$BUILDKITE_BRANCH export CI_BUILD_ID=$BUILDKITE_BUILD_ID if [[ $BUILDKITE_COMMIT = HEAD ]]; then @@ -31,7 +39,7 @@ if [[ -n $CI ]]; then # The standard BUILDKITE_PULL_REQUEST environment variable is always "false" due # to how solana-ci-gate is used to trigger PR builds rather than using the # standard Buildkite PR trigger. - if [[ $CI_BRANCH =~ pull/* ]]; then + if [[ $CI_BRANCH =~ pull/* ]] || [[ -n $BUILDKITE_PULL_REQUEST_BASE_BRANCH ]]; then export CI_BASE_BRANCH=$BUILDKITE_PULL_REQUEST_BASE_BRANCH export CI_PULL_REQUEST=true else @@ -51,14 +59,14 @@ if [[ -n $CI ]]; then esac if [[ -n $BUILDKITE_TRIGGERED_FROM_BUILD_PIPELINE_SLUG ]]; then - # The solana-secondary pipeline should use the slug of the pipeline that + # The x1-agave-secondary pipeline should use the slug of the pipeline that # triggered it export CI_REPO_SLUG=$BUILDKITE_ORGANIZATION_SLUG/$BUILDKITE_TRIGGERED_FROM_BUILD_PIPELINE_SLUG else export CI_REPO_SLUG=$BUILDKITE_ORGANIZATION_SLUG/$BUILDKITE_PIPELINE_SLUG fi # TRIGGERED_BUILDKITE_TAG is a workaround to propagate BUILDKITE_TAG into - # the solana-secondary pipeline + # the x1-agave-secondary pipeline if [[ -n $TRIGGERED_BUILDKITE_TAG ]]; then export CI_TAG=$TRIGGERED_BUILDKITE_TAG else diff --git a/ci/localnet-sanity.sh b/ci/localnet-sanity.sh index b01eca31d50d81..7891568e2703fa 100755 --- a/ci/localnet-sanity.sh +++ b/ci/localnet-sanity.sh @@ -202,8 +202,8 @@ killNodes() { # Try to use the RPC exit API to cleanly exit the first two nodes # (dynamic nodes, -x, are just killed) echo "--- RPC exit" - $agave_validator --ledger "$SOLANA_CONFIG_DIR"/bootstrap-validator exit --force || true - $agave_validator --ledger "$SOLANA_CONFIG_DIR"/validator exit --force || true + $tachyon_validator --ledger "$SOLANA_CONFIG_DIR"/bootstrap-validator exit --force || true + $tachyon_validator --ledger "$SOLANA_CONFIG_DIR"/validator exit --force || true # Give the nodes a splash of time to cleanly exit before killing them sleep 2 diff --git a/ci/run-sanity.sh b/ci/run-sanity.sh index 88a6f40b1adf28..0c09089fc75c82 100755 --- a/ci/run-sanity.sh +++ b/ci/run-sanity.sh @@ -31,7 +31,7 @@ while [[ $latest_slot -le $((snapshot_slot + 1)) ]]; do latest_slot=$($solana_cli --url http://localhost:8899 slot --commitment processed) done -$agave_validator --ledger config/ledger exit --force || true +$tachyon_validator --ledger config/ledger exit --force || true wait $pid diff --git a/ci/test-coverage.sh b/ci/test-coverage.sh index ffd362acd287b8..0d0350dfbfdde0 100755 --- a/ci/test-coverage.sh +++ b/ci/test-coverage.sh @@ -32,5 +32,5 @@ else codecov -t "${CODECOV_TOKEN}" annotate --style success --context codecov.io \ - "CodeCov report: https://codecov.io/github/anza-xyz/agave/commit/${CI_COMMIT:0:9}" + "CodeCov report: https://codecov.io/github/FairCrypto/agave-xolana/commit/${CI_COMMIT:0:9}" fi diff --git a/ci/upload-ci-artifact.sh b/ci/upload-ci-artifact.sh index e7cc34ab2b2d8c..8ddd3ec0c8e3c1 100644 --- a/ci/upload-ci-artifact.sh +++ b/ci/upload-ci-artifact.sh @@ -43,10 +43,4 @@ upload-s3-artifact() { upload-gcs-artifact() { echo "--- artifact: $1 to $2" - docker run --rm \ - -v "$GCS_RELEASE_BUCKET_WRITER_CREDIENTIAL:/application_default_credentials.json" \ - -v "$PWD:/solana" \ - -e CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE=/application_default_credentials.json \ - gcr.io/google.com/cloudsdktool/google-cloud-cli:latest \ - gcloud storage cp "$1" "$2" } diff --git a/ci/upload-github-release-asset.sh b/ci/upload-github-release-asset.sh index 229fb8993edafd..8d4f442ffe09a7 100755 --- a/ci/upload-github-release-asset.sh +++ b/ci/upload-github-release-asset.sh @@ -26,7 +26,7 @@ fi # Force CI_REPO_SLUG since sometimes # BUILDKITE_TRIGGERED_FROM_BUILD_PIPELINE_SLUG is not set correctly, causing the # artifact upload to fail -CI_REPO_SLUG=anza-xyz/agave +CI_REPO_SLUG=FairCrypto/agave-xolana #if [[ -z $CI_REPO_SLUG ]]; then # echo Error: CI_REPO_SLUG not defined # exit 1 diff --git a/docs/src/clusters/available.md b/docs/src/clusters/available.md index 52a7d469ad0cc5..17fd42fb3050d8 100644 --- a/docs/src/clusters/available.md +++ b/docs/src/clusters/available.md @@ -41,10 +41,10 @@ export SOLANA_METRICS_CONFIG="host=https://metrics.solana.com:8086,db=devnet,u=s solana config set --url https://api.devnet.solana.com ``` -##### Example `agave-validator` command-line +##### Example `tachyon-validator` command-line ```bash -$ agave-validator \ +$ tachyon-validator \ --identity validator-keypair.json \ --vote-account vote-account-keypair.json \ --known-validator dv1ZAGvdsz5hHLwWXsVnM94hWf1pjbKVau1QVkaMJ92 \ @@ -93,10 +93,10 @@ export SOLANA_METRICS_CONFIG="host=https://metrics.solana.com:8086,db=tds,u=test solana config set --url https://api.testnet.solana.com ``` -##### Example `agave-validator` command-line +##### Example `tachyon-validator` command-line ```bash -$ agave-validator \ +$ tachyon-validator \ --identity validator-keypair.json \ --vote-account vote-account-keypair.json \ --known-validator 5D1fNXzvv5NjV1ysLjirC4WY92RNsVH18vjmcszZd8on \ @@ -145,10 +145,10 @@ export SOLANA_METRICS_CONFIG="host=https://metrics.solana.com:8086,db=mainnet-be solana config set --url https://api.mainnet-beta.solana.com ``` -##### Example `agave-validator` command-line +##### Example `tachyon-validator` command-line ```bash -$ agave-validator \ +$ tachyon-validator \ --identity ~/validator-keypair.json \ --vote-account ~/vote-account-keypair.json \ --known-validator 7Np41oeYqPefeNQEHSv1UDhYrehxin3NStELsSKCT4K2 \ @@ -173,4 +173,4 @@ $ agave-validator \ :::info The above four [`--known-validator`s](../operations/guides/validator-start.md#known-validators) are operated by Solana Labs. -::: \ No newline at end of file +::: diff --git a/docs/src/clusters/benchmark.md b/docs/src/clusters/benchmark.md index 35978cdd0967dd..d59dcbaa64418f 100644 --- a/docs/src/clusters/benchmark.md +++ b/docs/src/clusters/benchmark.md @@ -108,7 +108,7 @@ For example Generally we are using `debug` for infrequent debug messages, `trace` for potentially frequent messages and `info` for performance-related logging. -You can also attach to a running process with GDB. The leader's process is named _agave-validator_: +You can also attach to a running process with GDB. The leader's process is named _tachyon-validator_: ```bash sudo gdb diff --git a/docs/src/implemented-proposals/installer.md b/docs/src/implemented-proposals/installer.md index c052aa7b4e54e5..07f5e4796a70a0 100644 --- a/docs/src/implemented-proposals/installer.md +++ b/docs/src/implemented-proposals/installer.md @@ -60,7 +60,7 @@ $ agave-install deploy http://example.com/path/to/solana-release.tar.bz2 update- $ agave-install init --pubkey 92DMonmBYXwEMHJ99c9ceRSpAmk9v6i3RdvDdXaVcrfj # <-- pubkey is obtained from whoever is deploying the updates $ export PATH=~/.local/share/agave-install/bin:$PATH $ solana-keygen ... # <-- runs the latest solana-keygen -$ agave-install run agave-validator ... # <-- runs a validator, restarting it as necessary when an update is applied +$ agave-install run tachyon-validator ... # <-- runs a validator, restarting it as necessary when an update is applied ``` ## On-chain Update Manifest diff --git a/docs/src/operations/best-practices/general.md b/docs/src/operations/best-practices/general.md index 3e531b0160c571..23360c6726f779 100644 --- a/docs/src/operations/best-practices/general.md +++ b/docs/src/operations/best-practices/general.md @@ -23,12 +23,12 @@ watch past workshops through the ## Help with the validator command line -From within the Solana CLI, you can execute the `agave-validator` command with +From within the Solana CLI, you can execute the `tachyon-validator` command with the `--help` flag to get a better understanding of the flags and sub commands available. ``` -agave-validator --help +tachyon-validator --help ``` ## Restarting your validator @@ -49,14 +49,14 @@ solana leader-schedule Based on the current slot and the leader schedule, you can calculate open time windows where your validator is not expected to produce blocks. -Assuming you are ready to restart, you may use the `agave-validator exit` +Assuming you are ready to restart, you may use the `tachyon-validator exit` command. The command exits your validator process when an appropriate idle time window is reached. Assuming that you have systemd implemented for your validator process, the validator should restart automatically after the exit. See the below help command for details: ``` -agave-validator exit --help +tachyon-validator exit --help ``` ## Upgrading @@ -75,7 +75,7 @@ process. It is a best practice to always build your Solana binaries from source. If you build from source, you are certain that the code you are building has not been tampered with before the binary was created. You may also be able to optimize -your `agave-validator` binary to your specific hardware. +your `tachyon-validator` binary to your specific hardware. If you build from source on the validator machine (or a machine with the same CPU), you can target your specific architecture using the `-march` flag. Refer @@ -106,7 +106,7 @@ options. ### Restart For all install methods, the validator process will need to be restarted before -the newly installed version is in use. Use `agave-validator exit` to restart +the newly installed version is in use. Use `tachyon-validator exit` to restart your validator process. ### Verifying version @@ -132,13 +132,13 @@ have state locally. In other cases such as restarts for upgrades, a snapshot download should be avoided. To avoid downloading a snapshot on restart, add the following flag to the -`agave-validator` command: +`tachyon-validator` command: ``` --no-snapshot-fetch ``` -If you use this flag with the `agave-validator` command, make sure that you run +If you use this flag with the `tachyon-validator` command, make sure that you run `solana catchup ` after your validator starts to make sure that the validator is catching up in a reasonable time. After some time (potentially a few hours), if it appears that your validator continues to fall behind, then you @@ -199,7 +199,7 @@ It is important that you do not accidentally run out of funds in your identity account, as your node will stop voting. It is also important to note that this account keypair is the most vulnerable of the three keypairs in a vote account because the keypair for the identity account is stored on your validator when -running the `agave-validator` software. How much SOL you should store there is +running the `tachyon-validator` software. How much SOL you should store there is up to you. As a best practice, make sure to check the account regularly and refill or deduct from it as needed. To check the account balance do: diff --git a/docs/src/operations/best-practices/monitoring.md b/docs/src/operations/best-practices/monitoring.md index a0f2ef9df9fa22..57098634f2abe9 100644 --- a/docs/src/operations/best-practices/monitoring.md +++ b/docs/src/operations/best-practices/monitoring.md @@ -27,11 +27,11 @@ The command will monitor your validator, but you will not get notifications unle It is a best practice to run the `agave-watchtower` command on a separate server from your validator. -In the case that you run `agave-watchtower` on the same computer as your `agave-validator` process, then during catastrophic events like a power outage, you will not be aware of the issue, because your `agave-watchtower` process will stop at the same time as your `agave-validator` process. +In the case that you run `agave-watchtower` on the same computer as your `tachyon-validator` process, then during catastrophic events like a power outage, you will not be aware of the issue, because your `agave-watchtower` process will stop at the same time as your `tachyon-validator` process. Additionally, while running the `agave-watchtower` process manually with environment variables set in the terminal is a good way to test out the command, it is not operationally sound because the process will not be restarted when the terminal closes or during a system restart. -Instead, you could run your `agave-watchtower` command as a system process similar to `agave-validator`. In the system process file, you can specify the environment variables for your bot. +Instead, you could run your `agave-watchtower` command as a system process similar to `tachyon-validator`. In the system process file, you can specify the environment variables for your bot. ### Setup Telegram Notifications @@ -83,4 +83,4 @@ export TELEGRAM_CHAT_ID= Once your environment variables are set, restart `agave-watchtower`. You should see output about your validator. -To test that your Telegram configuration is working properly, you could stop your validator briefly until it is labeled as delinquent. Up to a minute after the validator is delinquent, you should receive a message in the Telegram group from your bot. Start the validator again and verify that you get another message in your Telegram group from the bot. The message should say `all clear`. \ No newline at end of file +To test that your Telegram configuration is working properly, you could stop your validator briefly until it is labeled as delinquent. Up to a minute after the validator is delinquent, you should receive a message in the Telegram group from your bot. Start the validator again and verify that you get another message in your Telegram group from the bot. The message should say `all clear`. diff --git a/docs/src/operations/guides/restart-cluster.md b/docs/src/operations/guides/restart-cluster.md index cda3f30a5a016d..31dacfee3f82ed 100644 --- a/docs/src/operations/guides/restart-cluster.md +++ b/docs/src/operations/guides/restart-cluster.md @@ -68,7 +68,7 @@ Post something like the following to #announcements (adjusting the text as appro > 2. a. Preferred method, start from your local ledger with: > > ```bash -> agave-validator +> tachyon-validator > --wait-for-supermajority SLOT_X # <-- NEW! IMPORTANT! REMOVE AFTER THIS RESTART > --expected-bank-hash NEW_BANK_HASH # <-- NEW! IMPORTANT! REMOVE AFTER THIS RESTART > --hard-fork SLOT_X # <-- NEW! IMPORTANT! REMOVE AFTER THIS RESTART @@ -84,7 +84,7 @@ Post something like the following to #announcements (adjusting the text as appro > b. If your validator doesn't have ledger up to slot SLOT_X or if you have deleted your ledger, have it instead download a snapshot with: > > ```bash -> agave-validator +> tachyon-validator > --wait-for-supermajority SLOT_X # <-- NEW! IMPORTANT! REMOVE AFTER THIS RESTART > --expected-bank-hash NEW_BANK_HASH # <-- NEW! IMPORTANT! REMOVE AFTER THIS RESTART > --entrypoint entrypoint.testnet.solana.com:8001 diff --git a/docs/src/operations/guides/validator-failover.md b/docs/src/operations/guides/validator-failover.md index b7b3fea568194b..e309314718eea2 100644 --- a/docs/src/operations/guides/validator-failover.md +++ b/docs/src/operations/guides/validator-failover.md @@ -85,11 +85,11 @@ For more information on etcd TLS setup, please refer to https://etcd.io/docs/v3.5/op-guide/security/#example-2-client-to-server-authentication-with-https-client-certificates ### Primary Validator -The following additional `agave-validator` parameters are required to enable +The following additional `tachyon-validator` parameters are required to enable tower storage into etcd: ``` -agave-validator ... \ +tachyon-validator ... \ --tower-storage etcd \ --etcd-cacert-file certs/etcd-ca.pem \ --etcd-cert-file certs/validator.pem \ @@ -103,7 +103,7 @@ that your etcd endpoint remain accessible at all times. ### Secondary Validator Configure the secondary validator like the primary with the exception of the -following `agave-validator` command-line argument changes: +following `tachyon-validator` command-line argument changes: * Generate and use a secondary validator identity: `--identity secondary-validator-keypair.json` * Add `--no-check-vote-account` * Add `--authorized-voter validator-keypair.json` (where @@ -114,8 +114,8 @@ When both validators are running normally and caught up to the cluster, a failover from primary to secondary can be triggered by running the following command on the secondary validator: ```bash -$ agave-validator wait-for-restart-window --identity validator-keypair.json \ - && agave-validator set-identity validator-keypair.json +$ tachyon-validator wait-for-restart-window --identity validator-keypair.json \ + && tachyon-validator set-identity validator-keypair.json ``` The secondary validator will acquire a lock on the tower in etcd to ensure @@ -131,7 +131,7 @@ exit. However if/when the secondary validator restarts, it will do so using the secondary validator identity and thus the restart cycle is broken. ## Triggering a failover via monitoring -Monitoring of your choosing can invoke the `agave-validator set-identity +Monitoring of your choosing can invoke the `tachyon-validator set-identity validator-keypair.json` command mentioned in the previous section. It is not necessary to guarantee the primary validator has halted before failing diff --git a/docs/src/operations/guides/validator-start.md b/docs/src/operations/guides/validator-start.md index d86c714be4e6a6..770ba9766e493b 100644 --- a/docs/src/operations/guides/validator-start.md +++ b/docs/src/operations/guides/validator-start.md @@ -32,7 +32,7 @@ detail on cluster activity. ## Enabling CUDA If your machine has a GPU with CUDA installed \(Linux-only currently\), include -the `--cuda` argument to `agave-validator`. +the `--cuda` argument to `tachyon-validator`. When your validator is started look for the following log message to indicate that CUDA is enabled: `"[ solana::validator] CUDA is enabled"` @@ -47,7 +47,7 @@ the following commands. #### **Optimize sysctl knobs** ```bash -sudo bash -c "cat >/etc/sysctl.d/21-agave-validator.conf </etc/sysctl.d/21-tachyon-validator.conf <` -argument to `agave-validator`. You can specify multiple ones by repeating the argument `--known-validator --known-validator `. +argument to `tachyon-validator`. You can specify multiple ones by repeating the argument `--known-validator --known-validator `. This has two effects, one is when the validator is booting with `--only-known-rpc`, it will only ask that set of known nodes for downloading genesis and snapshot data. Another is that in combination with the `--halt-on-known-validators-accounts-hash-mismatch` option, it will monitor the merkle root hash of the entire accounts state of other known nodes on gossip and if the hashes produce any mismatch, @@ -277,13 +277,13 @@ account state divergence. Connect to the cluster by running: ```bash -agave-validator \ +tachyon-validator \ --identity ~/validator-keypair.json \ --vote-account ~/vote-account-keypair.json \ --rpc-port 8899 \ --entrypoint entrypoint.devnet.solana.com:8001 \ --limit-ledger-size \ - --log ~/agave-validator.log + --log ~/tachyon-validator.log ``` To force validator logging to the console add a `--log -` argument, otherwise @@ -296,7 +296,7 @@ The ledger will be placed in the `ledger/` directory by default, use the > [paper wallet seed phrase](../../cli/wallets/paper.md) > for your `--identity` and/or > `--authorized-voter` keypairs. To use these, pass the respective argument as -> `agave-validator --identity ASK ... --authorized-voter ASK ...` +> `tachyon-validator --identity ASK ... --authorized-voter ASK ...` > and you will be prompted to enter your seed phrases and optional passphrase. Confirm your validator is connected to the network by opening a new terminal and @@ -312,7 +312,7 @@ If your validator is connected, its public key and IP address will appear in the By default the validator will dynamically select available network ports in the 8000-10000 range, and may be overridden with `--dynamic-port-range`. For -example, `agave-validator --dynamic-port-range 11000-11020 ...` will restrict +example, `tachyon-validator --dynamic-port-range 11000-11020 ...` will restrict the validator to ports 11000-11020. ### Limiting ledger size to conserve disk space @@ -366,8 +366,8 @@ WantedBy=multi-user.target ``` Now create `/home/sol/bin/validator.sh` to include the desired -`agave-validator` command-line. Ensure that the 'exec' command is used to -start the validator process (i.e. "exec agave-validator ..."). This is +`tachyon-validator` command-line. Ensure that the 'exec' command is used to +start the validator process (i.e. "exec tachyon-validator ..."). This is important because without it, logrotate will end up killing the validator every time the logs are rotated. @@ -394,14 +394,14 @@ to be reverted and the issue reproduced before help can be provided. #### Log rotation -The validator log file, as specified by `--log ~/agave-validator.log`, can get +The validator log file, as specified by `--log ~/tachyon-validator.log`, can get very large over time and it's recommended that log rotation be configured. The validator will re-open its log file when it receives the `USR1` signal, which is the basic primitive that enables log rotation. If the validator is being started by a wrapper shell script, it is important to -launch the process with `exec` (`exec agave-validator ...`) when using logrotate. +launch the process with `exec` (`exec tachyon-validator ...`) when using logrotate. This will prevent the `USR1` signal from being sent to the script's process instead of the validator's, which will kill them both. @@ -409,13 +409,13 @@ instead of the validator's, which will kill them both. An example setup for the `logrotate`, which assumes that the validator is running as a systemd service called `sol.service` and writes a log file at -/home/sol/agave-validator.log: +/home/sol/tachyon-validator.log: ```bash # Setup log rotation cat > logrotate.sol </etc/sysctl.d/21-agave-validator.conf </etc/sysctl.d/21-tachyon-validator.conf < For more explanation on the flags used in the command, refer to the `agave-validator --help` command +> For more explanation on the flags used in the command, refer to the `tachyon-validator --help` command ``` #!/bin/bash -exec agave-validator \ +exec tachyon-validator \ --identity /home/sol/validator-keypair.json \ --known-validator 5D1fNXzvv5NjV1ysLjirC4WY92RNsVH18vjmcszZd8on \ --known-validator dDzy5SR3AXdYWVqbDEkVFdvSPCtS9ihF5kJkHCtXoFs \ diff --git a/genesis/src/main.rs b/genesis/src/main.rs index 6b7efd5e664339..fe313b1b9998b0 100644 --- a/genesis/src/main.rs +++ b/genesis/src/main.rs @@ -5,7 +5,7 @@ use { base64::{prelude::BASE64_STANDARD, Engine}, clap::{crate_description, crate_name, value_t, value_t_or_exit, App, Arg, ArgMatches}, itertools::Itertools, - solana_accounts_db::hardened_unpack::MAX_GENESIS_ARCHIVE_UNPACKED_SIZE, + solana_accounts_db::{hardened_unpack::MAX_GENESIS_ARCHIVE_UNPACKED_SIZE, inline_spl_token}, solana_clap_utils::{ input_parsers::{ cluster_type_of, pubkey_of, pubkeys_of, unix_timestamp_from_rfc3339_datetime, @@ -580,6 +580,18 @@ fn main() -> Result<(), Box> { solana_stake_program::add_genesis_accounts(&mut genesis_config); if genesis_config.cluster_type == ClusterType::Development { solana_runtime::genesis_utils::activate_all_features(&mut genesis_config); + + // Add the native mint account which was activated as a feature gate. + genesis_config.add_account( + inline_spl_token::native_mint::id(), + solana_sdk::account::AccountSharedData::from(Account { + owner: inline_spl_token::id(), + data: inline_spl_token::native_mint::ACCOUNT_DATA.to_vec(), + lamports: sol_to_lamports(1.0), + executable: false, + rent_epoch: 1, + }), + ); } if let Some(files) = matches.values_of("primordial_accounts_file") { diff --git a/ledger-tool/src/ledger_utils.rs b/ledger-tool/src/ledger_utils.rs index 49068ad26510eb..7abe58223d1ce6 100644 --- a/ledger-tool/src/ledger_utils.rs +++ b/ledger-tool/src/ledger_utils.rs @@ -190,14 +190,14 @@ pub fn load_and_process_ledger( } let account_paths = if let Some(account_paths) = arg_matches.value_of("account_paths") { - // If this blockstore access is Primary, no other process (agave-validator) can hold + // If this blockstore access is Primary, no other process (tachyon-validator) can hold // Primary access. So, allow a custom accounts path without worry of wiping the accounts - // of agave-validator. + // of tachyon-validator. if !blockstore.is_primary_access() { // Attempt to open the Blockstore in Primary access; if successful, no other process // was holding Primary so allow things to proceed with custom accounts path. Release - // the Primary access instead of holding it to give priority to agave-validator over - // agave-ledger-tool should agave-validator start before we've finished. + // the Primary access instead of holding it to give priority to tachyon-validator over + // agave-ledger-tool should tachyon-validator start before we've finished. info!( "Checking if another process currently holding Primary access to {:?}", blockstore.ledger_path() diff --git a/ledger/src/blockstore_db.rs b/ledger/src/blockstore_db.rs index ab7517453584a2..1e0c9be4c08b06 100644 --- a/ledger/src/blockstore_db.rs +++ b/ledger/src/blockstore_db.rs @@ -433,7 +433,7 @@ impl Rocks { info!( "Opening Rocks with secondary (read only) access at: {secondary_path:?}. \ This secondary access could temporarily degrade other accesses, such as \ - by agave-validator" + by tachyon-validator" ); DB::open_cf_descriptors_as_secondary( &db_options, diff --git a/local-cluster/tests/local_cluster.rs b/local-cluster/tests/local_cluster.rs index 675263f26f6af9..fe578b369e4999 100644 --- a/local-cluster/tests/local_cluster.rs +++ b/local-cluster/tests/local_cluster.rs @@ -2323,7 +2323,7 @@ fn test_hard_fork_with_gap_in_roots() { let blockstore_a = Blockstore::open(&val_a_ledger_path).unwrap(); create_snapshot_to_hard_fork(&blockstore_a, hard_fork_slot, vec![hard_fork_slot]); - // Intentionally make agave-validator unbootable by replaying blocks from the genesis to + // Intentionally make tachyon-validator unbootable by replaying blocks from the genesis to // ensure the hard-forked snapshot is used always. Otherwise, we couldn't create a gap // in the ledger roots column family reliably. // There was a bug which caused the hard-forked snapshot at an unrooted slot to forget diff --git a/multinode-demo/bootstrap-validator.sh b/multinode-demo/bootstrap-validator.sh index 2872af5cc426af..a1ad2ed16a097b 100755 --- a/multinode-demo/bootstrap-validator.sh +++ b/multinode-demo/bootstrap-validator.sh @@ -14,9 +14,9 @@ if [[ "$SOLANA_GPU_MISSING" -eq 1 ]]; then fi if [[ -n $SOLANA_CUDA ]]; then - program=$agave_validator_cuda + program=$tachyon_validator_cuda else - program=$agave_validator + program=$tachyon_validator fi no_restart=0 diff --git a/multinode-demo/common.sh b/multinode-demo/common.sh index db43dd15cffaaf..a0b4a8bb01eede 100644 --- a/multinode-demo/common.sh +++ b/multinode-demo/common.sh @@ -69,8 +69,8 @@ fi solana_bench_tps=$(solana_program bench-tps) solana_faucet=$(solana_program faucet) -agave_validator=$(solana_program validator) -agave_validator_cuda="$agave_validator --cuda" +tachyon_validator=$(solana_program validator) +tachyon_validator_cuda="$tachyon_validator --cuda" solana_genesis=$(solana_program genesis) solana_gossip=$(solana_program gossip) solana_keygen=$(solana_program keygen) diff --git a/multinode-demo/validator.sh b/multinode-demo/validator.sh index efb7a6afd56ea0..e8fabec696e244 100755 --- a/multinode-demo/validator.sh +++ b/multinode-demo/validator.sh @@ -64,7 +64,7 @@ while [[ -n $1 ]]; do elif [[ $1 = --no-airdrop ]]; then airdrops_enabled=0 shift - # agave-validator options + # tachyon-validator options elif [[ $1 = --expected-genesis-hash ]]; then args+=("$1" "$2") shift 2 @@ -270,9 +270,9 @@ if [[ $maybeRequireTower = true ]]; then fi if [[ -n $SOLANA_CUDA ]]; then - program=$agave_validator_cuda + program=$tachyon_validator_cuda else - program=$agave_validator + program=$tachyon_validator fi set -e diff --git a/program-test/tests/sysvar.rs b/program-test/tests/sysvar.rs index 95db7f1a17113d..6ebb20c27425f7 100644 --- a/program-test/tests/sysvar.rs +++ b/program-test/tests/sysvar.rs @@ -2,8 +2,8 @@ use { solana_program_test::{processor, ProgramTest}, solana_sdk::{ account_info::AccountInfo, clock::Clock, entrypoint::ProgramResult, - epoch_rewards::EpochRewards, epoch_schedule::EpochSchedule, instruction::Instruction, msg, - pubkey::Pubkey, rent::Rent, signature::Signer, sysvar::Sysvar, transaction::Transaction, + epoch_schedule::EpochSchedule, instruction::Instruction, msg, pubkey::Pubkey, rent::Rent, + signature::Signer, sysvar::Sysvar, transaction::Transaction, }, }; @@ -53,77 +53,3 @@ async fn get_sysvar() { .await .unwrap(); } - -fn epoch_reward_sysvar_getter_process_instruction( - _program_id: &Pubkey, - _accounts: &[AccountInfo], - input: &[u8], -) -> ProgramResult { - msg!("epoch_reward_sysvar_getter"); - - // input[0] == 0 indicates the bank is not in reward period. - // input[0] == 1 indicates the bank is in reward period. - if input[0] == 0 { - // epoch rewards sysvar should not exist for banks that are not in reward period - let epoch_rewards = EpochRewards::get(); - assert!(epoch_rewards.is_err()); - } else { - let _epoch_rewards = EpochRewards::get()?; - } - - Ok(()) -} - -#[tokio::test] -async fn get_epoch_rewards_sysvar() { - let program_id = Pubkey::new_unique(); - let program_test = ProgramTest::new( - "epoch_reward_sysvar_getter", - program_id, - processor!(epoch_reward_sysvar_getter_process_instruction), - ); - - let mut context = program_test.start_with_context().await; - - // wrap to 1st slot before next epoch (outside reward interval) - let first_normal_slot = context.genesis_config().epoch_schedule.first_normal_slot; - let slots_per_epoch = context.genesis_config().epoch_schedule.slots_per_epoch; - let last_slot_before_new_epoch = first_normal_slot - .saturating_add(slots_per_epoch) - .saturating_sub(1); - context.warp_to_slot(last_slot_before_new_epoch).unwrap(); - - // outside of reward interval, set input[0] == 0, so that the program assert that epoch_rewards sysvar doesn't exist. - let instructions = vec![Instruction::new_with_bincode(program_id, &[0u8], vec![])]; - let transaction = Transaction::new_signed_with_payer( - &instructions, - Some(&context.payer.pubkey()), - &[&context.payer], - context.last_blockhash, - ); - - context - .banks_client - .process_transaction(transaction) - .await - .unwrap(); - - // wrap to 1st slot of next epoch (inside reward interval) - let first_slot_in_new_epoch = first_normal_slot.saturating_add(slots_per_epoch); - context.warp_to_slot(first_slot_in_new_epoch).unwrap(); - - // inside of reward interval, set input[0] == 1, so that the program assert that epoch_rewards sysvar exist. - let instructions = vec![Instruction::new_with_bincode(program_id, &[1u8], vec![])]; - let transaction = Transaction::new_signed_with_payer( - &instructions, - Some(&context.payer.pubkey()), - &[&context.payer], - context.last_blockhash, - ); - - context - .banks_client - .process_transaction(transaction) - .await - .unwrap(); -} diff --git a/programs/bpf_loader/src/syscalls/mod.rs b/programs/bpf_loader/src/syscalls/mod.rs index fb3d5b32b7ca4f..1b596017d1cabb 100644 --- a/programs/bpf_loader/src/syscalls/mod.rs +++ b/programs/bpf_loader/src/syscalls/mod.rs @@ -270,8 +270,9 @@ pub fn create_program_runtime_environment_v1<'a>( let blake3_syscall_enabled = feature_set.is_active(&blake3_syscall_enabled::id()); let curve25519_syscall_enabled = feature_set.is_active(&curve25519_syscall_enabled::id()); let disable_fees_sysvar = feature_set.is_active(&disable_fees_sysvar::id()); - let epoch_rewards_syscall_enabled = - feature_set.is_active(&enable_partitioned_epoch_reward::id()); + let epoch_rewards_syscall_enabled = feature_set + .is_active(&enable_partitioned_epoch_reward::id()) + && !feature_set.is_active(&feature_set::deactivate_canceled_partitioned_epoch_reward::id()); let disable_deploy_of_alloc_free_syscall = reject_deployment_of_broken_elfs && feature_set.is_active(&disable_deploy_of_alloc_free_syscall::id()); let last_restart_slot_syscall_enabled = feature_set.is_active(&last_restart_slot_sysvar::id()); diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index fb1e24a99a0deb..13baaaa1de1f0e 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -65,7 +65,7 @@ dependencies = [ [[package]] name = "agave-geyser-plugin-interface" -version = "1.18.27" +version = "1.18.29" dependencies = [ "log", "solana-sdk", @@ -73,68 +73,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "agave-validator" -version = "1.18.27" -dependencies = [ - "agave-geyser-plugin-interface", - "chrono", - "clap 2.33.3", - "console", - "core_affinity", - "crossbeam-channel", - "fd-lock", - "indicatif", - "itertools", - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "jsonrpc-ipc-server", - "jsonrpc-server-utils", - "lazy_static", - "libc", - "libloading", - "log", - "num_cpus", - "rand 0.8.5", - "rayon", - "serde", - "serde_json", - "serde_yaml", - "signal-hook", - "solana-accounts-db", - "solana-clap-utils", - "solana-cli-config", - "solana-core", - "solana-download-utils", - "solana-entry", - "solana-faucet", - "solana-genesis-utils", - "solana-geyser-plugin-manager", - "solana-gossip", - "solana-ledger", - "solana-logger", - "solana-metrics", - "solana-net-utils", - "solana-perf", - "solana-poh", - "solana-rpc", - "solana-rpc-client", - "solana-rpc-client-api", - "solana-runtime", - "solana-sdk", - "solana-send-transaction-service", - "solana-storage-bigtable", - "solana-streamer", - "solana-test-validator", - "solana-tpu-client", - "solana-version", - "solana-vote-program", - "symlink", - "thiserror", - "tikv-jemallocator", -] - [[package]] name = "ahash" version = "0.7.6" @@ -4706,7 +4644,7 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.18.27" +version = "1.18.29" dependencies = [ "Inflector", "base64 0.21.7", @@ -4729,7 +4667,7 @@ dependencies = [ [[package]] name = "solana-accounts-db" -version = "1.18.27" +version = "1.18.29" dependencies = [ "arrayref", "bincode", @@ -4788,7 +4726,7 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bincode", "bytemuck", @@ -4807,7 +4745,7 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "1.18.27" +version = "1.18.29" dependencies = [ "borsh 1.2.1", "futures 0.3.30", @@ -4822,7 +4760,7 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "1.18.27" +version = "1.18.29" dependencies = [ "serde", "solana-sdk", @@ -4831,7 +4769,7 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bincode", "crossbeam-channel", @@ -4849,7 +4787,7 @@ dependencies = [ [[package]] name = "solana-bloom" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bv", "fnv", @@ -4866,7 +4804,7 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bincode", "byteorder 1.5.0", @@ -4883,7 +4821,7 @@ dependencies = [ [[package]] name = "solana-bpf-rust-big-mod-exp" -version = "1.18.27" +version = "1.18.29" dependencies = [ "array-bytes", "serde", @@ -4893,7 +4831,7 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bv", "bytemuck", @@ -4909,7 +4847,7 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.18.27" +version = "1.18.29" dependencies = [ "chrono", "clap 2.33.3", @@ -4924,7 +4862,7 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.18.27" +version = "1.18.29" dependencies = [ "dirs-next", "lazy_static", @@ -4938,7 +4876,7 @@ dependencies = [ [[package]] name = "solana-cli-output" -version = "1.18.27" +version = "1.18.29" dependencies = [ "Inflector", "base64 0.21.7", @@ -4963,7 +4901,7 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.18.27" +version = "1.18.29" dependencies = [ "async-trait", "bincode", @@ -4994,7 +4932,7 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -5002,7 +4940,7 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bincode", "chrono", @@ -5014,7 +4952,7 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.18.27" +version = "1.18.29" dependencies = [ "async-trait", "bincode", @@ -5034,7 +4972,7 @@ dependencies = [ [[package]] name = "solana-core" -version = "1.18.27" +version = "1.18.29" dependencies = [ "base64 0.21.7", "bincode", @@ -5109,7 +5047,7 @@ dependencies = [ [[package]] name = "solana-cost-model" -version = "1.18.27" +version = "1.18.29" dependencies = [ "lazy_static", "log", @@ -5131,7 +5069,7 @@ dependencies = [ [[package]] name = "solana-download-utils" -version = "1.18.27" +version = "1.18.29" dependencies = [ "console", "indicatif", @@ -5143,7 +5081,7 @@ dependencies = [ [[package]] name = "solana-entry" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bincode", "crossbeam-channel", @@ -5163,7 +5101,7 @@ dependencies = [ [[package]] name = "solana-faucet" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bincode", "byteorder 1.5.0", @@ -5185,7 +5123,7 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.18.27" +version = "1.18.29" dependencies = [ "block-buffer 0.10.4", "bs58", @@ -5208,7 +5146,7 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.18.27" +version = "1.18.29" dependencies = [ "proc-macro2", "quote", @@ -5218,7 +5156,7 @@ dependencies = [ [[package]] name = "solana-genesis-utils" -version = "1.18.27" +version = "1.18.29" dependencies = [ "log", "solana-accounts-db", @@ -5229,7 +5167,7 @@ dependencies = [ [[package]] name = "solana-geyser-plugin-manager" -version = "1.18.27" +version = "1.18.29" dependencies = [ "agave-geyser-plugin-interface", "bs58", @@ -5254,7 +5192,7 @@ dependencies = [ [[package]] name = "solana-gossip" -version = "1.18.27" +version = "1.18.29" dependencies = [ "assert_matches", "bincode", @@ -5302,7 +5240,7 @@ dependencies = [ [[package]] name = "solana-ledger" -version = "1.18.27" +version = "1.18.29" dependencies = [ "assert_matches", "bincode", @@ -5368,7 +5306,7 @@ dependencies = [ [[package]] name = "solana-loader-v4-program" -version = "1.18.27" +version = "1.18.29" dependencies = [ "log", "solana-measure", @@ -5379,7 +5317,7 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.18.27" +version = "1.18.29" dependencies = [ "env_logger", "lazy_static", @@ -5388,7 +5326,7 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.18.27" +version = "1.18.29" dependencies = [ "log", "solana-sdk", @@ -5396,7 +5334,7 @@ dependencies = [ [[package]] name = "solana-merkle-tree" -version = "1.18.27" +version = "1.18.29" dependencies = [ "fast-math", "solana-program", @@ -5404,7 +5342,7 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.18.27" +version = "1.18.29" dependencies = [ "crossbeam-channel", "gethostname", @@ -5417,7 +5355,7 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bincode", "clap 3.1.6", @@ -5443,7 +5381,7 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-perf" -version = "1.18.27" +version = "1.18.29" dependencies = [ "ahash 0.8.7", "bincode", @@ -5470,7 +5408,7 @@ dependencies = [ [[package]] name = "solana-poh" -version = "1.18.27" +version = "1.18.29" dependencies = [ "core_affinity", "crossbeam-channel", @@ -5486,7 +5424,7 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.18.27" +version = "1.18.29" dependencies = [ "ark-bn254", "ark-ec", @@ -5539,7 +5477,7 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.18.27" +version = "1.18.29" dependencies = [ "base64 0.21.7", "bincode", @@ -5565,7 +5503,7 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "1.18.27" +version = "1.18.29" dependencies = [ "assert_matches", "async-trait", @@ -5593,7 +5531,7 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.18.27" +version = "1.18.29" dependencies = [ "crossbeam-channel", "futures-util", @@ -5616,7 +5554,7 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.18.27" +version = "1.18.29" dependencies = [ "async-mutex", "async-trait", @@ -5641,7 +5579,7 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.18.27" +version = "1.18.29" dependencies = [ "lazy_static", "num_cpus", @@ -5649,7 +5587,7 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.18.27" +version = "1.18.29" dependencies = [ "console", "dialoguer", @@ -5666,7 +5604,7 @@ dependencies = [ [[package]] name = "solana-rpc" -version = "1.18.27" +version = "1.18.29" dependencies = [ "base64 0.21.7", "bincode", @@ -5721,7 +5659,7 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.18.27" +version = "1.18.29" dependencies = [ "async-trait", "base64 0.21.7", @@ -5745,7 +5683,7 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.18.27" +version = "1.18.29" dependencies = [ "base64 0.21.7", "bs58", @@ -5765,7 +5703,7 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.18.27" +version = "1.18.29" dependencies = [ "clap 2.33.3", "solana-clap-utils", @@ -5776,7 +5714,7 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "1.18.27" +version = "1.18.29" dependencies = [ "aquamarine", "arrayref", @@ -5851,7 +5789,7 @@ dependencies = [ [[package]] name = "solana-sbf-programs" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bincode", "byteorder 1.5.0", @@ -5880,7 +5818,7 @@ dependencies = [ [[package]] name = "solana-sbf-rust-128bit" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", "solana-sbf-rust-128bit-dep", @@ -5888,21 +5826,21 @@ dependencies = [ [[package]] name = "solana-sbf-rust-128bit-dep" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-alloc" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-alt-bn128" -version = "1.18.27" +version = "1.18.29" dependencies = [ "array-bytes", "solana-program", @@ -5910,7 +5848,7 @@ dependencies = [ [[package]] name = "solana-sbf-rust-alt-bn128-compression" -version = "1.18.27" +version = "1.18.29" dependencies = [ "array-bytes", "solana-program", @@ -5918,21 +5856,21 @@ dependencies = [ [[package]] name = "solana-sbf-rust-call-depth" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-caller-access" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-curve25519" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", "solana-zk-token-sdk", @@ -5940,14 +5878,14 @@ dependencies = [ [[package]] name = "solana-sbf-rust-custom-heap" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-dep-crate" -version = "1.18.27" +version = "1.18.29" dependencies = [ "byteorder 1.5.0", "solana-program", @@ -5955,21 +5893,21 @@ dependencies = [ [[package]] name = "solana-sbf-rust-deprecated-loader" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-dup-accounts" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-error-handling" -version = "1.18.27" +version = "1.18.29" dependencies = [ "num-derive 0.3.0", "num-traits", @@ -5979,42 +5917,42 @@ dependencies = [ [[package]] name = "solana-sbf-rust-external-spend" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-finalize" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-get-minimum-delegation" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-inner_instruction_alignment_check" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-instruction-introspection" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-invoke" -version = "1.18.27" +version = "1.18.29" dependencies = [ "rustversion", "solana-program", @@ -6024,49 +5962,49 @@ dependencies = [ [[package]] name = "solana-sbf-rust-invoke-and-error" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-invoke-and-ok" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-invoke-and-return" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-invoked" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-iter" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-log-data" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-many-args" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", "solana-sbf-rust-many-args-dep", @@ -6074,14 +6012,14 @@ dependencies = [ [[package]] name = "solana-sbf-rust-many-args-dep" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-mem" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", "solana-program-runtime", @@ -6091,7 +6029,7 @@ dependencies = [ [[package]] name = "solana-sbf-rust-membuiltins" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", "solana-sbf-rust-mem", @@ -6099,21 +6037,21 @@ dependencies = [ [[package]] name = "solana-sbf-rust-noop" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-panic" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-param-passing" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", "solana-sbf-rust-param-passing-dep", @@ -6121,14 +6059,14 @@ dependencies = [ [[package]] name = "solana-sbf-rust-param-passing-dep" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-poseidon" -version = "1.18.27" +version = "1.18.29" dependencies = [ "array-bytes", "solana-program", @@ -6136,7 +6074,7 @@ dependencies = [ [[package]] name = "solana-sbf-rust-rand" -version = "1.18.27" +version = "1.18.29" dependencies = [ "getrandom 0.2.10", "rand 0.8.5", @@ -6145,14 +6083,14 @@ dependencies = [ [[package]] name = "solana-sbf-rust-realloc" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-realloc-invoke" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", "solana-sbf-rust-realloc", @@ -6160,7 +6098,7 @@ dependencies = [ [[package]] name = "solana-sbf-rust-remaining-compute-units" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", "solana-program-runtime", @@ -6170,21 +6108,21 @@ dependencies = [ [[package]] name = "solana-sbf-rust-ro-account_modify" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-ro-modify" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-sanity" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", "solana-program-runtime", @@ -6194,7 +6132,7 @@ dependencies = [ [[package]] name = "solana-sbf-rust-secp256k1-recover" -version = "1.18.27" +version = "1.18.29" dependencies = [ "libsecp256k1 0.7.0", "solana-program", @@ -6202,7 +6140,7 @@ dependencies = [ [[package]] name = "solana-sbf-rust-sha" -version = "1.18.27" +version = "1.18.29" dependencies = [ "blake3", "solana-program", @@ -6210,46 +6148,46 @@ dependencies = [ [[package]] name = "solana-sbf-rust-sibling-instructions" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-sibling_inner-instructions" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-simulation" -version = "1.18.27" +version = "1.18.29" dependencies = [ - "agave-validator", "solana-logger", "solana-program", "solana-program-test", "solana-sdk", + "tachyon-validator", ] [[package]] name = "solana-sbf-rust-spoof1" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-spoof1-system" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-sysvar" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", "solana-program-runtime", @@ -6259,21 +6197,21 @@ dependencies = [ [[package]] name = "solana-sbf-rust-upgradeable" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sbf-rust-upgraded" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-program", ] [[package]] name = "solana-sdk" -version = "1.18.27" +version = "1.18.29" dependencies = [ "assert_matches", "base64 0.21.7", @@ -6326,7 +6264,7 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bs58", "proc-macro2", @@ -6343,7 +6281,7 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "1.18.27" +version = "1.18.29" dependencies = [ "crossbeam-channel", "log", @@ -6357,7 +6295,7 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bincode", "log", @@ -6370,7 +6308,7 @@ dependencies = [ [[package]] name = "solana-storage-bigtable" -version = "1.18.27" +version = "1.18.29" dependencies = [ "backoff", "bincode", @@ -6402,7 +6340,7 @@ dependencies = [ [[package]] name = "solana-storage-proto" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bincode", "bs58", @@ -6417,7 +6355,7 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "1.18.27" +version = "1.18.29" dependencies = [ "async-channel", "bytes", @@ -6448,7 +6386,7 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bincode", "log", @@ -6460,7 +6398,7 @@ dependencies = [ [[package]] name = "solana-test-validator" -version = "1.18.27" +version = "1.18.29" dependencies = [ "base64 0.21.7", "bincode", @@ -6490,7 +6428,7 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bincode", "log", @@ -6503,7 +6441,7 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.18.27" +version = "1.18.29" dependencies = [ "async-trait", "bincode", @@ -6525,7 +6463,7 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.18.27" +version = "1.18.29" dependencies = [ "Inflector", "base64 0.21.7", @@ -6548,7 +6486,7 @@ dependencies = [ [[package]] name = "solana-turbine" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bincode", "bytes", @@ -6583,7 +6521,7 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.18.27" +version = "1.18.29" dependencies = [ "async-trait", "solana-connection-cache", @@ -6596,11 +6534,11 @@ dependencies = [ [[package]] name = "solana-unified-scheduler-logic" -version = "1.18.27" +version = "1.18.29" [[package]] name = "solana-unified-scheduler-pool" -version = "1.18.27" +version = "1.18.29" dependencies = [ "solana-ledger", "solana-program-runtime", @@ -6612,7 +6550,7 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.18.27" +version = "1.18.29" dependencies = [ "log", "rustc_version", @@ -6626,7 +6564,7 @@ dependencies = [ [[package]] name = "solana-vote" -version = "1.18.27" +version = "1.18.29" dependencies = [ "crossbeam-channel", "itertools", @@ -6643,7 +6581,7 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bincode", "log", @@ -6663,7 +6601,7 @@ dependencies = [ [[package]] name = "solana-wen-restart" -version = "1.18.27" +version = "1.18.29" dependencies = [ "log", "prost", @@ -6682,7 +6620,7 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "1.18.27" +version = "1.18.29" dependencies = [ "bytemuck", "num-derive 0.4.1", @@ -6694,7 +6632,7 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.18.27" +version = "1.18.29" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -7126,6 +7064,68 @@ dependencies = [ "libc", ] +[[package]] +name = "tachyon-validator" +version = "1.18.29" +dependencies = [ + "agave-geyser-plugin-interface", + "chrono", + "clap 2.33.3", + "console", + "core_affinity", + "crossbeam-channel", + "fd-lock", + "indicatif", + "itertools", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "jsonrpc-ipc-server", + "jsonrpc-server-utils", + "lazy_static", + "libc", + "libloading", + "log", + "num_cpus", + "rand 0.8.5", + "rayon", + "serde", + "serde_json", + "serde_yaml", + "signal-hook", + "solana-accounts-db", + "solana-clap-utils", + "solana-cli-config", + "solana-core", + "solana-download-utils", + "solana-entry", + "solana-faucet", + "solana-genesis-utils", + "solana-geyser-plugin-manager", + "solana-gossip", + "solana-ledger", + "solana-logger", + "solana-metrics", + "solana-net-utils", + "solana-perf", + "solana-poh", + "solana-rpc", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-runtime", + "solana-sdk", + "solana-send-transaction-service", + "solana-storage-bigtable", + "solana-streamer", + "solana-test-validator", + "solana-tpu-client", + "solana-version", + "solana-vote-program", + "symlink", + "thiserror", + "tikv-jemallocator", +] + [[package]] name = "tar" version = "0.4.40" diff --git a/programs/sbf/Cargo.toml b/programs/sbf/Cargo.toml index 3c587e524008c8..7755c3b993a306 100644 --- a/programs/sbf/Cargo.toml +++ b/programs/sbf/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "1.18.27" +version = "1.18.29" description = "Solana SBF test program written in Rust" authors = ["Solana Labs Maintainers "] repository = "https://github.com/solana-labs/solana" @@ -25,29 +25,29 @@ rand = "0.8" rustversion = "1.0.14" serde = "1.0.112" serde_json = "1.0.56" -solana-account-decoder = { path = "../../account-decoder", version = "=1.18.27" } -solana-accounts-db = { path = "../../accounts-db", version = "=1.18.27" } -solana-bpf-loader-program = { path = "../bpf_loader", version = "=1.18.27" } -solana-cli-output = { path = "../../cli-output", version = "=1.18.27" } -solana-ledger = { path = "../../ledger", version = "=1.18.27" } -solana-logger = { path = "../../logger", version = "=1.18.27" } -solana-measure = { path = "../../measure", version = "=1.18.27" } -solana-program = { path = "../../sdk/program", version = "=1.18.27" } -solana-program-runtime = { path = "../../program-runtime", version = "=1.18.27" } -solana-program-test = { path = "../../program-test", version = "=1.18.27" } -solana-runtime = { path = "../../runtime", version = "=1.18.27" } -solana-sbf-rust-128bit-dep = { path = "rust/128bit_dep", version = "=1.18.27" } -solana-sbf-rust-invoke = { path = "rust/invoke", version = "=1.18.27" } -solana-sbf-rust-invoked = { path = "rust/invoked", version = "=1.18.27", default-features = false } -solana-sbf-rust-many-args-dep = { path = "rust/many_args_dep", version = "=1.18.27" } -solana-sbf-rust-mem = { path = "rust/mem", version = "=1.18.27" } -solana-sbf-rust-param-passing-dep = { path = "rust/param_passing_dep", version = "=1.18.27" } -solana-sbf-rust-realloc = { path = "rust/realloc", version = "=1.18.27", default-features = false } -solana-sbf-rust-realloc-invoke = { path = "rust/realloc_invoke", version = "=1.18.27" } -solana-sdk = { path = "../../sdk", version = "=1.18.27" } -solana-transaction-status = { path = "../../transaction-status", version = "=1.18.27" } -agave-validator = { path = "../../validator", version = "=1.18.27" } -solana-zk-token-sdk = { path = "../../zk-token-sdk", version = "=1.18.27" } +solana-account-decoder = { path = "../../account-decoder", version = "=1.18.29" } +solana-accounts-db = { path = "../../accounts-db", version = "=1.18.29" } +solana-bpf-loader-program = { path = "../bpf_loader", version = "=1.18.29" } +solana-cli-output = { path = "../../cli-output", version = "=1.18.29" } +solana-ledger = { path = "../../ledger", version = "=1.18.29" } +solana-logger = { path = "../../logger", version = "=1.18.29" } +solana-measure = { path = "../../measure", version = "=1.18.29" } +solana-program = { path = "../../sdk/program", version = "=1.18.29" } +solana-program-runtime = { path = "../../program-runtime", version = "=1.18.29" } +solana-program-test = { path = "../../program-test", version = "=1.18.29" } +solana-runtime = { path = "../../runtime", version = "=1.18.29" } +solana-sbf-rust-128bit-dep = { path = "rust/128bit_dep", version = "=1.18.29" } +solana-sbf-rust-invoke = { path = "rust/invoke", version = "=1.18.29" } +solana-sbf-rust-invoked = { path = "rust/invoked", version = "=1.18.29", default-features = false } +solana-sbf-rust-many-args-dep = { path = "rust/many_args_dep", version = "=1.18.29" } +solana-sbf-rust-mem = { path = "rust/mem", version = "=1.18.29" } +solana-sbf-rust-param-passing-dep = { path = "rust/param_passing_dep", version = "=1.18.29" } +solana-sbf-rust-realloc = { path = "rust/realloc", version = "=1.18.29", default-features = false } +solana-sbf-rust-realloc-invoke = { path = "rust/realloc_invoke", version = "=1.18.29" } +solana-sdk = { path = "../../sdk", version = "=1.18.29" } +solana-transaction-status = { path = "../../transaction-status", version = "=1.18.29" } +tachyon-validator = { path = "../../validator", version = "=1.18.29" } +solana-zk-token-sdk = { path = "../../zk-token-sdk", version = "=1.18.29" } solana_rbpf = "=0.8.3" static_assertions = "1.1.0" thiserror = "1.0" diff --git a/programs/sbf/rust/simulation/Cargo.toml b/programs/sbf/rust/simulation/Cargo.toml index e9728e5916b801..0fbd1ba3f42591 100644 --- a/programs/sbf/rust/simulation/Cargo.toml +++ b/programs/sbf/rust/simulation/Cargo.toml @@ -16,7 +16,7 @@ test-bpf = [] solana-program = { workspace = true } [dev-dependencies] -agave-validator = { workspace = true } +tachyon-validator = { workspace = true } solana-logger = { workspace = true } solana-program-test = { workspace = true } solana-sdk = { workspace = true } diff --git a/programs/sbf/rust/simulation/tests/validator.rs b/programs/sbf/rust/simulation/tests/validator.rs index 17de51e665e3ec..71860e0b1fc4fc 100644 --- a/programs/sbf/rust/simulation/tests/validator.rs +++ b/programs/sbf/rust/simulation/tests/validator.rs @@ -1,7 +1,7 @@ #![cfg(feature = "test-bpf")] use { - agave_validator::test_validator::*, + tachyon_validator::test_validator::*, solana_program::{ instruction::{AccountMeta, Instruction}, pubkey::Pubkey, diff --git a/programs/sbf/rust/sysvar/tests/lib.rs b/programs/sbf/rust/sysvar/tests/lib.rs deleted file mode 100644 index b99b89e75c9648..00000000000000 --- a/programs/sbf/rust/sysvar/tests/lib.rs +++ /dev/null @@ -1,97 +0,0 @@ -#![cfg(feature = "test-bpf")] - -use { - solana_program_test::*, - solana_sbf_rust_sysvar::process_instruction, - solana_sdk::{ - feature_set::disable_fees_sysvar, - instruction::{AccountMeta, Instruction}, - pubkey::Pubkey, - signature::Signer, - sysvar::{ - clock, epoch_rewards, epoch_schedule, fees, instructions, recent_blockhashes, rent, - slot_hashes, slot_history, stake_history, - }, - transaction::Transaction, - }, -}; - -#[tokio::test] -async fn test_sysvars() { - let program_id = Pubkey::new_unique(); - - let mut program_test = ProgramTest::new( - "solana_sbf_rust_sysvar", - program_id, - processor!(process_instruction), - ); - - let epoch_rewards = epoch_rewards::EpochRewards { - total_rewards: 100, - distributed_rewards: 50, - distribution_complete_block_height: 42, - }; - program_test.add_sysvar_account(epoch_rewards::id(), &epoch_rewards); - let (mut banks_client, payer, recent_blockhash) = program_test.start().await; - - let mut transaction = Transaction::new_with_payer( - &[Instruction::new_with_bincode( - program_id, - &[0u8], - vec![ - AccountMeta::new(payer.pubkey(), true), - AccountMeta::new(Pubkey::new_unique(), false), - AccountMeta::new_readonly(clock::id(), false), - AccountMeta::new_readonly(epoch_schedule::id(), false), - AccountMeta::new_readonly(instructions::id(), false), - #[allow(deprecated)] - AccountMeta::new_readonly(recent_blockhashes::id(), false), - AccountMeta::new_readonly(rent::id(), false), - AccountMeta::new_readonly(slot_hashes::id(), false), - AccountMeta::new_readonly(slot_history::id(), false), - AccountMeta::new_readonly(stake_history::id(), false), - #[allow(deprecated)] - AccountMeta::new_readonly(fees::id(), false), - AccountMeta::new_readonly(epoch_rewards::id(), false), - ], - )], - Some(&payer.pubkey()), - ); - transaction.sign(&[&payer], recent_blockhash); - banks_client.process_transaction(transaction).await.unwrap(); - - let mut program_test = ProgramTest::new( - "solana_sbf_rust_sysvar", - program_id, - processor!(process_instruction), - ); - program_test.deactivate_feature(disable_fees_sysvar::id()); - program_test.add_sysvar_account(epoch_rewards::id(), &epoch_rewards); - let (mut banks_client, payer, recent_blockhash) = program_test.start().await; - - let mut transaction = Transaction::new_with_payer( - &[Instruction::new_with_bincode( - program_id, - &[1u8], - vec![ - AccountMeta::new(payer.pubkey(), true), - AccountMeta::new(Pubkey::new_unique(), false), - AccountMeta::new_readonly(clock::id(), false), - AccountMeta::new_readonly(epoch_schedule::id(), false), - AccountMeta::new_readonly(instructions::id(), false), - #[allow(deprecated)] - AccountMeta::new_readonly(recent_blockhashes::id(), false), - AccountMeta::new_readonly(rent::id(), false), - AccountMeta::new_readonly(slot_hashes::id(), false), - AccountMeta::new_readonly(slot_history::id(), false), - AccountMeta::new_readonly(stake_history::id(), false), - #[allow(deprecated)] - AccountMeta::new_readonly(fees::id(), false), - AccountMeta::new_readonly(epoch_rewards::id(), false), - ], - )], - Some(&payer.pubkey()), - ); - transaction.sign(&[&payer], recent_blockhash); - banks_client.process_transaction(transaction).await.unwrap(); -} diff --git a/pubsub-client/src/nonblocking/pubsub_client.rs b/pubsub-client/src/nonblocking/pubsub_client.rs index b79e91f681b97f..2342224d208c0d 100644 --- a/pubsub-client/src/nonblocking/pubsub_client.rs +++ b/pubsub-client/src/nonblocking/pubsub_client.rs @@ -33,7 +33,7 @@ //! By default the [`block_subscribe`] and [`vote_subscribe`] events are //! disabled on RPC nodes. They can be enabled by passing //! `--rpc-pubsub-enable-block-subscription` and -//! `--rpc-pubsub-enable-vote-subscription` to `agave-validator`. When these +//! `--rpc-pubsub-enable-vote-subscription` to `tachyon-validator`. When these //! methods are disabled, the RPC server will return a "Method not found" error //! message. //! @@ -381,7 +381,7 @@ impl PubsubClient { /// Receives messages of type [`RpcBlockUpdate`] when a block is confirmed or finalized. /// /// This method is disabled by default. It can be enabled by passing - /// `--rpc-pubsub-enable-block-subscription` to `agave-validator`. + /// `--rpc-pubsub-enable-block-subscription` to `tachyon-validator`. /// /// # RPC Reference /// @@ -452,7 +452,7 @@ impl PubsubClient { /// votes are observed prior to confirmation and may never be confirmed. /// /// This method is disabled by default. It can be enabled by passing - /// `--rpc-pubsub-enable-vote-subscription` to `agave-validator`. + /// `--rpc-pubsub-enable-vote-subscription` to `tachyon-validator`. /// /// # RPC Reference /// diff --git a/pubsub-client/src/pubsub_client.rs b/pubsub-client/src/pubsub_client.rs index 70769619db1f4d..c792b1b80c9b7d 100644 --- a/pubsub-client/src/pubsub_client.rs +++ b/pubsub-client/src/pubsub_client.rs @@ -32,7 +32,7 @@ //! By default the [`block_subscribe`] and [`vote_subscribe`] events are //! disabled on RPC nodes. They can be enabled by passing //! `--rpc-pubsub-enable-block-subscription` and -//! `--rpc-pubsub-enable-vote-subscription` to `agave-validator`. When these +//! `--rpc-pubsub-enable-vote-subscription` to `tachyon-validator`. When these //! methods are disabled, the RPC server will return a "Method not found" error //! message. //! @@ -416,7 +416,7 @@ impl PubsubClient { /// Receives messages of type [`RpcBlockUpdate`] when a block is confirmed or finalized. /// /// This method is disabled by default. It can be enabled by passing - /// `--rpc-pubsub-enable-block-subscription` to `agave-validator`. + /// `--rpc-pubsub-enable-block-subscription` to `tachyon-validator`. /// /// # RPC Reference /// @@ -578,7 +578,7 @@ impl PubsubClient { /// votes are observed prior to confirmation and may never be confirmed. /// /// This method is disabled by default. It can be enabled by passing - /// `--rpc-pubsub-enable-vote-subscription` to `agave-validator`. + /// `--rpc-pubsub-enable-vote-subscription` to `tachyon-validator`. /// /// # RPC Reference /// diff --git a/rpc/src/rpc.rs b/rpc/src/rpc.rs index f5ad238dc329b2..6e293c102f7479 100644 --- a/rpc/src/rpc.rs +++ b/rpc/src/rpc.rs @@ -2561,7 +2561,7 @@ pub mod rpc_minimal { #[rpc(meta, name = "getVersion")] fn get_version(&self, meta: Self::Metadata) -> Result; - // TODO: Refactor `agave-validator wait-for-restart-window` to not require this method, so + // TODO: Refactor `tachyon-validator wait-for-restart-window` to not require this method, so // it can be removed from rpc_minimal #[rpc(meta, name = "getVoteAccounts")] fn get_vote_accounts( @@ -2570,7 +2570,7 @@ pub mod rpc_minimal { config: Option, ) -> Result; - // TODO: Refactor `agave-validator wait-for-restart-window` to not require this method, so + // TODO: Refactor `tachyon-validator wait-for-restart-window` to not require this method, so // it can be removed from rpc_minimal #[rpc(meta, name = "getLeaderSchedule")] fn get_leader_schedule( @@ -2696,7 +2696,7 @@ pub mod rpc_minimal { }) } - // TODO: Refactor `agave-validator wait-for-restart-window` to not require this method, so + // TODO: Refactor `tachyon-validator wait-for-restart-window` to not require this method, so // it can be removed from rpc_minimal fn get_vote_accounts( &self, @@ -2707,7 +2707,7 @@ pub mod rpc_minimal { meta.get_vote_accounts(config) } - // TODO: Refactor `agave-validator wait-for-restart-window` to not require this method, so + // TODO: Refactor `tachyon-validator wait-for-restart-window` to not require this method, so // it can be removed from rpc_minimal fn get_leader_schedule( &self, diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 8b217d3b8cf679..c8f42d438dfb93 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -90,6 +90,7 @@ use { ancestors::{Ancestors, AncestorsForSerialization}, blockhash_queue::BlockhashQueue, epoch_accounts_hash::EpochAccountsHash, + inline_spl_token, nonce_info::{NonceInfo, NoncePartial}, partitioned_rewards::PartitionedEpochRewardsConfig, rent_collector::{CollectedInfo, RentCollector, RENT_EXEMPT_RENT_EPOCH}, @@ -154,7 +155,7 @@ use { loader_v4::{self, LoaderV4State, LoaderV4Status}, message::{AccountKeys, SanitizedMessage}, native_loader, - native_token::LAMPORTS_PER_SOL, + native_token::{sol_to_lamports, LAMPORTS_PER_SOL}, nonce::{self, state::DurableNonce, NONCED_TX_MARKER_IX_INDEX}, nonce_account, packet::PACKET_DATA_SIZE, @@ -1132,6 +1133,9 @@ impl Bank { fn is_partitioned_rewards_feature_enabled(&self) -> bool { self.feature_set .is_active(&feature_set::enable_partitioned_epoch_reward::id()) + && !self + .feature_set + .is_active(&feature_set::deactivate_canceled_partitioned_epoch_reward::id()) } pub(crate) fn set_epoch_reward_status_active( @@ -7900,6 +7904,19 @@ impl Bank { if new_feature_activations.contains(&feature_set::update_hashes_per_tick6::id()) { self.apply_updated_hashes_per_tick(UPDATED_HASHES_PER_TICK6); } + + if new_feature_activations.contains(&feature_set::enable_native_mint_wrap_account::id()) { + self.store_account_and_update_capitalization( + &inline_spl_token::native_mint::id(), + &solana_sdk::account::AccountSharedData::from(Account { + owner: inline_spl_token::id(), + data: inline_spl_token::native_mint::ACCOUNT_DATA.to_vec(), + lamports: sol_to_lamports(1.0), + executable: false, + rent_epoch: 1, + }), + ); + } } fn apply_updated_hashes_per_tick(&mut self, hashes_per_tick: u64) { diff --git a/runtime/src/bank/tests.rs b/runtime/src/bank/tests.rs index 18c9727a991d73..45d93db09f7009 100644 --- a/runtime/src/bank/tests.rs +++ b/runtime/src/bank/tests.rs @@ -109,7 +109,6 @@ use { vote_state::{ self, BlockTimestamp, Vote, VoteInit, VoteState, VoteStateVersions, MAX_LOCKOUT_HISTORY, }, - vote_transaction, }, std::{ collections::{HashMap, HashSet}, @@ -12698,93 +12697,6 @@ fn test_rewards_computation() { assert_eq!(stake_rewards.stake_rewards.len(), expected_num_delegations); } -/// Test rewards computation and partitioned rewards distribution at the epoch boundary (one reward distribution block) -#[test] -fn test_rewards_computation_and_partitioned_distribution_one_block() { - solana_logger::setup(); - - // setup the expected number of stake delegations - let expected_num_delegations = 100; - - let validator_keypairs = (0..expected_num_delegations) - .map(|_| ValidatorVoteKeypairs::new_rand()) - .collect::>(); - - let GenesisConfigInfo { genesis_config, .. } = create_genesis_config_with_vote_accounts( - 1_000_000_000, - &validator_keypairs, - vec![2_000_000_000; expected_num_delegations], - ); - - let bank0 = Bank::new_for_tests(&genesis_config); - let num_slots_in_epoch = bank0.get_slots_in_epoch(bank0.epoch()); - assert_eq!(num_slots_in_epoch, 32); - - let mut previous_bank = Arc::new(Bank::new_from_parent( - Arc::new(bank0), - &Pubkey::default(), - 1, - )); - - // simulate block progress - for slot in 2..=num_slots_in_epoch + 2 { - let pre_cap = previous_bank.capitalization(); - let curr_bank = Bank::new_from_parent(previous_bank, &Pubkey::default(), slot); - let post_cap = curr_bank.capitalization(); - - // Fill banks with banks with votes landing in the next slot - // Create enough banks such that vote account will root - for validator_vote_keypairs in validator_keypairs.iter() { - let vote_id = validator_vote_keypairs.vote_keypair.pubkey(); - let mut vote_account = curr_bank.get_account(&vote_id).unwrap(); - // generate some rewards - let mut vote_state = Some(vote_state::from(&vote_account).unwrap()); - for i in 0..MAX_LOCKOUT_HISTORY + 42 { - if let Some(v) = vote_state.as_mut() { - vote_state::process_slot_vote_unchecked(v, i as u64) - } - let versioned = VoteStateVersions::Current(Box::new(vote_state.take().unwrap())); - vote_state::to(&versioned, &mut vote_account).unwrap(); - match versioned { - VoteStateVersions::Current(v) => { - vote_state = Some(*v); - } - _ => panic!("Has to be of type Current"), - }; - } - curr_bank.store_account_and_update_capitalization(&vote_id, &vote_account); - } - - if slot == num_slots_in_epoch { - // This is the first block of epoch 1. Reward computation should happen in this block. - // assert reward compute status activated at epoch boundary - assert_matches!( - curr_bank.get_reward_interval(), - RewardInterval::InsideInterval - ); - - // cap should increase because of new epoch rewards - assert!(post_cap > pre_cap); - } else if slot == num_slots_in_epoch + 1 || slot == num_slots_in_epoch + 2 { - // 1. when curr_slot == num_slots_in_epoch + 1, the 2nd block of epoch 1, reward distribution should happen in this block. - // however, all stake rewards are paid at the this block therefore reward_status should have transitioned to inactive. And since - // rewards are transferred from epoch_rewards sysvar to stake accounts. The cap should stay the same. - // 2. when curr_slot == num_slots_in_epoch+2, the 3rd block of epoch 1. reward distribution should have already completed. Therefore, - // reward_status should stay inactive and cap should stay the same. - assert_matches!( - curr_bank.get_reward_interval(), - RewardInterval::OutsideInterval - ); - - assert_eq!(post_cap, pre_cap); - } else { - // slot is not in rewards, cap should not change - assert_eq!(post_cap, pre_cap); - } - previous_bank = Arc::new(curr_bank); - } -} - /// Test rewards computation and partitioned rewards distribution at the epoch boundary (two reward distribution blocks) #[test] fn test_rewards_computation_and_partitioned_distribution_two_blocks() { @@ -12951,74 +12863,6 @@ fn test_epoch_rewards_sysvar() { assert!(account.is_none()); } -/// Test that program execution that involves stake accounts should fail during reward period. -/// Any programs, which result in stake account changes, will throw `ProgramExecutionTemporarilyRestricted` error when -/// in reward period. -#[test] -fn test_program_execution_restricted_for_stake_account_in_reward_period() { - use solana_sdk::transaction::TransactionError::ProgramExecutionTemporarilyRestricted; - - let validator_vote_keypairs = ValidatorVoteKeypairs::new_rand(); - let validator_keypairs = vec![&validator_vote_keypairs]; - let GenesisConfigInfo { genesis_config, .. } = create_genesis_config_with_vote_accounts( - 1_000_000_000, - &validator_keypairs, - vec![1_000_000_000; 1], - ); - - let node_key = &validator_keypairs[0].node_keypair; - let stake_key = &validator_keypairs[0].stake_keypair; - - let (mut previous_bank, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config); - let num_slots_in_epoch = previous_bank.get_slots_in_epoch(previous_bank.epoch()); - assert_eq!(num_slots_in_epoch, 32); - - for slot in 1..=num_slots_in_epoch + 2 { - let bank = new_bank_from_parent_with_bank_forks( - bank_forks.as_ref(), - previous_bank.clone(), - &Pubkey::default(), - slot, - ); - - // Fill bank_forks with banks with votes landing in the next slot - // So that rewards will be paid out at the epoch boundary, i.e. slot = 32 - let vote = vote_transaction::new_vote_transaction( - vec![slot - 1], - previous_bank.hash(), - previous_bank.last_blockhash(), - &validator_vote_keypairs.node_keypair, - &validator_vote_keypairs.vote_keypair, - &validator_vote_keypairs.vote_keypair, - None, - ); - bank.process_transaction(&vote).unwrap(); - - // Insert a transfer transaction from node account to stake account - let tx = - system_transaction::transfer(node_key, &stake_key.pubkey(), 1, bank.last_blockhash()); - let r = bank.process_transaction(&tx); - - if slot == num_slots_in_epoch { - // When the bank is at the beginning of the new epoch, i.e. slot 32, - // ProgramExecutionTemporarilyRestricted should be thrown for the transfer transaction. - assert_eq!( - r, - Err(ProgramExecutionTemporarilyRestricted { account_index: 1 }) - ); - } else { - // When the bank is outside of reward interval, the transfer transaction should not be affected and will succeed. - assert!(r.is_ok()); - } - - // Push a dummy blockhash, so that the latest_blockhash() for the transfer transaction in each - // iteration are different. Otherwise, all those transactions will be the same, and will not be - // executed by the bank except the first one. - bank.register_unique_recent_blockhash_for_test(); - previous_bank = bank; - } -} - /// Test rewards computation and partitioned rewards distribution at the epoch boundary #[test] fn test_store_stake_accounts_in_partition() { diff --git a/scripts/cargo-install-all.sh b/scripts/cargo-install-all.sh index 029b1fbf27943d..2859e860523270 100755 --- a/scripts/cargo-install-all.sh +++ b/scripts/cargo-install-all.sh @@ -111,7 +111,7 @@ else agave-ledger-tool solana-log-analyzer solana-net-shaper - agave-validator + tachyon-validator rbpf-cli ) diff --git a/scripts/run.sh b/scripts/run.sh index 70994c921f47ac..3b68fa305e8b2f 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -26,7 +26,7 @@ ok=true for program in solana-{faucet,genesis,keygen}; do $program -V || ok=false done -agave-validator -V || ok=false +tachyon-validator -V || ok=false $ok || { echo @@ -117,7 +117,7 @@ args=( --no-os-network-limits-test ) # shellcheck disable=SC2086 -agave-validator "${args[@]}" $SOLANA_RUN_SH_VALIDATOR_ARGS & +tachyon-validator "${args[@]}" $SOLANA_RUN_SH_VALIDATOR_ARGS & validator=$! wait "$validator" diff --git a/sdk/cargo-build-sbf/tests/crates/fail/Cargo.toml b/sdk/cargo-build-sbf/tests/crates/fail/Cargo.toml index 07873f5c57c994..53798e2aa81849 100644 --- a/sdk/cargo-build-sbf/tests/crates/fail/Cargo.toml +++ b/sdk/cargo-build-sbf/tests/crates/fail/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fail" -version = "1.18.27" +version = "1.18.29" description = "Solana SBF test program written in Rust" authors = ["Solana Labs Maintainers "] repository = "https://github.com/solana-labs/solana" @@ -10,7 +10,7 @@ edition = "2021" publish = false [dependencies] -solana-program = { path = "../../../../program", version = "=1.18.27" } +solana-program = { path = "../../../../program", version = "=1.18.29" } [lib] crate-type = ["cdylib"] diff --git a/sdk/cargo-build-sbf/tests/crates/noop/Cargo.toml b/sdk/cargo-build-sbf/tests/crates/noop/Cargo.toml index db63e9322c3707..f5b6abccccb94e 100644 --- a/sdk/cargo-build-sbf/tests/crates/noop/Cargo.toml +++ b/sdk/cargo-build-sbf/tests/crates/noop/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "noop" -version = "1.18.27" +version = "1.18.29" description = "Solana SBF test program written in Rust" authors = ["Solana Labs Maintainers "] repository = "https://github.com/solana-labs/solana" @@ -10,7 +10,7 @@ edition = "2021" publish = false [dependencies] -solana-program = { path = "../../../../program", version = "=1.18.27" } +solana-program = { path = "../../../../program", version = "=1.18.29" } [lib] crate-type = ["cdylib"] diff --git a/sdk/src/feature_set.rs b/sdk/src/feature_set.rs index 64f9dbc48d03de..cbe268f1237abe 100644 --- a/sdk/src/feature_set.rs +++ b/sdk/src/feature_set.rs @@ -789,8 +789,12 @@ pub mod deprecate_unused_legacy_vote_plumbing { solana_sdk::declare_id!("6Uf8S75PVh91MYgPQSHnjRAPQq6an5BDv9vomrCwDqLe"); } -pub mod enable_turbine_extended_fanout_experiments { - solana_sdk::declare_id!("BZn14Liea52wtBwrXUxTv6vojuTTmfc7XGEDTXrvMD7b"); +pub mod enable_native_mint_wrap_account { + solana_sdk::declare_id!("BeCY6VL4CKQR2QUwe9w3iRtNMN91FMW1sXbRzwfc3WYc"); +} + +pub mod deactivate_canceled_partitioned_epoch_reward { + solana_sdk::declare_id!("3sioPumDoSRarqzp442ETGUvTCLADgU9eFzKJj375B23"); } lazy_static! { @@ -985,7 +989,8 @@ lazy_static! { (enable_chained_merkle_shreds::id(), "Enable chained Merkle shreds #34916"), (deprecate_unused_legacy_vote_plumbing::id(), "Deprecate unused legacy vote tx plumbing"), (chained_merkle_conflict_duplicate_proofs::id(), "generate duplicate proofs for chained merkle root conflicts"), - (enable_turbine_extended_fanout_experiments::id(), "enable turbine extended fanout experiments #2373"), + (enable_native_mint_wrap_account::id(), "enable the native mint wrap account"), + (deactivate_canceled_partitioned_epoch_reward::id(), "deactivate canceled partitioned epoch reward"), /*************** ADD NEW FEATURES HERE ***************/ ] .iter() diff --git a/system-test/abi-testcases/mixed-validator-test.sh b/system-test/abi-testcases/mixed-validator-test.sh index c0400560dc519e..52c598300e8339 100755 --- a/system-test/abi-testcases/mixed-validator-test.sh +++ b/system-test/abi-testcases/mixed-validator-test.sh @@ -113,7 +113,7 @@ for v in "${otherVersions[@]}"; do ( set -x tmux new-window -t abi -n "$v" " \ - $SOLANA_BIN/agave-validator \ + $SOLANA_BIN/tachyon-validator \ --ledger $ledger \ --no-snapshot-fetch \ --entrypoint 127.0.0.1:8001 \ diff --git a/turbine/src/cluster_nodes.rs b/turbine/src/cluster_nodes.rs index 743a3202cba767..e897579d865f4f 100644 --- a/turbine/src/cluster_nodes.rs +++ b/turbine/src/cluster_nodes.rs @@ -584,31 +584,8 @@ pub fn make_test_cluster( } pub(crate) fn get_data_plane_fanout(shred_slot: Slot, root_bank: &Bank) -> usize { - if check_feature_activation( - &feature_set::disable_turbine_fanout_experiments::id(), - shred_slot, - root_bank, - ) { - DATA_PLANE_FANOUT - } else if check_feature_activation( - &feature_set::enable_turbine_extended_fanout_experiments::id(), - shred_slot, - root_bank, - ) { + if enable_turbine_fanout_experiments(shred_slot, root_bank) { // Allocate ~2% of slots to turbine fanout experiments. - match shred_slot % 359 { - 11 => 1152, - 61 => 1280, - 111 => 1024, - 161 => 1408, - 211 => 896, - 261 => 1536, - 311 => 768, - _ => DATA_PLANE_FANOUT, - } - } else { - // feature_set::enable_turbine_fanout_experiments - // is already activated on all clusters. match shred_slot % 359 { 11 => 64, 61 => 768, @@ -619,9 +596,23 @@ pub(crate) fn get_data_plane_fanout(shred_slot: Slot, root_bank: &Bank) -> usize 311 => 384, _ => DATA_PLANE_FANOUT, } + } else { + DATA_PLANE_FANOUT } } +fn enable_turbine_fanout_experiments(shred_slot: Slot, root_bank: &Bank) -> bool { + check_feature_activation( + &feature_set::enable_turbine_fanout_experiments::id(), + shred_slot, + root_bank, + ) && !check_feature_activation( + &feature_set::disable_turbine_fanout_experiments::id(), + shred_slot, + root_bank, + ) +} + // Returns true if the feature is effective for the shred slot. #[must_use] pub fn check_feature_activation(feature: &Pubkey, shred_slot: Slot, root_bank: &Bank) -> bool { diff --git a/validator/Cargo.toml b/validator/Cargo.toml index fcd23175a595b8..a1ab03a78ff66f 100644 --- a/validator/Cargo.toml +++ b/validator/Cargo.toml @@ -1,8 +1,8 @@ [package] -name = "agave-validator" +name = "tachyon-validator" description = "Blockchain, Rebuilt for Scale" -documentation = "https://docs.rs/agave-validator" -default-run = "agave-validator" +documentation = "https://docs.rs/tachyon-validator" +default-run = "tachyon-validator" version = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/validator/src/bin/solana-test-validator.rs b/validator/src/bin/solana-test-validator.rs index 139ad6804f0bc0..db68caa648cd1b 100644 --- a/validator/src/bin/solana-test-validator.rs +++ b/validator/src/bin/solana-test-validator.rs @@ -1,5 +1,5 @@ use { - agave_validator::{ + tachyon_validator::{ admin_rpc_service, cli, dashboard::Dashboard, ledger_lockfile, lock_ledger, println_name_value, redirect_stderr_to_file, }, diff --git a/validator/src/bootstrap.rs b/validator/src/bootstrap.rs index 0fe1ae7e6d5eda..1f9d233a1a6ebf 100644 --- a/validator/src/bootstrap.rs +++ b/validator/src/bootstrap.rs @@ -444,7 +444,7 @@ pub fn attempt_download_genesis_and_snapshot( ) .unwrap_or_else(|err| { // Consider failures here to be more likely due to user error (eg, - // incorrect `agave-validator` command-line arguments) rather than the + // incorrect `tachyon-validator` command-line arguments) rather than the // RPC node failing. // // Power users can always use the `--no-check-vote-account` option to diff --git a/validator/src/main.rs b/validator/src/main.rs index 444c1513100fe9..8a262facfebd59 100644 --- a/validator/src/main.rs +++ b/validator/src/main.rs @@ -2,7 +2,7 @@ #[cfg(not(target_env = "msvc"))] use jemallocator::Jemalloc; use { - agave_validator::{ + tachyon_validator::{ admin_rpc_service, admin_rpc_service::{load_staked_nodes_overrides, StakedNodesOverrides}, bootstrap, @@ -912,7 +912,7 @@ pub fn main() { let logfile = matches .value_of("logfile") .map(|s| s.into()) - .unwrap_or_else(|| format!("agave-validator-{}.log", identity_keypair.pubkey())); + .unwrap_or_else(|| format!("tachyon-validator-{}.log", identity_keypair.pubkey())); if logfile == "-" { None diff --git a/version/src/lib.rs b/version/src/lib.rs index 7a59406cf0647d..00cd17d745d7df 100644 --- a/version/src/lib.rs +++ b/version/src/lib.rs @@ -18,6 +18,7 @@ enum ClientId { JitoLabs, Firedancer, Agave, + Tachyon, // If new variants are added, update From and TryFrom. Unknown(u16), } @@ -64,7 +65,7 @@ impl Default for Version { commit: compute_commit(option_env!("CI_COMMIT")).unwrap_or_default(), feature_set, // Other client implementations need to modify this line. - client: u16::try_from(ClientId::Agave).unwrap(), + client: u16::try_from(ClientId::Tachyon).unwrap(), } } } @@ -99,6 +100,7 @@ impl From for ClientId { 1u16 => Self::JitoLabs, 2u16 => Self::Firedancer, 3u16 => Self::Agave, + 4u16 => Self::Tachyon, _ => Self::Unknown(client), } } @@ -113,6 +115,7 @@ impl TryFrom for u16 { ClientId::JitoLabs => Ok(1u16), ClientId::Firedancer => Ok(2u16), ClientId::Agave => Ok(3u16), + ClientId::Tachyon => Ok(4u16), ClientId::Unknown(client @ 0u16..=3u16) => Err(format!("Invalid client: {client}")), ClientId::Unknown(client) => Ok(client), } @@ -151,20 +154,22 @@ mod test { assert_eq!(ClientId::from(1u16), ClientId::JitoLabs); assert_eq!(ClientId::from(2u16), ClientId::Firedancer); assert_eq!(ClientId::from(3u16), ClientId::Agave); - for client in 4u16..=u16::MAX { + assert_eq!(ClientId::from(4u16), ClientId::Tachyon); + for client in 5u16..=u16::MAX { assert_eq!(ClientId::from(client), ClientId::Unknown(client)); } assert_eq!(u16::try_from(ClientId::SolanaLabs), Ok(0u16)); assert_eq!(u16::try_from(ClientId::JitoLabs), Ok(1u16)); assert_eq!(u16::try_from(ClientId::Firedancer), Ok(2u16)); assert_eq!(u16::try_from(ClientId::Agave), Ok(3u16)); - for client in 0..=3u16 { + assert_eq!(u16::try_from(ClientId::Tachyon), Ok(4u16)); + for client in 0..=4u16 { assert_eq!( u16::try_from(ClientId::Unknown(client)), Err(format!("Invalid client: {client}")) ); } - for client in 4u16..=u16::MAX { + for client in 5u16..=u16::MAX { assert_eq!(u16::try_from(ClientId::Unknown(client)), Ok(client)); } }