WO2024060401A1 - Distributed blockchain baas system based on gossip communication - Google Patents

Distributed blockchain baas system based on gossip communication Download PDF

Info

Publication number
WO2024060401A1
WO2024060401A1 PCT/CN2022/134585 CN2022134585W WO2024060401A1 WO 2024060401 A1 WO2024060401 A1 WO 2024060401A1 CN 2022134585 W CN2022134585 W CN 2022134585W WO 2024060401 A1 WO2024060401 A1 WO 2024060401A1
Authority
WO
WIPO (PCT)
Prior art keywords
baas
nodes
node
group
blockchain
Prior art date
Application number
PCT/CN2022/134585
Other languages
French (fr)
Chinese (zh)
Inventor
吴家彬
汪昌帅
贺伟
Original Assignee
天翼电子商务有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 天翼电子商务有限公司 filed Critical 天翼电子商务有限公司
Publication of WO2024060401A1 publication Critical patent/WO2024060401A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/04Protocols specially adapted for terminals or networks with limited capabilities; specially adapted for terminal portability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the invention relates to the technical field of blockchain and distributed applications, and in particular to a distributed blockchain BaaS system based on gossip communication.
  • the technical problem to be solved by this invention is to overcome the defects of the existing technology, provide a distributed blockchain BaaS system based on gossip communication, realize the communication function between BaaS platform nodes through the gossip protocol, and solve the problem of cross-platform invitation blocks It solves the problem of inaccessible resources during chain networking, and improves the management capabilities of private blockchain resources between BaaS platforms through the group mechanism and local blockchain resource permission management, solving the problem of inability to interact with data between multiple BaaS platforms. .
  • the present invention provides a distributed blockchain BaaS system based on gossip communication.
  • This system includes: gossip message communication, group resource isolation, BaaS blockchain resource privatization management, and cross-BaaS invitation blockchain node networking; specifically As follows:
  • the message interaction between BaaS nodes is realized by introducing gossip communication protocol; when there are a large number of BaaS nodes that need data synchronization, the ordinary P2P model is not suitable. It requires the BaaS node to maintain two connection pools, incoming and outgoing, resulting in the local BaaS node The number of links increases by a multiple of 2n;
  • the gossip protocol allows the BaaS node to connect to some nodes in the cluster. After the BaaS node adds and updates the blockchain resource data, the bottom layer automatically makes the changed data into a gossip message package and propagates it to all other connected nodes. With the Rumer-Mongering feature of gossip, the BaaS cluster can always maintain data consistency;
  • the new BaaS node When a new BaaS node joins the cluster, through the Anti-entropy feature of gossip, the new BaaS node will request all data blockchain resource data under the current cluster from the connected node, and quickly synchronize to the latest status;
  • the gossip protocol itself has a network fault tolerance mechanism. Its multi-node message redundant transmission feature ensures that when the network between two nodes is unreachable, other nodes will also try to send the same message.
  • the BaaS node When conducting cross-BaaS node invitation networking, the BaaS node sends invitation information that can only be received by the designated node and spreads it through the gossip protocol.
  • the non-target node When the non-target node receives the message, it will compare whether the designated node in the message is itself. , if it is not the local node, it will not be processed, and only the message will be disseminated; after the target node receives the message, if it agrees, it will return the acceptance message and the blockchain node certificate file through the gossip message package, otherwise it will return a rejection message carrying the reason for rejection;
  • Group allows BaaS nodes to form a private network and spread blockchain resources that are only public in the group. BaaS nodes not in the group cannot obtain resource information within the group. Partial sharing of BaaS blockchain resources can be achieved through the group. and isolation;
  • BaaS nodes can enter the group name in the management interface to create a group. After successful creation, the unique group_identifier in the entire network will be returned. Other BaaS nodes need to provide the group name and group_identifier to the internal nodes of the group to join the group. After joining the group, the BaaS nodes will automatically Synchronize the blockchain resource information within the group; group_identifier is calculated by the following formula:
  • group_identifier hex(sha256(group_name+timestamp))
  • the node can join the global group.
  • the global group is the global default group and any BaaS node can join.
  • the BaaS node only needs to connect to the public seed node;
  • Agent resources exposed in global Almost all BaaS nodes can be synchronized, but resource owners can still choose to hide them privately when creating blockchain resources;
  • Agent resources disclosed in a private group Only members within the group can view them. Resource owners can still choose to hide them privately when creating blockchain resources.
  • This solution uses the gossip protocol to achieve communication and data synchronization between BaaS nodes. Relying on the characteristics of the gossip protocol, after updating the local blockchain resources, the BaaS node only needs to pass the new data to a small number of nodes through the gossip message package. In the end, except for the offline node, other nodes in the message package can complete the data. Synchronize. The new BaaS node owner needs to know an existing BaaS node to join the cluster and quickly synchronize data to the latest status;
  • This solution also implements a group resource isolation mechanism, allowing the formation of sub-clusters between BaaS nodes to achieve resource data isolation between BaaS clusters. Applicable to the current BaaS cluster, when multiple BaaS nodes form a private blockchain network, they can use groups to make BaaS nodes unrelated to this blockchain network unknown. This solution also allows BaaS nodes to selectively expose or hide blockchain resources to improve the security of local blockchain resources.
  • Figure 1 is one of the schematic diagrams of the embodiment of the present invention.
  • Figure 2 is a second schematic diagram of the embodiment of the present invention.
  • Figure 3 is a third schematic diagram of the embodiment of the present invention.
  • Figure 4 is a schematic diagram of the present invention's dissemination of local blockchain resource information based on gossip
  • FIG. 5 is a schematic diagram of a BaaS node joining a private group according to the present invention.
  • Figure 6 is a schematic diagram of the cross-BaaS platform invitation blockchain node networking according to the present invention.
  • the present invention provides a distributed blockchain BaaS system based on gossip communication.
  • This system includes: gossip message communication, group resource isolation, BaaS blockchain resource privatization management, and cross-BaaS invitation blocks.
  • Link node networking details are as follows:
  • the message interaction between BaaS nodes is realized by introducing gossip communication protocol; when there are a large number of BaaS nodes that need data synchronization, the ordinary P2P model is not suitable. It requires the BaaS node to maintain two connection pools, incoming and outgoing, resulting in the local BaaS node The number of links increases by a multiple of 2n;
  • the gossip protocol allows the BaaS node to connect to some nodes in the cluster. After the BaaS node adds and updates the blockchain resource data, the bottom layer automatically makes the changed data into a gossip message package and propagates it to all other connected nodes. With the Rumer-Mongering feature of gossip, the BaaS cluster can always maintain data consistency;
  • the new BaaS node When a new BaaS node joins the cluster, through the Anti-entropy feature of gossip, the new BaaS node will request all data blockchain resource data under the current cluster from the connected node, and quickly synchronize to the latest status;
  • the gossip protocol itself comes with a network fault-tolerance mechanism, and its multi-node message redundant sending feature ensures that if the network between two nodes is unreachable, other nodes will also try to send the same message;
  • the BaaS node When conducting cross-BaaS node invitation networking, the BaaS node sends invitation information that can only be received by the designated node and spreads it through the gossip protocol.
  • the non-target node When the non-target node receives the message, it will compare whether the designated node in the message is itself. , if it is not the local node, it will not be processed, and only the message will be disseminated; after the target node receives the message, if it agrees, it will return the acceptance message and the blockchain node certificate file through the gossip message package, otherwise it will return a rejection message carrying the reason for rejection. As shown in Figure 1;
  • Groups allow BaaS nodes to form a private network and spread blockchain resources that are only public in the group. BaaS nodes outside the group cannot obtain resource information within the group. Through groups, local sharing and isolation of BaaS blockchain resources can be achieved;
  • BaaS nodes can enter the group name in the management interface to create a group. After successful creation, the unique group_identifier in the entire network will be returned. Other BaaS nodes need to provide the group name and group_identifier to the internal nodes of the group to join the group. After joining the group, the BaaS nodes will automatically Synchronize the blockchain resource information within the group; group_identifier is calculated by the following formula:
  • group_identifier hex(sha256(group_name+timestamp))
  • the node can join the global group.
  • the global group is the global default group and any BaaS node can join.
  • the BaaS node only needs to connect to the public seed node, as shown in Figure 2 shown;
  • Agent resources exposed in global Almost all BaaS nodes can be synchronized, but resource owners can still choose to hide them privately when creating blockchain resources;
  • Agent resources disclosed in private groups only internal members of the group can view them, and resource owners can still choose to hide them privately when creating blockchain resources;
  • BaaS platforms are deployed in multiple companies, and the networks between BaaS nodes can be interoperable.
  • One BaaS node creates a group, and other BaaS nodes join the group, create blockchain nodes and networks, install smart contracts, and invite blockchain across platforms. Node networking, the blockchain data information saved between BaaS nodes remains consistent.
  • This solution uses the gossip protocol to achieve communication and data synchronization between BaaS nodes. Relying on the characteristics of gossip, BaaS nodes do not need to have P2P connections with all BaaS in the cluster, but only need to connect to a subset. At the same time, the blockchain resource data consistency within the cluster is achieved through gossip, and the message package that can be processed by the designated node is transmitted through gossip, so as to invite blockchain nodes to network across BaaS nodes.
  • This solution also implements a group resource isolation mechanism, allowing sub-clusters to be formed between BaaS nodes to achieve resource data isolation between BaaS clusters. Applicable to the current BaaS cluster, when multiple BaaS nodes form a private blockchain network, they can use groups to make BaaS nodes unrelated to this blockchain network unknown. This solution also allows BaaS nodes to selectively expose or hide blockchain resources to improve the security of local blockchain resources.

Abstract

Disclosed in the present invention is a distributed blockchain BaaS system based on gossip communication. The system comprises: gossip message communication, group resource isolation, BaaS blockchain resource privatization management, and cross-BaaS node blockchain node invitation for networking. Specifically, regarding gossip message communication of BaaS nodes, message interactions between the BaaS nodes are implemented by introducing a gossip communication protocol; and when a large number of BaaS nodes need data synchronization, a common P2P mode is not suitable, and it is required that the BaaS nodes maintain two connection pools, i.e., incoming and outgoing, so that the number of local links of the BaaS nodes is increased by a multiple number of 2N. According to the present solution, communication and data synchronization between the BaaS nodes are implemented by using the gossip protocol; and according to the characteristics of gossip, the BAAS node does not need to be in P2P connection with all BaaS in a cluster, and only needs to be connected to one subset. Moreover, the consistency of blockchain resource data in the cluster is realized by means of gossip, and a message packet which can be processed by a specified node is transmitted by means of gossip, so that cross-BaaS node blockchain nodes are invited for networking.

Description

一种基于gossip通信的分布式区块链BaaS系统A distributed blockchain BaaS system based on gossip communication 技术领域Technical field
本发明涉及区块链与分布式应用技术领域,特别涉及一种基于gossip通信的分布式区块链BaaS系统。 The invention relates to the technical field of blockchain and distributed applications, and in particular to a distributed blockchain BaaS system based on gossip communication.
背景技术Background technique
当前绝大多数的BaaS平台架构通常是单点部署,由一个组织来部署和维护,并提供访问BaaS平台的途径。平台用户通过导入其本地的物理机资源或租用BaaS平台提供的资源来操作区块链系统。The vast majority of current BaaS platform architectures are usually single-point deployments, which are deployed and maintained by an organization and provide access to the BaaS platform. Platform users operate the blockchain system by importing their local physical machine resources or renting resources provided by the BaaS platform.
技术问题technical problem
某些项目下,会存在多个对等的组织,这些组织可能都要求部署BaaS平台来管理其本地的区块链资源,但是BaaS节点与BaaS节点之间无法互相通信,在跨BaaS区块链节点组网时,必须将其他BaaS的资源进行纳管,这会导致多个BaaS同时管理一个资源,降低了该资源的安全性和可管理性。Under some projects, there will be multiple peer organizations. These organizations may all require the deployment of BaaS platforms to manage their local blockchain resources, but BaaS nodes cannot communicate with each other. When nodes are networked, the resources of other BaaS must be managed. This will cause multiple BaaS to manage one resource at the same time, reducing the security and manageability of the resource.
技术解决方案Technical solutions
本发明要解决的技术问题是克服现有技术的缺陷,提供一种基于gossip通信的分布式区块链BaaS系统,通过gossip协议实现了BaaS平台节点间的通信功能,解决了跨平台邀请区块链组网时的资源不可访问的难题,并通过群组机制和本地区块链资源权限管理提高了BaaS平台间对私有区块链资源的管理能力,解决了多BaaS平台间无法数据交互的问题。The technical problem to be solved by this invention is to overcome the defects of the existing technology, provide a distributed blockchain BaaS system based on gossip communication, realize the communication function between BaaS platform nodes through the gossip protocol, and solve the problem of cross-platform invitation blocks It solves the problem of inaccessible resources during chain networking, and improves the management capabilities of private blockchain resources between BaaS platforms through the group mechanism and local blockchain resource permission management, solving the problem of inability to interact with data between multiple BaaS platforms. .
本发明提供了如下的技术方案:The present invention provides the following technical solutions:
本发明提供一种基于gossip通信的分布式区块链BaaS系统,本系统包括:gossip消息通信、群组资源隔离、BaaS区块链资源私有化管理以及跨BaaS邀请区块链节点组网;具体如下所示:The present invention provides a distributed blockchain BaaS system based on gossip communication. This system includes: gossip message communication, group resource isolation, BaaS blockchain resource privatization management, and cross-BaaS invitation blockchain node networking; specifically As follows:
一、BaaS节点gossip消息通信:1. BaaS node gossip message communication:
通过引入gossip通信协议实现BaaS节点间的消息交互;当有大量的BaaS节点需要数据同步时,普通的P2P模式并不适合,它要求BaaS节点维护incoming与outgoing两个连接池,导致BaaS节点本地的链接数以2n的倍数增长;The message interaction between BaaS nodes is realized by introducing gossip communication protocol; when there are a large number of BaaS nodes that need data synchronization, the ordinary P2P model is not suitable. It requires the BaaS node to maintain two connection pools, incoming and outgoing, resulting in the local BaaS node The number of links increases by a multiple of 2n;
gossip协议允许BaaS节点连接集群内的部分节点,BaaS节点在新增、更新区块链资源数据后,底层自动将改变的数据制作成gossip消息包,并传播至其已连接的所有其他节点,通过gossip的Rumer-Mongering特性,BaaS集群总能保持数据一致性;The gossip protocol allows the BaaS node to connect to some nodes in the cluster. After the BaaS node adds and updates the blockchain resource data, the bottom layer automatically makes the changed data into a gossip message package and propagates it to all other connected nodes. With the Rumer-Mongering feature of gossip, the BaaS cluster can always maintain data consistency;
当一个新的BaaS节点加入集群时,通过gossip的Anti-entropy特性,新的BaaS节点会向已连接的节点请求当前集群下的所有数据区块链资源数据,并快速同步至最新状态;When a new BaaS node joins the cluster, through the Anti-entropy feature of gossip, the new BaaS node will request all data blockchain resource data under the current cluster from the connected node, and quickly synchronize to the latest status;
gossip协议本身自带网络容错机制,其多节点消息冗余发送的特性,保证某两个节点间网络不可达的情况下,其他节点也会尝试发送相同的消息;The gossip protocol itself has a network fault tolerance mechanism. Its multi-node message redundant transmission feature ensures that when the network between two nodes is unreachable, other nodes will also try to send the same message.
二、跨BaaS节点邀请区块链节点组网:2. Invite blockchain nodes to network across BaaS nodes:
在进行跨BaaS节点邀请组网时,BaaS节点通过发送指定节点才能接收的邀请信息,并通过gossip协议传播,非目标节点在接受到该消息时,将比对消息中的指定节点是否是其本身,若非本节点则不处理,仅做传播消息处理;目标节点收到消息后,若同意,则将通过gossip消息包返回接受消息和区块链节点证书文件,否则返回携带拒绝理由的拒绝消息;When conducting cross-BaaS node invitation networking, the BaaS node sends invitation information that can only be received by the designated node and spreads it through the gossip protocol. When the non-target node receives the message, it will compare whether the designated node in the message is itself. , if it is not the local node, it will not be processed, and only the message will be disseminated; after the target node receives the message, if it agrees, it will return the acceptance message and the blockchain node certificate file through the gossip message package, otherwise it will return a rejection message carrying the reason for rejection;
三、群组资源隔离:3. Group resource isolation:
群组group允许BaaS节点间组成私有网络,并传播仅在group中公开的区块链资源,非group中的BaaS节点无法获取group内部的资源信息,通过group可实现BaaS区块链资源的局部共享和隔离;Group allows BaaS nodes to form a private network and spread blockchain resources that are only public in the group. BaaS nodes not in the group cannot obtain resource information within the group. Partial sharing of BaaS blockchain resources can be achieved through the group. and isolation;
BaaS节点可在管理界面输入group名称来创建group,创建成功后会返回全网唯一的group_identifier,其他BaaS节点需要向group内部节点提供group名称和group_identifier来加入该group,加入group后的BaaS节点会自动同步group内的区块链资源信息;group_identifier通过下面的公式计算得出:BaaS nodes can enter the group name in the management interface to create a group. After successful creation, the unique group_identifier in the entire network will be returned. Other BaaS nodes need to provide the group name and group_identifier to the internal nodes of the group to join the group. After joining the group, the BaaS nodes will automatically Synchronize the blockchain resource information within the group; group_identifier is calculated by the following formula:
group_identifier=hex(sha256(group_name+timestamp))group_identifier=hex(sha256(group_name+timestamp))
若BaaS节点不需要接入私有群组,该节点可以加入global群组,global群组是全局默认群组,任何BaaS节点均可加入,BaaS节点只需连接公开的seed节点即可;If the BaaS node does not need to access the private group, the node can join the global group. The global group is the global default group and any BaaS node can join. The BaaS node only needs to connect to the public seed node;
四、BaaS区块链资源私有化管理:4. BaaS blockchain resource privatization management:
BaaS节点所管理的区块链资源并不需要全部公开,BaaS在创建区块链资源时可以选择是公开还是已优化本地管理,私有资源管理可以具体分为下面三种情况:All blockchain resources managed by BaaS nodes do not need to be made public. When creating blockchain resources, BaaS can choose whether to make them public or to optimize local management. Private resource management can be divided into the following three situations:
(1)公开于global中的agent资源:几乎所有的BaaS节点都可以同步,但资源所有者在创建区块链资源时仍然可以选择私有隐藏;(1) Agent resources exposed in global: Almost all BaaS nodes can be synchronized, but resource owners can still choose to hide them privately when creating blockchain resources;
(2)公开于私有group中的agent资源:仅group内部成员可查看,资源所有者在创建区块链资源时仍然可以选择私有隐藏;(2) Agent resources disclosed in a private group: Only members within the group can view them. Resource owners can still choose to hide them privately when creating blockchain resources.
(3)完全私有化本地管理的agent资源:其他BaaS节点不可见。(3) Completely privatize locally managed agent resources: other BaaS nodes are not visible.
有益效果beneficial effects
与现有技术相比,本发明的有益效果如下:Compared with the prior art, the beneficial effects of the present invention are as follows:
(1)分布式应用的节点通常使用P2P进行全节点连接,这会让节点维护过多的连接实例;本方案通过gossip协议来代替全节点连接,在不损失系统去中心化的同时,每个节点只需维护少量的连接即可实现集群内数据一致性;(1) Nodes in distributed applications usually use P2P for full-node connections, which causes nodes to maintain too many connection instances; this solution uses the gossip protocol to replace full-node connections without losing system decentralization. Nodes only need to maintain a small number of connections to achieve data consistency within the cluster;
(2)本方案使用gossip协议实现了BaaS节点间的通信和数据同步。依靠gossip协议的特性,BaaS节点在更新本地区块链资源后,只需要将新数据通过gossip消息包传递给少量的节点即可,最终该消息包除了下线的节点,其他节点都能完成数据同步。新BaaS节点主需要知道一个已存在的BaaS节点即可加入集群并快速同步数据至最新状态;(2) This solution uses the gossip protocol to achieve communication and data synchronization between BaaS nodes. Relying on the characteristics of the gossip protocol, after updating the local blockchain resources, the BaaS node only needs to pass the new data to a small number of nodes through the gossip message package. In the end, except for the offline node, other nodes in the message package can complete the data. Synchronize. The new BaaS node owner needs to know an existing BaaS node to join the cluster and quickly synchronize data to the latest status;
(3)通过gossip协议来实现跨BaaS节点邀请区块链节点组网。BaaS使用gossip传递指定节点处理的消息包,仅通过集群中的节点来中继该消息包,这种做法可以免去BaaS节点间创建新的TCP连接;(3) Invite blockchain node networking across BaaS nodes through the gossip protocol. BaaS uses gossip to deliver the message package processed by the designated node, and only relays the message package through the nodes in the cluster. This approach can eliminate the need to create new TCP connections between BaaS nodes;
(4)本方案也实现了群组资源隔离机制,允许BaaS节点间形成子集群,实现BaaS集群间的资源数据隔离。适用于当前BaaS集群内,多个BaaS节点在组建具有私密性质的区块链网络时,可通过群组,使与此区块链网络无关的BaaS节点不可知。本方案也允许BaaS节点选择性公开或隐藏区块链资源,提高本地区块链资源的安全性。(4) This solution also implements a group resource isolation mechanism, allowing the formation of sub-clusters between BaaS nodes to achieve resource data isolation between BaaS clusters. Applicable to the current BaaS cluster, when multiple BaaS nodes form a private blockchain network, they can use groups to make BaaS nodes unrelated to this blockchain network unknown. This solution also allows BaaS nodes to selectively expose or hide blockchain resources to improve the security of local blockchain resources.
附图说明Description of the drawings
附图用来提供对本发明的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本发明,并不构成对本发明的限制。在附图中:The drawings are used to provide a further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. In the attached picture:
图1是本发明的实施例示意图之一;Figure 1 is one of the schematic diagrams of the embodiment of the present invention;
图2是本发明的实施例示意图之二;Figure 2 is a second schematic diagram of the embodiment of the present invention;
图3是本发明的实施例示意图之三;Figure 3 is a third schematic diagram of the embodiment of the present invention;
图4是本发明的基于gossip传播本地区块链资源信息示意图;Figure 4 is a schematic diagram of the present invention's dissemination of local blockchain resource information based on gossip;
图5是本发明的BaaS节点加入私有群组示意图;Figure 5 is a schematic diagram of a BaaS node joining a private group according to the present invention;
图6是本发明的跨BaaS平台邀请区块链节点组网示意图。Figure 6 is a schematic diagram of the cross-BaaS platform invitation blockchain node networking according to the present invention.
本发明的实施方式Embodiments of the invention
在以下结合附图对本发明的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本发明,并不用于限定本发明。其中附图中相同的标号全部指的是相同的部件。The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention. The same reference numerals in the drawings all refer to the same components.
实施例1Example 1
如图1-6,本发明提供一种基于gossip通信的分布式区块链BaaS系统,本系统包括:gossip消息通信、群组资源隔离、BaaS区块链资源私有化管理以及跨BaaS邀请区块链节点组网;具体如下所示:As shown in Figures 1-6, the present invention provides a distributed blockchain BaaS system based on gossip communication. This system includes: gossip message communication, group resource isolation, BaaS blockchain resource privatization management, and cross-BaaS invitation blocks. Link node networking; details are as follows:
一、BaaS节点gossip消息通信:1. BaaS node gossip message communication:
通过引入gossip通信协议实现BaaS节点间的消息交互;当有大量的BaaS节点需要数据同步时,普通的P2P模式并不适合,它要求BaaS节点维护incoming与outgoing两个连接池,导致BaaS节点本地的链接数以2n的倍数增长;The message interaction between BaaS nodes is realized by introducing gossip communication protocol; when there are a large number of BaaS nodes that need data synchronization, the ordinary P2P model is not suitable. It requires the BaaS node to maintain two connection pools, incoming and outgoing, resulting in the local BaaS node The number of links increases by a multiple of 2n;
gossip协议允许BaaS节点连接集群内的部分节点,BaaS节点在新增、更新区块链资源数据后,底层自动将改变的数据制作成gossip消息包,并传播至其已连接的所有其他节点,通过gossip的Rumer-Mongering特性,BaaS集群总能保持数据一致性;The gossip protocol allows the BaaS node to connect to some nodes in the cluster. After the BaaS node adds and updates the blockchain resource data, the bottom layer automatically makes the changed data into a gossip message package and propagates it to all other connected nodes. With the Rumer-Mongering feature of gossip, the BaaS cluster can always maintain data consistency;
当一个新的BaaS节点加入集群时,通过gossip的Anti-entropy特性,新的BaaS节点会向已连接的节点请求当前集群下的所有数据区块链资源数据,并快速同步至最新状态;When a new BaaS node joins the cluster, through the Anti-entropy feature of gossip, the new BaaS node will request all data blockchain resource data under the current cluster from the connected node, and quickly synchronize to the latest status;
gossip协议本身自带网络容错机制,其多节点消息冗余发送的特性,保证某两个节点间网络不可达的情况下,其他节点也会尝试发送相同的消息;The gossip protocol itself comes with a network fault-tolerance mechanism, and its multi-node message redundant sending feature ensures that if the network between two nodes is unreachable, other nodes will also try to send the same message;
二、跨BaaS节点邀请区块链节点组网:2. Invite blockchain nodes to network across BaaS nodes:
在进行跨BaaS节点邀请组网时,BaaS节点通过发送指定节点才能接收的邀请信息,并通过gossip协议传播,非目标节点在接受到该消息时,将比对消息中的指定节点是否是其本身,若非本节点则不处理,仅做传播消息处理;目标节点收到消息后,若同意,则将通过gossip消息包返回接受消息和区块链节点证书文件,否则返回携带拒绝理由的拒绝消息,如图1所示;When conducting cross-BaaS node invitation networking, the BaaS node sends invitation information that can only be received by the designated node and spreads it through the gossip protocol. When the non-target node receives the message, it will compare whether the designated node in the message is itself. , if it is not the local node, it will not be processed, and only the message will be disseminated; after the target node receives the message, if it agrees, it will return the acceptance message and the blockchain node certificate file through the gossip message package, otherwise it will return a rejection message carrying the reason for rejection. As shown in Figure 1;
三、群组资源隔离:3. Group resource isolation:
群组group允许BaaS节点间组成私有网络,并传播仅在group中公开的区块链资源,非group中的BaaS节点无法获取group内部的资源信息,通过group可实现BaaS区块链资源的局部共享和隔离;Groups allow BaaS nodes to form a private network and spread blockchain resources that are only public in the group. BaaS nodes outside the group cannot obtain resource information within the group. Through groups, local sharing and isolation of BaaS blockchain resources can be achieved;
BaaS节点可在管理界面输入group名称来创建group,创建成功后会返回全网唯一的group_identifier,其他BaaS节点需要向group内部节点提供group名称和group_identifier来加入该group,加入group后的BaaS节点会自动同步group内的区块链资源信息;group_identifier通过下面的公式计算得出:BaaS nodes can enter the group name in the management interface to create a group. After successful creation, the unique group_identifier in the entire network will be returned. Other BaaS nodes need to provide the group name and group_identifier to the internal nodes of the group to join the group. After joining the group, the BaaS nodes will automatically Synchronize the blockchain resource information within the group; group_identifier is calculated by the following formula:
group_identifier=hex(sha256(group_name+timestamp))group_identifier=hex(sha256(group_name+timestamp))
若BaaS节点不需要接入私有群组,该节点可以加入global群组,global群组是全局默认群组,任何BaaS节点均可加入,BaaS节点只需连接公开的seed节点即可,如图2所示;If the BaaS node does not need to access the private group, the node can join the global group. The global group is the global default group and any BaaS node can join. The BaaS node only needs to connect to the public seed node, as shown in Figure 2 shown;
四、BaaS区块链资源私有化管理:4. BaaS blockchain resource privatization management:
BaaS节点所管理的区块链资源并不需要全部公开,BaaS在创建区块链资源时可以选择是公开还是已优化本地管理,私有资源管理可以具体分为下面三种情况,如图3所示:All blockchain resources managed by BaaS nodes do not need to be made public. When creating blockchain resources, BaaS can choose whether to make them public or to optimize local management. Private resource management can be divided into the following three situations, as shown in Figure 3. :
(1)公开于global中的agent资源:几乎所有的BaaS节点都可以同步,但资源所有者在创建区块链资源时仍然可以选择私有隐藏;(1) Agent resources exposed in global: Almost all BaaS nodes can be synchronized, but resource owners can still choose to hide them privately when creating blockchain resources;
(2)公开于私有group中的agent资源:仅group内部成员可查看,资源所有者在创建区块链资源时仍然可以选择私有隐藏;(2) Agent resources disclosed in private groups: only internal members of the group can view them, and resource owners can still choose to hide them privately when creating blockchain resources;
(3)完全私有化本地管理的agent资源:其他BaaS节点不可见。(3) Completely privatize locally managed agent resources: other BaaS nodes are not visible.
进一步的,在多个公司部署BaaS平台,BaaS节点间网络均可互通,其中一个BaaS节点创建group,其他BaaS节点加入group,创建区块链节点与网络、安装智能合约、跨平台邀请区块链节点组网,BaaS节点间保存的区块链数据信息保持一致。Furthermore, BaaS platforms are deployed in multiple companies, and the networks between BaaS nodes can be interoperable. One BaaS node creates a group, and other BaaS nodes join the group, create blockchain nodes and networks, install smart contracts, and invite blockchain across platforms. Node networking, the blockchain data information saved between BaaS nodes remains consistent.
本发明具备以下特点:The invention has the following characteristics:
1.本方案使用gossip协议实现了BaaS节点间的通信和数据同步。依靠gossip的特性,BaaS节点不需要与集群中的所有BaaS都进行P2P连接,仅需与一个子集连接即可。同时通过gossip实现了集群内区块链资源数据一致性,并通过gossip传递指定节点可处理的消息包,实现跨BaaS节点邀请区块链节点组网。1. This solution uses the gossip protocol to achieve communication and data synchronization between BaaS nodes. Relying on the characteristics of gossip, BaaS nodes do not need to have P2P connections with all BaaS in the cluster, but only need to connect to a subset. At the same time, the blockchain resource data consistency within the cluster is achieved through gossip, and the message package that can be processed by the designated node is transmitted through gossip, so as to invite blockchain nodes to network across BaaS nodes.
本方案也实现了群组资源隔离机制,允许BaaS节点间形成子集群,实现BaaS集群间的资源数据隔离。适用于当前BaaS集群内,多个BaaS节点在组建具有私密性质的区块链网络时,可通过群组,使与此区块链网络无关的BaaS节点不可知。本方案也允许BaaS节点选择性公开或隐藏区块链资源,提高本地区块链资源的安全性。This solution also implements a group resource isolation mechanism, allowing sub-clusters to be formed between BaaS nodes to achieve resource data isolation between BaaS clusters. Applicable to the current BaaS cluster, when multiple BaaS nodes form a private blockchain network, they can use groups to make BaaS nodes unrelated to this blockchain network unknown. This solution also allows BaaS nodes to selectively expose or hide blockchain resources to improve the security of local blockchain resources.
最后应说明的是:以上所述仅为本发明的优选实施例而已,并不用于限制本发明,尽管参照前述实施例对本发明进行了详细的说明,对于本领域的技术人员来说,其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。Finally, it should be noted that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, it is still The technical solutions described in the foregoing embodiments may be modified, or some of the technical features may be equivalently replaced. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.

Claims (1)

  1. 一种基于gossip通信的分布式区块链BaaS系统,其特征在于,本系统包括:gossip消息通信、群组资源隔离、BaaS区块链资源私有化管理以及跨BaaS邀请区块链节点组网;具体如下所示:A distributed blockchain BaaS system based on gossip communication, which is characterized in that the system includes: gossip message communication, group resource isolation, BaaS blockchain resource privatization management, and cross-BaaS invitation blockchain node networking; The details are as follows:
    一、BaaS节点gossip消息通信:1. BaaS node gossip message communication:
    通过引入gossip通信协议实现BaaS节点间的消息交互;当有大量的BaaS节点需要数据同步时,普通的P2P模式并不适合,它要求BaaS节点维护incoming与outgoing两个连接池,导致BaaS节点本地的链接数以2n的倍数增长;The message interaction between BaaS nodes is realized by introducing gossip communication protocol; when there are a large number of BaaS nodes that need data synchronization, the ordinary P2P model is not suitable. It requires the BaaS node to maintain two connection pools, incoming and outgoing, resulting in the local BaaS node The number of links increases by a multiple of 2n;
    gossip协议允许BaaS节点连接集群内的部分节点,BaaS节点在新增、更新区块链资源数据后,底层自动将改变的数据制作成gossip消息包,并传播至其已连接的所有其他节点,通过gossip的Rumer-Mongering特性,BaaS集群总能保持数据一致性;The gossip protocol allows the BaaS node to connect to some nodes in the cluster. After the BaaS node adds and updates the blockchain resource data, the bottom layer automatically makes the changed data into a gossip message package and propagates it to all other connected nodes. With the Rumer-Mongering feature of gossip, the BaaS cluster can always maintain data consistency;
    当一个新的BaaS节点加入集群时,通过gossip的Anti-entropy特性,新的BaaS节点会向已连接的节点请求当前集群下的所有数据区块链资源数据,并快速同步至最新状态;When a new BaaS node joins the cluster, through the Anti-entropy feature of gossip, the new BaaS node will request all data blockchain resource data under the current cluster from the connected node, and quickly synchronize to the latest status;
    gossip协议本身自带网络容错机制,其多节点消息冗余发送的特性,保证某两个节点间网络不可达的情况下,其他节点也会尝试发送相同的消息;The gossip protocol itself comes with a network fault-tolerance mechanism, and its multi-node message redundant sending feature ensures that if the network between two nodes is unreachable, other nodes will also try to send the same message;
    二、跨BaaS节点邀请区块链节点组网:2. Invite blockchain nodes to network across BaaS nodes:
    在进行跨BaaS节点邀请组网时,BaaS节点通过发送指定节点才能接收的邀请信息,并通过gossip协议传播,非目标节点在接受到该消息时,将比对消息中的指定节点是否是其本身,若非本节点则不处理,仅做传播消息处理;目标节点收到消息后,若同意,则将通过gossip消息包返回接受消息和区块链节点证书文件,否则返回携带拒绝理由的拒绝消息;When inviting a network across BaaS nodes, the BaaS node sends an invitation message that can only be received by the designated node and propagates it through the gossip protocol. When the non-target node receives the message, it will compare whether the designated node in the message is itself. If it is not the current node, it will not process it and only propagate the message. After the target node receives the message, if it agrees, it will return the acceptance message and blockchain node certificate file through the gossip message package, otherwise it will return a rejection message with the rejection reason.
    三、群组资源隔离:3. Group resource isolation:
    群组group允许BaaS节点间组成私有网络,并传播仅在group中公开的区块链资源,非group中的BaaS节点无法获取group内部的资源信息,通过group可实现BaaS区块链资源的局部共享和隔离;Group allows BaaS nodes to form a private network and spread blockchain resources that are only public in the group. BaaS nodes not in the group cannot obtain resource information within the group. Partial sharing of BaaS blockchain resources can be achieved through the group. and isolation;
    BaaS节点可在管理界面输入group名称来创建group,创建成功后会返回全网唯一的group_identifier,其他BaaS节点需要向group内部节点提供group名称和group_identifier来加入该group,加入group后的BaaS节点会自动同步group内的区块链资源信息;group_identifier通过下面的公式计算得出:BaaS nodes can enter the group name in the management interface to create a group. After successful creation, the unique group_identifier in the entire network will be returned. Other BaaS nodes need to provide the group name and group_identifier to the internal nodes of the group to join the group. After joining the group, the BaaS nodes will automatically Synchronize the blockchain resource information within the group; group_identifier is calculated by the following formula:
    group_identifier=hex(sha256(group_name+timestamp))group_identifier=hex(sha256(group_name+timestamp))
    若BaaS节点不需要接入私有群组,该节点可以加入global群组,global群组是全局默认群组,任何BaaS节点均可加入,BaaS节点只需连接公开的seed节点即可;If the BaaS node does not need to access the private group, the node can join the global group. The global group is the global default group and any BaaS node can join. The BaaS node only needs to connect to the public seed node;
    四、BaaS区块链资源私有化管理:4. BaaS blockchain resource privatization management:
    BaaS节点所管理的区块链资源并不需要全部公开,BaaS在创建区块链资源时可以选择是公开还是已优化本地管理,私有资源管理可以具体分为下面三种情况:All blockchain resources managed by BaaS nodes do not need to be made public. When creating blockchain resources, BaaS can choose whether to make them public or to optimize local management. Private resource management can be divided into the following three situations:
    (1)公开于global中的agent资源:几乎所有的BaaS节点都可以同步,但资源所有者在创建区块链资源时仍然可以选择私有隐藏;(1) Agent resources exposed in global: Almost all BaaS nodes can be synchronized, but resource owners can still choose to hide them privately when creating blockchain resources;
    (2)公开于私有group中的agent资源:仅group内部成员可查看,资源所有者在创建区块链资源时仍然可以选择私有隐藏;(2) Agent resources disclosed in private groups: only internal members of the group can view them, and resource owners can still choose to hide them privately when creating blockchain resources;
    (3)完全私有化本地管理的agent资源:其他BaaS节点不可见。(3) Completely privatize locally managed agent resources: other BaaS nodes are not visible.
PCT/CN2022/134585 2022-09-20 2022-11-28 Distributed blockchain baas system based on gossip communication WO2024060401A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211145724.6 2022-09-20
CN202211145724.6A CN115695440A (en) 2022-09-20 2022-09-20 Distributed block chain BaaS system based on gossip communication

Publications (1)

Publication Number Publication Date
WO2024060401A1 true WO2024060401A1 (en) 2024-03-28

Family

ID=85062748

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/134585 WO2024060401A1 (en) 2022-09-20 2022-11-28 Distributed blockchain baas system based on gossip communication

Country Status (2)

Country Link
CN (1) CN115695440A (en)
WO (1) WO2024060401A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109033405A (en) * 2018-08-03 2018-12-18 华为技术有限公司 Safeguard method and apparatus, server and the computer readable storage medium of block chain
CN109150972A (en) * 2018-07-17 2019-01-04 湖南宸瀚信息科技有限责任公司 A kind of the common recognition mechanism and its working method of the efficient block chain of bilayer fragment
US20200092361A1 (en) * 2018-09-13 2020-03-19 International Business Machines Corporation Sparse peer with transient participation
CN111628886A (en) * 2020-04-14 2020-09-04 苏宁金融科技(南京)有限公司 Method and device for building block chain network under private cloud environment, and computer equipment
CN112241553A (en) * 2020-10-27 2021-01-19 上海万向区块链股份公司 Block chain privacy protection method and system based on multi-account book architecture

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109150972A (en) * 2018-07-17 2019-01-04 湖南宸瀚信息科技有限责任公司 A kind of the common recognition mechanism and its working method of the efficient block chain of bilayer fragment
CN109033405A (en) * 2018-08-03 2018-12-18 华为技术有限公司 Safeguard method and apparatus, server and the computer readable storage medium of block chain
US20200092361A1 (en) * 2018-09-13 2020-03-19 International Business Machines Corporation Sparse peer with transient participation
CN111628886A (en) * 2020-04-14 2020-09-04 苏宁金融科技(南京)有限公司 Method and device for building block chain network under private cloud environment, and computer equipment
CN112241553A (en) * 2020-10-27 2021-01-19 上海万向区块链股份公司 Block chain privacy protection method and system based on multi-account book architecture

Also Published As

Publication number Publication date
CN115695440A (en) 2023-02-03

Similar Documents

Publication Publication Date Title
CN106487695B (en) A kind of data transmission method, virtual network managing device and data transmission system
CN102577277B (en) Providing a logical aggregated point-to-point data link incorporating a multi-point link
EP1982447B1 (en) System and method for detecting and recovering from virtual switch link failures
CN100479415C (en) System for realizing data communication and its method
CN106850387A (en) A kind of system and method for the virtual network networking for realizing multiple data centers
WO2018121201A1 (en) Distributed cluster service structure, node cooperation method and device, terminal and medium
CN113067902B (en) Block chain message transmission method and device
CN103095569B (en) A kind of thermal capacitance calamity wide area network architecture of highly redundant low cost and its implementation
CN104023022B (en) A kind of IPSec SA acquisition methods and device
CN113676355B (en) Block chain multi-level networking method, equipment and storage medium
CN113098982B (en) Block chain message transmission method and device
CN109687996B (en) Segmentation method suitable for block chain network
CN103067531B (en) A kind of public network IP address resources management distribution method
US20130336117A1 (en) Distributed processing scheme to support ieee 1588 ptp over multiple ports spanning a lag
CN107615721A (en) Transmitting software defines network (SDN) logical links polymerization (LAG) member's signaling
WO2010048875A1 (en) Method, device of cluster system extension and cluster system
CN110113675A (en) A kind of N2N-NRM video sharing system and method
CN111083177A (en) Cross-domain collaborative interaction method based on collaborative gateway
CN113259457B (en) Information synchronization method and device for block chain sub-network
CN111800516B (en) Internet of things equipment management method and device based on P2P
WO2024060401A1 (en) Distributed blockchain baas system based on gossip communication
WO2018036521A1 (en) Resource adjustment method, apparatus, and system
CN106533775B (en) Virtualize member device and neighbor discovering method
JP2004530387A (en) Method for managing a communication network including a wireless link having more than two wireless devices
US11870646B2 (en) Fabric availability and synchronization

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22959401

Country of ref document: EP

Kind code of ref document: A1