Skip to main content

Archive migration prerequisites

To successfully migrate the archive database into the Berkeley version of the Mina network, you must ensure that your environment meets the foundational requirements.

Migration host

  • PostgreSQL database for database server
  • If you use Docker, then any of the supported OS by Mina (bullseye, focal, or buster) with at least 32 GB of RAM
  • gsutil application from Google Cloud Suite in version 5 or later
  • (Optional) Docker in version 23.0 or later

(Optional) Devnet/Mainnet database

One of the most obvious prerequisites is a Mainnet database.

If you don't have an existing database with Devnet/Mainnet archive data, you can always download it from the Google Cloud bucket. However, we strongly encourage you to perform migration on your own data to preserve the benefits of decentralization. You can use any gsutil-compatible alternative to Google Cloud or a gsutil wrapper program.

(Optional) Google Cloud bucket with Devnet/Mainnet precomputed blocks

Precomputed blocks are the JSON files that a correctly configured node updloads to the Google Cloud bucket. The Devnet/Mainnet to Berkeley archive data migration requires access to precomputed blocks that are uploaded by daemons that are connected to the Devnet or Mainnet networks.

The berkeley-migration app uses the gsutil app to download blocks. If you didn't store precomputed blocks during the first phase of migration, you can use the precomputed blocks provided by Mina Foundation. However, it is strongly recommended that you perform migration on your own data to preserve the benefits of decentralization.

For Devnet blocks:

gsutil cp gs://mina_network_block_data/devnet-*.json .

For Mainnet blocks:

gsutil cp gs://mina_network_block_data/mainnet-*.json .

⚠️ Precomputed blocks for the Mainnet network take ~800 GB of disk space. Plan for adequate time to download these blocks. The Berkeley migration app downloads them incrementally only when needed. You can instead download a 100 GB bundle of only the canonical Mainnet blocks that unpacks into ~220 GB:

gsutil cp gs://mina_network_block_data/mainnet-bundle-2024-03-20.tar.zst . ; tar -xf mainnet-bundle-2024-03-20.tar.zst

⚠️ Precomputed blocks for the Devnet network take several hundred GBs. Plan for adequate time to download these blocks. Instead, you can download a ~50 GB bundle of only the canonical Devnet blocks that unpacks into ~90 GB:

gsutil cp gs://mina_network_block_data/devnet-bundle-3NKRsRWBzmPR8Z8ZmJb4u8FLpnSkjRitUpKZzVkHp11QuwP5i839.tar.gz . ; tar -xf devnet-bundle-3NKRsRWBzmPR8Z8ZmJb4u8FLpnSkjRitUpKZzVkHp11QuwP5i839.tar.gz

These bundles are partial. Updated documentation with the new links and final data will be provided after the Berkeley major upgrade is completed.

The best practice is to collect precomputed blocks by yourself or by other third parties to preserve the benefits of decentralization.