MinaProtocol / mina

Mina is a cryptocurrency protocol with a constant size blockchain, improving scaling while maintaining decentralization and security.
https://minaprotocol.com
Apache License 2.0
1.99k stars 527 forks source link

No working suggested configuration for dockerized migration #15451

Closed emberian closed 4 months ago

emberian commented 5 months ago
dkijania commented 5 months ago

To add the context to the issue AN operator suffers from issue when invoking archive node migration docker without --workdir parameter like below:

sudo docker run -ti --rm --network archive --entrypoint=mina-berkeley-migration-script \
--volume devnet.json:/genesis_ledgers/devnet.json \
--volume /migration:/migration \
gcr.io/o1labs-192920/mina-archive-migration:3.0.0devnet-tooling-6e92017-bullseye \
initial \
--blocks-batch-size 300 \
--genesis-ledger genesis_ledgers/devnet.json \
--source-db postgres://postgres:pass@postgres:5432/archive_balances_migrated \
--target-db postgres://postgres:pass@postgres:5432/archive_migrated \
--blocks-bucket mina_network_block_data \
--network devnet

as a result all checkpoints and precomputed blocks are stored in / which is problematic as you cannot bind volume to / path. The simplest solution would be to add --workdir:/migrationparameter do docker execution command. However, still migration checkpoints and precomputed blocks will be stored in single location which is not convenient.

In order to fix problem fully we need to :