└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # Deploy a miner node on Nesa network testnet 2 | > Nesa is an L1 blockchain that allows developers to integrate any AI model to launch their own Dapp or blockchain rollup on its network. 3 | > 4 | > With its white paper, Nesa shows potential as a comprehensive blockchain platform for integrating AI models in the development of rollups and smart contracts. 5 | 6 | ## Hardware Requirement 7 | ![image](https://github.com/user-attachments/assets/fc99390f-66cf-4931-8aca-675597fa0db4) 8 | > GPU is not necessary and you can run your miner CPU-only 9 | 10 | 11 | ## Step 1: Install Dependecies 12 | ### 1. Install dependecies 13 | ```console 14 | sudo apt update && sudo apt upgrade -y 15 | sudo apt install curl iptables build-essential git wget lz4 jq make gcc nano automake autoconf tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev -y 16 | ``` 17 | ### 2. Install Docker 18 | ```console 19 | sudo apt-get update && sudo apt-get upgrade -y 20 | sudo apt-get install ca-certificates curl 21 | sudo install -m 0755 -d /etc/apt/keyrings 22 | sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc 23 | sudo chmod a+r /etc/apt/keyrings/docker.asc 24 | 25 | echo \ 26 | "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ 27 | $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ 28 | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null 29 | sudo apt-get update 30 | 31 | sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin 32 | 33 | # Check version 34 | docker --version 35 | 36 | # Give permissions to docker 37 | sudo groupadd docker 38 | sudo usermod -aG docker $USER 39 | ``` 40 | 41 | ## Step 2: Obtain a Hugging Face API key 42 | 1. Visit the [Hugging Face website](https://huggingface.co/). 43 | 44 | 2. Sign up or log in to your account. 45 | 46 | 3. Navigate to your [API access tokens page](https://huggingface.co/settings/tokens) under your account settings. 47 | 48 | 4. Click **“Create new token”**, head to **“Write”** tab, and generate an API key by clicking on **“Create token”** . 49 | 50 | 5. Copy the generated key to use it in your miner installation. 51 | 52 | ## Step 3: Obtain LeapWallet privatekey 53 | Create a cosmos wallet in Leap Wallet and export your wallet private key 54 | 55 | ![Screenshot_1](https://github.com/user-attachments/assets/876ae952-fb94-4f89-800d-6ca25631ca44) 56 | 57 | ## Step 4: Open Ports 58 | ```console 59 | sudo ufw allow ssh 60 | sudo ufw allow 22 61 | sudo ufw allow 31333 62 | sudo ufw enable 63 | ``` 64 | 65 | ## Step 5: Install and run Nesa Miner 66 | ``` 67 | bash <(curl -s https://raw.githubusercontent.com/nesaorg/bootstrap/master/bootstrap.sh) 68 | ``` 69 | * **Select a mode**: Choose **Wizardy**. 70 | * **Choose a Moniker**: Provide a unique name for your node. 71 | * **Node hostname**: skip & press `Enter`. 72 | * **Node email**: skip & press `Enter`. 73 | * **Enter Referral Code: to get bonus points**: `nesa1w8gv09dqv2fss8h7s92ye7e8afts608d9pyw65` 74 | * **Wallet Private Key**: Enter your wallet private key for miner registration and to receive rewards. 75 | * Finalize Configuration: Review and confirm the configuration before starting your node. The bootstrap script will provide a summary of your configuration and allow you to make changes before starting the miner. 76 | 77 | ![image](https://github.com/user-attachments/assets/69540b5a-1461-41a4-8a20-6efe4d5686f7) 78 | 79 | ## Step 6: Useful commands 80 | 81 | ### Check container logs 82 | ``` 83 | docker logs -fn 100 orchestrator 84 | ``` 85 | ``` 86 | docker logs -fn 100 mongodb 87 | ``` 88 | 89 | Check Containers: You must have 4 new containers now 90 | ``` 91 | docker ps 92 | ``` 93 | 94 | ### Get node peer-id (wallet public key) 95 | ```console 96 | cat $HOME/.nesa/identity/node_id.id 97 | ``` 98 | 99 | ### Get node status url 100 | ``` 101 | PUB_KEY=$(cat $HOME/.nesa/identity/node_id.id) 102 | echo https://node.nesa.ai/nodes/$PUB_KEY 103 | ``` 104 | ![image](https://github.com/user-attachments/assets/1c33ea05-6d59-4c7e-a061-76324b2e0134) 105 | 106 | ## OptionaL: Update or Restart node 107 | * For existing nodes that just need to update their configuration or restart their node 108 | 109 | ``` 110 | bash <(curl -s https://raw.githubusercontent.com/nesaorg/bootstrap/master/bootstrap.sh) 111 | ``` 112 | 113 | **1. select "Advanced Wizardry"** 114 | 115 | **2. Select Yes to bootstrap it, even if it is currently running.** 116 | 117 | * This will update your config and reboot the containers if they are running or start them if they are not. 118 | 119 | * After this, use `cat ~/.nesa/identity/node_id.id` to check your **node_id** and make sure it is as you think it is. Check the stats at https://node.nesa.ai/ 120 | 121 | ## Tokenomic: 122 | The $NES token will be launched on the mainnet network, and 8.8% of it will be airdropped to the incentivized testnet participants. 123 | 124 | ![GMpSQF5XAAABwMI](https://github.com/user-attachments/assets/a3bb334d-a55a-41f8-9a04-a333444e04fe) 125 | --------------------------------------------------------------------------------