Closed dannywillems closed 2 months ago
Do not use this for a production environment as it leaks credentials!
How to run a node on berkeley from source:
git clone git@github.com:MinaProtocol/mina/ mina-berkeley
cd mina-berkeley
git checkout 2.0.0rampup2
git submodule init
git submodule update --recursive
opam switch create ./ 4.14.0
eval $(opam env)
opam switch import opam.export -y
./scripts/pin-external-packages.sh
DUNE_PROFILE=devnet make build
DUNE_PROFILE=devnet make libp2p_helper
mkdir berkeley-keypairs
wget https://storage.googleapis.com/seed-lists/berkeley_seeds.txt
DUNE_PROFILE=devnet dune exec ./src/app/cli/src/mina.exe -- \
libp2p generate-keypair \
-privkey-path berkeley-keypairs/key1 # no password for testing
chmod 0600 berkeley-keypairs/key1
chmod 0700 berkeley-keypairs
MINA_LIBP2P_HELPER_PATH=$PWD/src/app/libp2p_helper/result/bin/libp2p_helper \
DUNE_PROFILE=devnet \
MINA_LIBP2P_PASS= \
dune exec ./src/app/cli/src/mina.exe -- daemon \
--libp2p-keypair berkeley-keypairs/key1 \
--peer-list-url https://storage.googleapis.com/seed-lists/berkeley_seeds.txt \
--config-file genesis_ledgers/berkeley.json \
--external-ip $(curl ifconfig.me)
To generate a keypair (password = test):
MINA_LIBP2P_HELPER_PATH=$PWD/src/app/libp2p_helper/result/bin/libp2p_helper \
DUNE_PROFILE=devnet \
MINA_LIBP2P_PASS= \
dune exec ./src/app/cli/src/mina.exe -- accounts create
To request tokens: https://berkeley.minaexplorer.com/faucet
To run a snark worker, supposing the account public key created previously is B62qmHP8LMb5vGdPLjxckkrhCKVkqaGVnCy7zH4TgxyuN3bWYQv6KSc
MINA_LIBP2P_HELPER_PATH=$PWD/src/app/libp2p_helper/result/bin/libp2p_helper \
DUNE_PROFILE=devnet \
MINA_LIBP2P_PASS= \
dune exec ./src/app/cli/src/mina.exe -- daemon \
--libp2p-keypair berkeley-keypairs/key1 \
--peer-list-url https://storage.googleapis.com/seed-lists/berkeley_seeds.txt \
--config-file genesis_ledgers/berkeley.json \
--external-ip $(curl ifconfig.me) \
--run-snark-worker B62qmHP8LMb5vGdPLjxckkrhCKVkqaGVnCy7zH4TgxyuN3bWYQv6KSc \
--snark-worker-fee 0.1
For the archive node:
sudo -u postgres psql
CREATE ROLE mina WITH LOGIN ENCRYPTED PASSWORD 'hellomina42';
CREATE DATABASE mina_archive_berkeley;
GRANT ALL PRIVILEGES ON DATABASE mina_archive_berkeley TO mina;
To create the schema:
# password will be asked, password is hellomina42
psql -U mina -d mina_archive_berkeley -h 127.0.0.1 -W -f ./src/app/archive/create_schema.sql
To run the archiver:
DUNE_PROFILE=devnet dune exec ./src/app/archive/archive.exe -- run \
--config-file genesis_ledgers/berkeley.json \
--postgres-uri "postgres://mina:hellomina42@127.0.0.1:5432/mina_archive_berkeley" \
--server-port 3086
To add more nodes types to your list: you might also want to try running Snark Coordinator
and maybe Seed
node type.
After this task, the assignee should be able to:
It should be from source and not using docker images to understand correctly the workflow and the parameters.
Including in the task is documenting how to achieve the goals and list the different commands the assignee used.