Grin Mainnet Node/Wallet setup

Today marks the mainnet launch of Grin. I have put together a guide for launch. It is VERY rough and there will definitely be a few edits along the way.

I have gathered resources from the respected github repo’s and included the sources as you should be doing your own verification. I would like to thank the Grin community as they have tirelessly been getting ready launch day. Once again, this is a guide to help point you in the right direction and things might break along the way as everything is still very new.

Install required Software and Packages

Source

1. Open a terminal session

Install the newest RUST v1.31.1

curl https://sh.rustup.rs -sSf | sh; source $HOME/.cargo/env

2. Confirm version of RUST

rustc —version

(If you already had old version RUST installed, issue “rustup update” for upgrade)

3. Install git

sudo apt update

sudo apt install git

Prepare Grin Node

1. Install required packages for Grin Node

sudo apt install build-essential cmake git libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev pkg-config libssl-dev llvm

2. Install Grin node.

cd

git clone https://github.com/mimblewimble/grin.git

cd grin

cargo build --release

(If you failed to build command for ‘croaring-sys …’, issue “sudo apt-get purge --auto-remove clang” then re-try)

Start the node:

cd /grin/target/release /

./grin



Let the node sync In the same directory: /grin/target/release/

Then enter these commands



[One time only]Initial a grin wallet and record the recovery phrase and password on paper.

./grin wallet init

Use a password for the wallet and write this phrase down using a pen and paper and keep it somewhere safe, since anyone who has this phrase can control all of your funds

Have the wallet listen to the network and keep it live if you plan on sending/receiving grin through this way

./grin wallet listen

You must keep the node running to have your transactions get published to the network





If you would like to receive/send grin from a text file you can use these commands for the Grin wallet:

Source

Sending Grin

There are a number of different ways to send grins to another wallet:

Sending via File

Sending Grins via file is currently recommended for beginners. The process is as follows:

Create a transaction file:

grin wallet send -m file -d my_grin_transaction.tx 10.25

This will create a transaction file called my_grin_transaction.tx in the current directory.

Send the transaction file to the recipient

Send this file though whatever means you like (email, ftp) to the intended recipient. The recipient will have to perform their part of the transaction in their wallet, and send the file back to you. See Receiving Grins below.

Receiving Grin Via File

The sender will send you a transaction file (as outlined in Create a transaction file), which you must import into your wallet via the receive command:

grin wallet receive -i my_grin_transaction.tx

This will create a response file called my_grin_transaction.tx.response which you must then send back to the sender to complete and post to the chain.

Finalize the Grin transaction

The recipient will send a transaction response file back to you. After confirming with the recipient that they processed your send file, you can then finalize and post the transaction to the chain:

grin wallet finalize -i my_grin_transaction.tx.response

This will post the transaction to the listening grin node, and the balances should confirm in both your wallet and the recipient's wallet after a few blocks have been found.



The sender and the receiver must complete a total of 3 actions between them. The sender creates a transaction file, and sends the file to the receiver via any method they choose. Once the receiver gets the .tx file, they must use the receive command and after a .tx.response file has been created, they can then send this via the same method they used before(email, ftp). The original sender must then finalize the transaction.

Example transaction using the Grin wallet:





./grin wallet send -m file -d grin_transaction.tx 10.25

10.25 is the amount of grin I chose to send

Then Sender(A) sends the grin_transaction.tx file via email to Receiver(B)



Receiver then completes this step



./grin wallet receive -i grin_transaction.tx



a grin_transaction.tx.response is generated in the same directory that should then be returned to the Sender(A) wallet via the medium you chose to use(email,ftp).



Sender(A) then finalizes the transaction by publishing it to the network.



./grin wallet finalize -i grin_transaction.tx.response

If you choose to use Wallet713

Source

Wallet 713 is a wallet that has a few different variations. There is an "address" in Wallet 713 that is specific to the grinbox implementation.



wallet713 has the same requirements as Grin and also requires a fully synced Grin node to be running in order to be operational.



Installing Wallet 713

git clone https://github.com/vault713/wallet713

cd wallet713

cargo build --release

Run Wallet 713

cd target/release/

./wallet713

>listen

These commands will help you use Wallet 713

outputs

txs

info

send 12.1 --to xxxxxxxxxxxxxxxxxxgrin_addressxxxxxxxxxxxx

If you would like to transact using files on wallet 713

Source

Transacting using files

Creating a file-based transaction

wallet713> $ send 10 --file ~/path/to/transaction.tx

Generates the file transaction.tx in the designated path that sends 10 grins to a recipient.

Receiving a file-based transaction

Once transaction.tx is received from a sender, the command:

wallet713> $ receive --file ~/path/to/transaction.tx

...will process the received transaction.tx and generate transaction.tx.response in the same directory that should then be returned to the sender wallet.

Finalizing a file-based transaction

Having received back transaction.tx.response, the sender can then issue:

wallet713> $ finalize --file ~/path/to/transaction.tx.response

...which will finalize the transaction and broadcast it.

Example transaction using wallet713

Send 2 --file grintransaction.tx

2 is the amount of grin I chose to send

Then Sender(A) sends the grintransaction.tx file via email or whatever they choose to Receiver(B)



Receiver then completes this command



receive --file grintransaction.tx



a grintransaction.tx.response is generated in the same directory that should then be returned to the Sender(A) wallet via the medium you chose to use(email,ftp).



Sender(A) then finalizes the transaction by publishing it to the network.



Finalize --file grintransaction.tx.response

Bisq

If you are looking to obtain any Grin off the market, bisq, a P2P decentralized exchange is offering BTC/Grin pairs. Bisq offers a few different BTC pairs. A buyer/seller is also able to use fiat through a variation of gateways(Zelle is one example) that also requires no registration for the site which goes in the spirit of Grin and privacy.

Bisq in itself is an extremely exciting technology and this tiny blurb does not come close to doing justice to what Bisq offers. I would suggest you take some seperate time to dive deeper on what Bisq offers.