Bitcoin Forum
April 26, 2024, 05:29:07 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Question on How Transaction Verification Works on: December 27, 2017, 12:11:03 AM
So I have been trying to understand the process on how transactions get verified but have a few questions that I was hoping you guys could answer. My current understanding of a transaction is like this:

I send 1 bitcoin from my public key (signed with my private key) to another public key. This is then sent to the mempool of the nearest node and then if it meets the requirements of a valid transaction this is broadcast to all other nodes on the network. If I add a high fee to my transaction it will be picked up by a miner and added to a block quickly, if I select a low fee or no fee it risks staying in the mempool. If it is not picked up by a miner after a certain amount of time it will be returned to my wallet.

Question 1: How does the miner verify my transaction in the mem pool? Does the miner's software automatically reference all the existing transactions on the blockchain to ensure that my account has 1 bitcoin to send?

Questions 2: Are only valid transactions added to a block to be verified?

Question 3: It is my understanding that a block needs an even number of transactions in a block in order to hash down to a merkle root. If transactions are in fact verified in a block and not in the mempool, is an additional transaction added to the block when one is discarded so that there are an even number of transactions to hash down to a merkle root?

Question 4: Do miners create their own custom software or are all miners running the exact same software?

If anyone could help me understand the exact path a transaction goes through from start to finish I would really appreciate it. I looked around for answers, but most didn't go into enough detail.

EDIT: Please move this to the newbie forum. Sorry for posting in the wrong section  Undecided
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!