By saying "
non-wallet transaction", I would guess that you're talking about
txidex=0 default.
With txindex disabled, you won't be able to get the transaction data using RPC from other transactions other than the ones in your wallet.
If it isn't a pruned node, the full blockchain will be stored as blk.dat in your drive regardless of the txindex settings.
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?
Nodes are programmed to check each block from syntax errors to network rules violation, if there's something wrong, it will be rejected.
When it comes with previous blocks, the
block header in each block that contains the
merkle root is enough to verify them.
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?
Transactions are stored in the blocks (
blk00000.dat~ in your computer).
Actually (
as an answer to 3 and 4) you can use a block parser to convert the raw (
binary) data into HEX or human-readable format.
Example:
Readable: Block height 443870 /
HEX: Block height 4438703. If transactions are not stored, what exactly is stored in the block data and how is that useful?
Bunch of 0's and 1's
