Thread

Zero-JS Hypermedia Browser

Relays: 5
Replies: 7
Generated: 12:13:26
When signing a Bitcoin transaction, there's a space within the transaction data reserved for the signature itself. Obviously, since the signature hasn't been created yet, we can't fill in the actual signature at this point—we create it later and insert it. The issue is that instead of just leaving this space empty, it's filled in with the locking script (scriptPubKey) of the UTXO being spent. Does anyone know why it's done this way? Is there some vulnerability that would arise if we left it blank when signing, or did Satoshi just design it this way arbitrarily, and now it's too late to change? I asked an AI, but either I asked poorly or it just gave me nonsense answers. #asknostr #devstr #bitcoin
2025-09-23 00:45:12 from 1 relay(s) 1 replies ↓
Login to reply

Replies (7)

I read the blog post you linked, but I still don't understand. In the attached screenshot, the blog states that the reason for putting the previous locking script in the empty signature space is to indicate that we recognize the original locking script. Does that make sense? It's not hidden information; anyone can find it since the txid and vout are specified. image image
2025-09-23 15:48:52 from 1 relay(s) ↑ Parent 1 replies ↓ Reply
I asked that person about the question, and he also didn't think there was any particular reason it had to be that way. It seems likely to be one of those things in Bitcoin’s history that weren't technically necessary, but were simply implemented by Satoshi that way—and now it can't really be changed, so it's just left as-is. Looks like my guess was right.
2025-09-25 13:50:59 from 1 relay(s) ↑ Parent Reply