Oct 2, 2025 15:00:22 PortlandHODL <ad...@qrsnap.io>:
--
You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bitcoindev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/6f6b570f-7f9d-40c0-a771-378eb2c0c701n%40googlegroups.com.
On Thu, Oct 02, 2025 at 06:21:18PM -0700, /dev /fd0 wrote:
>
> We can't predict future usage,
Aside from proof-of-publication (i.e. data storage directly in the UTXO
set) there is no usage of script which can't be equally (or better)
accomplished by using a Segwit v0 or Taproot script.
> so it would be great if this was restricted
> to OP_RETURN. While there is no real use for a scriptPubKey larger than 520
> bytes as shown in the data you shared, it is possible that users may create
> more OP_RETURN outputs after this change. It does not affect the UTXO set
> but will cost more and economically discourage the use of multiple
> OP_RETURN outputs.
>
Restricting it to OP_RETURN would have zero effect on people trying to
use scriptpubkeys for data storage. They would switch to any of the 65
or so other OP_RETURN equivalents, and failing that, switch to
OP_RESERVED, then to OP_FALSE, then to `0 1 EQVERIFY`, and so on. A
restriction that applies specifically to OP_RETURN outputs is no
restriction at all.
If we're going this route, we should just close all the gaps for the immediate future:
- Limit (new) scriptPubKeys to 83 bytes or less. 34 doesn't seem terrible. UTXOs are a huge cost to nodes, we should always keep them as small as possible. Anything else can be hashed (if SHA256 is broken, we need a hardfork anyway).
- Limit script data pushes to 256 bytes, with an exception for BIP16 redeem scripts.
- Make undefined witness/taproot versions invalid, including the annex and OP_SUCCESS*. To make any legitimate usage of them, we need a softfork anyway (see below about expiring this).
- Limit taproot control block to 257 bytes (128 scripts max), or at least way less than it currently is. 340e36 scripts is completely unrealistic.
- Make OP_IF invalid inside Tapscript. It should be unnecessary with taproot, and has only(?) seen abuse.
We can do these all together in a temporary softfork that self-expires after a year or two. This would buy time to come up with longer-term solutions, and observe how it impacts the real world. Since it expires, other softforks making use of upgradable mechanisms can just wait it out for those mechanisms to become available again - therefore we basically lose nothing. (This is intended to buy us time, not as a permanent fix.)
Alternatively, but much more complex, we could redesign the block weight metric so the above limits could be exceeded, but at a higher weight-per-byte; perhaps weigh data 25% more per byte beyond the expected size. This could also be a temporary softfork, perhaps with a rolling window, so future softforks could be free to lower weights should they be needed.
Another idea might be to increase the weight based on coin-days-destroyed/coin-age, so rapid churn has a higher feerate than occasional settlements. But this risks encouraging UTXO bloat, so needs careful consideration to proceed further.
Happy to throw together a BIP and/or code if there's community support for this.
Luke
--
You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bitcoindev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/6f6b570f-7f9d-40c0-a771-378eb2c0c701n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/001afe1d-0282-4c68-8b1c-ebcc778f57b0%40dashjr.org.
- Limit taproot control block to 257 bytes (128 scripts max), or at least way less than it currently is. 340e36 scripts is completely unrealistic.
Yes, sorry if I was unclear. The temporary restriction of 257 B is ultimately based on the size, which doesn't accommodate for that design ideal. It's a tradeoff until a better solution is implemented. While it might not be optimal in all cases to have 128 scripts, the fact remains that size/depth _allows for it_. (And 128 depth is still unrealistic, even if you don't like the script-count framing.)
Luke
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/1e0f9843-0f08-4dea-b037-24df38bf8ed0n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/001afe1d-0282-4c68-8b1c-ebcc778f57b0%40dashjr.org.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/CAMHHROwJA5N%3DSfejF353oWFFsKVCtk5cpr9QkOv%2BZcqGDFz6oA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bitcoindev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/961e3c3a-a627-4a07-ae81-eb01f7a375a1n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/5135a031-a94e-49b9-ab31-a1eb48875ff2n%40googlegroups.com.
> Limiting the maximum size of the scriptPubKey of a transaction to 67 bytes.
This leave no room to deal with broken hashing algorithms and very little future upgradability for hooks.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/78475572-3e52-44e4-8116-8f1a917995a4n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/CAAS2fgQEdVVcb%3DDfP7XoRxfXfq1unKBD0joffddOuTsn2Zmcng%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/f4755fb6-b031-4c60-b304-f123ba2ff473n%40googlegroups.com.
Greg,
> Also some risk of creating a new scarce asset class.
Well, Casey Rodarmor is in the thread, so lol maybe.
Anyway, point taken. I want to be 100% sure I understand the hypotheticals: there could be an off-chain, presigned, transactions that needs more than 520 bytes for the scriptPubKey and, as Poelstra said, could even form a chain of presigned transactions under some complex, previously unknown, scheme that only becomes public after this change is made. Can you confirm?
Would it also be a worry that a chain of transactions using said utxo could commit to some bizarre scheme, for instance a taproot transaction utxo that later is presigned committed back to P2MS larger than 520 bytes? If so, I think I get it, you're saying to essentially guarantee no confiscation we'd never be able to upgrade old UTXOs and we'd need to track them forever to prevent unlikely edge cases?
Does the presigned chain at least stop needing to be tracked once the given UTXO co-mingles with a post-update coinbase utxo?
If so, this is indeed complex! This seems pretty insane both for the complexity of implementing and the unlikely edge cases. Has Core ever made a decision of (acceptable risk) to upgrade with protection of onchain utxos but not hypothetical unpublished ones?
Aren't we going to run into the same situation if we do an op code clean up in the future if we had people presign/commit to op codes that are no longer consensus valid?
Tidwell
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/c208e054-b85a-4a5c-9193-c28ef0d225c5n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/09d0aa74-1305-45bd-8da9-03d1506f5784n%40googlegroups.com.
I don't even think bitcoin has ever policy restricted something that was in active use, much less softforked out something like that.