0

It seems that for the 18.5 million bitcoins generated, plus even the 6.25 bitcoins that were rewards just 10 minutes ago, are all recorded in the blockchain (the ledger), but it just depends on who the owner (the address) is?

And if Peter sends Mary 0.001 bitcoins, then it is just the ownership change (which address has it), all the same number of bitcoins is all recorded on the blockchain.

5
  • 2
    I guess? I don't really understand what the question is. – ieatpizza Feb 4 at 11:38
  • 2
    The blockchain is more of a transaction journal, while the "UTXO set" is the ledger. Generally "statement + am I right" don't tend to work great as topic starters here. Could you please edit your question to ask more openly? E.g. "Where are bitcoins stored?", "How are Bitcoin balances tracked?", or "How does the Blockchain help keeping track of who owns how many bitcoins?" – Murch Feb 4 at 17:25
  • @Murch I think I can rewrite it as, "a question + what I research and found so far"... if I post it as a question, there are people who come up and say, "what have you found out so far", "we don't provide answer without seeing that you already putting in effort" – nonopolarity Feb 4 at 19:27
  • Mh, I think I understand what you mean, sorry if that was your experience. Usually, conveying your current understanding as a background for your question is very helpful. What I'm at a loss here is to get a sense of what further information you are trying to get here. I don't know what "it just depends on who the owner is?" is aiming at. Depends for what? It would help if the question managed to better convey what an answer should cover! :) – Murch Feb 4 at 19:33
  • I realized all of a sudden, that the blockchain actually states where all bitcoins in existence are at, no matter it is a collection of bitcoins, or each bitcoin, or a bitcoin fraction is at, and they are just in different mini-accounts called "address", so I just asked if this is the correct concept – nonopolarity Feb 4 at 20:58
4

Rabbit holes are deep

  • Bitcoin's blockchain doesn't really know who owns anything.
  • Bitcoins don't exist as things whose ownership can be reassigned.
  • Bitcoins have no individual continuity.

Yes the Blockchain effectively keeps track of changes of something that often corresponds to what we think of as ownership of money. However the blockchain cannot distinguish between Alice sending 1 BTC to Bob (money changing hands) and Alice sending 1 BTC to a different address in one of her wallets (rearranging her money, no change of ownership).

Wallets can process transaction data to keep track of a set of unspent transaction outputs (UTXOs) removing outputs that have been spent and adding newly created outputs.

The total monetary amount of the UTXO set should add up to 18.5 million (or whatever the quantity mined so far adds up to).

However the identity of bitcoins is not preserved. It is only the total amounts that always sum up to the correct current money supply.

If you think of UTXO's as coins, the mined transactions effectively melt all the input coins down and use the combined molten metal to cast a new set of coins. No coins change hands, all coins are destroyed in every transaction and new coins created.

For example in the following transaction there is no way to say that certain inputs correspond to certain outputs. This is true regardless of the amounts although you can sometimes make inferences. An exchange might consolidate several of its users transactions into one bitcoin transaction with dozens of inputs and dozens of outputs and there's no certain way to determine which inputs correspond to which outputs.

In block 669188 there is a transaction 1218…d33e. If you look at that in a blockchain explorer such as blockchair the details will be shown as

Senders

Amount Address
0.00149566 BTC 3PxGWkwnxQ88zQw8TgBiYrH4pQxhakmN16
0.05809775 BTC 3CDcCbis6dEBeksMY8uYhWyU3EaLN6vh82

Recipients

Address Amount
1C7cDqqGK5vscgPfD9d6gwcMw2tSRb4Q1Q 0.01076317 BTC
3BwbGdAidTuFLYdAhgVX1DgnoPCJ9fECRY 0.04809524 BTC

See footnote.

Where did the 0.00149566 BTC end up? At 1C7c…4Q1q or at 3Bwb…ECRY? No one can say, it may not be a meaningful question.

So the notion "the blockchain actually states where all bitcoins in existence are at" isn't meaningful because there are no things called bitcoins, there are only amounts of money specified in a unit of measure named Bitcoin.

The reality is simply that the total amount of mined bitcoin is kept track of as a list of amounts, each of which is associated with a bitcoin-script.


Footnote

The data under "Senders" doesn't all come from the transaction data directly. Inputs are specified by the transaction ID of a prior transaction they were created in (received in) and an index number into the list of outputs of that transaction.

You can look at the raw data, for example by clicking on "raw data" in the Blockchair web page. It will show a Hex and a JSON view of the actual data

0200000000010274d82567d8e55f9b25628093bd151289543e8630c3f18656cfcd090953cf2ab601000000171600140cabe7062ed5a42e1c6dc75efb708e980efc9aa9ffffffffbc06dcfee104538ef7c333cc16be005de31a4fecec6d766da23ecb2ae6bebda001000000171600148a1e82051ee5b269209d35aee915ca71c2d80a47ffffffff025d6c1000000000001976a91479e947df07c7941727d79ea4cac9b909c43d3c1c88ac346349000000000017a9147072ead5bae0971c1aed1b49b61a822b502c6b3d8702473044022038577fabbcee921e0b4613df3f1b146f32bcc8cde69f0a298b4e0d481231dff402204db6efa7e562a103e103679870188bc7953bea4a0dfed014d6f32dff55bc8d7b012102988d62c603eddc6bd7b4972b03a8173b497bf2647b1ea0a8d2bb64ad7aa22f1b02473044022029fd501198a4dc7692fefc4d48a63c5a6d5a2936215ce0b3a7b1fb449428f13a02201d4f354d61ebd81300e27361e064fb0628ad807f4308ded893238767b68351d4012102ee971f8d307d7b75de716c743b49b579b577b2247f75465820407347feced7d900000000

That's hard to make sense of so they provide a JSON view (or JSON interpretation):

{
  "txid": "1218039587a3fc96f0c6f3d0fb0d49404f54917a3d63cb52158a1ef84f27d33e",
  "hash": "cb44308832dfeceeba412633b937ebc3bbf5c4629a463f7fa04442b74c76d53d",
  "version": 2,
  "size": 420,
  "vsize": 258,
  "weight": 1032,
  "locktime": 0,
  "vin": [
    {
      "txid": "b62acf530909cdcf5686f1c330863e54891215bd938062259b5fe5d86725d874",
      "vout": 1,
      "scriptSig": {
        "asm": "00140cabe7062ed5a42e1c6dc75efb708e980efc9aa9",
        "hex": "1600140cabe7062ed5a42e1c6dc75efb708e980efc9aa9"
      },
      "txinwitness": [
        "3044022038577fabbcee921e0b4613df3f1b146f32bcc8cde69f0a298b4e0d481231dff402204db6efa7e562a103e103679870188bc7953bea4a0dfed014d6f32dff55bc8d7b01",
        "02988d62c603eddc6bd7b4972b03a8173b497bf2647b1ea0a8d2bb64ad7aa22f1b"
      ],
      "sequence": 4294967295
    },
    {
      "txid": "a0bdbee62acb3ea26d766decec4f1ae35d00be16cc33c3f78e5304e1fedc06bc",
      "vout": 1,
      "scriptSig": {
        "asm": "00148a1e82051ee5b269209d35aee915ca71c2d80a47",
        "hex": "1600148a1e82051ee5b269209d35aee915ca71c2d80a47"
      },
      "txinwitness": [
        "3044022029fd501198a4dc7692fefc4d48a63c5a6d5a2936215ce0b3a7b1fb449428f13a02201d4f354d61ebd81300e27361e064fb0628ad807f4308ded893238767b68351d401",
        "02ee971f8d307d7b75de716c743b49b579b577b2247f75465820407347feced7d9"
      ],
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 0.01076317,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 79e947df07c7941727d79ea4cac9b909c43d3c1c OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a91479e947df07c7941727d79ea4cac9b909c43d3c1c88ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "1C7cDqqGK5vscgPfD9d6gwcMw2tSRb4Q1Q"
        ]
      }
    },
    {
      "value": 0.04809524,
      "n": 1,
      "scriptPubKey": {
        "asm": "OP_HASH160 7072ead5bae0971c1aed1b49b61a822b502c6b3d OP_EQUAL",
        "hex": "a9147072ead5bae0971c1aed1b49b61a822b502c6b3d87",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [
          "3BwbGdAidTuFLYdAhgVX1DgnoPCJ9fECRY"
        ]
      }
    }
  ]
}

Note that the two inputs listed under vin are

txid vout scriptsig etc
b62a…d874 1
a0bd…06bc 1

So the two inputs are specified, not using an address and an amount but by specifying a source transaction and a position in the list of outputs (vout). There is also other data, essentially proof of right to spend. So the blockchain explorer can use txid & vout as an index to look up additional details of those inputs from its records of the specified earlier transactions (e.g. "date received" for each vin)

3
  • Good answer. One sort of nit: Outputs are locked to some spending conditions or locking script, which usually means requiring the signature of a specific key. This is well-represented by an address. But inputs identify which UTXO they are spending by the "outpoint", i.e. the transaction that created the output and its position in the output list of that transaction (txid:vout). :) – Murch Feb 5 at 1:10
  • @Murch, thanks for the clarification, I'll update my answer with a real-world transaction and expand on this a little – RedGrittyBrick Feb 5 at 11:41
  • Great clarifictation, and yeah, I must admit that most blockchain explorers represent it exactly in the way that you first showed it, so maybe I'm a bit out of line pointing out what it does under the hood. Thanks for your great posts! :) – Murch Feb 5 at 17:44
1

The blockchain only implicitly tracks the existence of each piece of Bitcoin. If you have experience with accounting, the terms "journal" and "ledger" may be familiar. The "transaction journal" is a list of all the transactions that were made in some period of time, for example one business day. At the end of the day, the accountant tallies up all the payments between accounts and updates the list of current balances in the "ledger".

Similarly, the blockchain journals the full history of all transactions and the Unspent Transaction Output set (UTXO set) represents the ledger of current balances. Unconfirmed transactions are payment promises until they get collected in a block. Once included in a block, they are committed into a fixed order, and the network continues burying them under more and more work. As more blocks get added, the likelihood of transactions getting replaced shrinks rapidly.

Each block represents an update to the global shared state of the ledger. The strict order of all transactions is what allows full nodes to perform the initial synchronization with the network. The full nodes process the complete blockchain transaction by transaction until they reach the current blockchain tip and have recalculated the shared ledger.

However, none of the balances are actually tied to any specific identities, rather each transaction output is encumbered by a locking script that defines the conditions under which its funds may be spent. The most common locking script types require a specific private key to provide a cryptographic signature when a UTXO is spent by an input. Generally, whoever can provide the signature is considered the owner of the funds—without ever needing to reveal their identity.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.