{"id":25971044,"url":"https://github.com/t-rustdev/solana-winner-tool","last_synced_at":"2025-09-09T11:11:45.663Z","repository":{"id":277805163,"uuid":"933518291","full_name":"T-rustdev/solana-winner-tool","owner":"T-rustdev","description":"For transparency, we have included the tool we will be using for calculating the winners of the quantitative reward categories. You can find more details on how winners are calculated by reading the forum announcement.","archived":false,"fork":false,"pushed_at":"2025-02-16T08:04:59.000Z","size":1374,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-07T14:45:15.243Z","etag":null,"topics":["anchor","contract","developer","rust","smart","solana","tool","winner"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/T-rustdev.png","metadata":{"files":{"readme":"README-internal.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-16T06:31:33.000Z","updated_at":"2025-03-28T19:09:30.000Z","dependencies_parsed_at":"2025-02-16T09:19:15.230Z","dependency_job_id":"0bdf5414-b2d6-4975-a310-f913bf32c64d","html_url":"https://github.com/T-rustdev/solana-winner-tool","commit_stats":null,"previous_names":["t-rustdev/solana-winner-tool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/T-rustdev/solana-winner-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-rustdev%2Fsolana-winner-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-rustdev%2Fsolana-winner-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-rustdev%2Fsolana-winner-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-rustdev%2Fsolana-winner-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/T-rustdev","download_url":"https://codeload.github.com/T-rustdev/solana-winner-tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-rustdev%2Fsolana-winner-tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274289060,"owners_count":25257860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anchor","contract","developer","rust","smart","solana","tool","winner"],"created_at":"2025-03-04T23:30:07.492Z","updated_at":"2025-09-09T11:11:45.622Z","avatar_url":"https://github.com/T-rustdev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Internal\nInformation useful for running a TdS stage.\n\n## Configuring/Running the Tour de Sol Cluster\nBuildkite jobs are used to set up and tear down the Solana nodes on the TdS cluster, and configure some genesis block settings.\nMost of the relevant settings can be set at environment variables within a buildkite job, so we can change and re-deploy rapidly without needing to touch CI script code.\n\n### Enable TdS cluster\nRun a job of the TdS-enable pipeline.  Click 'New Build' and run with default settings\n\nhttps://buildkite.com/solana-labs/tds-enable\n\nThis only needs to be run once per CI instance, or after the TdS cluster has been disabled with the TdS-delete-disable pipeline.\n\n### Create and start a new TdS cluster\nTo create a new cluster, use the TdS-create-and-start buildkite job:\n\nhttps://buildkite.com/solana-labs/tds-create-and-start\n\nThe pipeline will pull the tip of the v0.16 branch of code for scripts and binaries by default.\nAll of the default configuration settings for the cluster can be found in the pipeline settings:\n\nhttps://buildkite.com/solana-labs/tds-create-and-start/settings\n\nAny of the above values can be overwritten for a particular build, by using `[key]=[value]` syntax (do not use double quotes for the value here) under Environment Variables when you click 'New Build'.\n\nThe `TDS_ZONES`, `TDS_NODE_COUNT` and `TDS_CLIENT_COUNT` must have a valid value if the default is not used.  All other variables may set the value to `skip` to disable the given configuration and the system default behavior will be used.\n\nNOTE: Using the `STAKE_INTERNAL_NODES` setting (including the default value in this pipeline) disables airdrops for the cluster.\n\nExample:  Enter the following in the Environment Variables box for a New Build to have only CPU-only validator node in a single region.  No clients and no GPUs.\n```bash\n  TDS_ZONES=us-west1-a\n  TDS_CLIENT_COUNT=0\n  ENABLE_GPU=skip\n```\n\nExample:  If you want to run the cluster on the tip of master instead of the v0.16 branch, in the New Build window, set the Branch field to `master` and add the following to the Environment Variables:\n```bash\nTESTNET_TAG=edge\n```\n\nExample:  To enable airdrops, add the following in Environment Variables:\n```bash\nSTAKE_INTERNAL_NODES=skip\n```\n\n### Restart network software on existing nodes\nTo restart the binary software on the nodes without deleting and re-creating the instances, use the TdS-restart pipeline\n\nhttps://buildkite.com/solana-labs/tds-restart\n\nThe number of nodes, GPUs, and the zones cannot be changed from this pipeline but new settings for the genesis block can be provided.  The following settings can be changed when restarting the cluster/ledger:\n```bash\n  HASHES_PER_TICK: \"auto\"\n  STAKE_INTERNAL_NODES: \"1000000000000\"\n  EXTERNAL_ACCOUNTS_FILE_URL: \"https://raw.githubusercontent.com/solana-labs/tour-de-sol/master/stage1/validator.yml\"\n  LAMPORTS: \"8589934592000000000\"\n  ```\n\n## Validator Keybase Username Registration\nAs new stage participants are registered for a given stage, their keybase username should be added to\none of the keybase-username files, one keybase username per line:\n* `validators/keybase-usernames.internal` - Solana internal\n* `validators/keybase-usernames.us` - us-based validators\n* `validators/keybase-usernames.earth` - earth-based validators, excluding us.\n\nThen prior to the start of the stage, run `./import-keybase-usernames.sh` to import\nall public keys each validator has published and commit the modifications to\n`validators/*.yml`\n\n### Running bench-tps on the cluster\n```bash\n$ ./bench-tps.sh\n```\n\n## Attaching to the TdS cluster\nFetching the TdS cluster configuration can be accomplished with:\n```bash\n$ export CLOUDSDK_CORE_PROJECT=tour-de-sol\n$ net/gce.sh config -p tds-solana-com -z us-west1-a -z us-central1-a -z europe-west4-a\n```\nat which point all the normal `net/` functionality becomes available (such as `net/ssh.sh`).   Also `net/net.sh logs` can be used to collect logs off the nodes\n\n## Ledger Rollback Procedure\n**Work in progress**\n\nThe following steps can be used to perform a ledger rollback if needed:\n1. Identify the desired slot height to roll back to\n2. Announce to all participants that a rollback is occuring, and request that everybody shut down their validators\n3. Stop the Solana TdS nodes: `./net stop`\n3. On the tds.solana.com bootstrap-leader node, run the following steps to generate a rollback list\n```bash\n$ solana-ledger-tool --ledger ${path_to_ledger} list-roots --max-height ${rollback_slot_height} --slot-list ./rollback.txt\n$ solana-ledger-tool --ledger ${path_to_ledger} prune --slot-list rollback.txt\n# The output should look something like this\nPrune at slot 5000 hash \"HRQnaDnSoaeM5xQKxjKYbU53ZFhTYtjBS7HWyG3Q1JUq\"\n```\n4. Bring the Solana TdS nodes back up with `./net start --no-deploy --no-snapshot --skip-ledger-verify -r`\n2. Announce to all participants that a rollback has been completed, they should now delete their ledger and restart their validator from a new snapshot\n\n## TPS Ramp-up Procedure\n\n#### Directions\n1. [Fetch the TdS cluster configuration](#attaching-to-the-tds-cluster)\n1. Set bash vars for the network\n```bash\n$ eval $(net/gce.sh info --eval)\n```\n1. Snag the faucet keypair from the bootstrap leader\n```bash\n$ net/scp.sh solana@\"$NET_VALIDATOR0_IP\":solana/config/faucet-keypair.json .\n```\n1. Optionally set Slack and Discord webhook env vars to be notified of progress\n```bash\nexport SLACK_WEBHOOK=https://hooks.slack.com/services/\u003c\u003e\nexport DISCORD_WEBHOOK=https://discordapp.com/api/webhooks/\u003cID\u003e/\u003cTOKEN\u003e\n```\n1. Wait for all validators to connect to the cluster\n1. Run `destake-net-nodes.sh` to remove the large initial stake from the Solana TdS nodes\n1. Start the ramp-up TPS tool\n```bash\n$ cargo run -p solana-ramp-tps -- -n $NET_VALIDATOR0_IP \\\n  --net-dir \u003csolana/net\u003e \\\n  --initial-balance 1 \\\n  --round-minutes 20 \\\n  --tx-count-baseline 1000 \\\n  --tx-count-increment 2000 \\\n  --stake-activation-epoch 9 \\\n  --faucet-keypair-path \u003cfaucet_keypair.json\u003e\n```\n\n#### Recovery\nIf the tool fails, it may be possible to recover and pickup where it last\nleft off. The only unsupported scenario is when the tool fails in the\nmiddle of awarding stake to the surviving validators.\n\n- If the tool failed during bench-tps, recovery is simple. Simply start\nthe tool at the `round` number which failed.\n- If the tool fails during stake warmup, specify both the TPS `round` number\nas well as the epoch when the stake started activating (`stake-activation-epoch`).\n\n```bash\n$ cargo run -p solana-ramp-tps -- -n $NET_VALIDATOR0_IP \\\n  --net-dir \u003csolana/net\u003e \\\n  --initial-balance 1 \\\n  --round \u003cSTART ROUND\u003e \\\n  --round-minutes 15 \\\n  --tx-count-baseline 5000 \\\n  --tx-count-increment 5000 \\\n  --stake-activation-epoch \u003cLAST STAKE ACTIVATION EPOCH\u003e \\\n  --faucet-keypair-path \u003cfaucet_keypair.json\u003e\n```\n\n#### Overview\nThe ramp up tool will be following this process:\n\n1. Download the genesis block\n1. Wait for warm up epochs to pass\n1. Start ramp up cycle\n  1. Wait for validator stakes to warm up\n  1. Run solana-bench-tps on clients\n  1. Sleep until the round is finished\n  1. Stop solana-bench-tps\n  1. Fetch top performing validators\n  1. Gift stake to the top validators\n  1. Double gift and increment TPS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-rustdev%2Fsolana-winner-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft-rustdev%2Fsolana-winner-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-rustdev%2Fsolana-winner-tool/lists"}