Bitcoin Forum
December 16, 2017, 07:50:08 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Question - Tx Confirmation Details  (Read 413 times)
iacz489
Newbie
*
Offline Offline

Activity: 7


View Profile
February 19, 2014, 09:30:53 PM
 #1

According to the protocol specific given by BitcoinWiki, after a transaction is broadcast,  ""it may be included in a block that is published to the network". Here comes something trivial: When is the newly confirmed transaction written into a block? Suppose I am an average node and I received a transaction and verified it is valid. What is the next step for me? Do I write this transaction into the latest block? How to make sure all nodes have a specific transaction written consistently into the same block?
I am currently researching network consistency issues and security problems in the Bitcoin system. This problem seems to remains an unsolved issue given I have not misunderstood anything else. I appreciate any help from anyone professional. Thanks in advance.
1513410609
Hero Member
*
Offline Offline

Posts: 1513410609

View Profile Personal Message (Offline)

Ignore
1513410609
Reply with quote  #2

1513410609
Report to moderator
1513410609
Hero Member
*
Offline Offline

Posts: 1513410609

View Profile Personal Message (Offline)

Ignore
1513410609
Reply with quote  #2

1513410609
Report to moderator
1513410609
Hero Member
*
Offline Offline

Posts: 1513410609

View Profile Personal Message (Offline)

Ignore
1513410609
Reply with quote  #2

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

Posts: 1513410609

View Profile Personal Message (Offline)

Ignore
1513410609
Reply with quote  #2

1513410609
Report to moderator
1513410609
Hero Member
*
Offline Offline

Posts: 1513410609

View Profile Personal Message (Offline)

Ignore
1513410609
Reply with quote  #2

1513410609
Report to moderator
wheatstone
Member
**
Offline Offline

Activity: 82


View Profile
February 19, 2014, 10:26:03 PM
 #2

A transaction is only confirmed once it is mined, i.e. contained in a valid block in the blockchain.

Transactions are broadcast to the network (typically) and miners (pools) decide which transactions they want to include in their next block. Each miner can freely chose which transactions to include and which not to.

Once a valid solution is found (i.e. the block is mined), whatever transactions the miner chose to include are then confirmed and part of the blockchain.

(At this stage there is actually still a small chance that the block will NOT be part of the consensus blockchain, if another valid block is distributed AND a subsequent block on that branch is mined.)
DannyHamilton
Legendary
*
Offline Offline

Activity: 2002



View Profile
February 19, 2014, 11:28:33 PM
 #3

According to the protocol specific given by BitcoinWiki, after a transaction is broadcast,  ""it may be included in a block that is published to the network". Here comes something trivial: When is the newly confirmed transaction written into a block? Suppose I am an average node and I received a transaction and verified it is valid. What is the next step for me? Do I write this transaction into the latest block? How to make sure all nodes have a specific transaction written consistently into the same block?
I am currently researching network consistency issues and security problems in the Bitcoin system. This problem seems to remains an unsolved issue given I have not misunderstood anything else. I appreciate any help from anyone professional. Thanks in advance.

Have you read the Bitcoin Whitepaper written by Satoshi Nakamoto yet?  If not, then you should do that *before* "researching network consistency issues and security problems in the Bitcoin system".

That being said.  If we are going to "Suppose you are an average node", then you will verify that the inputs are all valid previously unspent outputs that you know about.  You will also verify that the necessary signaures (or other script requirements) have been met.  Once you've confirmed that all the pieces of the transaction are valid, you will store the transaction in a memory pool, and relay it to all the peers that you are connected to.  That's it.  Not much more than that.

Now, if instead of supposing that you are an "average node", we suppose that you are a miner (or mining pool), then you will choose some of the unconfirmed transactions from your memory pool and will arrange them in a particular order.  You will also create a special "coinbase" transaction that has no inputs and pays out the current block subsidy split among as many outputs as you like (as long as you don't exceed the maximum transaction size).  You will take this list of transactions and compute a merkle root (this is a hash that is unique to this particular set of chosen transactions arranged in this particular order).  When choosing transactions, you will not include any transaction that is using an unconfirmed output as its input unless you also include that "parent" transaction in your block.  Then you will build a block header that includes the hash of the previous block, the merkle root of your chosen list of transactions, and a few other important pieces of information (such as the size of the block).  You will begin searching for a nonce value that will result in the hash of that block header being less than the current target difficulty.  Once you find a low enough hash, you will broadcast to all your connected peers the block with the appropriate nonce.  If your block is the first that any peer has heard about that uses the same "previous block" hash, then they will all validate the contents of your block and header.  Then they will add it to their blockchain and relay it to all their connected peers.  Any transaction that is included in the block that you built is now considered to be "confirmed" with 1 confirmations.

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!