3

There are some rules called consensus rules, for example the block generation amount.

And it is said that "a change to consensus rules is a hard-fork".

But how exactly are the consensus rules enforced?

The internet says that the consensus rules are the rules that every full node follows. And every node rejects blocks that do not meet consensus rules "no matter what".

Ok.

But.

Must ALL of the full nodes accept? Or should MOST of the full nodes accept? Or is there some "holy full node" that must accept?

What if one controls 90% of all full nodes and decides to accept blocks with, say, 200 BTC/block? What if one controls 90% of the hashpower AND 90% of all nodes AND 90% of all full nodes?

Is full node software "signed" in some way to prevent modification to consensus rules?

Murch
  • 75,206
  • 34
  • 186
  • 622

3 Answers3

4

But how exactly the consensus rules are forced?

Every single full node enforces them.

Internet says that the consensus rules are the rules thet every full node follows. And rejects blocks that do not meet consensus rules "no matter what".

Correct.

Ok.

But.

Should ALL of the full nodes accept? Or should MOST of the full nodes accept? Or is there some "holy full node" that must accept?

It doesn't matter to me what your full node does. It doesn't matter to me what anyone else's full node does. Mine enforces the consensus rules as I understand them.

What if one controls 90% of full nodes and decides to accept blocks with, say, 200btc/block? What if one controls 90% of hashpower AND 90% of all nodes AND 90% of all full nodes?

Then one has a network that won't interoperate with anyone else because it doesn't follow the consensus rules and so everything it says looks like garbage to everyone else. As far as the rest of the world is concerned, 90% of the hashing power just stopping mining valid bitcoin blocks. They won't try to make sense of the garbage that person is generating because they have no idea what it means. How would they know what the rules are that make that data sensible?

How would I even know that those blocks have a 200 BTC reward? The very same rule set that tells me where to look in the block to figure out the reward also tells me that the reward is not 200 BTC. How would my node even know how to make sense of that? Of course, it wouldn't. It would say, "that's not a block, it's some garbage that I can't make sense out of" and ignore it.

The rules my bitcoin full node follows don't provide any way to specify a block reward over 50 BTC. There is simply no way to get my full node to accept that such a thing exists because it's coded not to.

Is full node software "signed" in some way to prevent modification to consensus rules?

No. Everyone is permitted to follow whatever rules they want. Of course, they can only interoperate with people who have agreed to follow the same rules. If they cannot agree, then the network can fork with the people who have chosen different rules winding up on different blockchains.

David Schwartz
  • 51,554
  • 6
  • 106
  • 178
2

Is full node software "signed" in some way to prevent modification to consensus rules?

No. You can accept/reject/implement any rule. You can do whatever you want with your client. There is no central authority in bitcoin infrastructure to control you.

amaclin
  • 6,760
  • 1
  • 21
  • 32
1

And it is said that "change to consensus rules is hard-fork".

Only changes that allow previously invalid blocks are hardforks. When the new rules restrict valid blocks to a subset of the previous rules, it's a softfork. See What is a soft fork? for a full explanation.

Should ALL of the full nodes accept? Or should MOST of the full nodes accept? Or is there some "holy full node" that must accept?

Consensus rules are enforced by every node individually, and thus, every user decides for themselves what rules to accept by choosing what software to run. If only "most nodes" accept a rule, that's their choice, but doesn't force the remaining nodes to follow the same chain. Specifically, a node following the old rules receiving a block with a higher reward, would consider the block invalid, thus ignore the block's content and ban the relaying peer for relaying invalid information.

In your example where one party controls 90% of the nodes, 90% of the hashpower and 90% of the fullnodes, and unilaterally increases the block reward to 200 BTC, the other nodes will consider such a block invalid and not follow the chain. From their perspective 90% of the hashpower would have left the Bitcoin network. If they wanted to follow the chain with the chain, they would have to run new software that accepts this new set of rules. On the other hand, some lightweight nodes might be misled to follow the attacker's chain because they don't check this rule.

Murch
  • 75,206
  • 34
  • 186
  • 622
  • Ok. From other full node's perspective these 90%node's have left the network. But from user's perspective (lightweight nodes) they won't. Right? The block is in the chain, as per 90%of the node's opinion, so everything's ok. Or not? If not - why? – Dmitry Andrievsky Nov 01 '17 at 16:32
  • 1
    That depends on which rule was broken and on the subset of rules the lightweight node checks. Most lightweight nodes would probably accept a block with a higher block reward if it's the longest chain they know about. – Murch Nov 01 '17 at 16:35
  • And then it seems to be "money from nothing" situation, does it not? – Dmitry Andrievsky Nov 01 '17 at 16:38
  • Well, if one party controls 90% of the hashrate, 90% of the full nodes and 90% of the nodes, they would not have a lot of economic activity between those, as sending money to yourself is a no-op. So, almost all economic activity would be on the 10% chain, and it seems pretty obvious that the 90% chain would just be ignored. This has happened by the way: The miners tried to keep the 50 BTC reward at the first halving, but quickly switched to the standard rules when everyone ignored their blocks. – Murch Nov 01 '17 at 16:41
  • Well, let's think theoretically. You control 90%, you earn 100k btc with one block, you sell it at 6k/btc. May be economically justified, if don't in time. – Dmitry Andrievsky Nov 01 '17 at 17:03
  • And those wanted to keep 50 reward, did they control 50+%? Can you share a link to a story? – Dmitry Andrievsky Nov 01 '17 at 17:04
  • 2
    @DmitryAndrievsky: You're not earning Bitcoin, though, you're earning coins on your own chain that only you are following. So who's supposed to be buying that? When you try to send it to them, they're not going to see it being received. They'll think you're defrauding them. – Murch Nov 01 '17 at 17:14
  • Well. You - who? 90% of the network? Most of the users will accept the chain, won't they? 10% will not, ok. – Dmitry Andrievsky Nov 01 '17 at 17:19
  • 2
    @DmitryAndrievsky {link1} {link2} – amaclin Nov 01 '17 at 21:59