Mina Protocol (MINA) Staking Guide using Cli.

jenni
MINA Protocol India
4 min readMay 7, 2021

--

There are two ways to staking right now.

  1. Web wallet
  2. Command line (cli)

All the new Mina wallets like Clor.io, StakingPower, and Auro are neither yet audited nor open-source. So I won’t recommend them to use, but you can see how to delegate using Clor.io here.

So the safe option to go with delegation using the Command lines within the Mina software and don’t forget to note our public key which you need if you want to delegate your coins under us(StakeWithJenni). B62qns9cPvDwckhJXHpWZZ8b8T8oUgoF4Enpax5zNVBYYMtQwHf4Cmp

Let’s see from beginning how can you use cli to delegate Mina its pretty easy and safe. I have described very little things here because this guide meant for beginners.

Step-1. Getting a cloud server and setting it up for installing Mina software.

We will use Google cloud service to set up our cloud server to install Mina software within it, and you can get a free $300 in Google cloud here. I’m sharing this Google cloud guide in case you need any help.

Now I’m assuming you have a free $300 credit in your gcp(google cloud platform) so let’s set the firewall setup first .we have to allow inward ports 8302 and 22. and outward all ports open. check the video for detail.

Step-2. Now let’s create an instance

here we will select 8 vcpu and 32 gb for the instance . we will use Ubuntu 18.04. Check the video for detail

Step-3. Now let’s log in to our instance and install the software for Mina.

let’s log in in to ‘SSH’ and put these commands one by one as in video.

sudo -i 
echo "deb [trusted=yes] http://packages.o1test.net release main" | sudo tee /etc/apt/sources.list.d/mina.list
sudo apt-get update
sudo apt-get install -y curl unzip mina-mainnet=1.1.5-a42bdee
apt install supervisor

Step-4.Now let’s set up wallet

After putting all commands in to cli as show in video you have to provide password for the wallet and need to copy your public key and wallet file in a safe place. After you backup your wallet now use your public key to send your Mina tokens.

sudo apt-get install mina-generate-keypair=0.2.12-718eba4
mkdir ~/keys
chmod 700 ~/keys
mina-generate-keypair -privkey-path ~/keys/my-wallet

After this you must download the wallet to your local drive and save it before transferring Mina to the wallet. follow this YouTube video to set up Filezilla and download the keys folder.

Step-5. Start the daemon

Now we have set up wallet installed Mina software let’s start the daemon, and here we are using supervisor for starting daemon. We have already installed supervisor now lets config it so enter these commands in your cli and a blank window will appear.

nano /etc/supervisor/conf.d/mina.conf

You have to put these commands in to the window and press ctl + x then y then enter.

[program:mina]command=  mina daemon --peer-list-url https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt --block-producer-key /root/keys/my-wallet --block-producer-password "jenni" --generate-genesis-proof trueautostart=trueautorestart=truestderr_logfile=/var/log/mina.err.logstdout_logfile=/var/log/mina.out.logsupervisorctl update

Please note that i have used password as jenni for the wallet creation .

Now after 10 minutes lets check the daemon status . the status should be synced if not wait a bit .

mina client status 

Step-6.Let’s do the delegation now.

for delegation you have to put these commands in cli

mina accounts import -privkey-path ~/keys/my-wallet
mina accounts unlock -public-key put your public key here

Now the command for delegation

mina client delegate-stake \
-receiver B62qns9cPvDwckhJXHpWZZ8b8T8oUgoF4Enpax5zNVBYYMtQwHf4Cmp \
-sender put your public key \
-fee 0.1

and you write above command line just hit enter but before that make sure you have added Mina to you wallet, and you can check you balance in cli or in Mina explorer by visiting https://minaexplorer.com/wallet/ yourwallet_address

lets see the video .

after delegation wait for 5 minutes then go to https://minaexplorer.com/wallet/your_public_key

if your delegation is successful you will see one transaction like this

Again Don’t forget to back up your wallet and delete the instance we created in gcp other wise you have to pay later on when $300 gets over.

i would like to thank I for business for his inputs and modifications for this guide.

Thanks for reading and please feel free to ask your questions in Mina India Telegram group — https://t.me/Mina_india

--

--