Welcome to this comprehensive tutorial on how to mine TUNA, the native token of Fortuna. This is the special coin on the Cardano blockchain, developed by the @aiken_eng team, creators of the Smart contract language Aiken language.
What makes Fortuna special is a proof-of-work smart contract that draws its roots directly from Bitcoin's proof-of-work algorithm. so you need to work get some TUNA. this tutorial focuses on the simplest method to spine up the Fortuna miner.
What You'll Need
- Git set up on your computer
- An account on Demeter
- Ogmios instance up and running on Demeter
- Kupo instance also active on Demeter
- Deno runtime environment installed
- Of course, the Fortuna miner code
Step-by-Step Instructions
Step 1: Setup Git
-
Windows: Git can be installed using the official installer available on the Git website.
-
macOS: Git might come pre-installed, but if not, it can be installed using Homebrew or the official installer.
-
Linux: Git can be installed using the package manager specific to the distribution. For example, for Ubuntu you can use
apt
and for CentOS, you can useyum
.-
Ubuntu:
sudo apt update sudo apt install git
-
CentOS:
sudo yum update sudo yum install git
-
Step 2: Install Deno
-
Windows, macOS, Linux: Deno can be installed by following the official installation guide.
-
Shell (macOS and Linux):
curl -fsSL https://deno.land/x/install/install.sh | sh
-
PowerShell (Windows):
iwr https://deno.land/x/install/install.ps1 -useb | iex
-
Add Deno to your shell profile (bash or zsh):
echo 'export DENO_INSTALL="/home/$USER/.deno"' >> ~/.bashrc echo 'export PATH="$DENO_INSTALL/bin:$PATH"' >> ~/.bashrc source ~/.bashrc
-
Step 3: Clone the Miner Repository
First, let's clone the Fortuna miner code from GitHub.
git clone https://github.com/aiken-lang/fortuna
Step 2: Set Up Ogmios and Kupo Instances on Demeter
-
Sign Up on Demeter: Navigate to Demeter and sign up for an account.
-
Create a New Project: Once signed in, create your new project.
-
Open Your Project: Go to your projects list and open the project you just created.
-
Browse Extensions: Click on 'Browse Extensions'.
-
Select Ogmios: Choose the
Ogmios
extension. -
Instance Options: You can either connect to a shared instance or create your own.
-
Instance Connection: After connecting the instance, click the arrow to expand its details.
-
Enable External Access: Scroll down to "Access from external dApps" and toggle on "Expose Http Port".
-
Copy Public DNS: Note down the Public DNS link.
-
Navigate to Miner Code Folder: Return to the folder where you cloned the miner code on your local machine (step 3).
-
Rename
.env.example
: Change the file name to.env
. -
Update
.env
File: Open.env
and replaceOGMIOS_URL=""
with the Public DNS link you copied. Save the file. -
Repeat for Kupo: Go back to step 4 and this time select
Kupo
. Follow the same steps to get the Public DNS link for Kupo and update the.env
file accordingly.
Step 3: Start Mining TUNA
With the Ogmios and Kupo URLs set in your .env
file, you're all set to start mining. Run the following commands inside the miner folder:
-
Initialize Wallet: This command will create a Cardano wallet and save the seed phrase in a
seed.txt
file in the root folder.deno task cli init
-
Get Miner Address: To find out your miner address, run:
deno task cli address
-
Begin Mining: Send some ADA to your miner address and then initiate the mining process.
deno task cli mine
Congratulations! If you've followed all the steps correctly, your miner should now be operational.
Common Issues
- Kupo may not be 100% synced.
- Incorrect Kupo or Ogmios URLs.
Alternative Methods for Minting TUNA For those looking to optimize their mining performance, there are more advanced alternatives available:
You can modify the miner code to use Blockfrost instead of Ogmios. Running your own local instances of Ogmios and Kupo can give you an edge over other miners. Happy mining!