{"id":19369144,"url":"https://github.com/joystream/status-endpoint-joystream","last_synced_at":"2025-04-23T15:31:14.559Z","repository":{"id":40350750,"uuid":"193381765","full_name":"Joystream/status-endpoint-joystream","owner":"Joystream","description":"Status endpoint for the Joystream network","archived":false,"fork":false,"pushed_at":"2025-04-10T11:40:38.000Z","size":1370,"stargazers_count":1,"open_issues_count":7,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T12:54:51.230Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Joystream.png","metadata":{"files":{"readme":"README.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":"2019-06-23T18:23:47.000Z","updated_at":"2025-04-10T11:40:42.000Z","dependencies_parsed_at":"2025-04-10T12:32:36.518Z","dependency_job_id":"d4836b8a-f56d-4b14-94ac-7be25fb1500f","html_url":"https://github.com/Joystream/status-endpoint-joystream","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/Joystream%2Fstatus-endpoint-joystream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joystream%2Fstatus-endpoint-joystream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joystream%2Fstatus-endpoint-joystream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joystream%2Fstatus-endpoint-joystream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Joystream","download_url":"https://codeload.github.com/Joystream/status-endpoint-joystream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250460313,"owners_count":21434238,"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-11-10T08:09:50.572Z","updated_at":"2025-04-23T15:31:14.244Z","avatar_url":"https://github.com/Joystream.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# status-endpoint-joystream\n\nStatus endpoint for the Joystream network\n\n## How to Install\n\nClone the repo, then run:\n\n```\n$ yarn\n```\n\nAdd your config variables to `.env`, create `exchanges.json` (see: `exchanges.example.json) file and then run:\n\n```\n$ yarn start\n```\n\nto build and start the server.\n\n## Logs\n\n```\n# All logs\n$ yarn pm2 logs status-server\n\n# Errors only\n$ yarn pm2 logs status-server --err\n```\n\n## Shutdown\n\n```\nyarn pm2 delete status-server\n```\n\n## Updating the server after runtime upgrade\n\n```\n# 1. Kill the process\nyarn pm2 delete status-server\n\n# 2. Make sure lastProcessedBlock is \u003e= RUNTIME_UPGRADE_BLOCK_NUMBER\njq .lastBlockProcessed exchanges.json\n\n# 3. Make sure there were no exchanges at or after RUNTIME_UPGRADE_BLOCK_NUMBER as they may have been processed incorrectly.\n# In case there were any - see \"Handling exchanges at or after RUNTIME_UPGRADE_BLOCK_NUMBER\" below\njq .exchanges[-1].blockHeight exchanges.json\n\n# 4. Set `lastBlockProcessed` to RUNTIME_UPGRADE_BLOCK_NUMBER-1 (use the actual number!)\njq '.lastBlockProcessed=RUNTIME_UPGRADE_BLOCK_NUMBER-1' exchanges.json \u003e exchanges-tmp.json \u0026\u0026 mv exchanges-tmp.json exchanges.json\n\n# 5. Start the new status server\ncp exchanges.json exchanges-backup.json\ngit checkout new_status_server_branch\ncp exchanges-backup.json exchanges.json\nyarn \u0026\u0026 yarn start\n```\n\n### Handling exchanges at or after `RUNTIME_UPGRADE_BLOCK_NUMBER`\n\nIn case some exchanges happend at or after the runtime upgrade, but before the new version of the server was started (at step 3.), they need to be manually removed from `exchanges.json` (this is the limitation of the current implementation). In order to remove those exchanges:\n\n1. Let sum of the USD amount of those exchanges be `s`\n2. Increase `sizeDollarPool` by `s`\n3. Decrease `totalUSDPaid` by `s`\n4. Remove those exchanges from `exchanges` array\n5. Remove any entries in `poolChangeHistory` related to those exchanges","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoystream%2Fstatus-endpoint-joystream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoystream%2Fstatus-endpoint-joystream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoystream%2Fstatus-endpoint-joystream/lists"}