{"id":22886603,"url":"https://github.com/zenodeapp/pgf-testing","last_synced_at":"2026-02-10T11:37:13.844Z","repository":{"id":248905795,"uuid":"830007167","full_name":"zenodeapp/pgf-testing","owner":"zenodeapp","description":"PGF steward/funding script(s) for Namada to help testing its mechanisms and verify correctness.","archived":false,"fork":false,"pushed_at":"2024-07-18T09:39:58.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T01:41:17.246Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zenodeapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["zenodeapp"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"custom":["https://zenode.app/support"]}},"created_at":"2024-07-17T12:31:22.000Z","updated_at":"2024-07-18T09:40:00.000Z","dependencies_parsed_at":"2024-07-17T21:18:52.349Z","dependency_job_id":"53df013c-3b0c-4094-9b1b-f40f5f2598b3","html_url":"https://github.com/zenodeapp/pgf-testing","commit_stats":null,"previous_names":["zenodeapp/pgf-testing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenodeapp%2Fpgf-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenodeapp%2Fpgf-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenodeapp%2Fpgf-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenodeapp%2Fpgf-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zenodeapp","download_url":"https://codeload.github.com/zenodeapp/pgf-testing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244326214,"owners_count":20435122,"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":[],"created_at":"2024-12-13T20:19:28.101Z","updated_at":"2026-02-10T11:37:13.775Z","avatar_url":"https://github.com/zenodeapp.png","language":"Shell","funding_links":["https://github.com/sponsors/zenodeapp","https://zenode.app/support"],"categories":[],"sub_categories":[],"readme":"# PGF Testing\nPGF steward/funding script(s) for Namada to help testing its mechanisms and verify correctness.\n\n---\n\n## Requirements\n\n- [namada](https://docs.namada.net/introduction/install)\n- [jq](https://jqlang.github.io/jq/download)\n- [bc](https://www.gnu.org/software/bc/manual/html_mono/bc.html)\n\n## Getting started\n\n### [config.json](config.json)\n\nMake sure to configure this file before calling any of the scripts.\n\n```json\n{\n  \"service\": \"namadad\",\n  \"lines\": 20000,\n  \"monitor_interval\": 2\n}\n```\n\u003e `service`: your service name _[default: \"namadad\"]_.\n\u003e \n\u003e `lines`: the amount of lines the script is able to traverse back in your node's log _[default: 20000]_. A higher value will make scripts like [epoch.sh](./epoch.sh) less performant.\n\u003e\n\u003e `monitor_interval`: the amount of seconds to sleep in between every check when monitoring epoch and address balance changes using [monitor.sh](./monitor.sh).\n\n## Scripts\n\n### [monitor.sh](monitor.sh)\n\nThis will monitor the given owner address' balance and shows whenever an epoch change occurs.\n\n#### Command\n```sh\nbash monitor.sh \u003cowner\u003e\n```\n\u003e \\\u003cowner\\\u003e can either be an _alias_ or _address_.\n\n\u003e [!NOTE]\n\u003e\n\u003e This script creates a log file located in `logs/monitor_{owner}.log`.\n\n#### Output\n```log\n[2024-07-17 18:48:47] Monitor for anodeofzen started.\n[2024-07-17 18:48:47] Last committed epoch: 1684\n[2024-07-17 18:48:47] nam: 995.5\n[2024-07-17 18:49:32] balance change: +1.504242 nam (epoch 1684)\n[2024-07-17 18:49:32] nam: 997.004242\n[2024-07-17 18:51:06] balance change: -7.004242 nam (epoch 1684)\n[2024-07-17 18:51:06] nam: 990\n[2024-07-17 18:51:47] balance change: -1 nam (epoch 1684)\n[2024-07-17 18:51:47] nam: 989\n[2024-07-17 18:54:02] epoch change: 1685\n[2024-07-17 18:55:46] balance change: +343000000 nam (epoch 1685)\n[2024-07-17 18:55:46] nam: 343000989\n```\n\n### [epoch.sh](epoch.sh)\n\nLogs relevant information for the current or given epoch.\n\n#### Command\n```sh\nbash epoch.sh [epoch]\n```\n\u003e [epoch] is _optional_ [default: the current epoch].\n\n#### Output\n```log\n2024-07-17T16:59:53.124590Z  INFO namada_state::wl_state: Began a new epoch 1664\n2024-07-17T16:59:53.124622Z  INFO namada_state::wl_state: Began a new masp epoch 832\n2024-07-17T16:59:53.124628Z  INFO namada_node::shell::finalize_block: Block height: 52350, epoch: 1664, is new epoch: true, is masp new epoch: true.\n2024-07-17T16:59:53.282678Z  INFO namada_proof_of_stake::rewards: Minting tokens for PoS rewards distribution into the PoS account. Amount: 952.792145. Total inflation: 952.792148. Total native supply: 1001575106.370084. Number of blocks in the last epoch: 31. Reward accumulators sum: 30.999999999783.\n2024-07-17T16:59:53.282715Z  INFO namada_proof_of_stake::rewards: Minting tokens remaining from PoS rewards distribution into the Governance account. Amount: 0.000003.\n2024-07-17T16:59:53.282897Z  INFO namada_governance::pgf::inflation: Minting 952.793054 tokens for PGF rewards distribution into the PGF account (total supply 1001576059.162229)\n```\n\n### [total-supply.sh](total-supply.sh)\n\nLogs the current total supply, the total supply for a given epoch or compares two total supplies from two different epochs.\n\n#### Command\n```sh\nbash total-supply.sh [epoch] [epoch2]\n```\n\u003e [epoch] is _optional_ [default: the current epoch].\n\u003e \n\u003e [epoch2] is _optional_. If you decide to add a second epoch, the difference in supply will be calculated.\n\n#### Output\n```log\nEpoch 1664: 1001576059.162229\n```\n\n-OR-\n\n```log\nEpoch 1686: 1001597020.818731 nam\nEpoch 1687: 1001597973.631723 nam\nDifference: +952.812992 nam\n```\n\n\u003c/br\u003e\n\n\u003cp align=\"right\"\u003e— ZEN\u003c/p\u003e\n\u003cp align=\"right\"\u003eCopyright (c) 2024 ZENODE\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenodeapp%2Fpgf-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzenodeapp%2Fpgf-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenodeapp%2Fpgf-testing/lists"}