Post
Topic
Board Development & Technical Discussion
Re: testnet bitcoins?
by
stwenhao
on 29/06/2022, 04:08:35 UTC
Quote
I think the next test network should be based on Merged Mining, so you should push the test chain forward by mining the mainchain blocks, then you could make the whole network stronger, while producing some coins for testing at the same time, for the same work.
This. And miners should also receive a proportional amount of test coins, related to the mainnet difficulty, or the whole difficulty of all chains, if testnet will track that. So, if the mainnet block reward is 7 BTC, and you mined a block that is 100 times easier, then you should receive 0.07 test coins, not 50 test coins (ideally, you should also receive 0.07 real coins in decentralized way at the same time, but that is another story). And if you mined it with difficulty equal to one, you could receive zero satoshis on the test chain, because rounding down integers during division is the default in many languages, and because you can test all scripts on zero amounts, it would also work.

Another nice to have feature would be to get test coins by signing the mainnet coins. Then, you could sign for example some coins from transaction 9173744691ac25f3cd94f35d4fc0e0a2b9d1ab17b4fe562acc07660552f95518, and get some test coins by doing that (here: zero coins, but there are many dust amounts flying around that you can safely sign). Then, it could work as a test sidechain: you sign some coins, and then you can do your testing, and you can test your peg with the mainchain. Then, you move coins on the mainchain, and then test coins are destroyed, so they can be skipped by other nodes during the initial sidechain download.

Quote
In my opinion a better TestNet environment is one with constant automatic reset with fixed difficulty. That way you won't have to download and process 2.2 million blocks (current testnet3 height) or ~28 GB also nobody would be able to hoard coins for long if the chain resets after certain height like 1k blocks. Anybody would be able to mine a block, gets its high reward and use it.
Nice idea! I think we could have a timespan of one difficulty adjustment. For example, that could mean, when the difficulty is adjusted on the main network, then all test coins are cleared. Or we could use a moving window of 2016 blocks or something like that, then the test network will follow all mainchain events like halvings and difficulty adjustments, so all amounts of test coins will be quite similar to those used in practice on the mainnet.