So if I have a bitcoin wallet and I make a transaction. It gets propagated throughout each node, and once...
- a node receives enough transactions it starts to compute the next block. (Blocks created ASAP throughout entire network, no lag other than when nodes after the initial node start computing; lag is specific to your path length to the initial node)
No, miners are ALWAYS working on the next block. They don't wait for "enough transactions". They just work with whatever transactions currently exist in the memory pool that are not yet in a block.
- everyone gets enough transactions we all can start computing after some signal we all agree on. (Blocks created on average related to the average network communication time, no lag between nodes when race starts)
The race starts as soon as the previous block is received. This means that the person who computed the previous block actually has a very slight headstart on the new block, and the last person to hear about the recently completed block has lost some time that they could have been working on the new block. This acts as an incentive for miners and pools to attempt to be well connected to many fast nodes, allowing them to hear about any solved block as soon as possible. Additionally, if someone else solves and broadcasts a block before you can broadcast your own solved block, each node on the network will choose the first valid block that it hears about, adding further incentive to a miner to be well connected to propagate any block they solve as fast as possible, and eliminating the incentive to hold on to the current solved block while getting a head start on the next block.
- someone/thing notifies nodes with some sort of information about the next block and makes it possible to start computing the block. (Blocks created in time intervals set by whoever sends info; user with most transactions get to start the computing, nodes after this experience lag the same as the first^)
Not sure what you are saying here. The receipt of a new valid block is the signal to immediately begin working on the next block. The time interval to find a block is random, but the target hash value is such that the long term average works out to be about 10 minutes per block.
The last means we still have to send the info to the to all nodes and whoever gets it first can peek before others get it and start first so I don't think that is the case. Now that I said that number two is out because we still have to signal all nodes and set some time to start computing that is fair. (two generals paradox?
http://en.wikipedia.org/wiki/Two_Generals%27_Problem)
Receipt of a completed block is a signal to start working on the next block. If you don't receive the current completed block, then you continue to work on the wrong block. Eventually when your communications improves, you hear about the recently completed block from a peer, and give up on the one you were working on and move to the next. Every node already has all the information it needs to work on a block. It needs to know what the hash value was of the most recently completed block, and it needs a list of transactions in its memory pool that it can put into the next block that it works on.
So either there is a set size when someone can start and thus who ever makes the most transactions ( + received possible transactions) has the edge to getting to start the next block, or I haven't thought of something.
There is no set size. As a matter of fact, it is entirely valid to create a block that has ONLY the one transaction that pays the block subsidy to the miner and no other transactions at all. If the node happens to have some transactions in the memory pool, then this is a foolish thing to do, since you would be passing up on the opportunity to collect the transaction fees from those transactions.
Hopefully my last few questions...
- So how exactly is the new target hash generated between the nodes, is there a technical page I could read?
Every node generates the new target independently. Since they are all working from the same blockchain as the input to their calculations, they all compute the same target. Is the following link enough detail to answer your question, or would you prefer a link to the actual function that runs in every node?
https://en.bitcoin.it/wiki/DifficultyThe difficulty is adjusted every 2016 blocks based on the time it took to find the previous 2016 blocks. At the desired rate of one block each 10 minutes, 2016 blocks would take exactly two weeks to find. If the previous 2016 blocks took more than two weeks to find, the difficulty is reduced. If they took less than two weeks, the difficulty is increased. The change in difficulty is in proportion to the amount of time over or under two weeks the previous 2016 blocks took to find.
- And how exactly does "The software running on every node and every miner compares the hash to the expected difficulty that they have independently calculated based on the publicly available blocks that are currently part of the blockchain", again any technical pages you know?
The answer to this is the same as the previous question.