Hi all - I had a question.
Hi
I just started a full node using bitcoin core and it is currently syncing/validating the past blockchain and catching up. I understand that the default setting in bitcoin core is that non-wallet transaction data is not stored on your harddrive in the blockchain data. My questions are then:
1. How does my node verify/validate the past blocks without knowing the transactions from that block? I'm assuming other nodes don't store the transaction data so how is it that my node obtains the transactions to do a full validation of the particular block?
All transactions that ever been made on the Bitcoin network are in the block chain that you are downloading, including "non-wallet transactions".
1. Having downloaded all the transactions, your node is able to verify the merkle root and the hash the next block contains. Your assumption is wrong, if no more nodes (or a few ones) store past transactions then a new node joining the network would have (more or less) to trust some entity.
2. If the transactions are not stored on my computer, how do I have a full copy of the blockchain? I thought this was one of the points of running a node - you have a full backup of the entire blockchain. How could I reproduce the entire blockchain (if needed) without having the transaction data within each block?
See the answer to 1.
3. If transactions are not stored, what exactly is stored in the block data and how is that useful?
A block is composed of a header (with metadatas such as a timestamp, a version, the previous block hash (to make a chain), the target, the merkle root (a ~smart hash of all the transactions this block contains, the nonce) and transactions (preceded by a transaction count).
4. If transaction data is not stored in the block data of your computer (ie: txindex=0), how can you reproduce all the transactions if needed without having to download anything or connect to intenet to get it from other nodes if say you were the last node with a copy of the blockchain (eg: in case of an emergency if say, theoretically, all blockchains were somehow deleted and mine was the only one left)?
would really appreciate your help!!
If you didn't prune (and you would even in this case have downloaded the blocks then have deleted part of them), then you have all the transactions that were ever made on the network.