Bitcoin Forum
April 26, 2024, 01:39:15 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How do miners access to transaction referenced in the inputs of new transactions  (Read 301 times)
baudetph (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


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) ?
1714095555
Hero Member
*
Offline Offline

Posts: 1714095555

View Profile Personal Message (Offline)

Ignore
1714095555
Reply with quote  #2

1714095555
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714095555
Hero Member
*
Offline Offline

Posts: 1714095555

View Profile Personal Message (Offline)

Ignore
1714095555
Reply with quote  #2

1714095555
Report to moderator
1714095555
Hero Member
*
Offline Offline

Posts: 1714095555

View Profile Personal Message (Offline)

Ignore
1714095555
Reply with quote  #2

1714095555
Report to moderator
1714095555
Hero Member
*
Offline Offline

Posts: 1714095555

View Profile Personal Message (Offline)

Ignore
1714095555
Reply with quote  #2

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

Activity: 294
Merit: 250


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 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


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

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