Bitcoin Forum
May 17, 2024, 02:34:58 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Node Command Question  (Read 130 times)
BitcoinCanSaveUsAll (OP)
Member
**
Offline Offline

Activity: 104
Merit: 120


View Profile
June 02, 2020, 07:12:12 PM
 #1

Hello all,  I'm running the most recent bitcoin node from the core team on my Windows 10 laptop and have a question related to a few commands that I was hoping could be broken down into layman terms.  When using gettxoutproof I'm presented with hex proof that the transaction was included in the block that I specified in the command.  I then then use the verifytxproof to confirm it the other way.  I then tried to use the decodescript command on the hex data proof and it's giving me strange outputs. Can someone explain in layman terms what the decodescript command expects as input and what the data shows as the output?  I've used the help command in the node and couldn't really find anything to help me too much.  Also, does anyone have any good reference material for the commands in bitcoin core?  Thanks in advance for your helpl
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3402
Merit: 6641


Just writing some code


View Profile WWW
June 03, 2020, 04:24:42 AM
 #2

decodescript is completely unrelated to the transaction proofs that you get from gettxoutproof and use with verifytxproof.

decodescript is for inspecting and debugging scripts used in a transaction. The transaction proof from gettxoutproof is not a script, nor is it involved in a transaction itself. That proof is tying the txid to the merkle root in a block. It's the path through the merkle tree. This is not related to transaction scripts at all. Trying to put the transaction proof into decodescript will result in garbage.

To read a description of a command, the arguments to it, and what it returns, use the help <cmd> command where <cmd> is the command you are interested in. For example, to get the documentation for gettxoutproof, you would do help gettxoutproof.

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!