Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to implement Group Architecture in FISCO BCOS 2.0

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you about how to practice the group architecture in FISCO BCOS 2.0. the article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

I'll take building an arbitration chain as an example and demonstrate how to send a deal to that chain.

Course knowledge points:

Create a multi-group blockchain installation package using build_chain

How to start block chain nodes, view node consensus status and block status

Set up a console to deploy contracts to multiple groups

Organizational structure of arbitration chain

The following figure is an example of an arbitration chain:

Enterprise A, enterprise B and enterprise C cooperate with arbitration institutions respectively and use block chain to build arbitration services. Under the group architecture, the chain method is as follows: arbitration institutions configure two nodes to join three groups, enterprise A configures two nodes to join group 1, enterprise B configures two nodes to join group 2, and enterprise C configures two nodes to join group 3.

Details of arbitration chain network

The last section introduces the organization structure of arbitration chain, which simulates the network environment of arbitration chain under the environment of a machine. The networking environment of the simulation is as follows:

Arbitration institution: includes two nodes, the node IP is 127.0.0.1, and belongs to group 1, group 2 and group 3 at the same time

Enterprise A: includes two nodes. The node IP is 127.0.0.1, which only belongs to group 1.

Enterprise B: includes two nodes, both of which have an IP of 127.0.0.1, which only belongs to group 2

Enterprise C: includes two nodes. The node IP is 127.0.0.1, which only belongs to group 3.

Warm reminder:

In practical application scenarios, it is not recommended to deploy multiple nodes on the same machine. It is recommended to select the number of deployed nodes according to the machine load. In this example, the arbitration institution node belongs to all groups and has a high load, so it is recommended that it be deployed separately on machines with better performance.

Build the key process of arbitration chain

As shown in the following figure, building an arbitration chain (and all other blockchain systems) using the FISCO BCOS 2.0 Quick build chain script consists of five main steps:

Step1: install dependent software, mainly openssl and build_chain.sh scripts

Step2: using build_chain.sh to generate block chain node configuration

Step3: start all mechanism block chain nodes

Step4: launch the console

Step5: send a deal using the console

Below I will describe in detail the key process of building an arbitration chain based on these five steps.

Install dependent softwar

To build a FISCO BCOS 2.0 blockchain node, you need to prepare the following dependent software:

The network protocol of openssl:FISCO BCOS 2.0 depends on openssl.

Build_chain.sh script: mainly used to build block chain node configuration, which can be downloaded from https://raw.githubusercontent.com/FISCO-BCOS/FISCO-BCOS/master/tools/build_chain.sh

Generate block chain node configuration

Build_chain.sh provided by FISCO BCOS 2.0 can quickly generate block chain node configuration. According to the node organization structure described in [Arbitration chain Network details], the block chain configuration file ip_list:

# ip_list file content format: [ip]: [number of nodes] [organization name] [group list]

$cat > ipconf deploy HelloWorld

0x8c17cf316c1063ab6c89df875e96c9f0f5b2f744

# check the current block height of group1. If the block height increases to 1, the output block is normal. Otherwise, check whether the group1 consensus is normal.

$[group:1] > getBlockNumber

one

#... Send a deal to group2.

# switch to group2

$[group:1] > switch 2

Switched to group 2

[group:2] deploy Helloworld

...

The above is what the editor shares with you on how to implement the group architecture in FISCO BCOS 2.0. if you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report