Bitcoin Forum
August 02, 2024, 06:12:13 PM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: verify bitcoin transaction  (Read 429 times)
qrius1111 (OP)
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
December 26, 2013, 01:39:32 AM
 #1

hi all, newbie here Smiley

i am trying to understand the bitcoin transaction verification process in depth. as i understand it, it is possible to prove that a transaction has legitimately claimed the output of a previous transaction. to do this, i would need to perform an operation on the transaction and obtain the result of the previous output address. since the transaction is not mine, i do not own the private key of the output address, so it seems that all the information i need is purely contained within the transaction and the output of the previous transaction (which can be identified via the txid hash and index specified within the later transaction).

i found this code which has a function called "verify_message" - https://github.com/nanotube/supybot-bitcoin-marketmonitor/blob/master/GPG/local/bitcoinsig.py

will this function verify that a transaction is legitimately linked to a previous output address? if so then what are the inputs that need to be used? the address i know, and i'm guessing that the signature is the scriptsig of the latest transaction, but what is the "message" argument? is it something like the hash of the latest transaction?

can someone please help. i'd like to actually implement a test in python using some data from the blockexplorer.com website.

many thanks in advance!
infinitybo
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
December 26, 2013, 09:07:09 AM
 #2

HI ! about this, it's quietly an interesting point of view however once a transaction is completed, the unique address provided by the program is supposed to verify the previous output address.
qrius1111 (OP)
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
December 26, 2013, 11:08:47 AM
 #3

hi Smiley

yes i'm guessing the miners would perform this verification before allowing the transaction into a block. a quick google shows that this guy agrees too - http://bitcoin.stackexchange.com/a/9461/2116

i've looked all around the web for the code which computes the address from the tx input script and previous txout elements in python. i think i found some in c# (http://stackoverflow.com/questions/19665491/how-do-i-get-an-ecdsa-public-key-from-just-a-bitcoin-signature-sec1-4-1-6-k) but i'm not experienced enough in c#, like i am in python, to actually try it out.

i'm really just keen to fully understand how bitcoin works at these nitty gritty levels.
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!