• XENSOLANASOLXEN
  • How to mine SolXEN on Solana Testnet (Step by step guide with screenshots)

  • Edited

solXEN 420 miner v.1.1 Instructions

(thanks XenTzu)

This guide covers the installation of Rust and Solana, wallet creation and funding on the Solana testnet, and running the 420Miner script.

Prerequisites: Get access to a server where you can execute these commands. I am using Ubuntu 22.04 on WSL (Windows Subsystem for Linux) to illustrate the process in this guide.

Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

Install Solana

sh -c "$(curl -sSfL https://release.solana.com/stable/install)"

You may need to Configure Solana CLI (make sure your home directory matches):
export PATH="/home/ubuntu/.local/share/solana/install/active_release/bin:$PATH"

Confirm Solana is installed
solana --version

Create and Configure Wallets

Create a first wallet:

solana-keygen new

Configure Solana Testnet

solana config set --url https://api.testnet.solana.com

Airdrop 1 Sol to your first wallet

solana airdrop 1

Check balance, should be 1 SOL
solana balance

Set up a second wallet

cp /home/ubuntu/.config/solana/id.json /home/ubuntu/.config/solana/id1.json

Create second wallet
solana-keygen new --force

Airdrop 1 Sol to your second wallet:
solana airdrop 1

If it doesn't work and you encounter the following error:

, note that the Solana Testnet faucet limits the rate of SOL based on your computer's wallet and IP address.

Easy fix:

Create a Cargo Project

cargo new my_project

If you get an error, install cargo first:

sudo apt install cargo

Navigate to the new directory:
cd my_project

Once done, edid Cargo.toml file to add solana-client and solana-sdk dependencies:
nano Cargo.toml

To do so, insert these lines into dependencies:

[dependencies]
solana-client = "1.10"
solana-sdk = "1.10"

Set Up & Run SolXEN Miner

Get SolXEN Miner (code) from the following URL:
https://gist.githubusercontent.com/jacklevin74/b3b3709aa3e66eab8f762c0fb4de53ff/raw/51ad482cd8c5a1d6c77457ae2c12378e4333a788/rs

Now, edit the miner script main.rs, remove all content from it and paste the content into it from the URL above:
nano src/main.rs


and

Please note, if your home directory is not /home/ubuntu, amend the script to ensure home directory paths are correct.
Once done, save the file.

Build the project

cargo build

Execute the compiled program (run the miner)
cargo run

Verify transactions on the testnet:

Check the updated SOL balance
solana balance

Check the transaction history and results by entering your wallet's public address on the Solana explorer: https://explorer.solana.com/address/YOUR_WALLET_ADDRESS?cluster=testnet.

Navigate to Transaction History, to see the hashes with '420' string to confirm the successful mining of SolXen:

Enjoy!

Mining the SolXEN on Testnet? Are you kidding?

Will there be an airdrop for finding 420?

I am trying to understand why the actual seed phrase words are shown in this example and instructing us to use them as well. When i went through the "Solana-Keygen New" step, it generated a new seed phrase set of words and again for the 2nd wallet i created. Is it necessary to use the seed phrase words that are in the setup example? Also, I had issues with the path in the example. When I through the setup, it defaulted mine to /root/.config/solana/id.json. Ending up changing my PATH to match the location. Setup the wallets and had them funded with the airdrop, but couldn't get past the cargo build step. Will try again this evening.

    Richland100 The seedphrase used and shown was part of the example that he was demonstrating.
    SEED phrase is ALWAYS private, so ideally he should've masked his so that it doesn't cause confusion. Hope that helps.

      How to export the private key after creating the address. I found that the default public key address after generation cannot be imported to other wallets.

      jedza

      Absolutely made all the difference in the world understanding this. I am barely getting by in the coding world and nothing obvious is obvious to me. Luckily I followed my intuition and ignored those seed phrase words and used my own. But at least now I know that I didn't make a mistake in the setup and now I can focus on the real error i had, surrounding the Cargo build. lol

      jedza

      You're correct, this is Tesnet, so I didn't care, but thanks for pointing it out anyway. I've updated screenshots.

      How to set the eth address

      How to set this eth address

      Mine SolXen on Solana Devnet (python one-liner)

      Code is here: https://github.com/JozefJarosciak/SolXen-python/

      This is a one-liner SolXen Miner for Solana Devnet (only been tested on my Ubuntu machine).
      Feel free to test it on Mac or other platforms and submit the necessary fixes.

      Usage
      Running it is as simple as executing this one-liner on your machine. Just don't forget to add your Ethereum address at the end of the command.

      Note: You'll need to clone this repo and update the 'keypair_path' in solxen.py to reflect your computer's path, and then curl to your address in the command below.

      curl -s https://raw.githubusercontent.com/JozefJarosciak/SolXen-python/master/solxen.py | python3 - <YOUR_ETHEREUM_ADDRESS>

      Video Demo:
      https://www.youtube.com/watch?v=IourGFCEjKU

      I have been executing rust code on the testnet for a long time, and I have also spent a lot of testnet sol tokens. Now that new python code has appeared, you can also put the eth address. Is my previous testnet code executed in vain?

      One is testnet, the other is devnet, which one is it?

      Here is the prompt:
      Invalid checksummed Ethereum address: (My Ethereum address.)
      Traceback (most recent call last):
      File "/root/solxen.py", line 91, in
      setup_solana_client(eth_address, keypair_path)
      File "/root/solxen.py", line 83, in setup_solana_client
      subprocess.run(["./target/debug/solana_rust_client", "--fee", "5000", "--address", eth_address], check=True)
      File "/usr/lib/python3.10/subprocess.py", line 526, in run
      raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['./target/debug/solana_rust_client', '--fee', '5000', '--address', '(My Ethereum address.)']' returned non-zero exit status 1.

      Replacing the address path and rpc path is still an error.

      transaction: RPC response error -32002: Transaction simulation failed: Transaction results in an account (0) with insufficient funds for rent [20 log messages]
      Failed to send

      When the program is running, please tell me how to fix it