--- tags: testnet,upgrades --- # Software Upgrade Proposal Workflow * [v8-Rho Testnet Proposal Text](https://hackmd.io/PXngP2B6SouKpFefR6pG_Q) * [v8-Rho Mainnet Proposal Text](https://hackmd.io/NEFlSY9fQViCb4Hl5A-24Q) * [Unsigned JSON](https://github.com/cosmos/testnets/blob/master/public/UPGRADES.md#upgrade-height-and-binaries) for the v8-Rho proposal For mainnet: * [X] Desired upgrade time: `2023-02-09 11:00 UTC` * Estimated block height: `14004457` * [X] Proposer address: `cosmos1hqm96xsxdr86qywxyl5a7rh7saw4rnssmwrc68` * [ ] Binaries ## Preparation * Calculate an appropriate block height for the upgrade to take place * [Block height estimator spreadsheet](https://docs.google.com/spreadsheets/d/13HsQTevmnUycX2uihh32EcuY0u8I-EcvBLgLd8vs69w/edit#gid=24297356) * Obtain the URLs for the new binary files * The chain ID is `theta-testnet-001` * The `v7-Theta` software upgrade is used as an example * The proposer address is `cosmos1j7qzunvzx4cdqya80wvnrsmzyt9069d3gwhu5p` in this example * The node that is submitting the proposal must be online, otherwise use the `--node flag` * If the Gaia home folder is not `~/.gaia`, set the `--home [gaia home]` flag in all `gaiad` commands ## Format and Submit a Proposal 1. Generate the usigned proposal JSON using the `--offline` flag. Add a placeholder for the `description` text. ```bash gaiad tx gov submit-proposal software-upgrade v8-Rho \ --title v8-Rho \ --deposit 250000000uatom \ --upgrade-height 14004457 \ --upgrade-info '{"binaries":{"linux/amd64":"https://github.com/cosmos/gaia/releases/download/v8.0.0/gaiad-v8.0.0-linux-amd64?checksum=sha256:dc0e5b6690a55f0f1c41ad96f068049e25d9e85d53c0587284b7f1a1f9a51545","linux/arm64":"https://github.com/cosmos/gaia/releases/download/v8.0.0/gaiad-v8.0.0-linux-arm64?checksum=sha256:994f67ec8134504ae032a1ae58caf769b5a9a1581a38705efd94ab654a7f6173","darwin/amd64":"https://github.com/cosmos/gaia/releases/download/untagged-b06ce0e8a8ccd5b24c3f/gaiad-v8.0.0-darwin-amd64?checksum=sha256:2b7425b27e1c04877f0e9230f1657bee1b3274b73bee8f550a290cc505444dbf","darwin/arm64":"https://github.com/cosmos/gaia/releases/download/v8.0.0/gaiad-v8.0.0-darwin-amd64?checksum=sha256:2b7425b27e1c04877f0e9230f1657bee1b3274b73bee8f550a290cc505444dbf","windows/amd64":"https://github.com/cosmos/gaia/releases/download/v8.0.0/gaiad-v8.0.0-windows-amd64.exe?checksum=sha256:1362b026e942cc16ab2b7f35a3ff39fb9075dcde70570635485d4b1866e1d036"}}' \ --description "placeholder" \ --from cosmos1hqm96xsxdr86qywxyl5a7rh7saw4rnssmwrc68 \ --fees 5000uatom \ --chain-id cosmoshub-4 --generate-only \ --offline > unsigned-rho-proposal.json ``` > You may get an incorrect sequence error. Update the command with the number listed in the error or query the account sequence with `gaiad q auth <account>`. The `unsigned.json` file will look like this: ```json { "body": { "messages": [ { "@type": "/cosmos.gov.v1beta1.MsgSubmitProposal", "content": { "@type": "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", "title": "v7-Theta", "description": "placeholder", "plan": { "name": "v7-Theta", "time": "0001-01-01T00:00:00Z", "height": "10085397", "info": "{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/gaia/releases/download/v7.0.0/gaiad-v7.0.0-linux-amd64?checksum=sha256:dc0e5b6690a55f0f1c41ad96f068049e25d9e85d53c0587284b7f1a1f9a51545\",\"linux/arm64\":\"https://github.com/cosmos/gaia/releases/download/v7.0.0/gaiad-v7.0.0-linux-arm64?checksum=sha256:994f67ec8134504ae032a1ae58caf769b5a9a1581a38705efd94ab654a7f6173\",\"darwin/amd64\":\"https://github.com/cosmos/gaia/releases/download/v7.0.0/gaiad-v7.0.0-darwin-amd64?checksum=sha256:2b7425b27e1c04877f0e9230f1657bee1b3274b73bee8f550a290cc505444dbf\",\"windows/amd64\":\"https://github.com/cosmos/gaia/releases/download/v7.0.0/gaiad-v7.0.0-windows-amd64.exe?checksum=sha256:1362b026e942cc16ab2b7f35a3ff39fb9075dcde70570635485d4b1866e1d036\"}}", "upgraded_client_state": null } }, "initial_deposit": [ { "denom": "uatom", "amount": "50000" } ], "proposer": "cosmos1hxv7mpztvln45eghez6evw2ypcw4vjmsmr8cdx" } ], "memo": "", "timeout_height": "0", "extension_options": [], "non_critical_extension_options": [] }, "auth_info": { "signer_infos": [], "fee": { "amount": [], "gas_limit": "163345", "payer": "", "granter": "" } }, "signatures": [] } ``` 2. Write out the proposal description in Markdown. It must be less than 10k characters long. ```markdown # Upgrade the chain to Gaia v7 ## Summary After this proposal is submitted, it will go into a deposit period. If the deposit threshold is reached, it will go into a voting period. If the proposal passes, the upgrade will occur at the specified block height. ## Details Gaia v7 includes a number of changes. Visit the [roadmap](https://github.com/cosmos/gaia/blob/main/docs/roadmap/cosmos-hub-roadmap-2.0.md) for a full list. **Note: If you are upgrading from any Gaia version below 6.0.4, the Cosmovisor auto-download feature will not work.** ``` 3. Paste the Markdown for the proposal description into https://www.cescaper.com/. Copy the escaped format that converts new lines into `\r\n` and replace your placeholder text in `unsigned.json` with it. ```json {"body":{"messages":[{"@type":"/cosmos.gov.v1beta1.MsgSubmitProposal","content":{"@type":"/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal","title":"v7-Theta","description":"# Upgrade the chain to Gaia v7\r\n\r\n## Summary\r\n \r\nAfter this proposal is submitted, it will go into a deposit period.\r\n \r\nIf the deposit threshold is reached, it will go into a voting period.\r\n\r\nIf the proposal passes, the upgrade will occur at the specified block height.\r\n\r\n## Details\r\n\r\nGaia v7 includes a number of changes. Visit the [roadmap](https://github.com/cosmos/gaia/blob/main/docs/roadmap/cosmos-hub-roadmap-2.0.md) for a full list.\r\n**Note: If you are upgrading from any Gaia version below 6.0.4, the Cosmovisor auto-download feature will not work.**","plan":{"name":"v7-Theta","time":"0001-01-01T00:00:00Z","height":"10085397","info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/gaia/releases/download/v7.0.0/gaiad-v7.0.0-linux-amd64?checksum=sha256:dc0e5b6690a55f0f1c41ad96f068049e25d9e85d53c0587284b7f1a1f9a51545\",\"linux/arm64\":\"https://github.com/cosmos/gaia/releases/download/v7.0.0/gaiad-v7.0.0-linux-arm64?checksum=sha256:994f67ec8134504ae032a1ae58caf769b5a9a1581a38705efd94ab654a7f6173\",\"darwin/amd64\":\"https://github.com/cosmos/gaia/releases/download/v7.0.0/gaiad-v7.0.0-darwin-amd64?checksum=sha256:2b7425b27e1c04877f0e9230f1657bee1b3274b73bee8f550a290cc505444dbf\",\"windows/amd64\":\"https://github.com/cosmos/gaia/releases/download/v7.0.0/gaiad-v7.0.0-windows-amd64.exe?checksum=sha256:1362b026e942cc16ab2b7f35a3ff39fb9075dcde70570635485d4b1866e1d036\"}}","upgraded_client_state":null}},"initial_deposit":[{"denom":"uatom","amount":"50000"}],"proposer":"cosmos1j7qzunvzx4cdqya80wvnrsmzyt9069d3gwhu5p"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]} ``` 4. Sign the proposal to generate `signed.json`. ```bash gaiad tx sign unsigned.json \ --chain-id theta-testnet-001 \ --from cosmos1j7qzunvzx4cdqya80wvnrsmzyt9069d3gwhu5p \ --gas auto \ --fees 500uatom &> signed.json ``` 5. Submit the `signed.json` proposal. ```bash gaiad tx broadcast signed.json ```