Post
Topic
Board Development & Technical Discussion
Re: Private testnet between PC and VM
by
Hoshimaru
on 15/04/2015, 13:07:05 UTC

Glad to hear it is conmecting now.

How does it proceed now? Does one of the clients have to "mine" the genesis block to get the testnet blockchain started? Without this, there won't be a new block on the network right?

It lookse like you have both PoS ans PoW. AFAIK to go further, you will have to make a transaction and that's how new block is found and new coins are minted. I am not very familar with PoS but I think keeping the wallet open after sending transaction can mint nee coins or you can mine with your CPU/GPU.

Let's say it works like above, what happens when I shut down both clients? Does that block chain simply dies or does it "resume" as soon as 1 or more clients are connected to each other?

Will resume AFAIK.

IMHO you could announce in altcoins amd tell them this is for educational purpose. You may get more miners and peers.

Thank you for your reply Muhammed Zakir.

I've finally managed to get it going. The miner in the wallet itself didn't do anything with gen=1.
I believe that at some point, cpu mining with the wallet was disabled in bitcoin core, right? Thus any altcoin forking altcoins based on a bitcoin core release after disabling the miner will of course not mine at all.

I tried Tanguy Pruvot's cpuminer-multi and Tadaaaaa! It started mining testnet blocks. I'll let it run for a while to see when they mature & get confirmed.

Stopping the mining stop the block generation.
Shutdown & relaunch the clients resumes the operations once cpuminer start crunching the number. It's a very interesting concept to witness from close-by.

Code:
{
    "version" : "v1.1.0.0",
    "protocolversion" : 60013,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "newmint" : 17.00000000,
    "stake" : 0.00000000,
    "blocks" : 17,
    "timeoffset" : 0,
    "moneysupply" : 17.00000000,
    "connections" : 1,
    "proxy" : "",
    "ip" : "0.0.0.0",
    "difficulty" : {
        "proof-of-work" : 0.00004356,
        "proof-of-stake" : 0.00001526
    },
    "testnet" : true,
    "keypoololdest" : 1429042310,
    "keypoolsize" : 101,
    "paytxfee" : 0.00001000,
    "mininput" : 0.00000000,
    "errors" : ""
}

Code:
./cpuminer -a x11 -o http://127.0.0.1:33551 -u FirstInstance -p FirstInstancePassword --coinbase-addr=n1YYCSN2Y6qE9oxKvDj3ZU8u7Na42WJMDR
** cpuminer-multi 1.1-git by Tanguy Pruvot (tpruvot@github) **
BTC donation address: 1FhDPLPpw18X4srecguG3MxJYe4a1JsZnd

[2015-04-15 15:05:01] 2 miner threads started, using 'x11' algorithm.
[2015-04-15 15:05:02] Current block is 18
[2015-04-15 15:05:02] Switching to getwork, gbt version 6
[2015-04-15 15:05:06] CPU #0: 25.58 kH/s
[2015-04-15 15:05:08] CPU #0: 25.92 kH/s
[2015-04-15 15:05:08] accepted: 1/1 (100.00%), 25.92 kH/s yes!
[2015-04-15 15:05:09] CPU #0: 23.79 kH/s
[2015-04-15 15:05:11] x11 block 19, diff 0.00
[2015-04-15 15:05:11] CPU #1: 25.57 kH/s
[2015-04-15 15:05:14] CPU #0: 23.53 kH/s
[2015-04-15 15:05:16] CPU #0: 25.09 kH/s
[2015-04-15 15:05:16] CPU #1: 26.27 kH/s
[2015-04-15 15:05:17] accepted: 2/2 (100.00%), 51.36 kH/s yes!
[2015-04-15 15:05:20] x11 block 20, diff 0.00
[2015-04-15 15:05:20] CPU #1: 25.45 kH/s
[2015-04-15 15:05:21] CPU #1: 23.13 kH/s
[2015-04-15 15:05:21] CPU #0: 23.84 kH/s

Is there any program besides Rational Rose (don't have it) that can generate class diagrams, activity and sequence diagrams for bitcoin's code? Many people don't like diagrams, and I could find any yet, but I think they can be of value to understand how things work and are related to each other. The source code for bitcoin core (altcoins) are least to say... daunting if you need to gain understanding of how things work <("^_^)