Create KEYs for the mainnet Mina Protocol

AlexOnGoods
3 min readFeb 9, 2021

In the telegram and discord of Mina Protocol , there were many questions about how to generate keys for receiving a grant under the Genesis program.
This article will walk you through this simple process step by step.

For starters links:
Аdding the Mina repo
Installing the generation program.
How To Install an FTP server (vsftpd) on Ubuntu 20.04.
Telegram
Discord
Genesis Block Account Request v.2

1 How to generate keys

We will generate keys without a docker.

After adding the Mina repo you can simply run the following command.

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificatesecho "deb [trusted=yes] http://packages.o1test.net release main" | sudo tee /etc/apt/sources.list.d/mina.listsudo apt-get updatesudo apt-get install -y curl mina-testnet-postake-medium-curves=0.3.0-5493fe3

Check that daemon installed correctly by running:
coda version
The output should read:
Commit [DIRTY]5493fe344b40b6e668315fb8db4aa7eef4f1963f on branch HEAD

After that, install the key generator:

sudo apt-get install mina-generate-keypair=0.2.12-718eba4

Check that keygen tool installed correctly by running:
mina-generate-keypair -version
The output should read:
Commit [DIRTY]718eba4826794f83d51c0d8dcf538e78b0259528 on branch HEAD

Create a folder
mkdir ~/keys
chmod 700 ~/keys

Enter the generation command:

mina-generate-keypair -privkey-path ~/keys/my-walletchmod 600 ~/keys/my-wallet

Check if everything was generated normally?

mina-validate-keypair -privkey-path ~/keys/my-wallet

If the keys are generated correctly, the answer will be:
Verified a transaction using specified keypair

2 How to download a folder with keys on a PC

Text instructions for setting up a server for connecting to it via FTP.
First, let’s update the server packages and install the packages necessary in the future on it:

sudo apt update
sudo apt-get install mc
sudo apt-get install nano

install and enable vsftpd:

sudo apt install vsftpd -y
sudo systemctl start vsftpd

It is better not to add vsftpd to autoload so as not to endanger the server, but there is such a function: sudo systemctl enable vsftpd

Now we enter the firewall permissions required for ftp to work:

sudo ufw allow 20/tcp
sudo ufw allow 21/tcp
sudo ufw status

Before setting up, we will copy the original settings file so that in case of problems, we can return everything as it was:

sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.orig

Now let’s open the settings file:

sudo nano /etc/vsftpd.conf

and uncomment (remove the # sign in front of the line of code, after which it will become active), or if they are not there, write the following lines:

the # before write_enable = YES is to be removed

write_enable=YES
local_enable=YES
dirmessage_enable=YES
xferlog_enable = YES
xferlog_std_format=YES
connect_from_port_20=YES
listen=YES
listen_ipv6=NO
use_localtime=YES
anonymous_enable=NO

Service restart and you can connect:

sudo systemctl restart vsftpd
sudo systemctl status vsftpd

But first, let’s make sure that we have enabled work with a password: insudo nano /etc/ssh/sshd_config there is a line PasswordAuthentication yes .

I used the program Filezilla. Enter the server ip, username, password and port 22 → you can transfer files.

Done. We downloaded the files. It remains to fill out the form to participate in Genesis and save the files and password in safe places.

--

--