Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save es92/a87298475c6822f103dedfc2b5ba6c91 to your computer and use it in GitHub Desktop.
Save es92/a87298475c6822f103dedfc2b5ba6c91 to your computer and use it in GitHub Desktop.

Quick notes on updates:

  • Peers file is now at wget -O ~/peers.txt https://raw.githubusercontent.com/MinaProtocol/coda-automation/bug-bounty-net/terraform/testnets/testworld/peers.txt
  • New docker image is gcr.io/o1labs-192920/coda-daemon-baked:0.1.1-add-testworld-ledger-bbda99d-testworld-4af8f09
  • New debian is mina-testnet-postake-medium-curves=0.1.1+-add-testworld-ledger-bbda99d
  • The key format has changed since 4.1, old public/private keys are no longer valid (keys for adversarial will be distributed when adversarial is launched)

Running a node with Docker:

  • The easiest solution for connecting to our public qa-net "testworld" is to use the pre-baked docker image which includes the files up to step 10 of the "Running a node in a VPS or Linux Machine" and is not limited to Debian/Ubuntu.
  1. Copy your public/private key files (usually ~/keys/my-wallet and ~/keys/my-wallet.pub) to ~/mina-keys/
  2. cd ~ && chmod 700 ~/mina-keys/my-wallet
  3. Run mkdir ~/.coda-config
  4. Download the latest peers list file to ~/peers.txt wget -O ~/peers.txt https://raw.githubusercontent.com/MinaProtocol/coda-automation/bug-bounty-net/terraform/testnets/testworld/peers.txt
  5. Run the image with your keys, peers.txt, and ~/.coda-config mounted:
docker run --name mina -d \
-p 8301-8305:8301-8305 \
--restart=always \
--mount "type=bind,source=`pwd`/mina-keys,dst=/keys,readonly" \
--mount "type=bind,source=`pwd`/.coda-config,dst=/root/.coda-config" \
--mount type=bind,source="`pwd`/peers.txt,dst=/root/peers.txt",readonly \
-e CODA_PRIVKEY_PASS="YOUR PASSWORD" \
gcr.io/o1labs-192920/coda-daemon-baked:0.1.1-add-testworld-ledger-bbda99d-testworld-4af8f09 daemon \
-peer-list-file /root/peers.txt \
-block-producer-key /keys/my-wallet \
-insecure-rest-server \
-file-log-level Debug \
-log-level Info
  1. Run docker logs -f mina to follow the logs, and if it crashes save the log output to a file with docker logs mina > mina-log.txt and post the output to the #qa-task-force channel or attach the full log to a github issue and link the issue in discord.
  2. Run docker exec -it mina coda client status to monitor connectivity to the network, you should quickly find at least 10 peers and watch the block height / max observed block height climb. If not, post the output of this command on the qa-task-force Discord channel and someone will help diagnose issues.
  3. Send us logs (with docker logs mina > mina-log.txt) shortly after connecting (~1hr) and after the node has been running a while (~24hr) if you can. Send your discord username, coda-log.txt, docker exec -it mina coda client status > status.log, and details on the platform you’re using via email to logs@o1labs.org. If the log file is too big, either compress it before attaching to your email or upload it to Google Drive and share the file with logs@o1labs.org (include your discord name, status.log, and details on the platform you’re using in the Share Message note)
  4. Post any issues to github. Please include your mina-log.txt, status.log,~/.coda-config/coda.log, details on your platfrom, and a printout of coda client status to the issue. If an issue exists already, please add your above information to the issue

Running a node in a VPS or Linux Machine:

  1. Run the following commands on a Debian:stretch or Ubuntu:18.04 image
  2. sudo apt-get update
  3. sudo apt-get install -y apt-transport-https ca-certificates
  4. echo "deb [trusted=yes] http://packages.o1test.net unstable main" | sudo tee /etc/apt/sources.list.d/coda.list
  5. sudo apt-get update
  6. If you have installed the coda daemon before, remove the old coda package so that it does not conflict with the new mina package sudo apt-get remove -y coda-testnet-postake-medium-curves
  7. sudo apt-get install -y curl mina-testnet-postake-medium-curves=0.1.1+-add-testworld-ledger-bbda99d --allow-downgrades
  8. wget -O ~/peers.txt https://raw.githubusercontent.com/MinaProtocol/coda-automation/bug-bounty-net/terraform/testnets/testworld/peers.txt
  9. export KEYPATH=<keypath> where <keypath> is the full path to your private key file. If you submitted a public key to the excel spreadsheet for stake on the new network, then make sure to use the private key file corresponding to that public key.
  10. Use the new mina systemd service to keep the node running more easily.
  • systemctl --user daemon-reload
  • make a file ~/.mina-env containing the following two lines, replacing "your password here" with the password for ~/keys/my-wallet and adding any extra flags for the daemon you may want or need, like -external-ip or snark work flags:
CODA_PRIVKEY_PASS="your password here"
EXTRA_FLAGS=" -file-log-level Debug "
  • systemctl --user start mina
  • systemctl --user status mina to see weather or not the daemon is running successfully, systemctl --user stop mina to stop the daemon, systemctl --user restart mina to restart the daemon, and journalctl --user -u mina -n 1000 -f to see the last 1000 log lines and keep following from there.
  • coda client status and other client commands will work as normal.
  1. After your node is synced to the network, run Coda Client Status and post the output on the qa-task-force Discord channel
  2. Send us logs shortly after connecting (~1hr) and after the node has been running a while (~24hr) if you can. Send your discord username, .coda-config/coda.log, coda client status > status.log, and details on the platform you’re using via email to logs@o1labs.org. If the log file is too big, either tail -n 10000 .coda-config/coda.log to extract the last 10,000 lines or upload the full file to Google Drive and share the file with logs@o1labs.org (include your discord name, coda client status > status.log, and details on the platform you’re using in the Share Message note)
  3. Post any issues to github. Please include your coda.log, details on your platfrom, and a printout of coda client status to the issue. If an issue exists already, please add your above information to the issue

Issue priority labels:

  • Critical: Anything that stops a node from connecting to the network. For example, if a node crashes, is unable to sync, or is unable to connect to peers.
  • High: Anything that doesn’t stop a node from syncing, but causes bad functionality of other features. For example, anything to do with connectivity that doesn’t break connectivity, or some transaction types not working as expected.
  • Medium: Unintended behavior that does not break nodes or features. For example bad logging or error handling.
  • Low: Convenience improvements

Hardware Requirements:

Sending and receiving mina does not require any special hardware, but running a block producer on the Mina network currently requires:

  • at least an 8-core processor
  • at least 12GB of RAM

Note that if you plan on running a snark worker node, you may need more RAM -- 16GB is recommended. GPUs aren't currently required, but may be required for node operators when the protoctol is upgraded.

Network: At least 1 Mbps connection

VM Instances: O(1) Labs has tested running nodes on several cloud providers, and recommends the following instances for basic node operator needs. Keep in mind that custom requirements as well as different cost constraints may require a different instance type.

To learn more about our hardware requirements, visit https://minaprotocol.com/docs/getting-started

Notes:

  • You will notice that your node is stuck at synced at block height 1 until the network produces a new block. This is a known issue and will be addressed in the future releases
  • The log files will contain errors such as "Coda_net2: failed to parse log line from helper stderr " and variants of "Libp2p_helper.Go.addrutil: adding resolved addr:/ip4/0.0.0.0/tcp/8302". These are expected and will be addressed in the future releases
  • You might see the following errors in your log file. These are known errors and can be ignored:
  1. Genesis_ledger_helper can't find keys error messages: These can be ignored unless your build actually crashes immediately afterwards. Why is this happening? We want to see the errors.
  2. All of the libp2p errors: We need to go back and be more careful about hiding some of these messages as they look a lot scarier than they are. But for now, you can ignore them. Note that time locked accounts receive half the coinbase as unlocked accounts. You can learn more about time-locked accounts behere https://github.com/MinaProtocol/mina/blob/develop/rfcs/0025-time-locked-accounts.md and here MinaProtocol/mina#5753
    You can determine the correct balance of a time locked account using this interactive script https://repl.it/@garethtdavies/Mina-Time-Locked-Accounts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment