1
I had a few questions. I've looked extensively online and can't seem to get answers right on point.
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:
Is transaction specific data (ie: bitcoin address, time, inputs/outpus, etc...) stored in any of my raw data (eg: blk.dat file)?
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?
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?
If transaction are not stored, what exactly is stored in the block data and how is that useful? Is there a way to decode or use a mechanism to obtain the transaction information from the raw block data files?
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)?
Do I need to enable txindex=1 to have raw transaction data stored on my node? Or is it stored and accessible if needed without this enabled?
would really appreciate your help!!
Thank you so much, very helpful. Two follow ups:
So basically, if I ever needed to, I could use the raw data saved on my hard drive (with txindex=0) and (with tools mentioned above) create my own blockchain explorer detailing every transaction (inputs, outputs, etc...) without needing to obtain that information from any other nodes? I'm just thinking the hypothetical/theoretical situation where my computer has the only copy of the blockchain left and people rely on me to propagate all the transaction information.
Related to the above, isn't not having timesamps per tx an issue?
>yes you can.
no because all transactions are included in a block, which is timestamped
< – JBaczuk – 2019-03-29T16:17:19.187
Thank you. Ok one final question re: #1. You mentioned above the bitcoin addresses aren’t stored so how do you recreate the transactions without the bitcoin addresses? – leafsfan1967 – 2019-03-29T16:35:19.830
My pleasure. There are only a few types of addresses, and they are just encoded versions of
scriptPubkeysin each transaction output, so you can detect thesescriptPubkeysand encode them into addresses for the explorer. I suggest reading up on what an address is. – JBaczuk – 2019-03-29T16:42:02.157