Snowbridge
  • Introduction
  • Concepts
  • Architecture
    • Overview
    • Components
    • Channels
    • Verification
      • Ethereum
      • Polkadot
        • Operational Costs
    • Governance
    • Upgrades
    • Relayers
  • Applications
    • Token Transfers
  • Security
    • Exploit Reporting
    • Audits
  • Other
    • Quick Start Guide
    • Processes for keeping track of dependency changes
    • Bridges Workshop
  • Rococo Testnet
    • Rococo-Sepolia Token Transfers
  • Operations
    • Infrastructure
    • Contributing to Snowbridge
    • Governance and Operational Processes
    • General Governance Updates
    • Test Runtime Upgrades
    • Run Relayers
Powered by GitBook
On this page
  • Steps for initiating a governance update
  • Generate the preimage
  • Test the update in chopsticks
  • OpenGov
  1. Operations

General Governance Updates

PreviousGovernance and Operational ProcessesNextTest Runtime Upgrades

Last updated 10 months ago

Snowbridge has several governance APIs that can only be executed using a democratic process via Polkadot OpenGov.

These APIs include:

  • Updating the Gateway contract on Ethereum

  • Updating pricing parameters for fee calculations

These APIs are available on the EthereumSystem pallet on BridgeHub. We have also developed a for generating calls to these APIs.

Steps for initiating a governance update

As an example, we will show how to upgrade the Gateway contract on Ethereum.

Generate the preimage

Deploy the new gateway contract, and then generate a preimage for calling EthereumSystem.upgrade

snowbridge-preimage --format binary upgrade PARAMS > preimage.bin
 

Test the update in chopsticks

The snowbridge-preimage tool will also generate a helper script chopsticks-execute-upgrade.js to execute the update in simulated chopsticks environment.

  1. Run chopsticks and fork Polkadot, AssetHub, and BridgeHub, using these

chopsticks xcm -r polkadot.yml -p polkadot-asset-hub.yml -p polkadot-bridge-hub.yml
  1. Once the chopsticks environment has been initialized, connect to BridgeHub in Polkadot-JS, and execute the contents of chopsticks-execute-upgrade.js in the Polkadot-JS Javascript console.

OpenGov

The next step involves submitting the proposal to the Whitelisted Caller track in OpenGov.

This actually involves two referendums:

  • A referendum on the Collectives chain where the technical fellowship vote to whitelist the preimage.

  • A public referendum on Polkadot where the general public vote to execute the whitelisted preimage.

opengov-cli submit-referendum --proposal preimage.hex --network polkadot --track whitelisted-caller --after 100 --output-len-limit 100 --output AppsUiLink

A more testing scenario would involve having to upgrade BridgeHub with new code, and then calling a governance API.

We use the tool to generate the various calls required to setup these referendums.

tool
configs
complicated
opengov-cli