Testnet utxos should be spendable by anyone after N blocks, for some large N #8956

issue maaku opened this issue on October 18, 2016
  1. maaku commented at 2:36 PM on October 18, 2016: contributor

    As a modification of a suggestion from developer Rusty Russell, I suggest that testnet be hard-forked to allow anyone to spend any output older than N blocks, for some suitably large value of N like 26,208 blocks (nominally six months). This has at least three benefits:

    1. Ensures testnet coins never have value. If coins can be trivially obtained by 'stealing' old outputs, there is no scarcity from which economic value might originate.
    2. UTXO set reduction. There is presently no incentive for people to clean up their UTXOs after performing an experiment on testnet. It is good that the testnet block chain contains a record of all of these experiments, but it is not useful for the UTXO set to hold leftover outputs for perpetuity. All this does is increase the requirements of running a testnet node.
    3. Perpetual faucet. It would be easy to write an RPC that claimed funds from expired UTXOs, eliminating the need for faucets or the generosity of others to obtain funds. This is particularly a concern now that testnet mining is basically centralized and individual cpu miners are unable to get test coins from mining blocks..
  2. MarcoFalke added the label Brainstorming on Oct 18, 2016
  3. MarcoFalke added the label Tests on Oct 18, 2016
  4. MarcoFalke added the label Consensus on Oct 18, 2016
  5. petertodd commented at 5:14 PM on October 18, 2016: contributor

    NACK

    If UTXO bloat is an issue on testnet, I think that's a good warning sign for mainnet as well; I'd rather be able to point to testnet as an example for this kind of issue. In general, if we can't get sufficient testnet nodes due to scaling issues, that's a warning sign for Bitcoin as well.

    Having said that, I do agree that in general we want to ensure that testnet coins remain valueless; a special "faucet" output that isn't removed from the UTXO set after spending it may be a good solution here.

  6. btcdrak commented at 6:00 PM on October 18, 2016: contributor

    Point 2 doesn't make sense if point 1 holds true.

  7. petertodd commented at 6:20 PM on October 18, 2016: contributor

    @btcdrak I think @maaku is correct in his logic: with his proposed change, the incentive is mostly unchanged, but it becomes easy for anyone to clean up UTXO's created by others. Equally, if you are short of coins, grabbing someone else's UTXO is an easy way to get them (though that will likely be a minor incentive compared to simple altruistic cleanups).

  8. maaku commented at 6:20 PM on October 18, 2016: contributor

    @btcdrak can you explain? @petertodd With respect, the purpose of testnet is not to be some sort of cautionary tale for mainnet. The purpose of testnet is testing and experimentation. High availability and low variance in running requirements cause less headaches for people.

  9. sipa commented at 6:31 PM on October 18, 2016: member

    I do think @petertodd and @maaku have valuable points here. However, I've long through that a single testnet can't fullfill all functions we want from a testnet. In particular, I think it's worthwhile to have a network where extreme network and/or chain conditions occur (partitioning, huge reorganizations, slow blocks). On the other hand, I would also like to see more businesses and software authors provide testnet versions of their services, where users can actually test interaction with those services. The latter is not very appealing when the network is a wild west.

  10. rustyrussell commented at 8:23 PM on October 18, 2016: contributor

    Note that I want this for DIY testnets, where it makes more sense. In particular, Lightning and any layer-2 development would have benefit from a predictable, stable testnet.

  11. laanwj commented at 3:54 PM on October 19, 2016: member

    However, I've long through that a single testnet can't fullfill all functions we want from a testnet.

    I tend to agree. I also don't think it should be up to us define all kinds of testnet that should be possible. In the future I'd imagine it'll be possible to load some chainparams from a .json file, which defines the rules and settings to join an arbitrary testnet (e.g. @jtimon's #8855 would be a first step there). (of course the individual rules would have to be part of bitcoin core, but a testnet could pick and choose either wild-west conditions or stable as possible ones or any combination)

  12. rustyrussell commented at 12:46 AM on October 26, 2016: contributor

    "Wladimir J. van der Laan" notifications@github.com writes:

    However, I've long through that a single testnet can't fullfill all functions we want from a testnet.

    I tend to agree. I also don't think it should be up to us define all kinds of testnet that should be possible. In the future I'd imagine it'll be possible to load some chainparams from a .json file, which defines the rules and settings to join an arbitrary testnet (e.g. @jtimon's #8855 would be a first step there). (of course the individual rules would have to be part of bitcoin core, but a testnet could pick and choose either wild-west conditions or stable as possible ones)

    In practice you need to change rpcport and port, as well as whatever rules are needed for the testchain. So I think a new conf is better than a json file.

    My original idea was that you would give a genesis blockhash and DNS seed or manually addnode. The genesis block would tell you the other chain parameters.

    Cheers, Rusty.

  13. laanwj commented at 12:47 PM on October 26, 2016: member

    Please let's not get into a discussion of file formats. JSON was just an example as it is easy to support nested structures, and to generate from python. But I'm fine with whatever is implemented. As long as it is not ASN.1 I guess.

  14. MarcoFalke commented at 6:34 PM on May 8, 2020: member

    Closing for now. This should first be discussed on the mailing list. When and if an implementation (like signet) is ready, it can be considered for Bitcoin Core.

  15. MarcoFalke closed this on May 8, 2020

  16. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me