How is transaction history stored on the blockchain?

How is transaction history stored on the blockchain?

I understand that each block on the Bitcoin blockchain contains a list of transactions, but let's assume (for the sake of this question) that the block in question contains only a single transaction--and that this particular transaction has a history of previous transactions (i.e., it was not a coinbase transaction). How would I figure out which block holds this single transaction's previous transaction(s)? I know that each transaction contains the hash of the previous transaction--but how do you find that hash without looking into every block on the blockchain? In other words, how can I quickly discern a transaction hash chain for a given transaction ID? Any links to explanations or previous questions would be appreciated--I tried searching and haven't seen anything that answers my question to my satisfaction.

Thank you.

https://ift.tt/2KKKzY6

Comments

Popular posts from this blog

bitcoin node: what is the difference between simnet and regtest?

How to check if Electrum is masking my IP with the Tor proxy?

How generic miner connects to bitcoin or ethereum network and does it needs to store entire blockchain?