Author

Topic: Bitcoin Node Command Question (Read 147 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
June 03, 2020, 12: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 command where is the command you are interested in. For example, to get the documentation for gettxoutproof, you would do help gettxoutproof.
member
Activity: 104
Merit: 120
June 02, 2020, 03: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
Jump to: