Skip to content

Latest commit

 

History

History
230 lines (159 loc) · 7.14 KB

File metadata and controls

230 lines (159 loc) · 7.14 KB

Introduction

These notes cover mining Tari on the Linux command line. The setup documented here assumes a Linux server running Ubuntu 22.04 with one or more GPUs. For simplicity, we'll be using the console wallet.

We'll also assume that you're only interested in mining on the Tari mainnet.

These notes don't assume that you have a Linux desktop available to you. The command line is all you need.

[ TODO: Please be aware that at present these notes are incomplete but I hope to address more of the topic over time. ]

Criticisms and corrections and ideas

We need them! Send criticisms, notes or ideas to: simon@unisolve.com.au

Step 1 Check your OS

Run this one-line command:

grep -s "^PRETTY_NAME=" /etc/os-release | sed 's/PRETTY_NAME=//;s/"//g' || cat /etc/*release 2>/dev/null | head -n1 || uname -sr

If you're on Ubuntu 22.04 you should see:

Ubuntu 22.04.4 LTS

Otherwise, the one-liner script tries very hard to return a useful value, eg:

Ubuntu 20.04.6 LTS
CentOS Linux 7 (Core)
AlmaLinux 9.4 (Seafoam Ocelot)
Ubuntu 16.04.4 LTS
Raspbian GNU/Linux 10 (buster)
Ubuntu quantal (12.10)

These command line instructions might also help you with other recent Linux OSes, but for now we're concentratng on Ubunu 22.04

Step 2. Download tari-suite

Using your desktop browser, (or a browser in the Linux desktop if you have one), go to this page to see the latest offerings: https://github.com/tari-project/tari/releases

Note that any version with the string "-pre" in it, such as "v2.1.1-pre.0" is destined for a TestNet and therefore is probably not what you're looking for. Similarly, any version containing "-rc", such as "v2.1.0-rc.0" is the release candidate for the future StageNet/MainNet release.

So find the latest release without "-pre" or "-rc", (this is "v2.1.0" in my case). You can tell you're looking at the latest release because of the "Latest" text just to the right of the version number.

Now see the "Assets" section just under "Contributors". Go to the bottom of the Assets section and click on the "Show all nn assets" link if it's there. In my case this link says "Show all 88 assets".

Scroll down until you see the tari_suite-n.n.n zip file. In my case this is:

tari_suite-2.1.0-0df1ede-linux-x86_64.zip

Right click on that URL in the "Assets" section of the releases page to copy the download link.

Now use the "wget" command on your Linux server to download tari_suite to that server using the link you just copied. For me this looks like:

wget https://github.com/tari-project/tari/releases/download/v2.1.0/tari_suite-2.1.0-0df1ede-linux-x86_64.zip

Now we'll get the sha256 check file and run 'shasum -c' on it to confirm that the zip file we've downloaded is the one prepared by the Tari project team.

wget https://github.com/tari-project/tari/releases/download/v2.1.0/tari_suite-2.1.0-0df1ede-linux-x86_64.zip.sha256

shasum -c tari_suite-2.1.0-0df1ede-linux-x86_64.zip.sha256

You should see output like:

tari_suite-2.1.0-0df1ede-linux-x86_64.zip: OK

[ TODO: Is this step adequate? ]

Step 3. Extract files

We'll use "unzip" to extract the release files we want. Be sure to replace the "2.1.0" string with your release number:

unzip tari_suite-2.1.0-0df1ede-linux-x86_64.zip

You should see output like this:

Archive:  tari_suite-2.1.0-0dflede-linux-x86_64.zip
  inflating: libminotari_mining_helper_ffi.so
  inflating: minotari_console_wallet
  inflating: minotari_merge_mining_proxy
  inflating: minotari_miner
  inflating: minotari_node
  inflating: minotari_node-metrics
  inflating: start_tor.sh
  inflating: tari_suite-2.1.0-0dflede-linux-x86_64.sha256

Now we're getting somewhere.

Step 4. Start the console wallet

Create a new Linux window and start the console wallet:

./minotari_console_wallet
Initializing logging according to "/root/.tari/mainnet/config/wallet/log4rs.yml"
Node config does not exist.
Would you like to mine (Y/n)?
NOTE: this will enable additional gRPC methods that could be used to monitor and submit blocks from this node.

If you're asked "Would you like to mine", answer "Y"

Then you'll see:

⠀⠀⠀⠀⠀⣠⣶⣿⣿⣿⣿⣶⣦⣀
⠀⢀⣤⣾⣿⡿⠋⠀⠀⠀⠀⠉⠛⠿⣿⣿⣶⣤⣀⠀⠀⠀⠀⠀⠀⢰⣿⣾⣾⣾⣾⣾⣾⣾⣾⣾⣿⠀⠀⠀⣾⣾⣾⡀⠀⠀⠀⠀⢰⣾⣾⣾⣾⣿⣶⣶⡀⠀⠀⠀⢸⣾⣿⠀
⠀⣿⣿⣿⣿⣿⣶⣶⣤⣄⡀⠀⠀⠀⠀⠀⠉⠛⣿⣿⠀⠀⠀⠀⠀⠈⠉⠉⠉⠉⣿⣿⡏⠉⠉⠉⠉⠀⠀⣰⣿⣿⣿⣿⠀⠀⠀⠀⢸⣿⣿⠉⠉⠉⠛⣿⣿⡆⠀⠀⢸⣿⣿⠀
⠀⣿⣿⠀⠀⠀⠈⠙⣿⡿⠿⣿⣿⣿⣶⣶⣤⣤⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⢠⣿⣿⠃⣿⣿⣷⠀⠀⠀⢸⣿⣿⣀⣀⣀⣴⣿⣿⠃⠀⠀⢸⣿⣿⠀
⠀⣿⣿⣤⠀⠀⠀⢸⣿⡟⠀⠀⠀⠀⠀⠉⣽⣿⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⣿⣿⣿⣤⣬⣿⣿⣆⠀⠀⢸⣿⣿⣿⣿⣿⡿⠟⠉⠀⠀⠀⢸⣿⣿⠀
⠀⠀⠙⣿⣿⣤⠀⢸⣿⡟⠀⠀⠀⣠⣾⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⡇⠀⠀⠀⠀⣾⣿⣿⠿⠿⠿⢿⣿⣿⡀⠀⢸⣿⣿⠙⣿⣿⣿⣄⠀⠀⠀⠀⢸⣿⣿⠀
⠀⠀⠀⠀⠙⣿⣿⣼⣿⡟⣀⣶⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⡇⠀⠀⠀⣰⣿⣿⠃⠀⠀⠀⠀⣿⣿⣿⠀⢸⣿⣿⠀⠀⠙⣿⣿⣷⣄⠀⠀⢸⣿⣿⠀
⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⠛⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠙⠁⠀
Console Wallet

1. Create a new wallet.
2. Recover wallet from seed words or hardware device.
3. Create a read-only wallet using a view key.
>>

Create a new wallet by entering "1". You'll then be asked to enter, and then confirm, your wallet passphrase.

The next question is:

Would you like to use a connected hardware wallet? (Supported types: Ledger) (Y/n)

We're choosing no, so we enter "n" here.

You are then asked to copy your seed words and type the word "confirm" to confirm that, yes, you are never going to be shown these seed words again. Copy those seed words safely!

Step 5. Start the local tari node

Create a new Linux window and start the node:

./minotari_node

If you're asked:

Node identity does not exist.
Would you like to create one (Y/n)?

answer "Y"

Once the node is running, you can enter control-c at any time to call up the command prompt and enter commands. For example:

version

or

list-peers

or

help

Step 6. Start the miner

Create a new Linux window and start the Sha3x miner:

./minotari_miner

You should see:

Initializing logging according to "/root/.tari/mainnet/config/miner/log4rs.yml"
04:21 INFO  Starting Minotari Miner version: 2.1.0-0df1ede27452e090cfa81c28338df390e9a11e6e-release

Please enter 'wallet-payment-address' ('quit' or 'exit' to quit) :

Now click back to your Console Wallet window and locate the address in the console wallet as follows:

  1. Use the left or right arrrow to move to the "Receive" tab
  2. Copy the "Tari Address interactive" address

Enter that address for the miner to use

Step 7. RandomX/Monero Merge Mining ?

TODO