Skip to content

atomone-hub/govgen-genesis

Repository files navigation

GovGen Genesis

This repo is dedicated to the creation of the GovGen genesis using data from Cosmos Hub proposal #848

It relies on the work provided in atomone-hub/genesis#103, and follows the guidelines defined in atomone-hub/genesis#71

NOTE: check out requirements.txt for additional Python packages requirements.

Final genesis download link

The final genesis is avalable at this link.

It does include all gentxs collected from https://github.com/atomone-hub/validator/tree/main/govgen-1

The launch date is going to be 27th of February 2024 at 14:00 UTC.

Pre-gentxs genesis download link.

The genesis created using what is available in this repo can be downloaded at this link. The actual genesis will be different though, as it will also contain the gen-txs from validators which can apply at https://github.com/atomone-hub/validator and also submit their gen-txs there.

Base Genesis - params

Created a base-genesis.json that contains the genesis parameters starting from the state export of the Cosmos Hub at block 18010658, which is when proposal #848 is finalized and comes into effect.

This base genesis includes the following changes:

  • x/bank: disabled sendTx for ugovgen (and by default on the chain)
  • x/distribution: community tax, proposer reward and bonus all set to 0
  • x/mint: inflation disabled, no new $GOVGEN token minting
  • x/gov:
    • deposit amount raised to 5000 $GOVGEN,

    • deposit period increased to 21 days

    • voting period is replaced by 3 new different voting periods:

      • for text proposal: 365 days
      • for parameter change proposal: 14 days
      • for software upgrade proposal: 28 days
      • if the proposal is none of the above: 14 days
    • quorum raised to 50%

    • pass threshold increased to 2/3

  • x/staking:
    • reduced validators to 77, giving some room to post-genesis validators to join
    • reduced unboding period to 14 days

NOTE: genesis time set as "2024-02-27T14:00:00Z"

GovGen token distribution

The govgen-distribution.py Python script takes as input the result of the analysis performed in atomone-hub/genesis#103, i.e. the resulting accounts.json and calculates the $GOVGEN distribution based on votes and delegations associated with each address. It specifically accounts for votes marked as options 3 (No) and 4 (NWV) to determine each address's token allocation, summing amounts from either direct votes - if present - or votes inherited from delegations. The output is a JSON file listing eligible addresses with their respective $GOVGEN (ugovgen) amounts, and the total supply of these tokens. Addresses are also converted to have the govgen Bech32 prefix.

The script takes two arguments: the input JSON file and the desired output file's path. Designed specifically for a predetermined data structure and voting criteria, it assumes the numerical values in the input JSON are correctly formatted for processing. As mentioned, the format is the one defined in atomone-hub/genesis#103.

GovGen genesis before gentxs

The govgen-genesis-pre-gentxs.py Python script takes as input the JSON file produced by the govgen-distribution.py script and the base genesis file, and outputs a genesis file that is the result of the combination of the two.

The third argument for the script is optional and specifies the output genesis JSON file, which by default is simply genesis.json.

Collect gentxs and generate final genesis

Use the govgen-collect-gentxs.py script to generate the final genesis including the required gentxs. The script takes as input the genesis JSON generated by the govgen-genesis-pre-gentxs.py script, the path to the folder where all the gentxs are located, and optionally a third argument that specifies the path of the output genesis JSON file, which by default is simply genesis.json.

The script will also fund validator accounts that did not exist initially with a 25 $GOVGEN balance to provide funds for operations. Validator accounts that already exist and do not have at least 25 $GOVGEN are also topped off to reach that initial balance.

About

GovGen Genesis Creation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages