Skip to content

DMDcoin/dmdv4-testnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DMDv4 Testnet

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


Step 1: Copy Required Files to Your Node Server

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

Step 2: Build the Diamond Node

Building the Diamond Node involves two steps:

  1. Preparing your machine to build the software.
  2. Running the build process.

Prepare the Build Environment

This setup is required only once:

./setup-build-from-source.sh

Build the Node

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

Quick Guide: Running a Full Node

To run a validator node without participating as a validator:

# Start the Diamond Node using the full node configuration
./diamond-node -c=fullnode.toml

Quick Guide: Running a Validator Node

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.

Generate a Mining Key

Run the following command to create a mining key:

./dmd create_miner

This creates two files for your mining key:

  1. ./data/keys/DPoSChain/dmd_miner_key.json (keystore format)
  2. ./data/network/key (private key format)

Configure the Validator Node

  1. Copy the template configuration file:

    cp template-validator.toml validator_node.toml
    
  2. Edit the configuration file:

    nano validator_node.toml
    
  3. Replace both instances of put your address here with the address generated by the dmd create_miner command.

  4. Start the Validator Node:

    ./start.sh
    

Verify Node Synchronization

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.


Adding the Network to a Web3 Wallet

Use a wallet like MetaMask or the Brave Browser to connect to the DMD Diamond v4 Network.

Network Configuration:

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.


Staking on Your Node

To stake on your node:

  1. Ensure your node is running.
  2. Have atleast 10,000 tDMD (testnet DMD) available.

Retrieve Your Public Key

Your public key can be found in the following locations:

  • ./public_key.txt
  • In the node startup log (under "Public node URL").

Stake Using the Diamond-UI

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/


Running Your Node Persistently

Using tmux

  1. Install tmux if it is not already installed:

    sudo apt install tmux -y
  2. Start a new tmux session:

    tmux new -s diamond-node
  3. Start the node in the session:

    ./start.sh
  4. Detach from the session (leave it running):

    Ctrl+b, d
  5. To reattach to the session:

    tmux attach -t diamond-node

Using screen

  1. Install screen if it is not already installed:

    sudo apt install screen -y
  2. Start a new screen session:

    screen -S diamond-node
  3. Run the node:

    ./start.sh
  4. Detach from the session:

    Ctrl+a, d
  5. To reattach to the session:

    screen -r diamond-node

Using pm2

  1. 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 -
  2. Start the node with pm2:

    pm2 start "./start.sh" --name diamond-node
  3. View logs:

    pm2 logs diamond-node
  4. Restart the node:

    pm2 restart diamond-node
  5. Stop the node:

    pm2 stop diamond-node
  6. List all running pm2 services:

    pm2 ls 
  7. 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.


About

testnet setup for a DMD Diamond v4

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages