CN110728513A - Block chain working method and system based on raft protocol - Google Patents

Block chain working method and system based on raft protocol Download PDF

Info

Publication number
CN110728513A
CN110728513A CN201910876660.9A CN201910876660A CN110728513A CN 110728513 A CN110728513 A CN 110728513A CN 201910876660 A CN201910876660 A CN 201910876660A CN 110728513 A CN110728513 A CN 110728513A
Authority
CN
China
Prior art keywords
block
node
transaction
voting
follower
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201910876660.9A
Other languages
Chinese (zh)
Inventor
王波
赵神州
李骥东
王纯斌
张春生
李业晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Sefon Software Co Ltd
Original Assignee
Chengdu Sefon Software Co Ltd
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 Chengdu Sefon Software Co Ltd filed Critical Chengdu Sefon Software Co Ltd
Priority to CN201910876660.9A priority Critical patent/CN110728513A/en
Publication of CN110728513A publication Critical patent/CN110728513A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a block chain working method and a block chain working system based on a raft protocol. The scheme combines with a raft protocol system to describe all the processes of transaction, transaction conversion, packaging and block output, is unique and optimized for the whole process, provides a whole set of solution ideas and processes, and enables block chain consensus and the processes to be perfectly combined so as to ensure the final ultrahigh efficiency.

Description

Block chain working method and system based on raft protocol
Technical Field
The invention relates to the field of block chains, in particular to a block chain working method and system based on a raft protocol.
Background
In the block chain technology field, in the aspect of consensus efficiency, pow (proof of workload), pos (proof of rights), dpss (proof of delegation rights), pbft (practical Byzantine fault-tolerant system) and variants thereof are common consensus adopted at present, but the common consensus is adopted in most of public chains and a small number of alliance chains. In the alliance-link network, since the aps are reliable physical units, the efficiency of the blockchain consensus algorithm is more concerned.
In the blockchain network protocol, all the node identities are equal, so that the whole network has no master-slave division; the raft protocol is essentially provided with a master node and slave nodes, but leader nodes in the raft protocol are dynamically selected according to the raft protocol, and at any moment, the master node and the slave nodes are unknown, the identity is not fixed, the unpredictable node identity is met, and the block chain equality is better met.
There are other patents or techniques that focus on either voting at raft or proposing blocks according to the raft protocol (prpse) and confirming answers, and there is no complete set of effective interaction flow, complete solutions for trading, packing rules, voting/block-out, and accounting.
Disclosure of Invention
The invention aims to: the block chain working method and system based on the raft protocol are provided, and the problem that the raft protocol is applied to the field of block chains and forms a complete solution is solved.
The technical scheme adopted by the invention is as follows:
a block chain working method based on a raft protocol comprises a leader node and a follower node:
and initiating voting of blocks generated by all received transactions by the leader node, confirming the voting result by the leader node after voting by the follower node, accounting the transactions meeting the conditions by the follower node, and broadcasting the account book to the follower node.
The scheme combines with a raft protocol system to describe all the processes of transaction, transaction conversion, packaging and block output, is unique and optimized for the whole process, provides a whole set of solution ideas and processes, and enables block chain consensus and the processes to be perfectly combined so as to ensure the final ultrahigh efficiency.
And the system also comprises a candidate node, and when no leader node exists in the block chain, all nodes on the block chain are switched to the candidate node. In the raft protocol, there is typically an election process:
the leader node is selected by candidate nodes, and the maximum block chain length in all candidate nodes is used as a necessary condition for selecting the leader node.
And if the network does not have a master node leader node, all the nodes are switched to candidate nodes to participate in election to become leader nodes, meanwhile, voting is initiated and broadcast to other nodes, the other nodes receive the broadcast, the result is voted, if the initiating node receives node agreement larger than the preset proportion of the network, the node is regarded as the leader node, and if the initiating node does not receive the agreement of the node, the node is voted or switched to a follower node.
The method comprises the following steps that a leader node initiates voting on blocks generated by all received transactions, the leader node confirms voting results after voting by a follower node, and the follower node accounts transactions meeting conditions and broadcasts accounts to the follower node, wherein the voting comprises the following steps:
s1, the SDK sends the transaction to one of the follower node or the leader node, if the SDK sends the transaction to the follower node, the step is shifted to S2, and if the SDK sends the transaction to the follower node, the step is shifted to
S2, the follower node receives the transaction, verifies whether the transaction is legal, sends the transaction to the leader node after the verification is passed, and then goes to step S3;
s3, the following steps that the following;
s4, the packaging module constructs a corresponding block according to the transaction and sends the block to the block sending module;
s5, the block output module outputs blocks according to the block output rule of the block chain and sends the blocks to a raft state machine;
s6, broadcasting the received blocks by a raft state machine and initiating voting;
s7, the follower node receives the broadcast for voting, and replies the voting result to the raft state machine of the leader node;
s8, counting voting results of corresponding blocks by a raft state machine of the leader node, if a preset condition is met, updating state records of the blocks, updating local transaction logs and adding block data into a local account book;
and S9, broadcasting the state record of the block, the local transaction log and the local account book by the leader node, and updating the local transaction log and adding the block data into the local account book by the follower node according to the state record of the broadcast updating block.
The method further includes, before step S1, electing among all nodes of the block chain to select a leader node and a follower node. The whole network can not work normally until the leader is confirmed by the whole election.
The block output rule in step S5 includes:
rule 1: if the accumulated transaction content size meets the preset condition, the block is output;
rule 2: presetting transaction block-out time, and directly outputting blocks when the transaction block-out time is reached;
rule 3: if the new transaction is a block allocation change record, the block is immediately issued.
The principle of the block-out rule is similar to that of the Fabric super book
The transaction log includes at least one of a block record term, an index, a type, and a data record.
A blockchain system based on a raft protocol comprising nodes on a number of blockchains, the nodes comprising:
a memory for storing executable instructions;
a multi-core processor configured to execute the executable instructions stored in the memory to implement the operations of the leader node and the follower node of claim 1.
In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that:
1. the invention relates to a block chain working method and a system based on a raft protocol, the protocol has definite regulation on transaction forwarding, the rule of block output of a block is described, a raft protocol flow is used on block output consensus, records are written into an account book after voting on the block chain is completed, the whole flow is complete and clear, and the efficiency is superior to dps in practical engineering;
2. the invention relates to a block chain working method and system based on a raft protocol, which solve the problem that the raft protocol is applied to the field of block chains and forms a complete solution.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts, wherein:
FIG. 1 is a schematic flow diagram of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to fig. 1, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
Before further detailed description of the embodiments of the present invention, terms and expressions mentioned in the embodiments of the present invention are explained, and the terms and expressions mentioned in the embodiments of the present invention are applied to the following explanations.
Transactions (transactions), equivalent to the computer term "Transaction", include calls to smart contracts to effect operations on data related to a target account in the ledger, including operations to add, check, change, modify data in the form of Key-Value pairs in the account, or add new accounts in the ledger, not simply transactions in the business context, which embodiments of the present invention follow in view of the convention that "transactions" are colloquially used in blockchain technology.
A Block (Block) recording a data structure of the ledger data updated by the exchange within a period of time, marked with a timestamp and a unique mark (e.g. a digital fingerprint) of a previous Block, and after the Block is subjected to consensus verification by nodes in the Block chain network, the Block is appended to the end of the Block chain to become a new Block.
A chain of blocks (Blockchain), a chain of data structures in which blocks are assembled in a sequentially contiguous manner, each block having a hash value of a previous block or a subset thereof referenced therein, to cryptographically secure the recorded transaction against tampering and forgery.
A blockchain network incorporates new blocks into a set of centerless nodes of the blockchain in a consensus manner.
The account book (Legger) is the sum of data recorded by taking an account as a dimension in a block chain network, and comprises the elements of the account book data, the state of the account book, the state certification of the account book, a block index and the like.
The ledger data, the actual block data storage, i.e. the record of a series of ordered and non-falsifiable transactions recorded in the block chain, may be expressed in the form of a file system, and the update of the data in the account/account is realized when an intelligent contract called in the transaction is executed.
The ledger state, also referred to as state data, i.e. the state of the ledger data, may be in the form of key-value pairs in the database terminal, where the real-time ledger state is used to represent the latest record of key-value pairs updated by the agreed-upon exchange and the historical ledger state is used to represent the historical record of key-value pairs.
Consensus (Consensus), a process in a blockchain network, is used to agree on the outcome of a transaction among the nodes involved, and the mechanisms for achieving Consensus include Proof of workload (PoW), Proof of rights and interests (PoS, Proof of approval, Proof of share authorization (DPoS), Proof of elapsed Time (PoET, Proof of elapsed Time), and so on.
Intelligent Contracts (Smart Contracts), also called chain codes (chaincodes), are deployed in the blockchain network, and trigger the execution of programs according to conditions, and are used for operating the ledger through query, addition and modification so as to realize query or update of the ledger.
The Raft protocol: the Raft algorithm is a simplified implementation of the Paxos algorithm. The Raft algorithm is mainly used for a alliance chain, is a voting model distributed protocol coordination and master-slave model distributed mechanism, and is widely applied to various distributed applications and software.
Example 1
A block chain working method based on a raft protocol comprises a leader node and a follower node:
and initiating voting of blocks generated by all received transactions by the leader node, confirming the voting result by the leader node after voting by the follower node, accounting the transactions meeting the conditions by the follower node, and broadcasting the account book to the follower node.
The scheme combines with a raft protocol system to describe all the processes of transaction, transaction conversion, packaging and block output, is unique and optimized for the whole process, provides a whole set of solution ideas and processes, and enables block chain consensus and the processes to be perfectly combined so as to ensure the final ultrahigh efficiency.
Example 2
The only difference between this embodiment and embodiment 1 is that a candidate node is further included, and when there is no leader node in the block chain, all nodes on the block chain are switched to the candidate node. In the raft protocol, there is typically an election process:
the leader node is selected by candidate nodes, and the maximum block chain length in all candidate nodes is used as a necessary condition for selecting the leader node.
And if the network does not have a master node leader node, all the nodes are switched to candidate nodes to participate in election to become leader nodes, meanwhile, voting is initiated and broadcast to other nodes, the other nodes receive the broadcast, the result is voted, if the initiating node receives node agreement larger than the preset proportion of the network, the node is regarded as the leader node, and if the initiating node does not receive the agreement of the node, the node is voted or switched to a follower node.
Example 3
In this embodiment, on the basis of embodiment 1, initiating, by a leader node, a vote for a block generated by all received transactions, confirming, by the leader node, a voting result after the vote by a follower node, and accounting the transaction satisfying the condition by the follower node and broadcasting an account book to the follower node include the following steps:
s1, the SDK sends the transaction to one of the follower node or the leader node, if the SDK sends the transaction to the follower node, the step is shifted to S2, and if the SDK sends the transaction to the follower node, the step is shifted to S3;
s2, the follower node receives the transaction, verifies whether the transaction is legal, sends the transaction to the leader node after the verification is passed, and then goes to step S3;
s3, the leader node receives the transaction, verifies whether the transaction is legal or not, and adds the transaction into the packaging module after the verification is passed;
s4, the packaging module constructs a corresponding block according to the transaction and sends the block to the block sending module;
s5, the block output module outputs blocks according to the block output rule of the block chain and sends the blocks to a raft state machine;
s6, broadcasting the received blocks by a raft state machine and initiating voting;
s7, the follower node receives the broadcast for voting, and replies the voting result to the raft state machine of the leader node;
s8, counting voting results of corresponding blocks by a raft state machine of the leader node, if a preset condition is met, updating state records of the blocks, updating local transaction logs and adding block data into a local account book;
and S9, broadcasting the state record of the block, the local transaction log and the local account book by the leader node, and updating the local transaction log and adding the block data into the local account book by the follower node according to the state record of the broadcast updating block.
Example 4
This embodiment further includes, on the basis of embodiment 3, electing among all nodes of the block chain before step S1, and selecting a leader node and a follower node. The whole network can not work normally until the leader is confirmed by the whole election.
The block output rule in step S5 includes:
rule 1: if the accumulated transaction content size meets the preset condition, the block is output;
rule 2: presetting transaction block-out time, and directly outputting blocks when the transaction block-out time is reached;
rule 3: if the new transaction is a block allocation change record, the block is immediately issued.
The principle of the block-out rule is similar to that of the Fabric super book
The transaction log includes at least one of a block record term, an index, a type, and a data record.
Example 5
This implementation a block chain system based on raft agreement, including the node on a plurality of block chains, the node includes:
a memory for storing executable instructions;
a multi-core processor configured to execute the executable instructions stored in the memory to implement the operations of the leader node and the follower node of claim 1.
If the node is a follower node, the executable instruction on the node includes:
1. receiving the transaction, verifying whether the transaction is legal or not, and forwarding the transaction to the leader node after the verification is passed;
2. receiving a block broadcast sent by a leader node, recording the broadcast, adding the broadcast into a local raft protocol state machine, replying a voting result of the leader node if the broadcast is a vote, and writing a block record term, an index, a type and a data record into a local log if the broadcast is broadcast block information;
3. and writing the block hash and the height into an index, and adding the block data into the local account book file.
If the node is a leader node:
1. receiving the transaction, verifying whether the transaction is legal or not, and adding the transaction into a packaging module after the verification is passed;
2. receiving other node transactions, checking whether the voting rule is met, whether the transactions have replay attack and the like, and adding the transactions into a packaging module after the checking is passed;
3. adding the transaction packaged by the packaging module into a local block chaining block discharging module, and discharging the block by the block discharging module according to the rule;
4. adding the blocks to the proposed flow of the raft state machine, which records the broadcast to the unconfirmed blocks later;
5. receiving reply of a follower node to a broadcast record voting state of a certain block record;
6. adding the block state record into a local raft protocol state machine, counting the block voting result by the local state machine, if the block voting result is greater than a preset proportion, changing the state record, and writing the state record into a local object log;
7. reading the transaction log, reading the voting record, and modifying the state machine identifier; synchronously reading the cursor so that the subsequent cursor continues to be read at the current time and later, and repetition is prevented;
8. and writing the block hash and the height into an index, and adding the block data into the local account book file.
Example 6
In this embodiment, a complete block chain working method based on a raft protocol includes first establishing a block chain network composed of N nodes, where a consensus mechanism adopts a raft protocol;
when the network starts to work, all nodes are converted into candidate nodes to participate in election to become leader nodes, meanwhile, voting is initiated and broadcast to other nodes, the other nodes receive the broadcast and vote the result, and if the initiating node receives more than 50% of node agreement, the initiating node is considered as the leader node.
After determining the leader node, all other nodes are converted into follower nodes, and then:
s1, the SDK sends the transaction to one of the follower node or the leader node, if the SDK sends the transaction to the follower node, the step is shifted to S2, and if the SDK sends the transaction to the follower node, the step is shifted to S3;
s2, the follower node receives the transaction, verifies whether the transaction is legal, sends the transaction to the leader node after the verification is passed, and then goes to step S3;
s3, the leader node receives the transaction, wherein the transaction receiving comprises directly receiving the transaction sent by the SDK, verifying whether the transaction is legal after receiving, and adding the transaction into the packaging module after verifying that the transaction passes through the leader node; the method also comprises the steps of receiving a transaction sent by the follower node, checking whether a voting rule is met, whether the transaction has replay attack and the like, and adding the transaction into a packaging module by the leader node after the transaction passes verification;
s4, the packaging module constructs a corresponding block according to the transaction and sends the block to the block sending module;
s5, the block output module outputs blocks according to the block output rule of the block chain and sends the blocks to a raft state machine; the block output rule comprises the following steps:
rule 1: if the accumulated transaction content size meets the preset condition, the block is output; the preset size can be 1M or 2M and the like;
rule 2: presetting transaction block-out time, and directly outputting blocks when the transaction block-out time is reached; automatically triggering a transaction block after the time of 30s, 1min and the like is specified;
rule 3: if the new transaction is a block allocation change record, the block is immediately issued.
S6, broadcasting the received blocks by a raft state machine and initiating voting;
s7, the follower node receives the broadcast for voting, and replies the voting result to the raft state machine of the leader node;
s8, counting voting results of corresponding blocks by a raft state machine of the leader node, if the passing proportion is more than 50%, updating state records of the blocks, updating local transaction logs at the same time, and adding block data into a local account book;
and S9, broadcasting the state record of the block, the local transaction log and the local account book by the leader node, and updating the local transaction log and adding the block data into the local account book by the follower node according to the state record of the broadcast updating block.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A block chain working method based on a raft protocol comprises a leader node and a follower node, and is characterized in that:
and initiating voting of blocks generated by all received transactions by the leader node, confirming the voting result by the leader node after voting by the follower node, accounting the transactions meeting the conditions by the follower node, and broadcasting the account book to the follower node.
2. The method according to claim 1, wherein the method comprises: and the system also comprises a candidate node, and when no leader node exists in the block chain, all nodes on the block chain are switched to the candidate node.
3. The method according to claim 2, wherein the method comprises: the leader node is selected by candidate nodes, and the maximum block chain length in all candidate nodes is used as a necessary condition for selecting the leader node.
4. The method according to claim 1, wherein the method comprises: the method comprises the following steps that a leader node initiates voting on blocks generated by all received transactions, the leader node confirms voting results after voting by a follower node, and the follower node accounts transactions meeting conditions and broadcasts accounts to the follower node, wherein the voting comprises the following steps:
s1, the SDK sends the transaction to one of the follower node or the leader node, if the SDK sends the transaction to the follower node, the step is shifted to S2, and if the SDK sends the transaction to the follower node, the step is shifted to S3;
s2, the follower node receives the transaction, verifies whether the transaction is legal, sends the transaction to the leader node after the verification is passed, and then goes to step S3;
s3, the leader node receives the transaction, verifies whether the transaction is legal or not, and adds the transaction into the packaging module after the verification is passed;
s4, the packaging module constructs a corresponding block according to the transaction and sends the block to the block sending module;
s5, the block output module outputs blocks according to the block output rule of the block chain and sends the blocks to a raft state machine;
s6, broadcasting the received blocks by a raft state machine and initiating voting;
s7, the follower node receives the broadcast for voting, and replies the voting result to the raft state machine of the leader node;
s8, counting voting results of corresponding blocks by a raft state machine of the leader node, if a preset condition is met, updating state records of the blocks, updating local transaction logs and adding block data into a local account book;
and S9, broadcasting the state record of the block, the local transaction log and the local account book by the leader node, and updating the local transaction log and adding the block data into the local account book by the follower node according to the state record of the broadcast updating block.
5. The method of claim 4, wherein the method comprises: the method further includes, before step S1, electing among all nodes of the block chain to select a leader node and a follower node.
6. The method according to claim 1, wherein the method comprises: the block output rule in step S5 includes:
rule 1: if the accumulated transaction content size meets the preset condition, the block is output;
rule 2: presetting transaction block-out time, and directly outputting blocks when the transaction block-out time is reached;
rule 3: if the new transaction is a block allocation change record, the block is immediately issued.
7. The method of claim 4, wherein the method comprises: the transaction log includes at least one of a block record term, an index, a type, and a data record.
8. A block chaining system based on a raft protocol, comprising: comprising a plurality of nodes on a blockchain, the nodes comprising:
a memory for storing executable instructions;
a multi-core processor configured to execute the executable instructions stored in the memory to implement the operations of the leader node and the follower node of claim 1.
CN201910876660.9A 2019-09-17 2019-09-17 Block chain working method and system based on raft protocol Pending CN110728513A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910876660.9A CN110728513A (en) 2019-09-17 2019-09-17 Block chain working method and system based on raft protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910876660.9A CN110728513A (en) 2019-09-17 2019-09-17 Block chain working method and system based on raft protocol

Publications (1)

Publication Number Publication Date
CN110728513A true CN110728513A (en) 2020-01-24

Family

ID=69219136

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910876660.9A Pending CN110728513A (en) 2019-09-17 2019-09-17 Block chain working method and system based on raft protocol

Country Status (1)

Country Link
CN (1) CN110728513A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111368002A (en) * 2020-03-05 2020-07-03 广东小天才科技有限公司 Data processing method, system, computer equipment and storage medium
CN111683118A (en) * 2020-05-16 2020-09-18 中信银行股份有限公司 Block chain-based consensus method and device, master node equipment and slave node equipment
CN113609229A (en) * 2021-08-18 2021-11-05 东北大学 Rapid log replication method and device in Fabric Block chain
CN114596165A (en) * 2022-02-24 2022-06-07 成都质数斯达克科技有限公司 Block chain system and method for registering, selling and managing financial products
CN115250277A (en) * 2022-08-09 2022-10-28 西安邮电大学 Consensus mechanism applicable to edge cache system based on alliance chain
CN116233132A (en) * 2023-05-08 2023-06-06 成都理工大学 Energy block chain link point consensus method based on improved Raft consensus mechanism
EP4221068A1 (en) * 2022-01-31 2023-08-02 Siemens Aktiengesellschaft System and method for writing and retrieval of data in blockchain

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445711A (en) * 2016-08-28 2017-02-22 杭州云象网络技术有限公司 Byzantine-fault-tolerant consensus method applied to block chain
US20170323392A1 (en) * 2016-05-05 2017-11-09 Lance Kasper Consensus system for manipulation resistant digital record keeping
CN107395353A (en) * 2017-04-24 2017-11-24 阿里巴巴集团控股有限公司 A kind of block chain common recognition method and device
CN109669945A (en) * 2018-12-12 2019-04-23 成都四方伟业软件股份有限公司 Collaborative management method and device based on block chain
CN109978516A (en) * 2019-03-06 2019-07-05 西安电子科技大学 The manufacture of block and synchronous method, information data processing terminal in block chain network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170323392A1 (en) * 2016-05-05 2017-11-09 Lance Kasper Consensus system for manipulation resistant digital record keeping
CN106445711A (en) * 2016-08-28 2017-02-22 杭州云象网络技术有限公司 Byzantine-fault-tolerant consensus method applied to block chain
CN107395353A (en) * 2017-04-24 2017-11-24 阿里巴巴集团控股有限公司 A kind of block chain common recognition method and device
CN109669945A (en) * 2018-12-12 2019-04-23 成都四方伟业软件股份有限公司 Collaborative management method and device based on block chain
CN109978516A (en) * 2019-03-06 2019-07-05 西安电子科技大学 The manufacture of block and synchronous method, information data processing terminal in block chain network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
甘俊等: "区块链实用拜占庭容错共识算法的改进", 《计算机应用》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111368002A (en) * 2020-03-05 2020-07-03 广东小天才科技有限公司 Data processing method, system, computer equipment and storage medium
CN111683118A (en) * 2020-05-16 2020-09-18 中信银行股份有限公司 Block chain-based consensus method and device, master node equipment and slave node equipment
CN113609229A (en) * 2021-08-18 2021-11-05 东北大学 Rapid log replication method and device in Fabric Block chain
CN113609229B (en) * 2021-08-18 2023-10-20 东北大学 Method and device for fast log replication in Fabric block chain
EP4221068A1 (en) * 2022-01-31 2023-08-02 Siemens Aktiengesellschaft System and method for writing and retrieval of data in blockchain
WO2023144244A1 (en) * 2022-01-31 2023-08-03 Siemens Aktiengesellschaft System and method for writing and retrieval of data in blockchain
CN114596165A (en) * 2022-02-24 2022-06-07 成都质数斯达克科技有限公司 Block chain system and method for registering, selling and managing financial products
CN115250277A (en) * 2022-08-09 2022-10-28 西安邮电大学 Consensus mechanism applicable to edge cache system based on alliance chain
CN115250277B (en) * 2022-08-09 2023-09-05 西安邮电大学 Method for adapting consensus mechanism to edge buffer system based on alliance chain
CN116233132A (en) * 2023-05-08 2023-06-06 成都理工大学 Energy block chain link point consensus method based on improved Raft consensus mechanism

Similar Documents

Publication Publication Date Title
CN110728513A (en) Block chain working method and system based on raft protocol
Chaudhry et al. Consensus algorithms in blockchain: Comparative analysis, challenges and opportunities
Carrara et al. Consistency, availability, and partition tolerance in blockchain: a survey on the consensus mechanism over peer-to-peer networking
CN111382456B (en) Proposal message processing method, device, equipment and storage medium
CN109255713B (en) Method for acquiring accounting right in block chain network within certain time period
CN112104482B (en) Consensus method based on parallel voting
Wang et al. Inter-bank payment system on enterprise blockchain platform
CN110730204A (en) Method for deleting nodes in block chain network and block chain system
Chen et al. An improved algorithm for practical byzantine fault tolerance to large-scale consortium chain
CN110163755B (en) Block chain-based data compression and query method and device and electronic equipment
CN111478795B (en) Alliance block chain network consensus method based on mixed Byzantine fault tolerance
CN111711526A (en) Consensus method and system for block chain nodes
CN113326165B (en) Data processing method and device based on block chain and computer readable storage medium
CN113448694B (en) Block chain consensus method for improving transaction processing capability
CN112232619A (en) Block output and sequencing method, node and block chain network system of alliance chain
JP2022164563A (en) Transaction sequencing consensus method and system
CN109586949A (en) Block generation method and computer storage medium
CN112597240A (en) Federal learning data processing method and system based on alliance chain
CN115701078B (en) Cross-chain transaction processing method, device, electronic equipment and storage medium
Grybniak et al. Waterfall: a scalable distributed ledger technology
Bu et al. Cross hyperledger fabric transactions
CN110458541B (en) Object replacement method and device based on block chain
Dini et al. Analysis of implementing blockchain technology to the argentinian criminal records information system
Wels Guaranteed-TX: The exploration of a guaranteed cross-shard transaction execution protocol for Ethereum 2.0.
Ge et al. Magma: Robust and flexible multi-party payment channel

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200124

RJ01 Rejection of invention patent application after publication