Testnet Node Setup

1. System Requirements

Hardware Requirements

  • CPU: Minimum 4 cores (8+ cores recommended for mining or staking).

  • Memory (RAM): At least 8GB (16GB+ for optimized performance).

  • Disk Space: Minimum 50GB free space for blockchain storage; SSD recommended for faster data access.

  • Network: Stable internet connection with at least 10 Mbps bandwidth.

Software Requirements

  • Operating System:

    • Linux: Ubuntu 18.04 or later (recommended).

    • macOS: macOS 13 (Ventura) or later.

    • Windows: Windows 10 or later.

  • Docker: This is required for running containerized nodes.

  • Git: For version control and repository management.

  • Wget: For downloading resources.

2. Node Installation

Linux

  1. Install Prerequisites:

sudo apt update  
sudo apt install -y http://docker.io/
  1. Clone the Repository:

git clone https://github.com/BlockdagNetworkLabs/blockdag-scripts
cd blockdag-scripts/linux  
  1. Run Installation Script:

./install_docker.sh  

MacOS

  1. Install Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
  1. Install Required Software:

brew install docker git wget  
  1. Clone the Repository and Run Installation Script:

git clone https://github.com/BlockdagNetworkLabs/blockdag-scripts
cd blockdag-scripts/mac  

3. Network Configuration

Default Network Settings:

  • Testnet Node:

    • In wallet.sh file in the below with -v=testnet

pk_addr=$(./bdagex ec-to-public $private_key | ./bdagex ec-to-pkaddr -v=testnet)
  • In the docker-compose.yml change the flag to the testnet

./bdag
      --testnet
      --rpclisten=0.0.0.0:38131

Custom Peer Discovery:

Replace the peer’s multiaddress in the docker-compose.yml file for the flag `addpeer`.

--addpeer=/ip4/3.79.144.115/tcp/18150/p2p/16Uiu2HAm1pmvbnp5cdh3pBe7ji2YMqFtxnzafsMSBZwX7FTEBV1Y

Firewall Rules:

Open the following ports for inbound and outbound traffic: 38131, 18545, 18546, 18150, 38130 & 8130.

4. Wallet Setup

Create a New Wallet:

./wallet.sh  

Restore an Existing Wallet:

./wallet.sh YOUR_WALLET_SEED 

Securing Wallet:

  • Backup Wallet Seed: Store the wallet seed (from wallet.txt) in a secure, offline location.

  • Encrypt Wallet Files: Use tools like gpg or a secure password manager to encrypt wallet backups.

5. Node Synchronization

Start the Node:

To run a full BlockDAG node in a testnet environment with mining enabled, follow these commands:

./blockdag.sh  

if you have a wallet created, and have the public address then run the following command:

./node.sh YOUR_PUBLIC_ADDRESS

Monitor Synchronization:

docker logs -f blockdag-testnet-network

6. Security Best Practices:

Strong Password Policies:

Use a secure password for your wallet and node configuration.

Last updated

Was this helpful?