{"id":18953167,"url":"https://github.com/0xpolygon/polygon-edge-assm","last_synced_at":"2025-04-16T02:32:03.326Z","repository":{"id":37746052,"uuid":"481952074","full_name":"0xPolygon/polygon-edge-assm","owner":"0xPolygon","description":"Helper program for bootstrapping Polygon Edge deployments utilizing AWS Session Manager","archived":false,"fork":false,"pushed_at":"2022-10-12T16:59:27.000Z","size":29337,"stargazers_count":4,"open_issues_count":0,"forks_count":8,"subscribers_count":0,"default_branch":"master","last_synced_at":"2023-03-03T20:50:48.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/0xPolygon.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}},"created_at":"2022-04-15T12:31:14.000Z","updated_at":"2023-02-07T14:57:05.000Z","dependencies_parsed_at":"2023-01-19T13:03:18.347Z","dependency_job_id":null,"html_url":"https://github.com/0xPolygon/polygon-edge-assm","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xPolygon%2Fpolygon-edge-assm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xPolygon%2Fpolygon-edge-assm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xPolygon%2Fpolygon-edge-assm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xPolygon%2Fpolygon-edge-assm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xPolygon","download_url":"https://codeload.github.com/0xPolygon/polygon-edge-assm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223692706,"owners_count":17187064,"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-08T13:36:55.640Z","updated_at":"2024-11-08T13:36:56.210Z","avatar_url":"https://github.com/0xPolygon.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Polygon Edge secrets manager initializer\n\nOn running automated Polygon Edge deployments this API helps with creation of `genesis.json` file that the Polygon Edge server needs to run a chain.\nWhen the private keys are saved in some secrets manager solution ( right now only AWS SSM is supported ) this API fetches these keys and converts them to network_id and validator address.\n\n### Prequestites\n* Dedicated node that will clone this repo, compile binary and run it.\n* This node needs to have access to both ASSM and S3 that will hold `genesis.json` file ( instance IAM polices ).  \n* All polygon edge nodes need to be able to access this node at TCP 9001 by default ( security groups ).\n\n## How to use\nThe genesis creation process involves several stages, consisting of hitting the API and delivering the required data to it.  \n\n### Total number of nodes API\nIf there are 4 validator nodes in total: `/total-nodes?total=4`  \nNow the API knows that there are 4 nodes that we would like to initialize as validator nodes.\n\n### Initialization done\nEach validator node needs to send the following api when it finishes the `secrets init` stage: ` /node-done?name=node1\u0026ip=10.150.1.4`   \nNode sends its name, which coresponds to the name in secrets manager, and its IP address.  \nOnce the program receives enough calls to this API ( for 4 nodes, the program expects 4 calls to this API ), it moves to the next stage.   \n\n### Fetch keys and generate genesis.json file\nOnce all validator nodes reported that they have successfully completed the `secrets init` stage, this program fetches validator secrets from the secrets store, generates `genesis.json` file and puts it in the S3 bucket.   \nThe API call that triggers this action is: `/init`   \n\nEach node can be configured to send all 3 API calls.   \nOnce the last node hits `/init` api, the `genesis.json` file generation will start.\n\n### Configuration options\nFlags that can be set for this program are:   \n* `aws-region` - sets the AWS region for the SSM. Default: `us-west-2`\n* `s3-name` - sets S3 bucket name in which to place the `genesis.json` file. Default: `polygon-edge-shared`\n* `log-file` - sets the log file output. Default: `/var/log/edge-assm.log`\n* `genesis-log-file` - sets log file output for genesis module. Default: `/var/log/edge-assm-genesis.log`\n* `chain-name` - sets chain name. Default: pulled from `polygon-edge genesis` command\n* `pos` - sets PoS consensus. Default: false\n* `epoch-size` - sets epoch size. Default: pulled from `polygon-edge genesis` command\n* `premine` - premine accounts. For multiple accounts, separate them with `,`. Format: `\u003caccount\u003e:\u003cammount\u003e`\n* `chain-id` - sets chain id. Default: pulled from `polygon-edge genesis` command\n* `block-gas-limit` - sets block gas limit. Default: pulled from `polygon-edge genesis` command\n* `max-validator-count` - sets maximum validator count, only for PoS consensus. Default: pulled from `polygon-edge genesis` command\n* `min-validator-count` - sets minimum validator count, only for PoS consensus. Default: pulled from `polygon-edge genesis` command\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xpolygon%2Fpolygon-edge-assm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xpolygon%2Fpolygon-edge-assm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xpolygon%2Fpolygon-edge-assm/lists"}