- Increased Privacy
- Scalability, and reduced blockchain size
This coin is taking a more community driven decentralized approach compared to Beam. I suggest everyone who wants to mine this coin, reads the article, since it talks about how they are able to accomplish this, as well as how this differs from Monero and ZCash.
Grin is using the Equihash algorithm, is written in Rust and is ASIC resistance, to the point where, just like Monero, they will be hard forking every six months to avoid ASICs.
You might have also heard about Beam, which was the first cryptocurrency to come out with a version of the mimblewimble protocol. Grin is a lot different in architecture of the system, compared to Beam. The main differences from the users perspective is Grin allows for IP, file and address based transactions, while beam uses temporary ID’s that help wallets communicate with each other, and has the ability to create permanent ID’s since regular ID’s change after each connection to a wallet, to increase privacy.
Now that we know the details about Grin, let’s get to mining some GRIN!
General Mining Notes About Grin
- 1 General Mining Notes About Grin
- 2 Some General Mining Tips
- 3 Grin Wallet Setup
- 4 Ubuntu Installation
- 5 Grin Wallet Installation
- 6 Grin Wallet Setup
- 7 Grin Wallet Usage
- 8 Grin Mining Pools
- 9 CPU Mining
- 10 GPU Mining – Nvidia and AMD
- 11 Receive a Mining Pool Payout
- 12 General Troubleshooting
- 13 How much GRIN will I earn per day?
I do want to mention at the top of this tutorial that you will need at least a 5.5GB card to mine grin, and if you want to mine using the ASIC protocol you will need 11GB cards to do this.
Some General Mining Tips
So before we start this tutorial, I have two tips for making the most out of your mining experience. First make sure you have the latest drivers for your GPU’s. Secondly, most mining software will get flagged as a virus from virus scanners. Because of this, if your mining on your normal everyday use or gaming computer that has an antivirus installed, you will want to exclude the mining software from the antivirus. What I like to do, is I make one folder and then put all of my mining software in sub folders. I then exclude the top level folder from the antivirus and that excludes all the mining software.
Grin Wallet Setup
In this tutorial we are also going to show the wallet setup process. The reason were covering a wallet setup in this tutorial is because the mimblewimble protocol coins are designed much differently when compared to the other cryptocurrencies. One of the biggest design differences is there are not suppose to be any addresses in the system, and the wallets communicate (they do not have to be online) with each other to send crypto. Because this is a very different system than everyone in cryptocurrency is used to, Grin does have addresses as well as private keys, but the recommend way (and the way most of the pools are paying out) is not using addresses. In grin one can send an receive using an IP address, passing a file back and forth (email etc) or using a grin box address. We will cover all three methods in this tutorial.
As of right now there seems to only be Linux wallets out for grin, since you need a full node to run, and there are none for windows as of now.
If you do not have a Linux computer, you can use a spare computer, or a virtual machine on windows. I am using VMware player (free). Once you download and install it, you need to download a Linux distribution. I will be using the server edition of Ubuntu 18.04
I use the server edition because it will be quick to download, will use less space, and be more responsive. (Dont worry we will install a GUI) Once you download the ISO file follow these steps to create a virtual machine
Setting up the VM is pretty simple.
On the last picture, choose Customize Hardware… I would change the HD to at least 50GB if you have the space, and change the RAM and CPU usage to 50-75% of your computer. So a computer with 4 cores 8GB I would choose 2 cores and 4GB of ram for the VM.
Once your virtual machine is started, you can really just accept all of the default settings for the Linux setup, and use the whole disk since its inside a VM.
You then need to login, and are presented with the terminal since this is a server install. We now want to install our GUI. I will be using XFCE
sudo apt install -y xfce4 xfce4-goodies
This will use about 650MB. Once it is done, we need to start the GUI using
Note this is the login process the next time we use the VM. You type the username, password and then startx. So our Linux is now installed and booted!
Grin Wallet Installation
First we need to open a terminal
Now we need to install some packages we will need. We need to first get a web browser, so you can load the docs and this tutorial in the webbrowser in the VM, so you can copy and paste. We also need git to pull the source from github.
sudo apt install -y firefox git
Once you have installed Firefox and git, lets create a launcher for it. Just right click on the desktop and select create launcher. Then choose the Create Launcher Firef… and then click create.
Now open firefox, and choose mark as executable so the warning does not show up again.
load the tutorial up in Firefox so you can copy and paste the next steps
These will be required to build the wallet from source and to run the wallet. You can visit the official wallets GitHub for the requirements to see the commands we will perform below. This will install all of the software we need in one command
curl https://sh.rustup.rs -sSf | sh; source $HOME/.cargo/env && sudo apt install -y build-essential cmake libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev pkg-config libssl-dev llvm
Press enter if it ask for installation options. This whole operation will install about 700MB of packages.
For the wallet, were going to use a community built wallet instead of the official wallet. The reason for this is because in my opinion the community wallet is much easier to use, and to send and receive payments from. It more resembles the monero CLI in a way in my opinion so I will be using this wallet in the tutorial. The official wallet requires a lot of changing files which is another reason why were not going to use this. Also the community wallet has a better documentation on how to use the wallet.
Note the wallet now has a built in node, so we do not need a separate node in the new build.
Now its time to build the wallet
cd ~ && mkdir Installed-Programs && cd I* && git clone https://github.com/vault713/wallet713 && cd wallet713 && cargo build --release
Grin Wallet Setup
Now lets run the wallet and get synced up (You can use this command to start the wallet each time or maybe create a launcher like we did for firefox)
Now lets make a new wallet
You will want to right down the grin box address and the private seed words. Now grin does have a address system, you can still use grin without an address, but obviously this makes it a lot more easier. We can then check our balances by typing
To receive any new payments you have received from the last time you loaded the wallet we need to run the listener
The picture above shows the commands and responses from the wallet. The seedwords (private key) of the wallet is in the red box. These are only for you, dont give these out to others, otherwise they can spend your funds. The green payment address (red arrow), is the public key that you should give others so they can pay you. The blue arrow shows the balance of my wallet.
Grin Wallet Usage
There are 3 ways to send and receive payments in Grin
- File based
- Grin box address
Now that the listner is running, the wallet will automatically receive any https or grinbox address payment that is sent to it. For receiving https you would need to forward your ports from behind your router, and the wallet 713 does not support receiving https based payments at this time so we will not cover this.
To send a payment using HTTPS
send amount --to https://IP:13415
To send a payment using the grinbox address we can run
send amount --to grinbox_address_of_recipient
To send a payment using files
send amount --file ~/path/to/transaction.tx
You would then send this file (transaction.tx) to the recipient.
To receive payment through a file (This is how we will receive payments from the mining pool)
receive --file ~/path/to/transaction.tx
This will create a transaction.tx.response file which you need to return to the sender.
The sender will then run
finalize --file ~/path/to/transaction.tx.response
And the payment will be sent through the network
Grin Mining Pools
For this tutorial we will use https://grinmint.com/pages/index.html I have chosen this pool because they will have 0% fees for a short time after launch (Jan 15, 2019)
Now that we have a pool, lets start mining!
We will not be focusing on this, since it is not profitable.
GPU Mining – Nvidia and AMD
Right now there are not many choices for us to use to mine GRIN. The best option at the moment seems to be GrinGoldMiner
This mining software has a 2% dev fee. To use this mining software we need to install .NET 2.2
Choose the “Download .NET Core Runtime” button
Once downloaded and .NET is installed, run the miner, and edit the values to the choices below
Replace “email@example.com” with your email address.
Replace “rig1” with something to identify the mining computer like officecomputer.
Replace “strongpassword” with a password.
Then, open the config.xml file in the same folder and make sure it saved the settings, and detected your GPU’s correctly.
Now just run the miner software and you should see something like this.
I have also logged into the mining pool website. This is where you will request a payout. Since the mimblewimble protocol that Grin is using, has no addresses, you can request a payout to an email address or IP address.
Receive a Mining Pool Payout
First log into your dashboard, put in the password in the textbox and click email payout. You will then receive an email with a file. You will then want to run in the wallet
receive --file ~/path/to/transaction.tx
This will create a transaction.tx.response file which you need to return to the sender. To do this go back to the dashboard and type the password again, and then select finalize transaction. Then select the transaction.tx.response file and upload it. You should then receive a payment, which you can check by typing
In the wallet.
If there are problems with your mining setup, you can try a few things.
You may not have enough virtual memory. You may need 16GB of virtual memory (for Vega GPU’s you need more like 16GB per GPU) to change this go to Control Panel -> System and Security -> System and the click Advanced system settings on the left. From there, click settings under the advanced tab. Next click change, and then on the third screen, uncheck automatically manage, choose custom size, and type in the size (in MB) for both text boxes. Then press the set button, and then the ok button.
One thing to monitor for is stale or rejected shares. If you see a lot of stale shares, you may want to try a server that is closer to you. If you see a lot of rejected shares, try to lower the intensity of the miner if available.
How much GRIN will I earn per day?
To figure this out, you would go to https://www.coincalculators.io/coin.aspx?crypto=grin-mining-calculator and use their calculator. The calculator does provide a rough estimate, so you may get paid a higher or lower amount than what the calculator actually says.
Most of the values are already correctly entered, and you only need to edit a few values.
Hash rate: Enter your total speed (in megahashes per second) for all of your mining computers. This would be the “total speed” value in your mining software. Make sure to add up all of the computers your using for Grin mining.
Power: Enter the total amount of power (in watts) that your mining rig is using. Some mining software will measure this for you. You can also measure total power consumption for your computer using special software, or a kilowatt meter. I prefer using a kilowatt meter, because I find it to be the most accurate. Make sure to add up all of the computers your using for Grinmining.
Electricity Cost: Enter the cost per kilowatt hour that you pay to your electricity company. I was able to find this info in my monthly bill, as well as on their website.
Pool fee: Enter the pool fee + the miner software dev fee. This would be 0 + 2 = 2%
Hardware cost: Enter in the total cost of all of your hardware.
In this image, we can quickly see how many coins and USD value we will make in certain time frames. You want to look at the Profit column, since this is the value after paying for your electricity usage. I usually just focus on the daily payout in USD. By just focusing on this number, you can run the calculator for a few different coins, and quickly see which coin is most profitable for your mining rig setup. Keep in mind you also want to weigh the daily payout with the market cap. A low market cap coin may be really profitable one day, and then could have half the payout tomorrow. For a new coin that has a lot of hype around it too, you also need to weight the hype factor and the inflation factor into your decision as well in terms of mining and selling immediately or mining and holding some.
That’s it. You should now be mining GRIN! Make sure to type in your public key into the mining pool’s dashboard, to keep track of your statistics.