3
1
I'm trying to understand a transaction's lifetime and haven't yet found a technical, linear "timeline" of events that occur when a P2P transaction occurs.
This is my understanding so far; please correct it as needed:
A person uses their RSA private key to sign a message saying "deduct X amount from my account and send it to YYY address(s)". In this message they also reference the current Block number.
The client application (wallet) sends this transaction to 6 nodes for "confirmation". (is the destination a miner or a wallet?)
?? What does confirmation actually do??
The mining nodes add those transactions to single message called a block (and save them in almost any order)
The mining nodes compete to find a SHA256(SHA256(x)) hash of the the block that starts with a predetermined number of zeros.
The first mining node (or node pool) to generate the winning hash collects a prize and increments the block count. (note this currently appears to take 30 minutes, and the block size is limited to 1MB)
The miners notify a wallet who then replicates the new block to anyone who requests it, and pushes the updates to a certain number of peers. Any block with a date difference greater than 120 minutes of system time is discarded.
Any in-flight transactions that reference the solved block have to be resubmitted by the original client and refer to the current block.
Conflicting transactions (double spends) are detected in the Bitcoin client and discarded.
The wallet will keep track of any forked chains and the chain with the most computational power backing it wins. This fork may occur due to netsplits or malicious activity). In addition no single wallet or central authority currently knows of all the invalid transactions, or forks that have occurred in the network.
Once 100 (or 120) confirms have been sent, the BTC generated with the block may be spent. source
To anyone stumbling on this question: Please note that it is generally preferred to ask specific questions instead of asking in a "check my answer" style as seen here. If you feel confident that your understanding is correct, rather post the question and put your own understanding into an answer where it will compete with other answers. If there are mistakes in it, people will tell you. – Murch – 2016-03-16T10:05:20.013
I'm the OP and totally agree with @Murch I wrote this long long ago, and would be deleted if not for the +4 voted answer(s) below. TP has a lot of great answers here... check his history out – goodguys_activate – 2016-03-16T13:33:36.433