github MinaProtocol/mina 3.0.0devnet
Mina Devnet 3.0.0 Upgrade Release

latest releases: 3.0.1-migration-tooling, 3.0.0-migration-tooling
pre-release26 days ago

❗ This release is only to be used as part of the Devnet upgrade process ❗


This release represents the final stage in the Devnet upgrade process which concludes the execution of the upgrade mechanism. This release marks a new upgraded network with all of the Berkeley functionality that will feature on Mainnet when subsequently upgraded. This version of the daemon is not compatible with the previous builds and as such it is necessary to either install this on a clean system or to remove the previous builds and artifacts. The steps on how to do this are contained within the release notes.


Supported environments include macOS, Linux (Debian 10, 11 and Ubuntu 20.04 LTS), and any host machine with Docker.

Removing previous builds

mina client stop
sudo apt remove mina-devnet=1.5.0devnet-stop-slot-c18c750 
sudo mv /tmp/coda_cache_dir /tmp/coda_cache_dir_bak
sudo mv $HOME/.mina-config $HOME/.mina-config_bak   

Connecting to the Devnet network

Debian Packages

Debian Repository:
First, set up and update the devnet Debian Repository for your platform with the following commands:

sudo rm /etc/apt/sources.list.d/mina*.list
sudo echo "deb [trusted=yes] http://packages.o1test.net $(lsb_release -cs) devnet" | sudo tee /etc/apt/sources.list.d/mina-devnet.list
sudo apt-get update

Then, install the package(s) that you need:

Mina Daemon
sudo apt-get install --allow-downgrades -y mina-devnet=3.0.0
sudo apt-mark hold mina-devnet=3.0.0
Mina Archive
sudo apt-get install --allow-downgrades -y mina-archive=3.0.0
sudo apt-mark hold mina-archive=3.0.0

Mina Archive Schema
create_schema.sql
zkapp_tables.sql
Config File: var/lib/coda/config_dc6bf78b.json

Docker Images

Every docker image is built for each of the supported platforms, replace CODENAME in the images below with your choice of focal, buster, or bullseye to select the base docker image.

Mina Daemon gcr.io/o1labs-192920/mina-daemon:3.0.0-dc6bf78-CODENAME-devnet
Mina Archive gcr.io/o1labs-192920/mina-archive:3.0.0-dc6bf78-CODENAME
Mina Archive Schema
create_schema.sql
zkapp_tables.sql
Mina Rosetta gcr.io/o1labs-192920/mina-rosetta:3.0.0-dc6bf78-CODENAME

Step by Step Guides


Upgrade Package verification

Documentation
https://github.com/MinaProtocol/mina/blob/berkeley/docs/upgrading-to-berkeley.md

Further usage details are documented inside the script itself as its help message: https://github.com/MinaProtocol/mina/blob/berkeley/scripts/mina-verify-packaged-fork-config

You can find the fork config from the pre-upgrade Devnet here

In this release, the fork_config GraphQL endpoint does not automatically determine the correct block to fork from. As such, you will need to manually specify the block for the devnet hardfork when executing the GraphQL fork_config query.
The block that we hardfork from is always the latest block in the chain immediately prior to the transaction stop slot. In this case, the devnet transaction stop slot is set to 445620, so the correct fork block is the latest block in the chain where the globalSlotSinceGenesis < 445620. So the correct fork block to use here has the following properties:

{
  "state_hash": "3NKSvjaGSKiQuAt8BP1b1VCpLbJc9RcEFjYCaBYsJJFdrtd6tpaV",
  "blockchain_length": 296371,
  "global_slot_since_genesis": 445619
}
You can check this information by issuing the following GraphQL query and then searching through the blocks returned for the latest block where globalSlotSinceGenesis < 445620.
query MyQuery {
  bestChain {
    protocolState {
      consensusState {
        blockHeight
        slotSinceGenesis
      }
    }
    stateHash
  }
}

To query the correct fork config from GraphQL, you can specify the block height of this fork block as shown in the following query:

query MyQuery {
  fork_config(height: 296371)
}

Mina Archive Node

  1. Start the archive node using the migrated DB. You can migrate your database as instructed in this guide using the migration tool.

  2. Alternatively you can import the migrated db dump from here

Mina Daemon

This version connects and functions only on the Mina Devnet Network.

  1. If you don't already have one, create a libp2p key pair and persist it.
    mina libp2p generate-keypair -privkey-path <path-to-the-key-file>
  2. Set the environment variable MINA_LIBP2P_PASS with the password set for the libp2p key pair in the previous step.
  3. Run mina daemon with:
    -libp2p-keypair <path-to-the-key-file> and --peer-list-url https://storage.googleapis.com/o1labs-gitops-infrastructure/devnet/seed-list-devnet.txt

If you are running the correct version on the correct network (i.e. devnet), mina client status will show:

Chain id:     29936104443aaf264a7f0192ac64b1c7173198c1ed404c1bcff5e562e05eb7f6
Git SHA-1:    dc6bf78b8ddbbca3a1a248971b76af1514bf05aa

SDK Tooling

If you are new to the world of Berkeley & indeed zkApps we strongly encourage you to check it out!
The new Berkeley era allows compatibility with the mina network and our extensive suite of SDK tooling that allows anyone to write smart contracts utilising zero knowledge proofs!

Start here zkApps Overview and let us know what you think!

Useful links

Don't miss a new mina release

NewReleases is sending notifications on new releases.