A guide to mining ORE on Solana
How to use a virtual server to mine the Bitcoin like asset on the Solana blockchain
There is a new interesting Coin on Solana, something truly unique in the sea of constant meme coins. A Coin you have to work for. A Proof of Work coin like Bitcoin, on Solana.
Created by an anon dev by the name of Hardhat Chad.
It is an early experiment, born out of a hacker house and just launched in April 2024.
And this is a guide for mining enthusiasts or those who would like to experience what it was like in the early days of Bitcoin mining. And it’s designed in a way so that anyone can mine it.
The Ore Mining Guide
Step 1: Get a virtual server
I recommend Vultr, you can get a server for $7 / month
Step 2: Setup your server
Once you are logged into Vultr click on the top right Deploy button
Select Cloud Compute - Shared CPU
Select the location closest to you
Select the Ubuntu image, version 22
Select a price plan, I choose the cheapest, may upgrade later if needed
Finally click the Deploy Now button at the very bottom
To get the details of your server, click on Dashboard or Products then select your server, you will see details like IP address, username and password
Step 3: Remote into your server
Since I use a Mac, this will be a guide with Mac commands
You can use the Terminal app, I prefer iTerm2
Copy your server IP address then in the terminal run the following command:
ssh root@your_ip_address_here
Next copy your password, paste it in and hit enter, you should see something like this:
Last login: Sat Jul 27 17:00:44 2024 from 45.18.123.75 root@Gaban-Ventures-ORE-miner1:~#
Step 4: Install Rust
curl https://sh.rustup.rs -sSf | sh
Step: 5: Install the Solana CLI
sh -c "$(curl -sSfL https://release.solana.com/v1.18.4/install)"
Step: 6: Re-login
After installing Rust & Solana you need to log out and refresh your session, you can do this by just running exit
exit
After exiting you can login back in to continue the setup
Step 7: Create a new Solana wallet
Run the following command to start the wallet creation process
solana-keygen new
If will ask you to provide a unique string, you can type anything, just be sure to type it in correctly twice
To save your private key (if you want to import it into a Phantom, Backpack or MagicEden wallet) enter this command
cd ~/.config/solana
Then type ls to display the contents of that directory / folder
ls
You should see the following, id.json contains your private key
id.json install
Open id.json in vim (Vim is a terminal based editor) type the following
vim id.json
Now you should see something like this
[69,420,125,134,150, ...
In order to extract the private key from this you need to run some Python code, first copy that entire array
Step 8: Accessing your Private Key
2 ways, to do this, you can just use a code Editor like VS code to write the logic or VIM
VIM Way
vim decode_sol_key.py
This will create that file an automatically open up that file in vim
Next to edit / type in VIM, you need to hit the I key, use the arrow keys to move around, write the following code
import json
# Load the JSON content from the file
with open('/root/.config/solana/id.json', 'r') as f:
key_data = json.load(f)
# Convert the byte array into a readable hexadecimal format
private_key = ''.join(format(byte, '02x') for byte in key_data)
print(f'Private Key: {private_key}')
Next you need to save an exit vim, to do so:
Press Esc to exit insert mode.
Type :wq and press Enter to save and quit vim
VSCode Way
Just create the file decode_sol_key.py on your desktop
Add the code above into the file and save it, but change the path to the file like so
import json # Load the JSON content from the file with open('id.json', 'r') as f: key_data = json.load(f) # Convert the byte array into a readable hexadecimal format private_key = ''.join(format(byte, '02x') for byte in key_data) print(f'Private Key: {private_key}')
Save the array you copied from id.json into an id.json file on your desktop
Use your terminal to navigate to your Desktop and run this command
python3 decode_sol_key.py
Now you will see your private key and you can copy, save it and import into another wallet
Step 9: Fund your Wallet
When you first created your wallet, it will have given you the public key
Send SOL to that wallet, a small amount for a few transactions should be enough
Step 10: Install the ORE CLI
Now install ORE
cargo install ore-cli
Step 11: Install Node
You need to install PM2 next, but your server may not have Node, or you may have an older version of Node like I did, version 12, but you can skip this next part.
I prefer using a more modern version of Node so here are the steps:
Remove the current version of Node.js and npm:
apt remove nodejs npm
Setup a NodeSource repository with version 20
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
Install node
apt-get install nodejs -y
Note you may run into errors with conflicting packages, just ChatGPT the fix for your specific server, I had to remove the following packages from my server
apt-get remove --purge nodejs libnode72 libnode-dev
Verify your installation of Node with the following commands
node -v npm -v
Next update npm (if necessary)
npm install -g npm
Step 12: Install PM2 to ensure your miner restarts if it crashes
PM2 is needed to restart your server if it runs into any problems
npm install pm2 -g
Step 13: Configure your miner
Next we setup the config file for your miner
First ensure you are in the root, run the following command
cd ~
You should see just a snap folder
Use vim again to create your mine.json file
vim mine.json
Next enter this into that file
{ "name": "ore_miner", "script": "ore", "args": ["mine", "--rpc", "https://api.mainnet-beta.solana.com", "--keypair", "PATH_TO_YOUR_KEYPAIR", "--other", "args"] }
“PATH_TO_YOUR_KEYPAIR” should be
/root/.config/solana/id.json
Step 14: Start your miner
pm2 start mine.json
To view the miner working, you can run the log command
pm2 logs ore_miner
You can now exit your server as pm2 will keep running in the background.
Step 15: Manage your mining rewards
To view your rewards
ore --keypair /root/.config/solana/id.json rewards
To claim rewards to your wallet, run this command
ore --keypair /root/.config/solana/id.json claim <amount>
To transfer Solana from your wallet use the following
solana transfer ADDRESS_TO_RECIEVE 0.01 --from sender-keypair.json
To transfer ORE you need to type the following commands with the ORE token address
spl-token create-account oreoN2tQbHXVaZsr3pf66A48miqcBXCDJozganhEJgz
To transfer ORE tokens
spl-token transfer ORE_MINT_ADDRESS 10 RECIPIENT_TOKEN_ACCOUNT --from SENDER_TOKEN_ACCOUNT
Hope this guide is helpful, ping me on Twitter for help.
Engage with the $ORE mining community on platforms like Telegram and Discord for support, tips, and discussions. These communities are invaluable resources for both beginners and experienced miners.
do you have a updated tutorial for oreV2 sir?