Trying to deploy a private testnet in a local environment. I'm coming over from the Ethereum side, so I'm used to how things run in geth where I can initialize a custom genesis file on node 1, indicate a data directory, and then create a static peers JSON file to allow separate nodes that I control to join the testnet. So far, I haven't found any way to do this.
In chainparams.cpp, we commented out the DNS seeds (around lines 132-140) that are predefined and replaced them with our own.
I then created a custom bitcoin.conf file which contains:
connect=[node 1 ip addr]:8333 connect=[node 2 ip addr]:8333 connect=[node 3 ip addr]:8333 connect=[node 4 ip addr]:8333
Then I run the following command to start bitcoind:
bitcoind -conf=/home/appo/bitcoin/bitcoin.conf -port=8333
First problem:
connect() to [node ip addr]:8333 failed after select(): Connection refused (111)
I also notice that it's still loading peers from peers.dat even though I've disabled DNS seeding (I think) and it's also referencing the mainnet chain state, but I'd like to create a new genesis block.
I'm trying to test in a local environment by essentially forking Bitcoin to allow me to run tests without any external dependancies, so TL;DR what I need is to be able to:
- Initialize a new genesis block so we don't need to reference any of the historical chain data and can create our own fork. This is so we can run functional performance tests in a controlled environment.
- Either manually peer or allow discovery of only specific nodes within our network that we control.
Any help would be appreciated. Thanks!