Testnet setup guide for running a DMD Diamond v4 Blockchain Node.
This guide is designed for Ubuntu 18.04 and Ubuntu 20.04 systems.
We recommend using Ubuntu 20.04 LTS or Ubuntu 22.04 LTS.
Validator Node Spec recommendation: 4 core 8 gb ram 200gb ssd (growing with blockchain size) for normal full node non validator operation far lower requirement cpu/ram wise possible but to compile the node still need like 4gb ram and ssd space requirements are the same
Download the necessary files from this repository onto your node server.
We recommend using git
for easy downloads and updates.
# Install git
apt install git -y
# Clone the repository for the DMDv4 testnet
git clone https://github.com/DMDcoin/dmdv4-testnet.git
# Switch into the new directory
cd dmdv4-testnet
Building the Diamond Node involves two steps:
- Preparing your machine to build the software.
- Running the build process.
This setup is required only once:
./setup-build-from-source.sh
This script fetches the latest source version and builds the binaries.
Note: The process may take up to an hour depending on your machine's performance.
./build-from-source.sh
To run a validator node without participating as a validator:
# Start the Diamond Node using the full node configuration
./diamond-node -c=fullnode.toml
Note: Validator node setup is currently for invited closed alpha users only.
Validator nodes require a dedicated unlocked account for the hbbft engine to sign block contributions.
Run the following command to create a mining key:
./dmd create_miner
This creates two files for your mining key:
./data/keys/DPoSChain/dmd_miner_key.json
(keystore format)./data/network/key
(private key format)
-
Copy the template configuration file:
cp template-validator.toml validator_node.toml
-
Edit the configuration file:
nano validator_node.toml
-
Replace both instances of
put your address here
with the address generated by thedmd create_miner
command. -
Start the Validator Node:
./start.sh
Check the logs to confirm that your node is syncing with the blockchain.
The following log output indicates successful synchronization:
INFO import Imported #1040 0xabfe…f189 (0 txs, 0.00 Mgas, 29 ms, 0.56 KiB)
For the latest block information, visit the block explorer.
Use a wallet like MetaMask or the Brave Browser to connect to the DMD Diamond v4 Network.
- Network Name: DMDv4 Beta1
- RPC URL: https://beta-rpc.bit.diamonds
- Chain ID: 27272
- Symbol: tDMD
- Block Explorer URL: https://beta-explorer.bit.diamonds
To use your own RPC endpoint, start your node with:
./diamond-node -c=rpcnode.toml
Replace the RPC URL with your server's IP address.
To stake on your node:
- Ensure your node is running.
- Have atleast 10,000 tDMD (testnet DMD) available.
Your public key can be found in the following locations:
./public_key.txt
- In the node startup log (under "Public node URL").
Visit the Diamond-UI and enter your public key.
Follow the instructions to set up a pool with a staking amount between 10,000 and 50,000 tDMD.
For more details: Diamond-UI Guide
If u own DMD Diamond v3 coins at snapshot u can claim them following the guide here https://beta-claiming.bit.diamonds/ a tiny amount of DMD for enabling to interact with claiming can be requested here temporary http://62.171.133.46:8080 later https://beta-faucet.bit.diamonds/
Using tmux
-
Install
tmux
if it is not already installed:sudo apt install tmux -y
-
Start a new
tmux
session:tmux new -s diamond-node
-
Start the node in the session:
./start.sh
-
Detach from the session (leave it running):
Ctrl+b, d
-
To reattach to the session:
tmux attach -t diamond-node
Using screen
-
Install
screen
if it is not already installed:sudo apt install screen -y
-
Start a new
screen
session:screen -S diamond-node
-
Run the node:
./start.sh
-
Detach from the session:
Ctrl+a, d
-
To reattach to the session:
screen -r diamond-node
Using pm2
-
Install
pm2
(for debian):apt update && apt install sudo curl && curl -sL https://raw.githubusercontent.com/Unitech/pm2/master/packager/setup.deb.sh | sudo -E bash -
-
Start the node with
pm2
:pm2 start "./start.sh" --name diamond-node
-
View logs:
pm2 logs diamond-node
-
Restart the node:
pm2 restart diamond-node
-
Stop the node:
pm2 stop diamond-node
-
List all running pm2 services:
pm2 ls
-
Save the
pm2
configuration to start automatically on reboot:pm2 save pm2 startup
Important: Then copy/paste the displayed command onto the terminal details here.