How is the Bitcoin Public Ledger stored?
I'm trying to create a functional replica of the Bitcoin protocol, albeit at a smaller scale, for an academic project. As far as I'm aware, the Bitcoin Public Ledger is a list of all BTC transactions ever made. But how is it stored?
How is the ledger stored on every node? Is this the ledger? Where is the data stored in Bitcoin?
After reading these 3 posts, what I understand is that every node (with a few exceptions) stores the entire transaction history, and the way the protocol works ensures that it is very difficult and impractical to introduce fake transactions into the blockchain.
However, if, somehow, there are 2 nodes whose ledgers have conflicting transaction histories, how is it decided on which version all the users must go by? (Because according to this answer, there is no official/centralised copy of the ledger, and all copies are equally valid.)
from Recent Questions - Bitcoin Stack Exchange https://ift.tt/Ak2R3Bw
via IFTTT