Trias jointly held the seventh academic Salon with the School of Software and Microelectronics at PKU. This activity mainly on Digital Currency Wallet and The Blockchain Crossing to do in-depth exchanges.
Nowadays digital money wallet and hard fork are both hot topic that people pay close attention in blockchain industry. Digital money wallets can be divided into two categories according to the secret key origin.
The first is a non-deterministic wallet. In the case of a Bitcoin wallet, each key is generated by a different random number and has no relationship to each other.
We know that a wallet is a private key container. For holding the private key, we can use elliptic curve multiplication to generate the public key, and then use a one-way encryption hash function to generate Bitcoin address. It is important to note that the whole process is irreversible.
The relationship is shown in the figure.
In Bitcoin networks, the public key is used to receive Bitcoin while the private key is applied in transaction at the time of payment. As long as the private key is available, digital currency in account can be totally controlled, such as trading or transferring.
But this approach remains two problems. First, it is difficult for users to do backup. Second, it is failed to that safe and convenient to generate addresses.
We need to mention here another kind of wallet, called deterministic wallet. All keys are generated by a master key and are interrelated with each other. This approach is conducive to solving these problems above.
Liu Bin, a senior developer in the field of blockchain, briefly combed out the overall process of creating a deterministic wallet. It is roughly divided into four parts as follows:
1. Generating mnemonics;
2. Generating seeds from mnemonic words;
3. Generating the HD wallet master extended private key from the seed;
4. Deriving the required sub-private key and address according to the tree structure.
Professor Shen Qingni of Peking University is very interested in the specific wallet implementation. She asked Liu Bin about the specific technology and code for more implementation details. After introduction, Xin Wu, a doctoral student at Peking University, analyzed the key points of blockchain fork, which referred to the views’ divergence in the blockchain, leading to the inconsistent end.
Here we need to know what is hard fork? It is a rule change such that the software validating according to the old rules will see the blocks produced according to the new rules as invalid. In case of a hard fork, all nodes meant to work in accordance with the new rules need to upgrade their software.
We know that in the central organization, a server can have the relevant authority of the background one-click upgrade. But in a decentralized system, if the community unable to reach an agreement, the final version is inconsistent, and resulting in forking.
Divergences of many kinds, including consensus algorithms (NBFT/CFT:Paxos, Raft;BFT:PBFT, POW, POX), block size (1MB, 2MB, 8MB, 32MB, 64MB), account models, monetary aggregates, etc., all those almost can lead to fork.
Xin Wu made a concrete analysis of the most famous Bitcoin fork and Ethereum ‘the DAO’ time. If one group of nodes continues to use the old software while the other nodes use the new software, a split can occur. For example, Ethereum has hard-forked to ‘make whole’ the investors in The DAO, which had been hacked by exploiting a vulnerability in its code. In this case, the fork resulted in a split creating Ethereum and Ethereum Classic chains.
We can divide the fork process into four cases, namely, the blockchain internal mechanism, terminal version upgrade (soft fork), terminal version upgrade (hard fork), as well as the split of the community, chain and currency. Xin Wu also pointed out that hard fork is not a technical issue but a matter of human nature and interests.