---
# System prepended metadata

title: Juno Network Release Guide

---

# Reece's Network Release Guide
This document outlines a step by step guide to release a binary change to node operators.

**Note** All releases must be tested on the testnet before mainnet. Severe security patches may be the only exception to this rule, depending on the severity. These should be tested on testnet/devnet and execute against the bit of software changed (i.e. Wasm upgrade, make sure wasmd still works). Then move to a mainnet node, wait, then release to all.

## Halting Security Patch (i.e. CW1.5.2)
Validator Update Readiness Script: https://gist.github.com/Reecepbcups/2b8f90139ccbfbe293afaa7d466b2ebf

Example Sheet: https://docs.google.com/spreadsheets/d/1TIGUb32vS6T8Qk2obQ-_HwKPMOOM6ue6HwueVo2WbTg/edit#gid=0

## Pre-Relase & initial Testnet

1) Write code and test. Manually test upgrade locally as well as the auto CI/CD
2) Tag pre-release. Sort changes in terms of `Modules, Features, Testing/CI, Dep Bumps, CLI Additions, and Other`.
    - pre release should end with `-alpha.#` or `-beta.#` after many alphas have been created
    - **If it is non state breaking:**
    - 
    ```bash
    # A non state breaking release has been tagged, upgrade with:
    
    # stop node

    # Apply the patch
    git fetch --tags && git checkout vTAGHERE.beta.1
    make build && make install
    
    # if you are using cosmovisor, you need to copy the binary for use
    mkdir -p $DAEMON_HOME/cosmovisor/upgrades/v18/bin && cp $HOME/go/bin/junod $DAEMON_HOME/cosmovisor/upgrades/v18/bin
    
    # Confirm the values line up
    junod version --long
    # commit: COMMIT_HASH_HERE
    # cosmos_sdk_version: 
    # version: vTAG.x.x
    
    # start node
    ```
3) **State breaking** Use [cosmos-proposal-maker](https://github.com/Reecepbcups/cosmos-proposal-maker) and outline the entire proposal text. make it pretty so it can be reused for mainnet
- Use `block_estimator.py` to calulate the release time block easily. 
    - It must be 2 days in advance. Check to ensure this is the case in mintscan.
- Paste in the new description, and ensure the upgrade-info has the correct binary. Use the ./software_upgrade/juno_v*.sh folder as Tx submit reference.
4) Write instructions in the [juno testnets repo](https://github.com/CosmosContracts/testnets) filling out all info.
5) After merging: Submit a software upgrade proposal on testnet 16-18:00 UTC.
6)
    ```
    @uni There is a software upgrade vote live:
    `junod tx gov vote ### yes --gas-prices 0.1ujunox --gas-adjustment 1.3 --gas auto --chain-id uni-6 -y -b sync --from <key>`

    The upgrade instructions are as follows:
    - https://github.com/CosmosContracts/testnets/blob/main/uni-6/03_V14_BETA_UPGRADE.md

    Target Block is: https://testnet.mintscan.io/juno-testnet/blocks/770462.

    Thank you all 🙏
    ```
7) Send a message to the communications DAO to begin brainstorming
    - Artwork
    - Upgrade Name
    - Medium article (from changelog, post after mainnet launch)
    - Get drafted tweets
    - Video Interview w/ Comms for shorts on features
    - Distribute all the above to the private Juno Media Announcements TG
6) Test testnet features for 2 weeks

---

## Mainnet

### Upgrade Proposals should be put up on Mondays.

1) Tag a new release on the branch for v##.0.0 ( DO NOT CREATE IT AS DRAFT)
    - The last commit should be the same as Uni's last change
    - Wait a bit for the CI to run an d generate the junod binary to the release

2) Update the testnet [cosmos-proposal-maker](https://github.com/Reecepbcups/cosmos-proposal-maker) main description for any specifics
    - Medium Article

3) Submit to chain with minimum deposit. Then get into vote period
- `junod tx gov deposit PROPOSAL 4000000000ujuno --fees=50000ujuno --from=reece-main `

4) Let comms DAO know (Do this significantly before to pre gen the release tweets?)

5) Add instructions to https://github.com/CosmosContracts/mainnet & merge
6) Tag Validators in validators announcements (public) with upgrade information
    - like so:
    ```markdown
    @validators v##.0.0 upgrade is now live for voting!

    Proposal: https://www.mintscan.io/juno/proposals/######

    Target Block: https://www.mintscan.io/juno/blocks/#######

    Upgrade instructions: https://github.com/CosmosContracts/mainnet/blob/main/juno-1/*****.md

    :junocross:
    ```
    
7) 10-15 minutes before it goes live, re-ping validators a reminder in the channel
   ```markdown
   @validators Reminder, A state breaking upgrade goes live in the next ## minutes!
   
   If you have not pre staged your upgrade with Cosmovisor, you have to manually restart your junod instance.
   
   Record to beat: 6 minutes and 22 seconds (v13, March 13th, 2022)
   ```
   
   
---

# Mainnet Security
- Push PR, get approvals into branch
- test on testnet & mainnet nodes (private, Core team only)
- If its safe to do so: tag -alpha for testnet. Tag Uni validators.
- After Uni (if applicable) Tag validators in #validator-announcements to watch for a patch soon (in the next X days / hours)
- Later on, tag release on main.
- Post instructions in private validator chat
- Have a google sheet with upgrades to ensure we get >67%

Discord Announcement
```
@Validator vXX..X.X Patch instructions

# stop your node
systemctl stop juno

# Download the latest version
cd juno
git fetch --tags && git checkout vXX.X.X
make build && make install

# Cosmovisor Users
cp -f $HOME/go/bin/junod $DAEMON_HOME/cosmovisor/current/bin/

junod version --long
# this will return commit <commit>

# start the node back up
systemctl start juno

# Edit your readiness in the spreadsheet once completed
https://docs.google.com/spreadsheets/d/1BP1M0aoQ59Wf5ZUu69zbtCzfcKwxnKcZU3h_wPInysk/edit
```