Bitcoin

What if the user locks some bitcoins with a script that only needs to know the preimage, but matches the p2sh template?

The main script for Lightning Network HTLC output has a conditional branch that requires the user to know the preimage of the hash. It also requires the user to provide a valid signature, but before P2SH existed (it used to be), I was wondering what if the user created a locking script that matched the P2SH template? For whatever reason, users have been trying to lock up their Bitcoins with the requirement that “the payer must know the preimage of this hash.” However, since this pre-image is not a Bitcoin script itself, it cannot be executed even if it matches the P2SH template. Do nodes that know P2SH lock these bitcoins forever?

Related Articles

Back to top button