Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Steve on June 18, 2011, 03:48:14 PM



Title: testnet (anyone mining?)
Post by: Steve on June 18, 2011, 03:48:14 PM
I'm using testnet, but it's been a long time since I've seen a block come through.  I wonder if anyone is mining (this is one case where it would be handy to have a miner in the client)?

I think what I'd really like for testing is a block chain that I could run in isolation with a couple clients...and be able to force the difficulty to remain at 1 no matter how frequently blocks are generated (and then be able to run a miner and specific a frequency for block creation).  I think I remember someone mentioning a testnet in a box or something (time to go search around a little).


Title: Re: testnet (anyone mining?)
Post by: joan on June 18, 2011, 04:22:10 PM
Run with -gen option to mine.


Title: Re: testnet (anyone mining?)
Post by: Gavin Andresen on June 18, 2011, 05:10:42 PM
https://sourceforge.net/projects/bitcoin/files/Bitcoin/testnet-in-a-box/


Title: Re: testnet (anyone mining?)
Post by: aleiprecht on June 22, 2011, 03:33:46 PM
Hmmm, didn't know about the testnet in a box before... might come in handy
Is there anything wrong with using the public testnet ? And to answer the initial question, yes I am mining (difficulty ~33) the testnet when I am not actively testing my code.


Title: Re: testnet (anyone mining?)
Post by: Steve on June 22, 2011, 06:54:13 PM
Nothing wrong with using the public testnet, just that mining activity (and hence block generation) can be spotty...and if you want to generate blocks for testing, even at difficulty of 33, it's still higher than is necessary for testing purposes.


Title: Re: testnet (anyone mining?)
Post by: aleiprecht on June 22, 2011, 07:34:23 PM
My reason for mining on the public testnet, and if I am wrong with my thinking I appreciate being corrected.

1.) I am building an application that accepts bitcoins.
2.) My testers are in the US and in Europe
3.) If they start their bitcoin clients with the -testnet switch and make transactions their TX will have to be included into the blockchain somehow
4.) If no one mines on the testnet, then #3 won't work

That's pretty much the motivation... Does that sound right ??


Title: Re: testnet (anyone mining?)
Post by: Steve on June 23, 2011, 02:51:28 AM
My reason for mining on the public testnet, and if I am wrong with my thinking I appreciate being corrected.

1.) I am building an application that accepts bitcoins.
2.) My testers are in the US and in Europe
3.) If they start their bitcoin clients with the -testnet switch and make transactions their TX will have to be included into the blockchain somehow
4.) If no one mines on the testnet, then #3 won't work

That's pretty much the motivation... Does that sound right ??

That's right, but to me it seems block creation on the testnet can be erratic...which is why I'm interested in running a private testnet and mining on that (difficulty is very low and block creation can be better controlled).

But, I've run into an issue with a private testnet...a public testnet managed to find and connect to my private test net and nuked my private chain.  I guess I'll need to setup one central client that accepts inbound connections and lock it down with iptables or something...an option like -allowip (similar to -rpcallowip) would be very convenient...I could explicitly allow just the clients on the private testnet to connect to this central server (and make sure they only have one connection using -connect and -nolisten).