{"id":9243751,"url":"https://github.com/everstake/ton-validation","last_synced_at":"2025-08-12T02:32:51.481Z","repository":{"id":99186631,"uuid":"219534563","full_name":"everstake/ton-validation","owner":"everstake","description":"Small utility to automate TON validator requests for continious validation and getting rewards","archived":false,"fork":false,"pushed_at":"2023-09-26T10:47:48.000Z","size":634,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-25T22:45:31.553Z","etag":null,"topics":["blockchain"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/everstake.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-11-04T15:32:11.000Z","updated_at":"2023-09-26T10:47:47.000Z","dependencies_parsed_at":"2023-03-04T14:45:32.207Z","dependency_job_id":null,"html_url":"https://github.com/everstake/ton-validation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everstake%2Fton-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everstake%2Fton-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everstake%2Fton-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everstake%2Fton-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/everstake","download_url":"https://codeload.github.com/everstake/ton-validation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229629592,"owners_count":18101317,"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","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":["blockchain"],"created_at":"2024-05-08T00:11:06.785Z","updated_at":"2024-12-14T00:18:24.217Z","avatar_url":"https://github.com/everstake.png","language":"Python","funding_links":[],"categories":["Block explorers \u0026 Dev-ops tools"],"sub_categories":[],"readme":"## Small utility to automate validator requests and get rewards\nPlease refer to [Validator HOWTO Guide](https://test.ton.org/Validator-HOWTO.txt)\n\n#### WARNING! Highly experimental. Use at your own risk!\nTested on Ubuntu 18.04, using [this commit](https://github.com/ton-blockchain/ton/commit/ba76f1404ef06b044fcbdc2d35a5ac7b7d01cad0).\n\n\u003e Please backup and remove your db.json to start with a clean one before running v1.3\n\n### Required:\n\n* Python 3 (Tested on 3.6.8)\n* working Full-node that completed sync\n* configured lite-client and validator-engine-console\n* default keys and wallet (as shown in *Validator HOWTO Guide*) stored along with executables\n* executables (fift, lite-client, validator-engine-console)\n* configured env variable $FIFTPATH\n* recover-query.boc which you can obtain by running (`fift -s recover-stake.fif`)\n* wallet smart contract in the masterchain (*-1 identifier*)\n* sufficient amount of Grams for validation purposes (20k will result in continuous process of validation in testnet)\n* [tonos-cli v0.1.29](https://github.com/tonlabs/tonos-cli/releases/tag/v0.1.29) - Tested to work\n\n\n### Installation steps:\n```\n#set env variable in .bashrc file using export, here user=ton\nexport FIFTPATH=/home/ton/ton-sources/ton/crypto/fift/lib:/home/ton/ton-sources/ton/crypto/smartcont\nexport BETTER_EXCEPTIONS=1\nsudo apt install python3-pip\nsudo apt install python3-venv\npython3 -m venv env\nif you use bash -\u003e source env/bin/activate\n#After that your promt will change\n#Place requirements.txt and validator.py in directory with executables\npip install -r requirements.txt\n#Run and check the output\npython validator.py\n#To exit run\ndeactivate\n```\n#### How to run:\n\nPlace validator.py along with executables and run\n\n***python validator.py***\n\n\n### Important notes\n\nBackup your node config because the script makes a lot of keys.\n\nWe recommend to check the output and the source code.\n\nAs seqno of your wallet smartcontracts changes - old *.boc* files are useless, so we don't keep them.\n\nIf everything is OK, these files will be periodically overwritten:\n- return-stake.boc\n- validator-to-sign.bin\n- validator-query.boc\n- finish.boc\n\n\n#### Current dir listing before running the script:\n![DIR listing](img/dir_before.png)\n\n\n#### Running the script:\n![DIR listing](img/script_run.png)\n\n\n#### Current dir listing after running the script:\n![DIR listing](img/dir_after.png)\n\n\n#### Notes on automation\n\nRun the script with *watch* for a couple of days to test it:\n\n`(env) ton@server /m/o/T/b/950e2\u003e watch -n 1800 -d \"python validator.py\"`\n\nWhen you have checked everything you can proceed and configure running the script with cron:\n\n`*/3 * * * * cd /path/to/DIR \u0026\u0026 env/bin/python validator.py \u003e /dev/null 2\u003e\u00261`\n\nRefer to a good article about [cron and python](https://monicagranbois.com/blog/python/cron-and-python-virtualenv/).\n\n#### Logs \n\nScript logs the results of its works to **last.log** file and to separate directories regarding anything about current elections.\n\nAlso, it stores stats and keys in DB file.\n\n#### DB file\n\nThe db file is a json generated by [TinyDB](https://github.com/msiemens/tinydb).\n\nYou can parse it by running  `cat db.json | jq -r '._default' | jq '[.[]]'`  to get readable output.\n\nSee how to get some graphs and good-looking charts at **[everstake/ton-helpers](https://github.com/everstake/ton-helpers)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feverstake%2Fton-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feverstake%2Fton-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feverstake%2Fton-validation/lists"}