I've been around here for a bit, but I wanted to get a solid grasp on the technical side of bitcoin before diving into other areas. This question is kinda tough for me, and I'd appreciate some clarity.
So, the standard script for a lightning network HTLC output has this conditional branch that needs a user to know the preimage of a hash. Plus, it needs a valid signature. But it got me thinking: what if, back in the early days before P2SH existed, someone made a locking script that accidentally fit the P2SH model? Let's say they only meant to set up a lock that said "the spender needs to know this hash preimage". The thing is, that preimage isn't a bitcoin script, so it can't be executed even if it fits the P2SH structure. Do nodes that recognize P2SH end up locking this bitcoin forever?
Can P2SH-aware nodes permanently lock bitcoin?
1 reply 160 views
Yes.
If the top stack item which has to be interpreted as a script (the redeem script to be exact) is not a valid script for any reason, that output is unspendable forever because according to the consensus rules the transaction spending it would be invalid.
Related topics
- bitcoin-qt sync issues and slow speeds 6
- Recovering a Bitcoin wallet and address 8
- Looking for wallet software that supports custom P2SH redeem scripts? 19
- Affordable quiet mini PC for running a Bitcoin node and blockchain explorer 19
- Using two different Bitcoin versions without messing up blockchain data 3
- Issue with Bitcoin Core Wallet after power outage 8