Bitcoin Forum
September 27, 2018, 10:44:25 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Nested P2SH  (Read 1577 times)
laurentmt
Sr. Member
****
Offline Offline

Activity: 386
Merit: 250


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 ?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1538088265
Hero Member
*
Offline Offline

Posts: 1538088265

View Profile Personal Message (Offline)

Ignore
1538088265
Reply with quote  #2

1538088265
Report to moderator
1538088265
Hero Member
*
Offline Offline

Posts: 1538088265

View Profile Personal Message (Offline)

Ignore
1538088265
Reply with quote  #2

1538088265
Report to moderator
1538088265
Hero Member
*
Offline Offline

Posts: 1538088265

View Profile Personal Message (Offline)

Ignore
1538088265
Reply with quote  #2

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

Activity: 467
Merit: 261


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

The script debugger only shows you the inner script evaluation.

laurentmt
Sr. Member
****
Offline Offline

Activity: 386
Merit: 250


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: 261


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
Sr. Member
****
Offline Offline

Activity: 386
Merit: 250


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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!