Bitcoin Forum
July 27, 2024, 04:42:26 PM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Do P2SH-knowing nodes lock this bitcoin?  (Read 71 times)
BoiCrypto (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
February 13, 2024, 08:26:27 AM
 #1

I have been here for a while now, but I chose to study the technical aspects of bitcoin before I can move forward to any other part of it. I find this question difficult to comprehend, and I need more clarification about it.

The basic script for a lightning network HTLC output has a conditional branch, which requires a user to know the preimage of a hash. It also requires the user to give a valid signature, but it got me thinking: what if, before P2SH was a thing (back in the day), a user created a locking script that just so happens to match the P2SH template? For whatever reason, the user only intended to lock the bitcoin with a "spender must know the preimage of this hash" requirement. But this preimage is not a bitcoin script itself, so it can't be executed even though it matches the P2SH template. Do P2SH-knowing nodes lock this bitcoin forever?
pooya87
Legendary
*
Offline Offline

Activity: 3528
Merit: 10719



View Profile
February 14, 2024, 05:40:38 AM
 #2

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.

█████████████████████████
████████▀▀████▀▀█▀▀██████
█████▀████▄▄▄▄████████
███▀███▄███████████████
██▀█████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
██▄███████████████▀▀▄▄███
███▄███▀████████▀███▄████
█████▄████▀▀▀▀████▄██████
████████▄▄████▄▄█████████
█████████████████████████
 
 BitList 
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
REAL-TIME DATA TRACKING
CURATED BY THE COMMUNITY

.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
 
  List #kycfree Websites   
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!