# Great Consensus Cleanup Revival

**URL:** <https://delvingbitcoin.org/t/great-consensus-cleanup-revival/710>\
**Category:** Protocol Design\
**Created:** [March 24, 2024, 5:29pm UTC](https://delvingbitcoin.org/t/great-consensus-cleanup-revival/710 "2024-03-24T17:29:42Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![ajtowns](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/ajtowns/32/417_2.png) [@ajtowns](https://delvingbitcoin.org/u/ajtowns)\
**Post date:** [April 5, 2024, 3:26am UTC](https://delvingbitcoin.org/t/great-consensus-cleanup-revival/710/8 "2024-04-05T03:26:53Z")

</div>

> [@1440000bytes](#):
>
> I think SIGHASH\_SINGLE bug reported in 2012 should also be fixed with other bugs: [[Bitcoin-development] Warning to rawtx creators: bug in SIGHASH\_SINGLE ](https://www.mail-archive.com/bitcoin-development@lists.sourceforge.net/msg01408.html)

This insecure use of SIGHASH\_SINGLE is useful for cheaply spending insecure low-value/dust utxos to miner fees – the [idea](https://bitcointalk.org/index.php?topic=1118704.msg11864913#msg11864913) is that you combine many inputs with only one output, use SIGHASH\_SINGLE for inputs after the first so that you get cheap hashing, and for the signature R-value you use G/2 which has a short encoding, allowing you to clean up more dust in the same number of bytes. Because the utxos are already insecure, revealing the utxo’s private key by spending with a known R-value is fine, and because you don’t care about revealing the private key, having a signature that can be reused for other utxos with the same pubkey is also fine.

To some extent this can also be used as a “release” key; if you script is `<Pn> CHECKSIGVERIFY <T> CHECKSIG` then the `T` can publish a single signature that can be reused by `P0`, `P1`, etc who have locked different utxos against similar scripts (the `Pn` signature would be an ordinary `SIGHASH_ALL` here). That’s potentially more convenient than `NONE|ANYONECANPAY` as it doesn’t commit to the utxo being spent; provided you don’t mind having extra inputs so that there’s no output corresponding to this utxo’s input.

So personally I think it’s fine to leave this as-is, and just recommend people use p2wpkh, p2wsh or p2tr instead to avoid this weird behaviour unless they actually want it.

---

_[View the full topic](https://delvingbitcoin.org/t/great-consensus-cleanup-revival/710)._
