The Relaxed Synchronicity Requirements of Soft- and Hard-forking Changes for Non-mining Nodes
We begin with three definitions to make our language precise.
Def. 1. CONSENSUS RULE SET.
The set, C, of all rules used by a given node to determine which transactions or blocks are invalid. If C = ∅ (the empty set), then all transactions and blocks are valid.
Def. 2. SOFT-FORKING CHANGE.
A pure increase in a node's consensus rule set. If C is the rule set prior to the soft-forking change and C' is the rule set after the change, then C' is a strict superset of C (i.e., C' ⊃ C). The new rule set is more restrictive.
Def. 3. HARD-FORKING CHANGE.
A pure decrease in a node's consensus rule set. If C is the rule set prior to the hard-forking change and C'' is the rule set after the change, then C'' is a strict subset of C (i.e., C'' ⊂ C) . The new rule set is more permissive.
Next we propose a simple theorem and corollary.
Theorem: REVERTING A SOFT-FORKING CHANGE IS A HARD-FORKING CHANGE.
Proof: If C_f is the rule set after the soft-forking change and if C_i is the rule set before, then by Def. 2, C_f must be a strict superset of C_i (C_f ⊃ C_i). By Def. 3, moving back from C_f to C_i is thus a hard-forking change (because C_i ⊂ C_f)
Corollary: REVERTING A HARD-FORKING CHANGE IS A SOFT-FORKING CHANGE.
Proof: see above (in reverse).
With that out of the way, we now get to the meat of this post. Since we have a lot of experience with successful soft-forking changes, let's ask what a soft-forking change to reduce the block size limit from 2MB to 1MB would look like. Since we know that a hard-forking change is a soft-forking change in reverse (cf. the theorem's corollary), perhaps there's something we can learn. (I use the example of the block size limit because it's a topic of current interest, but the logic applies to other changes as well.)
WHAT WOULD A SOFT-FORKING CHANGE FROM 2MB BACK TO 1MB LOOK LIKE?
Ans. Miners would coordinate some time in the future, t0, where they agree to no longer build on top of blocks greater than 1MB; that is, at time t = t0 they would enforce the more-restrictive rule set C_1mb rather than C_2mb (C_1mb ⊃ C_2mb).
The synchronicity requirements on non-mining nodes are relaxed. Non-mining nodes may elect to enforce the restricted rule set (i.e., begin rejecting blocks greater than 1MB) at any time t >= t0. However, they CANNOT enforce the restricted rule set for t < t0, without the risk of forking themselves off the network.
WHAT SHOULD A HARD-FORKING CHANGE FROM 1MB TO 2MB LOOK LIKE?
Ans. Miners would coordinate some point in the future, t0, where they agree to build on top of blocks greater than 1MB; that is, at time t = t0 they would enforce the less-restrictive rule set C_2mb rather than C_1mb (C_2mb ⊂ C_1mb).
Once again, the synchronicity requirements on non-mining nodes are relaxed. Non-mining nodes may elect to stop enforcing the old rule set (i.e., begin accepting blocks greater than 1MB) at any time t <= t0. However, they CANNOT continue to enforce the old rule set for t > t0, without the risk of forking themselves off the network.
TL/DR: The main point is that from the non-mining nodes' perspective, synchronous coordination is not required for either soft- or hard-forking changes. For a soft-forking change, nodes can upgrade asynchronously after the miners start enforcing a new rule. For a hard-forking change, nodes can upgrade asynchronously before the miners stop enforcing an old rule.
HOW CAN WE USE THESE RELAXED SYNCHRONICITY REQUIREMENTS TO MAKE HARD-FORKING CHANGES EASIER?
The answer is that we should give non-mining nodes the ability to easily reduce their consensus rule sets before the hard-forking event, along with a way for them to signal those changes to the network. This parallels what we’ve done successfully for soft-forking changes (i.e., allowing nodes to continue enforcing the old rule set after the change was activated).
For example, there is no reason Coinbase, Xapo and BitPay's non-mining nodes need to enforce a 1MB block size limit today. These companies could declare "from this day forward, our nodes will accept any block composed of valid transactions that is less than X MB in size" where X is > 1MB. If other economically-important nodes follow their lead, it would alleviate the false coordination problem that is presently adding friction to the block size limit increase.
We begin with three definitions to make our language precise.
Def. 1. CONSENSUS RULE SET.
The set, C, of all rules used by a given node to determine which transactions or blocks are invalid. If C = ∅ (the empty set), then all transactions and blocks are valid.
Def. 2. SOFT-FORKING CHANGE.
A pure increase in a node's consensus rule set. If C is the rule set prior to the soft-forking change and C' is the rule set after the change, then C' is a strict superset of C (i.e., C' ⊃ C). The new rule set is more restrictive.
Def. 3. HARD-FORKING CHANGE.
A pure decrease in a node's consensus rule set. If C is the rule set prior to the hard-forking change and C'' is the rule set after the change, then C'' is a strict subset of C (i.e., C'' ⊂ C) . The new rule set is more permissive.
Next we propose a simple theorem and corollary.
Theorem: REVERTING A SOFT-FORKING CHANGE IS A HARD-FORKING CHANGE.
Proof: If C_f is the rule set after the soft-forking change and if C_i is the rule set before, then by Def. 2, C_f must be a strict superset of C_i (C_f ⊃ C_i). By Def. 3, moving back from C_f to C_i is thus a hard-forking change (because C_i ⊂ C_f)
Corollary: REVERTING A HARD-FORKING CHANGE IS A SOFT-FORKING CHANGE.
Proof: see above (in reverse).
With that out of the way, we now get to the meat of this post. Since we have a lot of experience with successful soft-forking changes, let's ask what a soft-forking change to reduce the block size limit from 2MB to 1MB would look like. Since we know that a hard-forking change is a soft-forking change in reverse (cf. the theorem's corollary), perhaps there's something we can learn. (I use the example of the block size limit because it's a topic of current interest, but the logic applies to other changes as well.)
WHAT WOULD A SOFT-FORKING CHANGE FROM 2MB BACK TO 1MB LOOK LIKE?
Ans. Miners would coordinate some time in the future, t0, where they agree to no longer build on top of blocks greater than 1MB; that is, at time t = t0 they would enforce the more-restrictive rule set C_1mb rather than C_2mb (C_1mb ⊃ C_2mb).
The synchronicity requirements on non-mining nodes are relaxed. Non-mining nodes may elect to enforce the restricted rule set (i.e., begin rejecting blocks greater than 1MB) at any time t >= t0. However, they CANNOT enforce the restricted rule set for t < t0, without the risk of forking themselves off the network.
WHAT SHOULD A HARD-FORKING CHANGE FROM 1MB TO 2MB LOOK LIKE?
Ans. Miners would coordinate some point in the future, t0, where they agree to build on top of blocks greater than 1MB; that is, at time t = t0 they would enforce the less-restrictive rule set C_2mb rather than C_1mb (C_2mb ⊂ C_1mb).
Once again, the synchronicity requirements on non-mining nodes are relaxed. Non-mining nodes may elect to stop enforcing the old rule set (i.e., begin accepting blocks greater than 1MB) at any time t <= t0. However, they CANNOT continue to enforce the old rule set for t > t0, without the risk of forking themselves off the network.
TL/DR: The main point is that from the non-mining nodes' perspective, synchronous coordination is not required for either soft- or hard-forking changes. For a soft-forking change, nodes can upgrade asynchronously after the miners start enforcing a new rule. For a hard-forking change, nodes can upgrade asynchronously before the miners stop enforcing an old rule.
HOW CAN WE USE THESE RELAXED SYNCHRONICITY REQUIREMENTS TO MAKE HARD-FORKING CHANGES EASIER?
The answer is that we should give non-mining nodes the ability to easily reduce their consensus rule sets before the hard-forking event, along with a way for them to signal those changes to the network. This parallels what we’ve done successfully for soft-forking changes (i.e., allowing nodes to continue enforcing the old rule set after the change was activated).
For example, there is no reason Coinbase, Xapo and BitPay's non-mining nodes need to enforce a 1MB block size limit today. These companies could declare "from this day forward, our nodes will accept any block composed of valid transactions that is less than X MB in size" where X is > 1MB. If other economically-important nodes follow their lead, it would alleviate the false coordination problem that is presently adding friction to the block size limit increase.
Last edited: