WO2021196350A1 - 区块链Raft+PBFT的混合共识网络算法及系统 - Google Patents
区块链Raft+PBFT的混合共识网络算法及系统 Download PDFInfo
- Publication number
- WO2021196350A1 WO2021196350A1 PCT/CN2020/089665 CN2020089665W WO2021196350A1 WO 2021196350 A1 WO2021196350 A1 WO 2021196350A1 CN 2020089665 W CN2020089665 W CN 2020089665W WO 2021196350 A1 WO2021196350 A1 WO 2021196350A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- raft
- pbft
- blockchain
- algorithm
- consensus network
- Prior art date
Links
- 238000004422 calculation algorithm Methods 0.000 title claims abstract description 45
- 230000006855 networking Effects 0.000 claims abstract description 12
- 239000000370 acceptor Substances 0.000 claims abstract 2
- 238000000034 method Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 12
- 238000012790 confirmation Methods 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 claims description 6
- 230000007246 mechanism Effects 0.000 abstract description 3
- 230000006872 improvement Effects 0.000 description 8
- 230000000903 blocking effect Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/30—Decision processes by autonomous network management units using voting and bidding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1044—Group management mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1044—Group management mechanisms
- H04L67/1051—Group master selection mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Definitions
- the present invention relates to the technical field of block chains, and specifically to a mixed consensus network algorithm and system of block chain Raft+PBFT.
- Blockchain is a term in the field of information technology. In essence, it is a shared database. The data or information stored in it has the characteristics of "unforgeable”, “full traces”, “traceable”, “open and transparent”, and “collective maintenance”. Based on these characteristics, blockchain technology has laid a solid foundation of "trust”, created a reliable "cooperation” mechanism, and has broad application prospects.
- the core problem of the distributed network of the blockchain is how to reach a consensus efficiently. It is more difficult to reach a consensus in a society with a low degree of centralization and decentralized decision-making power.
- the purpose of the present invention is to provide a hybrid consensus network algorithm and system of blockchain Raft+PBFT to solve the problems raised in the background art.
- one of the objectives of the present invention is to provide a blockchain Raft+PBFT hybrid consensus network algorithm, which includes the following steps:
- the nodes of the whole network are selected through a random algorithm to select consensus committee nodes;
- the method for Raft to perform rapid networking of each node of the blockchain network includes the following steps:
- Raft's open source software uses etcd, which is a highly available kv storage based on raft.
- the random algorithm method includes the following steps:
- the method of constructing a PBFT consensus network includes the following steps:
- the client c sends ⁇ REQUEST, o, t, c> to the master node to request the execution of operation o; the timestamp t is used to ensure that the client request will only be executed once;
- Each message sent by the replica node to the client includes the current view number; enabling the client to track the view number, so as to further calculate the number of the current master node;
- the client sends a request to the master node through a point-to-point message, and then the master node automatically broadcasts the request to all backup nodes.
- the view is a continuously numbered integer, and its calculation formula is:
- v is the view number
- p is the copy number
- is the number of the copy set.
- the master node automatically broadcasts the request to all backup nodes, including a pre-preparation phase, a preparation phase, and a confirmation phase.
- Pre-preparation phase The master node assigns a sequence number n to the received request, and then sends a pre-preparation message to all backup nodes.
- the format of the pre-preparation message is ⁇ PRE-PREPARE, v, n, d>, m>, where v is the view number, m is the request message sent by the client, and d is the summary of the request message m;
- Preparation phase If the backup node i accepts the pre-preparation message ⁇ PRE-PREPARE, v, n, d>, m>, it enters the preparation phase. During the preparation phase, the node sends a preparation message ⁇ PREPARE, to all replica nodes v, n, d, i>, and write the pre-preparation message and the preparation message into its own message log;
- the second objective of the present invention is to provide a blockchain Raft+PBFT hybrid consensus network system, including a Raft module and a PBFT module, the Raft module is used for fast networking of each node of the blockchain network;
- the PBFT module is used to construct a PBFT consensus network, and the Raft module and the PBFT module are used to implement the blockchain Raft+PBFT hybrid consensus network algorithm according to any one of claims 1-7.
- the third objective of the present invention is to provide a blockchain Raft+PBFT hybrid consensus network device, including a processor, a memory, and a computer program stored in the memory and running on the processor.
- the processor is used to execute the computer program. Realize any of the above-mentioned blockchain Raft+PBFT hybrid consensus network algorithms.
- the fourth object of the present invention is that the computer readable storage medium stores a computer program, which is characterized in that: when the computer program is executed by a processor, it implements any one of the above-mentioned blockchain Raft+PBFT hybrid consensus network algorithms.
- the present invention has the beneficial effects: in the hybrid consensus network algorithm of the blockchain Raft+PBFT, Raft is used for rapid networking of each node of the blockchain network to form a peer-to-peer blockchain network, A random algorithm is used to select consensus committee nodes from the entire network to build a PBFT consensus network to ensure relatively reliable consistency and form a consensus mechanism.
- Figure 1 is a block diagram of the overall flow of embodiment 1;
- FIG. 2 is a block diagram of the flow chart of the fast networking method of Embodiment 1;
- Fig. 3 is a flow chart of the method for constructing a PBFT consensus network in embodiment 1;
- one of the purposes of this embodiment is to provide a hybrid consensus network algorithm of blockchain Raft+PBFT, which includes the following steps:
- the nodes of the whole network are selected through a random algorithm to select consensus committee nodes;
- the method for Raft to perform rapid networking of each node of the blockchain network includes the following steps:
- Raft's open source software uses etcd, which is a highly available kv storage based on raft.
- scenario two highly available k-v storage:
- the random algorithm method includes the following steps:
- the method of constructing the PBFT consensus network includes the following steps:
- the client c sends ⁇ REQUEST, o, t, c> to the master node to request the execution of operation o; the timestamp t is used to ensure that the client request will only be executed once;
- Each message sent by the replica node to the client includes the current view number; enabling the client to track the view number, so as to further calculate the number of the current master node;
- the client sends a request to the master node through a point-to-point message, and then the master node automatically broadcasts the request to all backup nodes.
- v is the view number
- p is the copy number
- is the number of the copy set.
- the master node automatically broadcasts the request to all backup nodes, including the pre-preparation phase, the preparation phase, and the confirmation phase.
- Pre-preparation phase The master node assigns a sequence number n to the received request, and then sends a pre-preparation message to all backup nodes.
- the format of the pre-preparation message is ⁇ PRE-PREPARE, v, n, d>, m>, where v is the view number, m is the request message sent by the client, and d is the summary of the request message m;
- Preparation phase If the backup node i accepts the pre-preparation message ⁇ PRE-PREPARE, v, n, d>, m>, it enters the preparation phase. During the preparation phase, the node sends a preparation message ⁇ PREPARE, to all replica nodes v, n, d, i>, and write the pre-preparation message and the preparation message into its own message log;
- the second purpose of this embodiment is to provide a blockchain Raft+PBFT hybrid consensus network system, including a Raft module and a PBFT module.
- the Raft module is used for fast networking of each node of the blockchain network;
- the PBFT module Used to construct the PBFT consensus network, the Raft module and the PBFT module are used to implement any of the above-mentioned blockchain Raft+PBFT hybrid consensus network algorithms.
- FIG. 4 there is shown a schematic structural diagram of a hybrid consensus network device providing blockchain Raft+PBFT involved in this embodiment.
- the device includes a processor, a memory, and a bus.
- the processor includes one or more processing cores.
- the processor is connected to the processor through a bus.
- the memory is used to store program instructions. When the processor executes the program instructions in the memory, the above-mentioned blockchain Raft+PBFT hybrid consensus network algorithm is implemented.
- the memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static anytime access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), Erase Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic Disk or Optical Disk.
- SRAM static anytime access memory
- EEPROM electrically erasable programmable read-only memory
- EPROM Erase Programmable Read Only Memory
- PROM Programmable Read Only Memory
- ROM Read Only Memory
- Magnetic Memory Flash Memory
- magnetic Disk Magnetic Disk or Optical Disk.
- the present invention also provides a computer-readable storage medium.
- the computer-readable storage medium stores a computer program.
- the computer program is executed by a processor, the above-mentioned blockchain Raft+PBFT hybrid consensus network algorithm is realized.
- the present invention also provides a computer program product containing instructions, which when running on a computer, causes the computer to execute the above-mentioned blockchain Raft+PBFT hybrid consensus network algorithm.
- the program can be stored in a computer-readable storage medium, as mentioned above.
- the storage medium can be read-only memory, magnetic disk or optical disk, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Theoretical Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
Claims (10)
- 区块链Raft+PBFT的混合共识网络算法,其特征在于:包括如下步骤:S1、Raft进行区块链网络的各个节点进行快速组网;S2、形成区块链的点对点网络;S3、通过随机算法进行全网节点选取共识委员会节点;S4、构建PBFT共识网络。
- 根据权利要求1所述的区块链Raft+PBFT的混合共识网络算法,其特征在于:所述S1中,Raft进行区块链网络的各个节点进行快速组网的方法包括如下步骤:S1.1、选主,在paxos中选主,同步所有acceptor的commited记录,完成上任;S1.2、执行任务,commited得到follower的通过,完成任务。
- 根据权利要求1所述的区块链Raft+PBFT的混合共识网络算法,其特征在于:所述S1中,Raft的开源软件采用etcd,etcd是基于raft实现的高可用的kv存储。
- 根据权利要求1所述的区块链Raft+PBFT的混合共识网络算法,其特征在于:所述S4中,构建PBFT共识网络的方法包括如下步骤:S3.1、客户端c向主节点发送<REQUEST,o,t,c>请求执行操作o;S3.2、每个由副本节点发给客户端的消息都包含了当前的视图编号;S3.3、客户端通过点对点消息向主节点发送请求,然后主节点自动将该请求向所有备 份节点进行广播。
- 根据权利要求5所述的区块链Raft+PBFT的混合共识网络算法,其特征在于:所述视图是连续编号的整数,其计算公式为:p=vmod|R|;其中,v为视图编号,p为副本编号,|R|为副本集合的个数。
- 根据权利要求5所述的区块链Raft+PBFT的混合共识网络算法,其特征在于:所述主节点自动将该请求向所有备份节点进行广播包括预准备阶段、准备阶段和确认阶段。
- 区块链Raft+PBFT的混合共识网络系统,其特征在于:包括Raft模块和PBFT模块,所述Raft模块用于进行区块链网络的各个节点进行快速组网;所述PBFT模块用于构建PBFT共识网络,所述Raft模块和PBFT模块用于实现如权利要求1-7中任一所述的区块链Raft+PBFT的混合共识网络算法。
- 区块链Raft+PBFT的混合共识网络装置,其特征在于:包括处理器、存储器以及存储在存储器中并在处理器上运行的计算机程序,处理器用于执行计算机程序时实现如权利要求1-7中任一所述的区块链Raft+PBFT的混合共识网络算法。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于:所述计算机程序被处理器执行时实现如权利要求1-7中任一所述的区块链Raft+PBFT的混合共识网络算法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010238998.4A CN111464349A (zh) | 2020-03-30 | 2020-03-30 | 区块链Raft+PBFT的混合共识网络算法及系统 |
CN202010238998.4 | 2020-03-30 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021196350A1 true WO2021196350A1 (zh) | 2021-10-07 |
Family
ID=71678514
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/089665 WO2021196350A1 (zh) | 2020-03-30 | 2020-05-11 | 区块链Raft+PBFT的混合共识网络算法及系统 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111464349A (zh) |
WO (1) | WO2021196350A1 (zh) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115334038A (zh) * | 2022-08-20 | 2022-11-11 | 信通院(江西)科技创新研究院有限公司 | 一种基于区块链的appid申请管理方法和系统 |
CN115664684A (zh) * | 2022-12-27 | 2023-01-31 | 湖南工商大学 | 融合数字证据的共识协议运行方法、装置及相关设备 |
CN116015672A (zh) * | 2022-12-15 | 2023-04-25 | 山西大学 | 一种基于信誉模型的pbft共识机制 |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112019330B (zh) * | 2020-08-04 | 2024-03-29 | 广东省科技基础条件平台中心 | 一种基于联盟链的内网安全审计数据的存储方法及系统 |
CN112019380B (zh) * | 2020-08-12 | 2022-07-22 | 西华大学 | 一种基于权益激励的结合Raft和PBFT算法的区块链共识方法 |
CN112465515B (zh) * | 2021-01-28 | 2022-02-25 | 支付宝(杭州)信息技术有限公司 | 一种区块链的共识方法、共识节点及电子设备 |
CN113573255A (zh) * | 2021-07-26 | 2021-10-29 | 上海点融信息科技有限责任公司 | 基于区块链进行共识的方法、装置及存储介质 |
CN113837758A (zh) * | 2021-09-27 | 2021-12-24 | 深圳前海微众银行股份有限公司 | 一种区块链系统的共识方法及装置 |
CN114422513B (zh) * | 2022-01-19 | 2024-02-27 | 贵州数创控股(集团)有限公司 | 一种基于Raft-PBFT的区块链共识方法 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103414705A (zh) * | 2013-07-30 | 2013-11-27 | 电子科技大学 | 一种基于saas模式的移动互联网络异构数据交换方法 |
CN106789095A (zh) * | 2017-03-30 | 2017-05-31 | 腾讯科技(深圳)有限公司 | 分布式系统及消息处理方法 |
US20170323392A1 (en) * | 2016-05-05 | 2017-11-09 | Lance Kasper | Consensus system for manipulation resistant digital record keeping |
CN109525636A (zh) * | 2018-10-12 | 2019-03-26 | 上海保险交易所股份有限公司 | 基于Raft算法的区块链共识方法 |
CN109784916A (zh) * | 2018-12-12 | 2019-05-21 | 广东工业大学 | 一种改进pbft的以太坊共识机制应用于联盟链的方法 |
-
2020
- 2020-03-30 CN CN202010238998.4A patent/CN111464349A/zh active Pending
- 2020-05-11 WO PCT/CN2020/089665 patent/WO2021196350A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103414705A (zh) * | 2013-07-30 | 2013-11-27 | 电子科技大学 | 一种基于saas模式的移动互联网络异构数据交换方法 |
US20170323392A1 (en) * | 2016-05-05 | 2017-11-09 | Lance Kasper | Consensus system for manipulation resistant digital record keeping |
CN106789095A (zh) * | 2017-03-30 | 2017-05-31 | 腾讯科技(深圳)有限公司 | 分布式系统及消息处理方法 |
CN109525636A (zh) * | 2018-10-12 | 2019-03-26 | 上海保险交易所股份有限公司 | 基于Raft算法的区块链共识方法 |
CN109784916A (zh) * | 2018-12-12 | 2019-05-21 | 广东工业大学 | 一种改进pbft的以太坊共识机制应用于联盟链的方法 |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115334038A (zh) * | 2022-08-20 | 2022-11-11 | 信通院(江西)科技创新研究院有限公司 | 一种基于区块链的appid申请管理方法和系统 |
CN115334038B (zh) * | 2022-08-20 | 2024-03-26 | 信通院(江西)科技创新研究院有限公司 | 一种基于区块链的appid申请管理方法和系统 |
CN116015672A (zh) * | 2022-12-15 | 2023-04-25 | 山西大学 | 一种基于信誉模型的pbft共识机制 |
CN115664684A (zh) * | 2022-12-27 | 2023-01-31 | 湖南工商大学 | 融合数字证据的共识协议运行方法、装置及相关设备 |
Also Published As
Publication number | Publication date |
---|---|
CN111464349A (zh) | 2020-07-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021196350A1 (zh) | 区块链Raft+PBFT的混合共识网络算法及系统 | |
WO2021042880A1 (zh) | 区块链网络中删除节点的方法和区块链系统 | |
EP4254183A1 (en) | Transaction processing method and apparatus, computer device, and storage medium | |
CN111338766B (zh) | 事务处理方法、装置、计算机设备及存储介质 | |
Sovran et al. | Transactional storage for geo-replicated systems | |
Yanovich et al. | Exonum: Byzantine fault tolerant protocol for blockchains | |
CN112654978B (zh) | 分布式异构存储系统中数据一致性实时检查的方法、设备和系统 | |
US10275400B1 (en) | Systems and methods for forming a fault-tolerant federated distributed database | |
CN111597015A (zh) | 事务处理方法、装置、计算机设备及存储介质 | |
Agneeswaran | Big-data–theoretical, engineering and analytics perspective | |
CN114493865A (zh) | 基于区块链的去中心化互联网协同系统和数据交互方法 | |
Manevich et al. | Endorsement in Hyperledger Fabric via service discovery | |
US20230110826A1 (en) | Log execution method and apparatus, computer device and storage medium | |
Amiri et al. | Permissioned blockchains: Properties, techniques and applications | |
AU2019381980A1 (en) | Taking snapshots of blockchain data | |
EP3769219B1 (en) | Taking snapshots of blockchain data | |
Amiri et al. | Saguaro: An edge computing-enabled hierarchical permissioned blockchain | |
US20210218827A1 (en) | Methods, devices and systems for non-disruptive upgrades to a replicated state machine in a distributed computing environment | |
Ailijiang et al. | Efficient distributed coordination at wan-scale | |
CN114661818B (zh) | 图数据库中集群间数据实时同步的方法、系统和介质 | |
CN116303789A (zh) | 多分片多副本数据库并行同步方法、装置及可读介质 | |
CN116974983A (zh) | 数据处理方法、装置、计算机可读介质及电子设备 | |
CN114428818A (zh) | 数据处理系统、数据处理方法、可读存储介质 | |
CN113138879A (zh) | 用于混合边缘复制的方法和系统 | |
Chengfu | Research on autonomous and controllable high-performance consensus mechanism of blockchain |
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: 20929319 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20929319 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20929319 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25/04/2023) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20929319 Country of ref document: EP Kind code of ref document: A1 |