Hello
First of all, don't worry. I don't intend to launch the 10000th scam coin or any coin in general. Instead, I would rather gain understanding of the inner workings of crypto currency.
I'm experimenting with an X11 POW/POS coin that so far had no testnet at all to start with. Reading through documentation to be found here and on Github, I've managed to apply the changes required to the source code. I successfully created a Genesis block and now I try to kick off the testnet between my PC running OpenSUSE 13.2 and a virtual machine running Mint 17.1.
The genesis block for the testnet looks like this
{
"hash" : "00000d4d0549912423730a89e05b8f096591d32795b1612a0abd5c3541904ddf",
"confirmations" : 1,
"size" : 155,
"height" : 0,
"version" : 1,
"merkleroot" : "a19abd6632650bde37a3feb35eef8ac6d1ffb70d5ce180b5e68b9eea13cb23ae",
"mint" : 0.00000000,
"time" : 1429024276,
"nonce" : 203625,
"bits" : "1f00ffff",
"difficulty" : 0.00001526,
"blocktrust" : "10001",
"chaintrust" : "10001",
"flags" : "proof-of-work stake-modifier",
"proofhash" : "00000d4d0549912423730a89e05b8f096591d32795b1612a0abd5c3541904ddf",
"entropybit" : 1,
"modifier" : "0000000000000000",
"modifierchecksum" : "0e00670b",
"tx" : [
"a19abd6632650bde37a3feb35eef8ac6d1ffb70d5ce180b5e68b9eea13cb23ae"
]
}
The genesis block on the actual mainnet looks this:
{
"hash" : "00000c639b0fbf250ba63c6ef2952dbb44bb1051324a27383b8a56fb833d8137",
"confirmations" : 1403349,
"size" : 155,
"height" : 0,
"version" : 1,
"merkleroot" : "18bf53ed0bbbc417c8e2d7993294dba71e1ba10697c9289c617ee02108bb197c",
"mint" : 0.00000000,
"time" : 1402346011,
"nonce" : 1912748,
"bits" : "1e0fffff",
"difficulty" : 0.00024414,
"blocktrust" : "100001",
"chaintrust" : "100001",
"nextblockhash" : "0000014e0a7c56f23135b52a5af015a9b89266c4899d66039d65b0f80cc969a8",
"flags" : "proof-of-work stake-modifier",
"proofhash" : "00000c639b0fbf250ba63c6ef2952dbb44bb1051324a27383b8a56fb833d8137",
"entropybit" : 1,
"modifier" : "0000000000000000",
"modifierchecksum" : "0e00670b",
"tx" : [
"18bf53ed0bbbc417c8e2d7993294dba71e1ba10697c9289c617ee02108bb197c"
]
}
I'm confident this part for the testnet is alright.
The next step is "start" this testnet and actually create new blocks. To do so, I'm using my computer and a virtual machine.
On my computer with IP 192.168.0.163, I run the headless daemon of the wallet with the following configuration:
server=1
rpcallowip=192.168.0.*
listen=1
rpcuser=FirstInstance
rpcpassword=FirstInstancePassword
port=33550
rpcport=33551
gen=1
testnet=1
noirc=1
The virtual machine has access to my LAN using a bridge and received the IP 192.168.0.206. Both machines can see each other. This VM runs the QT wallet and is configured as
server=1
rpcallowip=192.168.0.*
rpcuser=SecondInstance
rpcpassword=SecondInstancePassword
port=33550
rpcport=33551
gen=1
testnet=1
noirc=1
connect=192.168.0.163:33550
I first start the daemon on the physical machine, followed by the QT client on the VM.
Unfortunately, the QT client (headless has the same effect) isn't able to connect to its peer on the physical machine and blocks stay on 0.
Opened LevelDB successfully
LoadBlockIndex(): hashBestChain=00000d4d054991242373 height=0 trust=65537 date=04/14/2015 15:11:16
LoadBlockIndex(): synchronized checkpoint 00000d4d0549912423730a89e05b8f096591d32795b1612a0abd5c3541904ddf
Verifying last 0 blocks at level 1
block index 4ms
Loading wallet...
nFileVersion = 1010000
Keys: 101 plaintext, 0 encrypted, 101 w/ metadata, 101 total
wallet 266ms
Loading addresses...
Loaded 0 addresses from peers.dat 0ms
mapBlockIndex.size() = 1
nBestHeight = 0
setKeyPool.size() = 100
mapWallet.size() = 0
mapAddressBook.size() = 1
ThreadRPCServer started
DNS seeding disabled
Done loading
ThreadIRCSeed exited
refreshWallet
ThreadSocketHandler started
ThreadOpenAddedConnections started
ThreadOpenAddedConnections exited
ThreadOpenConnections started
trying connection 192.168.0.163:33550 lastseen=0,0hrs
ThreadMessageHandler started
ThreadStakeMiner started
Flushed 0 addresses to peers.dat 2ms
ipcThread started
connection timeout
trying connection 192.168.0.163:33550 lastseen=0,0hrs
connection timeout
trying connection 192.168.0.163:33550 lastseen=0,0hrs
connection timeout
trying connection 192.168.0.163:33550 lastseen=0,0hrs
connection timeout
On the physical machine, I return getinfo every 30 seconds (using "watch")
{
"version" : "v1.1.0.0",
"protocolversion" : 60013,
"walletversion" : 60000,
"balance" : 0.00000000,
"newmint" : 0.00000000,
"stake" : 0.00000000,
"blocks" : 0,
"timeoffset" : 0,
"moneysupply" : 0.00000000,
"connections" : 0,
"proxy" : "",
"ip" : "0.0.0.0",
"difficulty" : {
"proof-of-work" : 0.00001526,
"proof-of-stake" : 0.00001526
},
"testnet" : true,
"keypoololdest" : 1429042310,
"keypoolsize" : 101,
"paytxfee" : 0.00001000,
"mininput" : 0.00000000,
"errors" : ""
}
What am I overseeing to make this work? I'm don't think that I need to open any port with iptables on the physical machine or do portforwarding, since it's all on LAN.
Although, I'm concerned about
"ip" : "0.0.0.0",. The same client on mainnet gives returns my public IP. Should I bind the client on the physical machine to a specific IP?