[Proposal #63] agoric-upgrade-12

:wave:Hello Agoric Validators & BLD Community,

Agoric OpCo is happy to announce that a new software release, agoric-upgrade-12, is now available for the agoric-3 chain. :raised_hands:

Release details:

  • Reduce the BlockParams.MaxBytes consensus parameter to 5MB
  • Enable restore from State Sync with larger payloads, which was previously broken
  • Avoid a potential consensus failure when the node is restarted during busy blocks
  • Allow a brand new chain to be launched with a functioning walletFactory contract (previously this only worked for chain upgrades)
  • Allow usage of outbound IBC in JS smart contracts

We’ve prepared the following:

Upgrade Handlers:

Emerynet: agorictest-upgrade-12
Mainnet: agoric-upgrade-12

Important note for anyone generating state-sync snapshots for use by new nodes:

In order to produce state-sync snapshots, beginning with agoric-upgrade-11 your node must have a “complete” JS database. If your DB isn’t complete, the state-sync generation process will fail. If you have been running a node continuously since the Mainnet 1B upgrade (agoric-upgrade-10), then your DB will be complete.

If you created your node from a state-sync restore before agoric-upgrade-11, or if you used a community snapshot that had itself restored from state-sync, then your DB will not be complete. You can restore from state-sync with agoric-upgrade-12 to obtain a complete DB.

Recommended Testnet Milestones

By running long-lived testnets and using that environment to evaluate software before promoting it to mainnet, validators play a vital role in maintaining a healthy, robust network for the Agoric community. Qualifying or certifying any new software release as production ready requires significant testing, and Agoric OpCo recommends that validators evaluate the following milestones before launching an on-chain governance proposal on the agoric-3 mainnet.

:zero: – Choose a testnet coordinator to kick off the Emerynet upgrade. Traditionally, the testnet coordinator submits the on-chain proposal for mainnet software upgrade.

:one: – Ensure that you’re up to date on golang and node versions for this release, and that you’ve upgraded to the newest version of Cosmovisor that supports the upgrade handler.

:two: – Evaluate core mainnet functionality. This could include:

  • Creating a state-sync snapshot
  • Spinning up a node using a state-sync snapshot
  • Exercising the new VM functionality of the release by participating in the upgrade
  • Restarting your node after a successful upgrade
  • Making IBC transactions with testnet tokens
  • Exercising on-chain governance parameters

:three: – Keep the community updated on testnet progress by posting updates to this thread and/or sharing details in Discord so that the entire community can follow progress towards launch.

:four: – Coordinate with your fellow validators to determine if this release is ready to be promoted to mainnet and, when ready, the Testnet Coordinator should notify the OpCo team that they’d like the pre-release tag removed.

:five: – Testnet Lead (or another validator) create a mainnet proposal, if needed seek support from the community for deposit.

Calculating an upgrade height

GitHub - Agoric/estimator 4

Creating an Emerynet upgrade proposal:

Confirm the commit hash and upgrade name BEFORE submitting a proposal.


# Edit as needed
FROM_WALLET=yourwallet
UPGRADE_HEIGHT="1234-get-blockheight-from-estimator"

# Verify values
UPGRADE_TO="agorictest-upgrade-12"
CHAIN_ID="agoric-emerynet-8"
COMMIT_ID=$(git rev-parse HEAD)
ZIP_URL="https://github.com/Agoric/agoric-sdk/archive/${COMMIT_ID}.zip"
CHECKSUM=sha256:$(curl -L "$ZIP_URL" -o- | shasum -a 256 | cut -d' ' -f1)
UPGRADE_INFO="{\"binaries\":{\"any\":\"$ZIP_URL?checksum=$CHECKSUM\"}}"

agd tx gov submit-proposal software-upgrade $UPGRADE_TO --upgrade-info="$UPGRADE_INFO" --upgrade-height="$UPGRADE_HEIGHT" --title="Upgrade to $UPGRADE_TO" --description="This proposal if voted will upgrade the chain to $UPGRADE_TO" --from=$FROM_WALLET --chain-id=$CHAIN_ID


When the testnet milestones are complete and validators have fully qualified the release on Emerynet, the testnet coordinator should inform Agoric OpCo to promote the release from rc to final and update tags accordingly, then create and submit a similar on-chain proposal to upgrade the agoric-3 chain to agoric-upgrade-12.

Creating a Mainnet upgrade proposal:

Confirm the commit hash and upgrade name BEFORE submitting a proposal.


# Edit as needed
FROM_WALLET=yourwallet
UPGRADE_HEIGHT="1234-get-blockheight-from-estimator"

# Verify values
UPGRADE_TO="agoric-upgrade-12"
CHAIN_ID="agoric-3"
COMMIT_ID=$(git rev-parse HEAD)
ZIP_URL="https://github.com/Agoric/agoric-sdk/archive/${COMMIT_ID}.zip"
CHECKSUM=sha256:$(curl -L "$ZIP_URL" -o- | shasum -a 256 | cut -d' ' -f1)
UPGRADE_INFO="{\"binaries\":{\"any\":\"$ZIP_URL?checksum=$CHECKSUM\"}}"

agd tx gov submit-proposal software-upgrade $UPGRADE_TO --upgrade-info="$UPGRADE_INFO" --upgrade-height="$UPGRADE_HEIGHT" --title="Upgrade to $UPGRADE_TO" --description="This proposal if voted will upgrade the chain to $UPGRADE_TO" --from=$FROM_WALLET --chain-id=$CHAIN_ID


3 Likes

The upgrade proposal on Emerynet (Governance proposal 18 on network agoric-emerynet-8) referenced the wrong upgrade name. To unblock the upgrade without respinning the network, validators must locally edit the upgrade name string in app.go and rebuild the binary. The following commands can be used from the root of your agoric-sdk checkout:

sed -i s/agorictest-upgrade-12/agoric-upgrade-12-rc0/ golang/cosmos/app/app.go
make -C packages/cosmic-swingset

This only applies to the software run by Emerynet validators. The mainnet proposal should be generated with the agoric-upgrade-12 upgrade name, and no patch is necessary.

1 Like

Update on milestones

1 – Ensure that you’re up to date on golang and node versions for this release, and that you’ve upgraded to the newest version of Cosmovisor that supports the new upgrade handler.
All dependencies and preparation steps were done before the upgrade.

2 – Evaluate core mainnet functionality. This could include:
:kiwi_fruit: 2.1. Creating a state-sync snapshot
Our state-sync peer were configured to create snapshots every 1000 blocks, we can confirm that all snapshots were performed with no issues starting from upgrade block 2433000

ls ~agoric-testnet/.agoric/data/snapshots/
2267000  2327000  2350000  2386000  2404000  2432000  2433000  2434000  2435000  2436000  metadata.db

:kiwi_fruit: 2.2. Spinning up a node using a state-sync snapshot
Tested state-sync using our own RPC node.
Logs: Spinning up a node using a state-sync snapshot · GitHub
Instructions for state-sync: State sync - kjnodes | Chain services
:kiwi_fruit: 2.3. Exercising the new VM functionality of the release by participating in the upgrade
Upgraded the chain on upgrade block using Cosmovisor on 3 nodes without any issues
:kiwi_fruit: 2.4 Restarting your node after a successful upgrade
Restarted the node many times after upgrade with no problems
:kiwi_fruit: 2.5 Making IBC transactions with testnet tokens.
Created IBC channel between agoric and bitcanna testnets

  - Client: 07-tendermint-10
    * Connection: connection-7
      | State: OPEN
      | Counterparty state: OPEN
      + Channel: channel-6
        | Port: transfer
        | State: OPEN
        | Counterparty: channel-7
# Chain: bitcanna-dev-1
  - Client: 07-tendermint-7
    * Connection: connection-7
      | State: OPEN
      | Counterparty state: OPEN
      + Channel: channel-7
        | Port: transfer
        | State: OPEN
        | Counterparty: channel-6

Tested IBC transfers to both sides:
Agoric → Bitcanna
TxHash: DA53A22FF3110FBA1F3C384865BDF317B2B923CB806256228CD137C5331AAB1C
https://explorer.kjnodes.com/agoric-testnet/tx/DA53A22FF3110FBA1F3C384865BDF317B2B923CB806256228CD137C5331AAB1C

Bitcanna → Agoric
TxHash: 7BC603162B350553C83F674EF45CA18F8197F9916381C4DC814F91BB67BCB211
https://explorer.kjnodes.com/bitcanna-testnet/tx/7BC603162B350553C83F674EF45CA18F8197F9916381C4DC814F91BB67BCB211
:kiwi_fruit: 2.6 Exercising on-chain governance parameters
Governance parameter change tested successfully with proposal #19

1 Like

Following a the successful Emerynet milestone testing period and confirmation from validators Agoric OpCo has removed the pre-release tag from agoric-upgrade-12. The release is production ready and validators can move forward and coordinate for an agoric-upgrade-12 proposal on mainnet!

Proposal 63: Upgrade the chain to agoric-upgrade-12 has passed!

The proposal targets the upgrade block to be 12586889, anticipated to be on November 21st 2023 at approx. 17:00 UTC.

The chain upgrade was successful! There was some backlog to get through but that is done and we now have blocks being produced as usual. The upgrade process quite fast and only took ~12 minutes to go from chain halt to new blocks.

Thanks to all validators for your efforts through this upgrade!