4: Build the miner node
Building the miner node
In this step we will build the miner (node). Once the node is running, you will see a log entry displaying your Public Key (Wallet) address. You will need this address to stake in the next step.
Prerequisites to build the miner (node)
Please ensure you have Go version 1.22 installed, as it is the only supported version for building the node.
Installing Go 1.22
Installing Go 1.22
To install Go version 1.22 using Homebrew, follow these steps:
- Open your terminal.
- Run the following command to install Go 1.22:
- After the installation is complete, you need to add Go 1.22 to your PATH. Add the following line to your shell profile (e.g.,
.bash_profile
,.zshrc
):
- Reload your shell profile by running:
or
- Verify the installation by checking the Go version:
You should see go version go1.22
in the output.
To install Go version 1.22 using Homebrew, follow these steps:
- Open your terminal.
- Run the following command to install Go 1.22:
- After the installation is complete, you need to add Go 1.22 to your PATH. Add the following line to your shell profile (e.g.,
.bash_profile
,.zshrc
):
- Reload your shell profile by running:
or
- Verify the installation by checking the Go version:
You should see go version go1.22
in the output.
To install Go version 1.22 on Ubuntu, follow these steps:
- Open your terminal.
- Update your package list and install the necessary dependencies:
- Download the Go 1.22 tarball:
- Extract the tarball to
/usr/local
:
- Add Go 1.22 to your PATH by adding the following line to your shell profile (e.g.,
.bashrc
,.profile
):
- Reload your shell profile by running:
or
- Verify the installation by checking the Go version:
You should see go version go1.22
in the output.
Step 1
Building and starting the miner (Node)
Begin by constructing the miner (node) to get it up and running.
Step 2
Start the miner (node)
Start the miner (node) and and look for the log entry displaying your Public Key (Wallet) address.
Example log output
After starting the node, look for logs similar to the following:
Finding Your Public Key and Peer ID
Finding Your Public Key and Peer ID
Peer ID:
The Peer ID is a unique identifier for your miner (node) in the network. You can find it in the Multiaddress
log entry.
For example, in the log entry:
The Peer ID is the tail end of the string after /p2p/
, which in this case is:
Public Key (Wallet) address:
The Public Key (Wallet) address is a unique identifier for your wallet in the network. You can find it in the Public Key
log entry.
For example, in the log entry:
The Public Key (Wallet) address is:
.env
configuration.