[moved from Technical Support]
Hi,
Im new to Bitcoin, find it fascinating, and have been trying to understand how all the pieces work. Here are a few questions Ive been wrestling with...
When I started the Bitcoin client for the first time it spent several hours downloading (I think) all the blocks. What exactly was it downloading? Was it the full data for every block with every committed transaction ever? Or was it something smaller, like maybe just a few important fields from the block? And related to this, how much of what my client downloaded did it retain? (E.g., does it download a lot of detail, verify it, and then keep just some hash of this, like say the Merkle tree?)
On a related note, how does my client verify that a transaction is good (if its even possible for it do this)? I know there are a lot of pieces to the verification but the particular point Im wondering about is how it confirms that a particular transaction input is in fact the output of an earlier transaction. It seems to do this my client would either need to have (1) the full contents of the inputs block; or (2) the full Merkle tree of the inputs block; or (3) the Merkle root of the inputs block + the Merkle branch of the input transaction. (1) seems unlikely since thats a lot of data (I believe this is what a full node has). (3) doesnt seem possible because AFAICT the protocol for a transaction doesnt allow for including a Merkle branch. So I guess then its either (2) or something else entirely.
Thanks for your help!