Hard and soft bifurcation bifurcation in the end is what?

Hard and soft bifurcation bifurcation in the end is what?

The zeroth chapter is introduction

 

Bitcoin is a set of software, modifying and upgrading often involves two concepts of software code, called a hard bifurcation, a soft bifurcation. What does it mean? The most common definition of community is to modify the consensus. But the “consensus” what specific means, it is difficult to understand. We are still more practical to modify the code level under their definition.

 

The first chapter bitcoin transaction format and transaction history

 

In the understanding of what is before the hard and soft bifurcation bifurcation, we need to know both what to change.

Bitcoin transactions have double meanings in Chinese, which is a key of hard and soft bifurcation bifurcation often misunderstood.

Bitcoin trading one means the us send bitcoin uniform use of data structure , which is a set of rules, all of us send bitcoin, no matter what you use this wallet software must obey a set of rules. It is defined as a data structure, each field which represents what it means. All software can understand the meaning of the wallet.

Bitcoin transactions another meaning is that people use bitcoin between sending bitcoin events. For example, I sent 0.12345BTC to you, this is a transaction. All these send bitcoin events constitute a bitcoin transaction history, the main content of which is currently composed of bitcoin complete node more than 80 G data. All of these records can be in the blockchain browser can check to you, as long as the blockchain browser type your bitcoin address can be found in all of your trading records.

Make a simile. The transaction format is similar to others that we go to the bank to fill in the remittance remittance, remittance remittance defines the name, identity card, mobile phone number, account number, amount, payee name, account number…… Other information. Bitcoin trading format also provides the sender of the information and the payee information, but this information and identity information to specific information to fill out the provisions of bitcoin transactions see next chapter.

 

The transaction format and block format chapter second bitcoin

 

Bitcoin transaction history of this concept we are easy to understand, is not to say, there is nothing to say. But bitcoin transaction format, data structure is the key to explain the transaction, you can not understand what is called hard and soft bifurcation bifurcation.

A bitcoin transaction is one containing the values of inputs and outputs the data structure, the data structure will be implanted a sum of money from the initial point (inputs) transferred to the target address (output value) of the code information. The data structure contains some fields, we see with these fields, from the “master bit the fifth chapter” coins.

All bitcoin wallets are in accordance with the provisions of this form the way to send bitcoins, otherwise in the bitcoin network will not be identified, the transaction is invalid. This is like you go to the bank remittance, you don’t follow the remittance fill bank will not accept.

Bitcoin network will on average 10 minutes, each node sends the transaction and then collected into a package, called blocks, cover the time stamp, and then added to the block chain. What is the area?

Block is the polymerization of the transaction information (i.e. the average ten minutes on each node of a network of bitcoin transactions) container data structure. It consists of a metadata area followed by a block size and body a long string of transaction composition. The data structure is defined as a block like the following.

All the wallets mining in accordance with the provisions of the table the way to package block, otherwise in the bitcoin network will not be complete other node identification (SPV node not), also will be considered invalid transaction.

 

The third chapter of hard and soft bifurcation bifurcation of the “official” definition

 

Hard and soft are the definition of bifurcation bifurcation in bitcoin.org, but the definition is fuzzy, in order to prevent nonsense (question definition, bitcoin.org really made me with profound respect and humility.) Excerpts from the text, i:

Hard fork is defined as such:

A permanent divergence in the the block chain, commonly occurs when non-upgraded nodes can t validate blocks created by “upgraded nodes that follow newer consensus rules.

Https://bitcoin.org/en/glossary/hard-fork

The blockchain permanent differences in the new consensus rules after the release, no upgrade node cannot verify part has upgraded the node production block, usually rigid bifurcation occurs.

This is the definition of soft bifurcation:

A temporary fork in the block chain which commonly occurs when miners using non-upgraded nodes violate a new consensus rule their nodes don t know about. “

Https://bitcoin.org/en/glossary/soft-fork

When the new consensus rules after the release, no upgrade node will because they do not know the new consensus rule, and the production of illegal block, will produce a temporary branch.

On the implementation of community block expansion is hard or soft bifurcation bifurcation of the dispute, I guess bitcoin.org on the two fuzzy definition should bear the main responsibility. The biggest responsibility is in the original “consensus rules (consensus rules)” definition is not clear, if we go to the bitcoin.org search for “consensus rules (consensus rule)” what is the meaning of the original is so:

The block validation rules that full nodes follow to stay in consensus with other nodes.

Https://bitcoin.org/en/glossary/consensus-rules

The complete node and other nodes in order to maintain the consensus and validation rules to follow block.

The consensus definition is logically made a circular authentication fallacy, this definition is “the consensus is that in order to maintain the consensus rule.” this and schurrle said is the same: “living well is meaningful.” “What is a good life?” “To live is to do meaningful things.” In fact, he did not answer what is a good life, and what is meaningful.

In addition to these two definitions in the hard bifurcation defined as “permanent divergence (permanent branch)”, and the soft bifurcation defined as “temporary fork (temporary branch)”, this is almost the definition of wordplay, let the community many people are afraid of hard branch. Think hard branch is a very terrible thing.

To tell the truth, this article outline written in my mind for a long time, but I did not dare to write, because I doubt but bitcoin.org the definition of holy land. I have been reading the bitcoin.org bitcoin protocol definition, couldn’t find me on the description. I have asked many major domestic V, did not get a complete answer. Lovers soft forked made a lot of articles to the propaganda soft forked days community, called for a boycott of the hard fork, I read after my reasoning after in my knowledge, I am sure they are wrong. They are from the source of the error of “consensus” understanding is a kind of false representation, simply do not know what specific means, as long as mentioned in the “consensus” is sacred, all the logic and reasoning to the “consensus” stopped.

Since the soft and hard without a bifurcation bifurcation abstract definition, then we start from them in the end what was done to the analysis.

 

The implementation of the soft case upgrade bifurcation chapter fourth bitcoin block chain

Bitcoin block chain in recent months before implementation of a software upgrade is the BIP68/112/113 bifurcation, entry into force of the bitcoin protocol, by the community called CSV soft bifurcation. Around 2016 June upgrade is complete. This soft forked end changed where bitcoin code? To answer this question, we need to go from the bitcoin transaction data structure to find the answer.

Bitcoin transaction data structure in CSV soft branch before and after what happened?

The field map in the scarlet letter is bold CSV soft bifurcation the main changes of the place. Before CSV bifurcation, this field is a “serial number (currently unused transaction replacement function)”:

It is because the original bitcoin transaction data structure in a field which is not used, or was fuzzy definition, so it can be used to define. This is not a clear definition of the fields in the bitcoin complete version of the old node will not be carefully validated, the new version of the node in accordance with the definition of the rules of the production of a new block, can also be the old version of the receiving node verification. This is the specific process of soft bifurcation.

But this is clearly not a long-term solution, because this is such a field, you once, which later have no.

Bitcoin in 2012 there is a significant upgrade, called P2SH, is a community called multi signature soft bifurcation. This is a revised bitcoin transaction signature script, making bitcoin can easily through multiple ways to send transaction signature. The revision of what?

The field map in the scarlet letter is bold signature soft major changes in the local bifurcation. Start Nakamoto definition of this field is called P2PKH (Pay-to-Public-Key-Hash, paid to the public key), the field can have 5 types of script.

Because after the multi signature soft bifurcation, no upgrade node node in the verification has updated the block, for this new P2SH lock script can also be validated, so this is a soft bifurcation.

More than two soft bifurcation are bitcoin transaction data structure modification. Can modify the soft forked bitcoin transaction history form.

In August 15, 2010, there is a loophole by a hacker bitcoin code, in the 74638th block height brush out of a transaction contains 184 billion 400 million bitcoin. Then at half time by developers, and released a patch, will output the deal to become invalid. Https://bitcoin.org/en/glossary/hard-fork The patch (should be Nakamoto issued) fixes this vulnerability, what is the specific change?

The scarlet letter is the bold that field patches mainly revised. Modify the rules before the “amount” is not higher than the “transaction”, after the modification of the rules is the addition of a “total” can not be negative. This modification can not upgraded node node verification has been upgraded from the block, so soft bifurcation.

 

Now we are on the three cases of abstraction, give a definition: soft soft bifurcation bifurcation refers to bitcoin transaction data structure (which is widely circulated “consensus”) is changed, the node can be verified without upgrade has upgraded the node to produce a block, and has upgraded the node can also verify not upgraded to produce block node.

Soft bifurcation of the “consensus” must also include the modified block format changes, but there are three cases of transaction format changes.

Here we see the bifurcation hard case.

 

The implementation of specific case hard bifurcation of the fifth chapter bitcoin block chain

 

In March 12, 2013, when bitcoin QT is 0.8.0 version of the software release, version 0.8 using a new database level db. Some miners node upgrade bitcoin QT 0.8 version, some miners also continue to use the bitcoin version of qt0.7 software. Each production block, but bitcoin QT 0.8 using the new database produced by qt0.7 version node block has been rejected. The specific reason is the old database sometimes does not accept more than 800Kb block. So in the block height 225430 bitcoin block chain into two chains, resulting in the bitcoin block chain have two chains, one containing more than 800KB block chain, the other is a refusal to admit these contain more big block chain, which has undergone hard bifurcation.

Then they dug up the chain bitcoin QT 0.8 version of the miners, return to the bitcoin version of QT 0.7 to continue mining.

The hard bifurcation is an accident, is the bitcoin QT 0.8 version of the software is a bug lead node with the old software refused to verify the new node block production software. But the cause is hard bifurcation node with the old software version of the new version of the software to validate the node production blocks, then each.

In July 4, 2015, bitcoin blockchain in a hard block height 363731 bifurcation. When is the Bitcoin Core developers to the new version of the Bitcoin Core 0.10.0 added BIP 66. It was with a soft forked modification, use the 0.10 version of the software in the bitcoin network on the main pool, but there is a pool BTC Nuggets was not upgraded, resulting in two blocks of BTC Nuggets dug out the other miners refused, and then the two sides continue their mining yourself think is the right block the chain, resulting in hard bifurcation, divided into two strands.

Bitcoin.org then issued a notice calling for miners to upgrade to bitcoin core version of 0.10.2 to eliminate the bifurcation.

This is an accident, the cause is hard bifurcation node using the new software version of the old version of the software verification to node production blocks, then each.

 

So far the two bifurcation are hard but the causes of accidents, hard bifurcation first is because of the new generation block format in different nodes have differences, after a transaction because of the format in different nodes have differences. But because the community was an accident, not discuss enough information. I do not know the specific block or transaction which field is modified due to the bifurcation.

 

Here, we can on the two cases of abstraction, given a hard bifurcation definition: hard bifurcation refers to bitcoin block format or transaction format (which is widely circulated “consensus”) is changed, the node verification has not upgraded refused to upgrade nodes to produce block. But has upgraded the node can verify not upgraded to produce node blocks, then we each continue what he thinks is right chain, so divided into two chains.

 

The community is planning, but has not been activated by soft and hard bifurcation bifurcation.

 

The sixth chapter is planning the expansion of hard branch block

 

The bitcoin community is planning a hard branch, is currently the reason block is filled with the transaction, to hold more deals in ten minutes a block, you need to modify the structure of data block. We first look at the data structure block.

The complete node software main bitcoin network is bitcoin core 0.12, the software specified in Table 6 in the block size of the field to a maximum of 1M. This leads to the last field “deal” to accommodate the bitcoin trading limited data, a transaction is at least 250 bytes, 1Mb can only hold more than 4000 transactions per second, can only have a maximum of 7 transactions. But because the actual transaction tends to reach the size of 500 bytes per second, in fact often can only accommodate 3 transactions.

So someone will put this field maximum height adjustment, such as the Bitcoin Classic this software will be transferred to 2M the maximum value of this field, and after the median plan taking the first 2016 block size multiplied by a good agreement of the times decided the next batch of block size limit. Bitcoin and XT are changing this value to 20M, and doubling every two years, until the maximum value reaches 8.3G. Bitcoin and Unlimited will directly modify this field by mine pool decide how to pack.

The problem is, using these modifications of the field of software to produce and node blocks will not upgrade the nodes are not compatible, no upgrade will refuse to verify the new node production area. This will lead to hard bifurcation.

 

Here, we know that the so-called hard branches need to modify the “consensus” is refers to the modified block data structure format, or modify the transaction data format structure.

 

The seventh chapter isolated witness soft bifurcation

 

There is a block of disguised expansion plan is isolated to witness this scheme is to modify the bitcoin transaction data structure, we still see fig..

The red field is the main place to witness the isolation, which is to be part of this transaction data out of the defined data structure, and also remove the block defined data structure. So the business is less a part of the data, so that each transaction volume will be small, and the entire block space can accommodate 1M more deals.

But such a move would cause a denial of this field, no upgrade nodes verify these upgrade node production block. But there are ways to let them not refuse, but the code is very complicated, but the code is written more than a year, up to now has not come out. The code is more complex, the potential vulnerabilities are more, think of Bip 66 by the soft hard lead to bifurcation bifurcation, and the isolation of more complex witness.

 

Here, once again proved that the so-called soft branch need to modify the “consensus” refers to the modified block data structure format, or modify the transaction data format structure.

 

The eighth chapter is soft and hard to modify the bifurcation bifurcation “consensus” is to modify the data structure

 

Now we can on the soft and hard bifurcation bifurcation in the end what to do a summary, especially soft and hard bifurcation bifurcation between what is the difference between, so that by the inaccurate definition of “consensus” dizzy.

Modified soft forked “consensus” specifically refers to modify bitcoin transaction data structure, or modify the bitcoin block data structure.

Hard to modify the bifurcation “consensus” specifically refers to modify bitcoin transaction data structure, or modify the bitcoin block data structure.

In the process of modifying the object level, soft and hard branch bifurcation is absolutely no difference, just now we see all that has happened, the plan and bifurcation are like this, they are trying to change or modify the transaction data structure, data structure or block.

The current occurrence, or plan of hard and soft bifurcation bifurcation are definitely not to modify the transaction history. Even if it is happened in August 15, 2010 day to brush out currency vulnerability, that once the transaction is to modify the data structure, but incidental role is a block in the transaction void, because the deal in the new transaction data structure definition is illegal.

So soft and hard to modify the bifurcation bifurcation consensus level is essentially no difference.

The bifurcation in which difference between hard and soft bifurcation?

 

The ninth chapter of soft and hard the main difference is the bifurcation bifurcation between new nodes mutual compatibility

 

The difference is compatible with the old node. Soft bifurcation modify the data structure, the new node production transactions and block can be verified and old nodes cannot accept hard bifurcation.

Because of the hard bifurcation modify the data structure, the new node production block will be rejected if the old node, the old node refused to upgrade software to continue to follow the old data mining structure that bitcoin will produce two chains.

But because there is no upgrade soft branching node can accept the new data node production, so it will not appear two chains. But in order to do a new soft bifurcation node and the node data is fully compatible with the old production, it is very difficult, because nature is not the same as the data structure we should recognize each other, once a node is not the same as refused to verify transactions or blocks, it would be hard to branch. This is the 66 Bip bifurcation eventually become soft the reason of hard branch.

From the fourth chapter, we see the way to modify the soft forked concrete is the field originally defined good redefined, such as multi signature soft bifurcation. Or is the original is in the field definition, such as soft CSV bifurcation.

But now from the transaction data structure, all the fields already occupied, and the accurate and detailed definition, if you have to do it soft bifurcation, can only be part of the original field definition erased, re definition. This leads to the original function may be lost, if this function is indispensable it will lead to hard, bifurcation, new nodes are rejected. So be careful bifurcation. This is the practice of isolating witness. Isolation is a field witness directly deleted, but in order to ensure compatibility between new and old nodes, that is they waste.

It is not hard to consider bifurcation no upgrade node will refuse to have upgraded node production data and code, simple to many situations.

Let’s look at this in order to realize the soft and hard to do bifurcation bifurcation compatibility what difference.

Soft and hard to change the main bifurcation bifurcation of old and new data related to the production of new and old nodes of a total of six:

The old node 1. no upgrade;

2. upgrade the new node;

3. old old node transaction transaction format;

4. new node new trading transaction format;

5. old nodes produce only containing the old block format of the old block;

With a new block format of the new block 6. new nodes produced.

In fact, but also consider other factors more complex, including the complete node; SPV node; new node is accounted for; SPV mining nodes; unconfirmed transactions and multiple transactions; CSV exchange; RBF transaction……. These are all factors to consider the compatibility. But for simplicity, here I consider only the 6 main changes above, we first make a list.

Soft need to ensure perfect compatibility on the bifurcation required to achieve the following two conditions:

Node 1. updated accept no transaction and block node production upgrade (backward compatible);

Node 2. is not upgraded to accept the deal and upgrade the production block node (forward compatibility).

Hard to guarantee the compatibility of the bifurcation need only meet the above first conditions, that is the new node needs to verify the whole block chain from the beginning of the 0 block height can be.

We make an example to illustrate the two compatibility:

Backward compatibility is our best understanding, is that we use word 2013 to open the word 2010 version of the file. Forward compatible mean the old version of the software to accept what can’t understand the new version of the software production data. If you use word 2010 to open the word2013 version of the document. This difficulty is not know how high ah, the old version of the software will know how the data has not been defined? The only thing it can do is to ignore these new features.

Hard bifurcation is not considered so complex compatibility, the first is to forward compatibility. Hard fork will not care not upgrade the updated node node to verify the production of this block will do, you can not verify validation, you do not upgrade I won’t play with you.

 

The tenth chapter compares the advantages and disadvantages of soft and hard bifurcation bifurcation

 

Soft bifurcation can ensure that do not want to upgrade to upgrade the people, do not want to upgrade the demand is actually very common in real life.

Hard bifurcation must require all old nodes to upgrade, otherwise the old node cannot identify new node production transactions and block, block chain into two strands of lead.

The bifurcation of the soft upgrade space is limited, because the current bitcoin transaction data structure and data structure block all fields has a detailed definition of good, you want to ensure that you forward compatible, will not increase the new field, otherwise you will reject the old node. So the soft forked upgrade space in the existing field bound up to redefine. It includes soft forked will be unable to block definition of the data structure in the “block size” in this field, it is never soft bifurcation of 1M block breakthrough. And this kind of extremely complex compatibility with the slightest mistake, will new and old nodes are not compatible, which lead to hard bifurcation. This has happened again.

The bifurcation of the space is hard to upgrade a lot, because hard to accept the old account as long as the branch node production and transaction block can be hard, do not need to consider whether the old node bifurcation node will accept the new deal and block production. It can be hard to bifurcation transaction data structure and block data structure more bold revision.

Finally, bitcoin transaction data structure and block data structure has a field called “number”, meaning “clear the deal or block reference rule”. This means that Nakamoto is to use hard to modify these bifurcation rules, that is to say if we want to change the rules, then redefined version no.. But without modifying the “soft forked version”, but changed the rules.

 

The eleventh chapter is conclusion

 

The word “consensus” fooled too many people. In fact, “do not destroy the consensus” soft packaging of the essence of bifurcation, bifurcation and hard to modify the same object is the same, but the terrible price is forward compatible, which requires not to upgrade the software to ignore the updated software production data and code, run the risk to benefit is just lazy software upgrade. I think any sane person is not willing to accept the risk benefit ratio.

(the theme I have always wanted to write, but don’t be afraid to write their own good with profound respect and humility. Today the courage to write out. Write a whole day. Please check it. Have the wrong place please you must be pointed out that if you feel useful to you, welcome to give me a reward coins. )

Author: Huang Shiliang (@ micro-blog WeChat tan90d WeChat HSL lightning lightning public number)
My BTC address: 14mhzjkJ71oMAMkKu3dy98dnUpkyQBHL1r

Leave a Reply

Your email address will not be published. Required fields are marked *