Bitcoin Forum
May 04, 2024, 01:45:16 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Nested P2SH  (Read 1667 times)
laurentmt (OP)
Sr. Member
****
Offline Offline

Activity: 384
Merit: 258


View Profile
February 18, 2015, 10:41:24 PM
 #1

I've just found a strange script in the first input of this transaction. It looks like a PS2H inside a P2SH :

scriptPubKey = OP_HASH160 f2941f... OP_EQUAL
scriptSig = OP_PUSHDATA1 98 4c96225... 17 a914ced... 
  with a914ced... = OP_HASH160 14 cede0e... OP_EQUAL

My understanding is that :
- first, we check that hash160(a914ced...) = f2941f...
- then, we check that hash160(4c96225...) = cede0e... (the redeem script acts like a puzzle)

But the script debugger seems to have a very different interpretation which I don't understand. Do I miss something ?
If you want to be a moderator, report many posts with accuracy. You will be noticed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714830316
Hero Member
*
Offline Offline

Posts: 1714830316

View Profile Personal Message (Offline)

Ignore
1714830316
Reply with quote  #2

1714830316
Report to moderator
1714830316
Hero Member
*
Offline Offline

Posts: 1714830316

View Profile Personal Message (Offline)

Ignore
1714830316
Reply with quote  #2

1714830316
Report to moderator
hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
February 19, 2015, 01:29:05 PM
 #2

The script debugger only shows you the inner script evaluation.

laurentmt (OP)
Sr. Member
****
Offline Offline

Activity: 384
Merit: 258


View Profile
February 19, 2015, 01:49:17 PM
 #3

The script debugger only shows you the inner script evaluation.
It's weird because usually the script debugger shows the complete evaluation (e.g. the P2PKH output of the same transaction).
Anyway. Do you think that my understanding of the script is correct (i.e. we have a puzzle nested inside a P2SH) ?
hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
February 19, 2015, 02:57:31 PM
 #4

It looks like it. IMHO, it's not smart because the miner can trivially rewrite the tx and steal the coins.

laurentmt (OP)
Sr. Member
****
Offline Offline

Activity: 384
Merit: 258


View Profile
February 19, 2015, 05:44:29 PM
 #5

It looks like it. IMHO, it's not smart because the miner can trivially rewrite the tx and steal the coins.
Yep. That's the problem of script puzzles without signatures.
I think it's just someone having some fun with bitcoin scripts or may be it was a game... I don't know.
Anyway, thanks for your answer.
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!