How to use block chain technology to develop project __ block chain

Source: Internet
Author: User
Tags hyperledger fabric parity wallet

Block chain is a popular new concept, which contains two concepts of technology and finance. From a technical standpoint, this is a distributed database that sacrifices consistency and ensures eventual consistency, which is, of course, relatively one-sided. From the point of view of economics, the point-to-point network with strong fault-tolerant ability satisfies the need of a shared economy-a low-cost and credible environment.

This article takes the alliance chain as an example, describes the basic process of the practice of a union chain, including the following content:

The construction and preliminary analysis of the business scene,
Business Scenario Modeling,
Development path,
Development difficulties.
This article does not cover all types of development, mainly provides some ideas for development, and illustrates a practical approach.

Block chain is a popular new concept, which contains two concepts of technology and finance. From a technical standpoint, this is a distributed database that sacrifices consistency and ensures eventual consistency, which is, of course, relatively one-sided. From the point of view of economics, the point-to-point network with strong fault-tolerant ability satisfies the need of a shared economy-a low-cost and credible environment.

This article takes the alliance chain as an example, describes the basic process of the practice of a union chain, including the following content:

The construction and preliminary analysis of the business scene,
Business Scenario Modeling,
Development path,
Development difficulties.
This article does not cover all types of development, mainly provides some ideas for development, and illustrates a practical approach. first, the general idea

First of all to determine the type of block chain, is a notary block chain or value type.

Notary Block chain: Refers to a number of key data self-certification, disclosure, tamper-proof functions such as the block chain, usually in the value of the block chain with the function, can also be expanded separately for public disclosure and so on.
Value-type block chain: Refers to a kind of accounting books which can carry on the transfer of assets ownership.

On the value block chain, we need to determine the overall positioning of the target block chain:
In the end is a universal value transmission block chain, or a specific scene of the block chain.
If it is a specific scene of the block chain, we usually recommend the Super book as a technical prototype, if it is a more common value block chain, we recommend the idea of the ether square. Second, the construction of business scene and preliminary analysis

The first point to be clear is that the block chain is not omnipotent. In fact, many scenes do not need block chain technology can also be solved.

In the area of Cross-border payment, block chain is very good because there are many point-to-point cross-border institutions have a large amount of payment liquidation needs, but do not want to participate in the intermediary, block chain is a good choice.

But in some groups, within large companies, block-chain solutions are substantially less than traditional enterprise resource solutions. 1. Demand Pain Point Analysis

General demand pain points when the following conditions are met, you may consider using a block chain:

There is a Peer-to-peer network environment with no trust
There is a peer node between nodes and there is no absolute arbiter.
The behavior between nodes is a game behavior.
The Peer-to-peer network may contain input and output, and when input and output are included, the block chain is no longer closed.

There are generally several behaviors (including but not limited to) for a node:

Do not trust other nodes;
To ensure the maximization of their own profits;
Selfishness gets but does not contribute resources.
According to the business modeling of the above scenario, it is necessary to derive a solution to meet the needs of the specific business logic combined with game theory.

Case 1:

Usually we have different mechanism a,b,c, there is asymmetric information exchange demand, namely a,b,c have partial data separately, but the three combine together to have the whole quantity data of the market.

But as a, you want to know if B,c has a point of data in its own data set, and adjust your purchase strategy based on this result.

Case 2:

We have different agencies x,y,z, there is the need for information feedback, when Z received the Y service, will give y a feedback, this feedback may be credit evaluation, may be just response feedback. In short, this feedback needs to be documented, X will adjust its purchase strategy according to Z's feedback results. When X buys a service, it also gives y a feedback, and Z receives feedback. 2. Non-block chain technology can be solved

The above two cases first consider whether the use of a non-block chain can be resolved:

For Case 1, sensitive and private data is not disclosed, even if encryption is not allowed to be uploaded to the block chain. So a process of data input and output block chain is produced, which is not controlled by the block chain.

So is it possible to use the traditional technology to control it. Seemingly not, the solution to meet the sensitive data is only hash calculation and homomorphic encryption.

However, both require data transfer to the specified location.

Usually we will consider using 0 knowledge proofs as the solution, however, the specific algorithm may need to build according to the specific business logic, combine simple intelligent contract, produce different output according to the query result.

For Case 2, the easy to tamper with feedback information, can be a single brush and other issues are the largest, how to ensure that this information feedback is objective and neutral can not be tampered with, and the block chain tokens of the age of currency so that the transaction has the direction to prevent cheating. third, business scene modeling

In the second section of the two cases, we have to model, remove the core pain point, we must also have the need for accounting, in any case, each node is a service side, but also the client side, then how to measure their contribution and how much.
So any block chain platform, must be a token system, otherwise the bookkeeping will be very difficult
In the business scene modeling process, we focus on how to achieve Pareto improvement between nodes, rather than because each node is selfish behavior, so that block chain services in the only. Iv. Path of development 1. Block chain prototype selection

According to the description at the beginning of this article, if it is a block chain solution for a particular scenario, it is advisable to hyperledger fabric, of course, to build the private chain of the etheric square.

The following figure is a comparison of some of the etheric square and fabric:

The ether square is the same as Hyperledger:

is to provide a platform for the implementation of the block chain business, business implementation is through the intelligent contract to achieve maximum flexibility and the bottom of the unmodified.
Ethernet Square is: EVM virtual machine, solidity contract language
Hyperledger is: Shim chain code container, write a contract with go.
Official versions are implemented using the Go language
Because they are to provide third-party programmable ability, because of difficulty, internal inevitable loopholes. There is a threat of malicious program attack on the outside. Especially in the public chain, the threat will be greater. Last month, there was a contract solidity language loophole in the ether square.

The etheric square differs from the Hyperledger:

The Ethernet workshop offers only intelligent contract capabilities. Also coincides with his positioning: intelligent contract and the central application platform. There is no core support for system security or access mechanism.
The Hyperledger, while absorbing the characteristics of the intelligent contract, provides membership and authentication role management modules. More close to commercial application scenarios.
The consensus mechanism is different.
Because the consensus is not the same, so can be processed per second transaction volume is not the same, the ether is Chi Pe per second processing volume. And Hyperledger can achieve 100,000 level of processing capacity.
The use of technology to achieve different ideas. The ether square more is realizes by oneself, according to the wheel, has the developer to dazzle the skill the feeling, like offers the contract language solidity, oneself realizes EVM (this may be the actual need)

The following figure is the author of a private chain project in the comparison between the two (private chain considered the feasibility of Hydrachain):

P1

Of course, if you consider developing yourself, it is recommended to build a base bitcoin network, add, and change the following:

Consensus algorithm
Network Transfer Protocol
Additional contract (optional)
In fact, the intelligent contract in some scenarios is not required, for users, reliable and convenient real-time is the first requirement, if the specific application scenario, the "contract" curing in the block chain inside, is also a feasible way of thinking.

In view of the above two kinds of alliance chain realization, I also want to emphasize that not all services must be block chain, the author conceived a universal umbrella-type structure,

such as Bitcoin side chain technology, the main chain provides basic ledger services, side chain to provide specific scene services, side-chain applications can be non-block chain implementation, just interface registration can be. 3. Interactive interface Design

In the interactive interface design, it is recommended to use the current industry-wide JSON-RPC interface, both extensibility and friendliness.
Generally we divide the interface into two types: Open Interface and Account interface.
The Open interface refers to the description information of the block chain itself and is not required to be authenticated.
And the account interface is required to authenticate the account. 4. Basic Ledger Design

Contains the following questions:
Whether the prototype block chain has met the demand.
If for the ether, basically do not need to change the basic ledger, just build smart contract can be.
How to base on Bitcoin system, there may be a big change.

Do not meet the requirements of how to change the basic ledger.
This actually depends on the account model, if the use of Utxo mode, the change is focused on how to embed template trading body.
If you use the balance mode, then there is no such problem. 5. Business Expansion Layer Design

Contains the following questions:
The expansion layer is an external block chain or a built-in block chain.
If you include data entry, whether you need desensitization. How to get on the chain after desensitization. v. Development changes and development difficulties 1. The transformation of development thinking

Unlike traditional Web services, block-chain development is no longer focused on service-oriented, but is oriented to books and transactions.

Instead of being the primary target of highly available and highly concurrent applications, developers switched to end-user-oriented, user-friendly and development-scalable terminal-program development.

Therefore, high concurrent high-performance is no longer the core index of block chain terminals, security, scalability, friendliness has become the main indicators.

The following figure is the author of the China Technology opening day mentioned in a workflow:

P2

Applies only to (federated chain/private chain) projects. 2. Development difficulties

There are three difficulties in development:

The current development of human resource reserves is insufficient
At present, the more mature technology system is: Bitcoin and derivative technology system, Ethernet square, Super Ledger Hyperledger fabric, bits bitshares, Ripple, the future of the coin nxt.

The top three projects listed are the most influential block chain projects. Bitcoin and derivative technology are mostly developed in C + + language; ether supports most of the mainstream languages, the official Golang, there are other branches of the project such as the rust language of the parity wallet, the super Ledger is mainly Golang.

From the current area of Shanghai's block chain practitioners, conservative estimates in 400~500 around. According to half of the developers calculation, but also only more than 200, in the face of huge market demand, talent is extremely scarce.

Because C + + is currently only part of the financial and gaming areas, so there are not many C + + engineers, especially the high level of C + + engineers are less. Go as a new language, the development momentum is very strong, but go ecology is not as big as Java.

If from the Java point of view, how to use the Java ecology, the current block chain has not yet done that.

In a comprehensive way, the combination of the block chain in technology and other technologies remains to be explored.

Block chain is an interdisciplinary subject that requires experience in various aspects of engineering practice
In practice, we hope that the block chain practitioners to understand the technical and financial business, this request is relatively high.

For each block chain technology system understanding deviation, block chain technology and concepts change rapidly, closed-door development may go to a dead end, how to maintain a part of the energy to update the knowledge system, while ensuring that the development of the progress of the developer is a greater challenge.

As a new technology, block chain covers many aspects such as going to the center, trusting, sharing economy, distributed computing and distributed storage, and testing the ability of the technicians to learn and think. In the future, the block chain will be together with AI, will affect all aspects of ordinary life.

Http://blockchaindev.org/archives/13-development-in-blockchain.html#more

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.