The difference between two typical blockchain design ideas

in #blockchain6 years ago

The blockchain has evolved to the present and has produced many different forms of blockchain technology. With the development of technology, the currently accepted view is that the blockchain has entered the 2.0 era. Blockchain 1.0 is a decentralized digital currency blockchain system represented by bitcoin, while 2.0 is a blockchain system that introduces smart contracts.

denys-nevozhai-351730-unsplash.jpg

In the blockchain system that supports smart contracts, the Linux Foundation's Hyperledger Fabric (contributed by IBM) and Vitalik Buterin's Ethereum (Ethereum) created and managed by Vitalik Buterin are two typical examples. These two blockchain systems have completely different design ideas, which fully embodies the difference between the traditional enterprise information system thinking design pattern (Fabric) and the blockchain fundamentalist thinking design pattern.

First look at Ethereum, a very typical blockchain system that is affected by the Bitcoin architecture. The most typical feature is that the chain is the foundation. All trust comes from a chained data structure based on Hash cryptography based on which all the functions are architected.

For Fabric, the system must have a beautiful technical architecture: pluggable modular design, high scalability, high cohesion and low coupling. On a beautiful technical architecture, each module is called to construct a function-chain. Each additional function can use an existing chain or create a new one.

Ethereum uses a virtual machine approach to implement smart contracts. The virtual machine in Ethereum is called EVM and is a lightweight sandbox execution environment. To make smart contracts more convenient, Ethereum developers have created new languages ​​to write smart contracts. The most popular EVM programming language is Solidity.

A major feature of EVM is that it can only read and write data on the chain. The data on the non-chain can only be passed to the smart contract by the caller when the smart contract is called. (This feature of EVM ensures that the results of smart contracts are deterministic and do not result in different results due to different node executions.) The smart contract itself and the smart contract call process (or the transaction using smart contracts) are recorded. On the chain.

Therefore, we can see that in the architecture of Ethereum, the "chain" is the anchor of trust, and all trust comes from the chain.

nasa-53884-unsplash.jpg

Fabric uses the Docker mechanism to implement smart contracts. Compared to Ethereum's EVM, Docker can be considered a heavyweight sandbox execution environment. Due to the nature of Docker, Fabric can develop smart contracts in many languages, and many library functions and system functions can be used. Therefore, Fabric's smart contracts are more flexible (for example, can communicate with IoT devices), but this flexibility Sexuality also leads to the risk that different nodes may produce different results after execution without reaching consensus.

The introduction of Channel makes Fabric's smart contract deployed directly on several nodes. Each smart contract can create a new chain or share a chain with other smart contracts. The "chain" is in the fabric of the fabric, which is equivalent to a storage space shared by several nodes participating in the function when a certain function is implemented.

After understanding the difference between the implementation of these two smart contracts, we will find the difference between the design of these two typical blockchains - which layer of the architecture should the "chain" be?

In the blockchain fundamentalism, since everyone is not credible, they can only believe in a complete data system that is chained up by the Hash algorithm. In the alliance chain for inter-enterprise applications, since nodes need to be authenticated to join, the degree of trust is higher. Therefore, as long as some key data is agreed upon to achieve credibility.

pietro-jeng-266017-unsplash.jpg

It is precisely because of this design difference that in Ethereum, all smart contracts run on the same chain, and everyone shares a trusted infrastructure; in Fabric, one application corresponds to one chain, and the whole system consists of There are many sub-chains that share a basic

Coin Marketplace

STEEM 0.28
TRX 0.12
JST 0.032
BTC 67227.10
ETH 3137.71
USDT 1.00
SBD 3.76