0

So I understand how blockchains work[1]. I understand how proof-of-work works[2]. And I understand how they work together. I also understand (or at least I think I do :) how transactions work (A block can contain arbitrary data inside of it, so it can contain a message signed by A that he transfers 5 btc to B).

But where does the bitcoin itself fit in this picture?

Is it a recalculated number every time (so if A gives 1 btc to B, then if I want to confirm, I verify that A has 1 btc to give away by checking who sent him anything, and make sure that he has what to give away, etc. up until the miner's bounty)? If so, this would have to be done whenever a block is mined (if not, I (who have 0 btc in my "wallet") can certify that I give B 100 btc, mine a block, and include that transaction. And while the blockchain on its own would still work (meaning that the hashes work out and solve the proof-of-work), the accounting wouldn't).

Am I making sense or am I totally off?

[1]. It's a linked list, but instead of linking-by-address, it's a link-by-hash.

[2]. Change a part of the Node so that the node's hash would start with 100 zeros, for example.

1 Answer 1

0

There is more to a blockchain than just a linked list of hashes and a proof of work. There's more to Bitcoin than just a linked list of hashes and a proof of work. What defines Bitcoin and its blockchain are the consensus rules. These are a set of rules that determine what constitutes a valid block and a valid transaction. The blockchain is a linked list of blocks which contain transactions that conform to the consensus rules. Every block in the blockchain must also conform to these consensus rules.

One of the consensus rules is that a transaction cannot create more value in its outputs than it spends in its inputs. It can create less value, and the difference is the transaction fee. But it cannot create more value as that would lead to infinite inflation and Bitcoin would not work as a monetary system. This rule is completely independent of the linked list of hashes and completely independent of the Proof of Work.

Furthermore, there is no such an object as a Bitcoin. What people refer to as Bitcoin are simply values associated with transaction outputs. There aren't actually Bitcoins; it is solely based around the transactions and their outputs.

6
  • transaction cannot create more value in its outputs than it spends in its inputs So how does the network verify inputs?
    – btc
    Apr 16, 2018 at 23:13
  • A transaction creates transaction outputs. These transaction outputs are spent as inputs in other transactions. They have an associated value and a set of conditions required to spend that output. So verification means that a node will look up the transaction output that is being spent from (as it is directly referenced in the input) and makes sure that the transaction spending that output provides the necessary information required to spend that output as well as recording its value for use later in validating the transaction.
    – Andrew Chow
    Apr 16, 2018 at 23:22
  • So a miner verifies the contract it puts into the blockchain? And what if it cheated and put it in even if it was illegal? Does every miner upstream verify each contract?
    – btc
    Apr 17, 2018 at 1:48
  • Not just miners, full nodes (which miners are a subset of) verify all blocks and transactions. If a block contains an invalid transaction, then all full nodes (including other miners) will reject that block for violating the consensus rules and continue as if that block did not exist. The miners are not the ones who determine whether a transaction is valid; full nodes determine that for themselves.
    – Andrew Chow
    Apr 17, 2018 at 2:28
  • Thanks for this answer!! Just one small question, according to this answer, as of six years ago there were almost 10 million transaction recorded in the blockchain. How far back is each transaction verified (in the official software)? And (just curious here) have there been any (in the wild) attempts at double-spending in collusion with a miner that were stopped by others?
    – btc
    Apr 17, 2018 at 6:10

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