Skip to content

Latest commit

 

History

History
136 lines (95 loc) · 3.19 KB

README_EN.md

File metadata and controls

136 lines (95 loc) · 3.19 KB

ORE V2 Mining on DEVNET

View in Chinese (中文)

Preparation

  1. Install Debian (optional)

    wsl --install debian
    wsl --setdefault Debian
    wsl
  2. Install Dependencies

    sudo apt install -y curl wget git build-essential software-properties-common
  3. Install Rust

    curl https://sh.rustup.rs -sSf | sh
  4. Install Solana CLI

    sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
  5. Generate Private Key with Vanity Address

    cd ~
    solana-keygen grind --starts-and-ends-with YOUR::1 --ignore-case >> seed.txt
    cp ~/*.json $HOME/.config/solana/id.json
  6. Get DEVNET Gas

    solana config set --url d
    solana airdrop 1
  7. Clone Repositories

    cd ~
    git clone -b hardhat/v2 --single-branch https://github.com/hardhatchad/ore
    git clone -b hardhat/v2 --single-branch https://github.com/hardhatchad/ore-cli
    git clone https://github.com/hardhatchad/drillx
  8. Configure CUDA & NVCC (no needed)

    See CUDA Downloads for your system.

    wget https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb && sudo dpkg -i cuda-keyring_1.1-1_all.deb
    sudo add-apt-repository contrib && sudo apt-get update
    sudo apt-get -y install cuda-toolkit-12-4 nvidia-kernel-open-dkms cuda-drivers
  9. Fix NVCC Issues (no needed)

    See NVCC Installation Issues.

    echo -e "\nexport CUDA_HOME=/usr/local/cuda\nexport LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64\nexport PATH=\$PATH:\$CUDA_HOME/bin" >> ~/.bashrc

Compilation

  1. Compile ore-cli

    cd ~/ore-cli

    For GPU:

    cargo build --release --features="gpu"
    sudo cp ~/ore-cli/target/release/ore /usr/local/bin/ore

    For CPU:

    cargo build --release
    sudo cp ~/ore-cli/target/release/ore /usr/local/bin/ore
  2. Start Mining

    For GPU:

    ore --rpc https://api.devnet.solana.com --keypair ~/.config/solana/id.json mine --buffer-time 2

    For CPU:

    ore --rpc https://api.devnet.solana.com --keypair ~/.config/solana/id.json mine --buffer-time 2 --threads 12

ORE Update

cd ~
rm -rf ~/ore* && rm -rf ~/drillx
git clone -b hardhat/v2 --single-branch https://github.com/hardhatchad/ore
git clone -b hardhat/v2 --single-branch https://github.com/hardhatchad/ore-cli
git clone https://github.com/hardhatchad/drillx
cd ~/ore-cli
cargo build --release
sudo cp ~/ore-cli/target/release/ore /usr/local/bin/ore

ORE Uninstall

sudo rm /usr/local/bin/ore

Windows Screen Off

To turn off the screen in Windows, you can use the following command in PowerShell:

(Add-Type '[DllImport("user32.dll")]public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)