Bitcoin Forum
October 19, 2017, 06:33:11 PM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How do miners access to transaction referenced in the inputs of new transactions  (Read 265 times)
baudetph
Newbie
*
Offline Offline

Activity: 2


View Profile
February 03, 2016, 10:22:28 AM
 #1

i don't understand how miners prevent easily an output tx from double spent. I understand that when a transaction is broadcasted to the network, miners will try to add it to a block. For that they will check that signature script of each input match with pubkey script of corresponding output of the corresponding previous transaction. My question is :
- how do miners get easily the previous tx from which bitcoins are to be spent knowing only its identifier. Tx identifier doesn't tell in what block this transaction is mined, and block headers don't provide this information meaning you have to look out the whole blocks.
- Does each miner maintain its own ledger of transactions (tx id, block in which it is included, spent ("yes" or "no") and if "yes" in what block and transaction) ?
1508437991
Hero Member
*
Offline Offline

Posts: 1508437991

View Profile Personal Message (Offline)

Ignore
1508437991
Reply with quote  #2

1508437991
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1508437991
Hero Member
*
Offline Offline

Posts: 1508437991

View Profile Personal Message (Offline)

Ignore
1508437991
Reply with quote  #2

1508437991
Report to moderator
1508437991
Hero Member
*
Offline Offline

Posts: 1508437991

View Profile Personal Message (Offline)

Ignore
1508437991
Reply with quote  #2

1508437991
Report to moderator
1508437991
Hero Member
*
Offline Offline

Posts: 1508437991

View Profile Personal Message (Offline)

Ignore
1508437991
Reply with quote  #2

1508437991
Report to moderator
Cuidler
Sr. Member
****
Offline Offline

Activity: 294


View Profile
February 03, 2016, 10:47:26 AM
 #2

Full nodes maintain list of unspend outputs, UTXO set. Prefferably in memory and is about 1GB in size currently. When output is spend, it is removed from UTXO set, and added to UTXO set for each output address in added transaction to the blockchain. It is quickest way to know whether received transaction from peer is valid.

.Liqui Exchange.Trade and earn 24% / year on BTC, LTC, ETH
....Brand NEW..........................................Payouts every 24h. Learn more at official thread
baudetph
Newbie
*
Offline Offline

Activity: 2


View Profile
February 03, 2016, 10:49:31 AM
 #3

Thank You.
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!