Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: cloverme on November 24, 2015, 03:44:29 PM



Title: Testnet reset question
Post by: cloverme on November 24, 2015, 03:44:29 PM
In the past, I've read that the testnet blockchain has been reset with a new genesis block. I think there's been 2 resets, as testnet2 and testnet3 in the past several years.  Technically, how is testnet reset?  Is it done by changing the hashGenesisBlock in main.cpp or ? Also, who decides to reset testnet, is that Gavin or is there sort of like a quorum of consensus that testnet needs to be reset when a new development cycle takes place?

Where testnet3 was created (I think):
https://github.com/bitcoin/bitcoin/commit/feeb761ba07af74a7cd78b8c8f7c2a961fd9ea1c

Currently I use testnet coins to test the game i'm developing. I don't care if I lose them since they have no value, but it got me wondering about testnet blockchain mangement. :)



Title: Re: Testnet reset question
Post by: fbueller on November 24, 2015, 05:20:10 PM
The new chain is created by adding a new genesis block to the chains parameters. No blocks from the old one will appear here, it's a fresh start. It doesn't stop people from using the old chain if they have code that supports it, but if you upgrade, you'd get the new chain.

See main.cpp - line 1933.

There's a testnet in a box kit you can deploy, if you're interested!


Title: Re: Testnet reset question
Post by: cloverme on November 24, 2015, 09:18:31 PM
Thanks, I also see a notation at line 2776 "// Reject block.nVersion=3 blocks when 95% (75% on testnet) of the network has upgraded:"
That answers my consensus question as well. Yeah, I recently read about testnet in a box. I don't think I need that level of abstraction yet, but it's an interesting option.


Title: Re: Testnet reset question
Post by: LeeVelazquez on December 01, 2015, 09:41:00 AM
It's a new experience. I have no knowledge about testnet coins. Thankful to you for sharing your feedback about testnet coins.