CN111798234A - Lightweight block chain system and construction method - Google Patents

Lightweight block chain system and construction method Download PDF

Info

Publication number
CN111798234A
CN111798234A CN202010494135.3A CN202010494135A CN111798234A CN 111798234 A CN111798234 A CN 111798234A CN 202010494135 A CN202010494135 A CN 202010494135A CN 111798234 A CN111798234 A CN 111798234A
Authority
CN
China
Prior art keywords
transaction
information
node
nodes
state
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.)
Granted
Application number
CN202010494135.3A
Other languages
Chinese (zh)
Other versions
CN111798234B (en
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.)
Institute of Information Engineering of CAS
Original Assignee
Institute of Information Engineering of CAS
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 Institute of Information Engineering of CAS filed Critical Institute of Information Engineering of CAS
Priority to CN202010494135.3A priority Critical patent/CN111798234B/en
Publication of CN111798234A publication Critical patent/CN111798234A/en
Application granted granted Critical
Publication of CN111798234B publication Critical patent/CN111798234B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a lightweight block chain system and a construction method thereof, wherein the system comprises one or more groups established by the trust of a node to other nodes set by each node, and each group comprises one or more nodes including a main node generated by the election of each node in the group. The invention divides the transaction into two types of intra-group transaction and inter-group transaction according to the group attribute of the node, then respectively processes the two transaction types according to different service logics and feeds back processing information in time; a consensus algorithm is designed based on a trust network so as to realize the safety, rapidness and high efficiency of system block output and distributed account book state updating.

Description

Lightweight block chain system and construction method
Technical Field
The invention belongs to the technical field of computer application, and particularly relates to a lightweight block chain system and a construction method thereof.
Background
The block chain is a decentralized infrastructure and a distributed database technology which are gradually raised along with the increasing popularization of digital encryption currencies such as bitcoin and the like, and is a reliable data platform for decentralized and trust removal is maintained in a data block chain structure mode, and the chain structure of the reliable data platform can maintain continuously-growing and non-falsifiable data records.
The blockchain technology is considered as the most subversive technical innovation since the invention of the Internet, the blockchain technology ensures data security by means of a password method, ensures data consistency by means of a consensus mechanism, executes commands by means of an intelligent contract and transmits data by means of P2P networking, so that a system based on the blockchain technology has the characteristics of decentralization, non-tampering, distributed consensus, traceability, final consistency and the like, and the reliable transmission problem of trust and value is solved at extremely low cost, and therefore, the blockchain technology has a very wide application prospect in various fields such as digital economy, the Internet of things, big data, public services and the like.
Currently, the most widely used block chain system includes a public chain system represented by bitcoin and ether house and a federation chain system represented by hyper ledger Fabric (hyper). In the public chain system, an identity authentication mechanism is not needed, and anyone can join the network and participate in the service operation of the block chain network, so that the complete decentralization in the real sense is realized; but public link system networks face the problems of high energy consumption, low efficiency, long transaction authentication time, difficulty in large-scale landing application and the like. In a alliance chain system, a user or an organization can join the alliance chain system only by having a specific authority to participate in business operation and read-write maintenance of block chain data, the system separates transaction execution from consensus, supports policy-based endorsement and has an identity management integration based on an industry standard; the upgraded and iterated blockchain system has the advantages of high throughput, high concurrency, low delay and the like, can freely correspond to blockchain projects with complex scenes and large scales, and is widely applied to the scenes of internet, supply chain finance, anti-counterfeiting traceability and the like at present.
The technical evolution from public links represented by Bizhou currency and Ether Fahrenheit to alliance links represented by Hyperridge Fabric realizes the great improvement of the performance of the blockchain system in certain application scenes through the restriction management of membership of participating blockchain networks. However, regardless of a alliance chain or a public chain, the existing mature technology is still too numerous and complex in application, and a block chain network designed for large-scale, thousands of member nodes inevitably causes huge resource consumption and data storage burden of a memory, a processor and the like for a certain single node; therefore, how to deploy nodes on a lightweight server and build a safe, stable, fast and efficient lightweight block chain system on dozens to hundreds of lightweight nodes is an urgent problem to be solved in order to meet the practical application scenarios that the business volume is relatively less, the requirement on the performance of the server is not high, and the deployment can be fast and conveniently carried out.
Disclosure of Invention
In order to solve the above problems, the present invention provides a lightweight block chain system and a construction method thereof, which aims at building a safe, stable, fast and efficient lightweight block chain system on a server with relatively low configuration and uncomplicated service logic.
The technical scheme of the invention is as follows:
a lightweight blockchain system comprises one or more groups established by the trust level of a node to other nodes, wherein each group comprises one or more nodes including a main node generated by the election of the nodes in the group; each node carries out transaction and updates the state of the account book through the following steps:
when two users belonging to the same group carry out transaction, the two users carrying out transaction complete the transaction after receiving the transaction confirmation information of the group main node, and the group main node stores the transaction information and the calculated book state pre-reading and writing information and broadcasts the information to the block chain system;
when two users belonging to different groups carry out transaction, the two users carrying out transaction complete the transaction after receiving transaction confirmation messages sent by two corresponding main nodes, and meanwhile, the two corresponding main nodes store and broadcast transaction information and calculated pre-read writing information of the state of the book to a block chain system;
after a set time, each main node competes for the block priority according to the identity information;
and each node updates the state of the book according to the transaction information of the main node with the block priority and the pre-read-write information of the state of the book.
Furthermore, the trust level of the node to other nodes set by each node is stored in a local key ring list; the local key ring list comprises the node public key, the node identity information, the authentication signature and the signer ID of at least one other node to the node, the trust of the node to other nodes of the system and nodes to be authenticated of the system, and the priority of the group node participating in the election of the new master node.
Further, one or more groups comprise at least one slave node for assisting the master node in maintaining the global ledger state and the block data information.
Further, the transaction information includes transaction time, transaction initiator, transaction acceptor, signature information of transaction initiator to transaction, and transaction data.
Further, when two nodes belonging to the same group carry out transaction, the group master node stores and broadcasts transaction information and calculated book state pre-read writing information to the block chain system through the following steps:
1) acquiring and verifying transaction information;
2) simulating and executing legal transaction to obtain transaction confirmation information and book status pre-reading and writing information;
3) returning the transaction confirmation information to the two users who perform the transaction;
4) and storing and broadcasting the transaction information and the book state pre-read writing information to the block chain system.
Further, the validity of the transaction information is verified by checking the transaction signature information, the transaction initiator account status and whether double flowers are present.
Further, transaction information and book state pre-reading and writing information are stored in a local transaction pool, and an index of transaction is established.
Further, when two users belonging to different groups transact, the two corresponding main nodes store and broadcast transaction information and calculated pre-read and write information of the state of the book to the block chain system through the following steps:
1) the main node corresponding to the transaction initiator acquires transaction information and sends the successfully verified transaction information to the main node corresponding to the transaction receiver;
2) the main node corresponding to the transaction receiver verifies the legality of the transaction information, simulates and executes legal transaction, stores and respectively sends the acquired first confirmation information of the transaction to the two nodes for transaction and the main node corresponding to the transaction initiator, and stores and sends the pre-read writing information of the first state of the ledger to the main node corresponding to the transaction initiator;
3) the host node corresponding to the transaction initiator simulates and executes the transaction, and acquires second confirmation information of the transaction and second state pre-read writing information of the account book;
4) the main node corresponding to the transaction initiator compares the pre-read writing information of the second state of the account book with the pre-read writing information of the first state of the account book, and if the comparison is successful, the transaction second confirmation message is sent to the two nodes for transaction and the main node corresponding to the transaction receiver, and the pre-read writing information of the second state of the account book is stored as the pre-read writing information of the state of the account book;
5) the main node corresponding to the transaction receiver saves the pre-read writing information of the first state of the ledger as the pre-read writing information of the state of the ledger;
6) and the two corresponding main nodes broadcast the transaction information and the book status pre-reading and writing information to the block chain system respectively.
Further, each main node calculates a hash value according to the identity information and a random seed, and the main node with the largest hash value obtains the block priority.
A construction method of a lightweight blockchain comprises the following steps:
1) each node maintains a trust list locally according to the trust degree of the node to other nodes;
2) dividing all nodes into one or more groups through a trust list;
3) selecting a node as a main node in each group;
wherein, each node carries out transaction and updates the state of the account book through the following steps:
when two users belonging to the same group carry out transaction, the two users carrying out transaction complete the transaction after receiving the transaction confirmation information of the group main node, and the group main node stores the transaction information and the calculated book state pre-reading and writing information and broadcasts the information to the block chain system;
when two users belonging to different groups carry out transaction, the two users carrying out transaction complete the transaction after receiving transaction confirmation messages sent by two corresponding main nodes, and meanwhile, the two corresponding main nodes store and broadcast transaction information and calculated pre-read writing information of the state of the book to a block chain system;
after a set time, each main node competes for the block priority according to the identity information;
and each node updates the state of the book according to the transaction information of the main node with the block priority and the pre-read-write information of the state of the book.
Compared with the prior art, the invention has the following advantages:
1) dividing the transaction into an intra-group transaction and an inter-group transaction according to the group attribute of the node, respectively processing the two transaction types according to different service logics and feeding back processing information in time;
2) the invention designs a consensus algorithm based on a trust network so as to realize the safety, rapidness and high efficiency of system block output and distributed account book state updating.
Drawings
Fig. 1 is an example of a lightweight blockchain network architecture.
Fig. 2 is a key ring structure.
FIG. 3 is the G1-Leader Keyed Ring section content.
Fig. 4 is a schematic diagram of a lightweight blockchain consensus mechanism.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The lightweight blockchain system is characterized in that a lightweight and easily-realized trust network (Web of trust) based on a public Key PKI system is designed based on a Key Ring (Key Ring), is used for constructing a trust foundation and an identity management mechanism of the whole blockchain network, and endows the identities and attributes of different groups (groups) and nodes (Peer) in each Group, such as the priority order of a Leader node and other nodes in each Group inheriting the Leader (in order that after a certain Leader node is down, the affiliated Group can conveniently select a main node to process services, and the priority order of the inherited Leader is set in the Key Ring); after different nodes establish trust, the blockchain network is started, and all the nodes maintain the global account book state and blockchain information together according to a consensus mechanism in the scheme. In order to improve the transmission and processing speed of the transaction, the invention adopts the Gossip communication protocol to broadcast and synchronize the information of the whole block chain network, divides the transaction into two types of intra-group transaction and inter-group transaction according to the group attribute of the node, and then respectively processes the two transaction types according to different service logics and feeds back the processing information in time.
A simple embodiment of the invention is shown in FIG. 1, and the technical scheme thereof has three aspects of block chain identity authentication, network organization and transaction form, and consensus mechanism, wherein Group is a Group, t1…tnAt n consensus time points, block is specified as follows:
first, block chain identity authentication aspect
The invention adopts a trust network (Web of Trust) based on a Key Ring as an identity authentication mechanism of the lightweight blockchain system, and the basic idea is that each node in the blockchain network mutually authenticates and signs according to the trust degree, and each Peer node locally maintains a Key Ring (Key Ring) list as a basic component to establish the trust basis of the network, wherein the list contains the trust signatures and the trust degrees of each node to other nodes in the network, and simultaneously, in order to quickly identify the identity of the member node, the Key Ring also contains the basic identity information (such as ID, communication address, belonging group and other related attributes) of each node. A simple example key ring structure is shown in figure 2. The basic content is as follows:
public Key: the public key of the node;
user ID: identity information of the node;
signatures: the signature information of the node to the public key of the node is at least included in the authentication signature and the signer ID of one or more nodes, and other nodes can add the signatures of the nodes to authenticate the public key of the Peer node.
Owner Trust: the node pair trust degree of a public key owner (Peer) can be set to be three values of ultimate, complete and unknown according to the trust degree. The node is used for setting trust values between the Leader node in the block chain network and nodes in the same group; complete is the trust value that the node sets for the nodes of other groups (except for Leader); the unknown is used for setting a trust value for a node to be added into the network to wait for authentication, an inactive node or an untrusted node in the network;
Leader-Inherit: and one integer can be set only by the Leader node, and represents the priority of the new Leader election participated by other Peer nodes in the group after the Leader node in the same group is down, wherein the value of the integer can be 1-N or none, the smaller the value is, the higher the priority is, and the none indicates that the node is not a member of the group.
Taking the Leader node of Group1 in fig. 1 as an example, part of the content of the key ring is as shown in fig. 3: the first part (marked 1) is the Leader self-related information of the group G1, and the second part is the information of the Peer1 nodes in the key ring (such as the priority of the inherited Leader, the trust signature and the trust degree of the G1-Leader) in the group G1; and by analogy, the third part, the fourth part and the fifth part are related information such as trust signatures and trust degrees of the Leader or the Peer node pair G1-Leader in other groups.
From the above, the Peer node can conveniently and quickly obtain the relevant information (identity, group, trust level, etc.) of other nodes from the key ring, thereby performing the relevant service operation between nodes or groups.
Network organization and transaction form
In order to reduce the number of nodes participating in consensus, simplify the consensus process, shorten the consensus time and simultaneously reduce the communication complexity and network overhead as much as possible, the invention provides a Group concept, namely, part of the nodes can be constructed into a Group based on trust or other factors, and then different groups jointly construct and maintain the lightweight blockchain network; each group selects a master node (Leader) according to a corresponding rule, if a certain group only comprises one node, the node defaults to the Leader node of the group, and the main responsibilities of the Leader node include:
1) network communications between groups;
2) regularly sending live (active message, which indicates that the node works normally, the same below) information to other nodes in the group;
3) processing transactions, wherein the confirmation of each transaction needs to be the signature confirmation of a Leader node of a group where both transaction parties are located;
4) locally maintaining transaction pool information, and calculating a hash value as an index for each successful transaction to facilitate retrieval of the transaction;
5) maintaining the state of the global account book and the block data information, and synchronizing the state and the block data information to other nodes in the group;
6) and maintaining the trust relationship of the group to other groups, the trust relationship of the nodes in the same group to other nodes, the identity and other related information based on the key ring.
In the lightweight blockchain system, each Leader node needs to maintain a global account book state and blockchain information, in order to avoid the loss of a Group caused by the shutdown of the Leader node, other nodes in the Group can take the role of a Follower (slave node), so that the global state data of the lightweight blockchain network is stored together with the Leader nodes in the Group, and the Leader nodes initiate and participate in the election of new Leader nodes under the shutdown condition of the Leader nodes, so that the new Leader nodes participate in a network consensus mechanism to maintain the normal operation of the network.
Meanwhile, in order to process the transaction in the lightweight blockchain network quickly and efficiently, the invention provides two different types of transaction modes of intra-group transaction and inter-group transaction, namely, according to two transaction partiesWhether the business logic of transaction processing is determined by members of the same group or not so as to rapidly process the transaction. The invention uses Tx(tsSed, Rev, Sig, data) represents a transaction, where tsRepresenting the time when the Leader confirms the exchange, Sed is the initiator of the current transaction, Rev represents the receiver of the transaction, Sig is the signature information of the transaction initiator on the transaction, data represents the relevant data of the transaction, and simultaneously, two adjacent consensus time intervals of the front and back of the system are divided into a Period. The size of Period is determined by the throughput of the system processing transactions, the value of Period can be adjusted to avoid block bloat when the system transactions are frequent, and the value of Period can be adjusted to be high to enable the block to contain enough transactions when the system transactions are small.
The group transaction is the transaction between users managed by the same group node, and the transaction is processed more similar to a centralized processing mode, such as a group UseriInitiating a transaction Tx(n,Useri,UserjSigdata) to users in the groupjAfter receiving the transaction initiated by the User, the Peer node directly forwards the transaction information to the Leader node, and after receiving the transaction information, the Leader node firstly confirms the validity of the transaction (checks the transaction signature and the User)iThe account status, whether double flowers exist, etc.), then the transaction is simulated and executed, the result and the transaction information are saved, finally, the change of the account status is pre-read and written once, and the transaction confirmation message is returned to both sides of the user (the confirmation message contains the signature information of the Leader node, the transaction is endorsed once, and the message is completely confirmed after the Period is finished and the block is confirmed). After both sides of the transaction user receive the transaction confirmation information, the transaction result can be inquired from the Leader node, and the account states of both sides of the transaction user can be changed according to the transaction result. The Leader node returns the transaction confirmation message to both sides of the user and simultaneously broadcasts the transaction related message to other Group groups (in order to reduce system traffic, the message can be directly broadcast to the Leader nodes of different groups, and then the Leader node broadcasts the message to other nodes of the same Group); otherwise, if the Leader node finds the transaction illegalThen a transaction failure message is sent directly to the user.
Inter-group transactions refer to transactions between users managed by different groups, e.g. group GkUser iniInitiating a transaction Tx(n,Gk-Useri,Gm-UserjSig, data) to group GmInner UserjGroup GkAfter receiving the transaction, the Leader node firstly confirms the validity of the transaction, and then retransmits the transaction to the group G after confirming the validitymThe Leader node of (B) performs validity check (the rebroadcast information includes G)k-UseriIn PeriodnPre-read and write information of ledger state generated by transaction in group to ensure that Leader nodes of two groups agree with basic information of both parties of transaction), GmThe Leader node checks the transaction information by combining the local account book state and the received rebroadcast information, simulates and executes the transaction after the check is passed, stores the result and the transaction information, pre-reads and writes the change of the account book state once, signs a transaction confirmation message and sends the transaction confirmation message to the user and the group GkLeader node of GkThe Leader node of (A) simulates again the execution of the transaction, the associated state change and G caused to the transactionm-comparing the information sent by the leader, if the results are consistent, signing the transaction confirmation information to the user and forwarding it to Gm-Leader to complete the interaction, the last two Leader nodes broadcasting the transaction to the network; for the inter-group transaction, the user must receive the signature confirmation of two Leader nodes to consider that the transaction is preliminarily confirmed, and of course, the final result must wait until PeriodnAnd the confirmation can be carried out after the completion and the block output. Otherwise, a problem occurs in any link in the transaction process (for example, the results of the two leader node simulation transactions are not matched), and the transaction is discarded.
Third, the aspect of consensus mechanism
The consensus algorithm adopted by the invention is shown in fig. 4, and is mainly explained from two aspects as follows:
1) leader node election: in the initialization process of the lightweight blockchain network, a Leader node elects a node with the highest trust degree to act as the node in the group, then the Leader node appoints the inheritance order of the Leader after the shutdown according to the trust degree of other nodes in the group, writes the inheritance order into the Leader-Inherot information of a key ring, and synchronizes to other nodes in the network to serve as the inheritance priority of other nodes in the group after the shutdown of the Leader node; if the Leader node is down, other nodes send a message for re-election of the Leader through the Gossip communication protocol and vote for the node with the highest priority which can be contacted by the node, and when the node with higher priority in the remaining active nodes receives the vote exceeding 2/3, the node actively takes responsibility of the Leader and sends live information to other nodes, which means that the new Leader node is successfully elected. However, if only a single node does not receive live information of the Leader due to network reasons, the re-election message sent by the single node is rejected by other nodes which can be connected to the Leader so as to avoid initiating a wrong election operation. It should be noted that the inheritance order refers to the priority when selecting the Leader, and not to say that the Leader is inherited according to the order after the Leader is down, this is mainly done to prevent the network fault caused when the node with the highest inheritance priority and the Leader are down together; or because the node with the highest inheritance priority loses communication with the Leader due to the network, the role of the Leader is wrongly played and live information is sent to other nodes to cause system disorder; or inheriting that the node with the highest priority is not active in the block chain network and does not actively take the role of a Follower; this ensures the fairness and liveness of the blockchain network to some extent.
2) In order to enable a designed block chain system to meet the requirements of high speed and high efficiency, the invention adopts a method for decoupling two processes of distributed account book management and system block generation, and the specific process is as follows: in a Period of Period, the Leader node of each group processes the transaction logic of the block chain system according to the intra-group transaction and the inter-group transaction, and broadcasts the processed transaction to the Leader nodes of other groups through the gossip protocol, and the Leader nodes pre-read and write the local account book once according to the collected successful transaction so as to facilitate the next consensus beforeChecking whether the account states of both transaction parties are legal; meanwhile, each Leader node maintains a transaction information pool to store transaction information collected in a Period of Period; in order to facilitate the searching and comparison of the processed transaction, after the transaction is successfully processed, the Leader node calculates a hash value for the transaction information, so that the transaction can be quickly searched in a transaction pool; the Leader node can also pull the collected or processed transaction information from the Leader nodes of other groups; when periodnWhen the time point arrives, each group Leader node uses a random function to generate a random string seed, after the seed is spliced with the own identity information, the hash Value is calculated to obtain a special Value as the basis for competing out the block (for convenience, the Value is represented by H-Value), broadcasting the H-Value and a transaction hash Value index (for reducing communication traffic and not needing to broadcast transaction specific information) collected in the time period in the transaction pool to other Leader nodes, wherein the Leader nodes determine the state change of the account book and the priority of block output according to the compared H-Value size (so that the hash Value is calculated for the seed, the node is prevented from calling a random function for multiple times to obtain a Value with higher priority, the hash Value is only used as a reference of the block output and does not relate to the system security, and therefore, a fast-calculation hash algorithm such as sha1 can be used for not wasting calculation resources); after the Leader node receives the block output information of other Leader nodes, comparing the received H-Value values to determine the block priority; such as a node LeaderNTaking out block priority, other nodes index the transaction collected by own transaction pool with LeaderNCompares the sent transactions and LeaderNMiddle periodnSending complete information of transactions which are not collected to the LeaderN(ii) a Node LeaderNAfter receiving information sent by other nodes, simulating and executing uncontained transaction and writing the uncontained transaction into an account book state, packaging the transaction into blocks according to a time sequence, and packaging the blocksnAnd the state updating information of the account book is broadcasted to other nodes in the network within the Period; finally, other nodes in the network will follow the LeaderNAnd updating the local block chain network state by the sent block and account book information and finishing the consensus.
Because each penThe transaction is verified by the Leader nodes of the groups where both transaction parties are located, so that the change of the account book cannot be influenced by the transaction sequence processed, but the information of the system block can be influenced. To prevent the Leader node from being down in the consensus process (by the Leader)mFor a downtime example), the system will be at PeriodNTime point t of the endnTriggering timeout, e.g. no Leader is received at the end of timeoutmFeedback information of, LeaderNDirectly entering the last block outlet ring section; leadermZhong in PeriodNTransactions that are not contained in the block will be forced to be discarded; therefore, in order to avoid the loss caused by the downtime of the Leader node, the Leader node needs to broadcast the transaction processed by the Leader node in time through the Gossip communication protocol.
If the node with the highest block right is down after the hash value of the node is broadcasted, other Leader nodes of the system perform block consensus again according to the logic of the consensus algorithm after timeout is finished, and only for rapidly achieving the consensus, the seed and the corresponding hash value do not need to be generated again.
The lightweight blockchain system designed by the invention is established based on the trust relationship among all nodes, so the problems of node collusion, cheating and the like in the Byzantine consensus system are not discussed in the invention, and the consensus algorithm only considers the problem of the downtime of the nodes.
The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. It will be apparent to those skilled in the art that various modifications and variations can be made in the present examples without departing from the spirit and scope of the invention. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.

Claims (10)

1. A lightweight blockchain system comprises one or more groups established by the trust level of a node to other nodes, wherein each group comprises one or more nodes including a main node generated by the election of the nodes in the group; each node carries out transaction and updates the state of the account book through the following steps:
when two users belonging to the same group carry out transaction, the two users carrying out transaction complete the transaction after receiving the transaction confirmation information of the group main node, and the group main node stores the transaction information and the calculated book state pre-reading and writing information and broadcasts the information to the block chain system;
when two users belonging to different groups carry out transaction, the two users carrying out transaction complete the transaction after receiving transaction confirmation messages sent by two corresponding main nodes, and meanwhile, the two corresponding main nodes store and broadcast transaction information and calculated pre-read writing information of the state of the book to a block chain system;
after a set time, each main node competes for the block priority according to the identity information;
and each node updates the state of the book according to the transaction information of the main node with the block priority and the pre-read-write information of the state of the book.
2. The blockchain system of claim 1, wherein the trust level of the local node set by each node to other nodes is stored in a local key ring list; the local key ring list comprises the node public key, the node identity information, the authentication signature and the signer ID of at least one other node to the node, the trust of the node to other nodes of the system and nodes to be authenticated of the system, and the priority of the group node participating in the election of the new master node.
3. The blockchain system of claim 1, wherein at least one slave node is included in one or more groups to assist a master node in maintaining global ledger status and blockdata information.
4. The blockchain system of claim 1, wherein the transaction information includes transaction time, transaction initiator, transaction recipient, signature information of the transaction initiator for the transaction, and transaction data.
5. The blockchain system of claim 1, wherein when two nodes belonging to the same group conduct transactions, the group master node saves and broadcasts the transaction information and the calculated book status pre-read write information to the blockchain system by:
1) acquiring and verifying transaction information;
2) simulating and executing legal transaction to obtain transaction confirmation information and book status pre-reading and writing information;
3) returning the transaction confirmation information to the two users who perform the transaction;
4) and storing and broadcasting the transaction information and the book state pre-read writing information to the block chain system.
6. The blockchain system of claim 5, wherein the validity of the transaction information is verified by checking transaction signature information, transaction initiator account status, and whether double flowers are present.
7. The blockchain system of claim 5, wherein transaction information and ledger state pre-read write information are stored in a local transaction pool and an index of transactions is established.
8. The blockchain system of claim 1, wherein when two users belonging to different groups conduct transactions, two corresponding master nodes store and broadcast transaction information and calculated book state pre-read write information into the blockchain system by:
1) the main node corresponding to the transaction initiator acquires transaction information and sends the successfully verified transaction information to the main node corresponding to the transaction receiver;
2) the main node corresponding to the transaction receiver verifies the legality of the transaction information, simulates and executes legal transaction, stores and respectively sends the acquired first confirmation information of the transaction to the two nodes for transaction and the main node corresponding to the transaction initiator, and stores and sends the pre-read writing information of the first state of the ledger to the main node corresponding to the transaction initiator;
3) the host node corresponding to the transaction initiator simulates and executes the transaction, and acquires second confirmation information of the transaction and second state pre-read writing information of the account book;
4) the main node corresponding to the transaction initiator compares the pre-read writing information of the second state of the account book with the pre-read writing information of the first state of the account book, and if the comparison is successful, the transaction second confirmation message is sent to the two nodes for transaction and the main node corresponding to the transaction receiver, and the pre-read writing information of the second state of the account book is stored as the pre-read writing information of the state of the account book;
5) the main node corresponding to the transaction receiver saves the pre-read writing information of the first state of the ledger as the pre-read writing information of the state of the ledger;
6) and the two corresponding main nodes broadcast the transaction information and the book status pre-reading and writing information to the block chain system respectively.
9. The blockchain system of claim 1, wherein each master node computes a hash value based on the identity information and a random seed, the master node with the largest hash value yielding a block priority.
10. A construction method of a lightweight blockchain comprises the following steps:
1) each node maintains a trust list locally according to the trust degree of the node to other nodes;
2) dividing all nodes into one or more groups through a trust list;
3) selecting a node as a main node in each group;
wherein, each node carries out transaction and updates the state of the account book through the following steps:
when two users belonging to the same group carry out transaction, the two users carrying out transaction complete the transaction after receiving the transaction confirmation information of the group main node, and the group main node stores the transaction information and the calculated book state pre-reading and writing information and broadcasts the information to the block chain system;
when two users belonging to different groups carry out transaction, the two users carrying out transaction complete the transaction after receiving transaction confirmation messages sent by two corresponding main nodes, and meanwhile, the two corresponding main nodes store and broadcast transaction information and calculated pre-read writing information of the state of the book to a block chain system;
after a set time, each main node competes for the block priority according to the identity information;
and each node updates the state of the book according to the transaction information of the main node with the block priority and the pre-read-write information of the state of the book.
CN202010494135.3A 2020-06-03 2020-06-03 Lightweight block chain system and construction method Active CN111798234B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010494135.3A CN111798234B (en) 2020-06-03 2020-06-03 Lightweight block chain system and construction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010494135.3A CN111798234B (en) 2020-06-03 2020-06-03 Lightweight block chain system and construction method

Publications (2)

Publication Number Publication Date
CN111798234A true CN111798234A (en) 2020-10-20
CN111798234B CN111798234B (en) 2023-04-07

Family

ID=72806160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010494135.3A Active CN111798234B (en) 2020-06-03 2020-06-03 Lightweight block chain system and construction method

Country Status (1)

Country Link
CN (1) CN111798234B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112419060A (en) * 2020-11-20 2021-02-26 上海树图区块链研究院 Asset hosting system, asset management method, node, and medium
CN113516557A (en) * 2021-07-14 2021-10-19 桂林电子科技大学 Block chain with directed acyclic graph structure and implementation method thereof
CN114444090A (en) * 2021-12-17 2022-05-06 中国科学院信息工程研究所 Efficient secret unique leader election method

Citations (3)

* 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
CN109995850A (en) * 2019-03-05 2019-07-09 深圳前海微众银行股份有限公司 A kind of transaction processing method of block catenary system and block catenary system
CN110569675A (en) * 2019-09-18 2019-12-13 上海海事大学 Multi-Agent transaction information protection method based on block chain technology

Patent Citations (3)

* 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
CN109995850A (en) * 2019-03-05 2019-07-09 深圳前海微众银行股份有限公司 A kind of transaction processing method of block catenary system and block catenary system
CN110569675A (en) * 2019-09-18 2019-12-13 上海海事大学 Multi-Agent transaction information protection method based on block chain technology

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112419060A (en) * 2020-11-20 2021-02-26 上海树图区块链研究院 Asset hosting system, asset management method, node, and medium
CN112419060B (en) * 2020-11-20 2024-03-22 上海树图区块链研究院 Asset hosting system, asset management method, node and medium
CN113516557A (en) * 2021-07-14 2021-10-19 桂林电子科技大学 Block chain with directed acyclic graph structure and implementation method thereof
CN113516557B (en) * 2021-07-14 2022-09-23 桂林电子科技大学 Block chain with directed acyclic graph structure and implementation method thereof
CN114444090A (en) * 2021-12-17 2022-05-06 中国科学院信息工程研究所 Efficient secret unique leader election method

Also Published As

Publication number Publication date
CN111798234B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN110784346B (en) Reputation value-based PBFT consensus system and method
Abraham et al. The blockchain consensus layer and BFT
CN111798234B (en) Lightweight block chain system and construction method
CN112907252B (en) Block chain transaction method and system based on multi-person chain lower channel
Stewart et al. Grandpa: a byzantine finality gadget
CN111092896B (en) Food source tracing distributed data synchronization method based on optimized PAXOS
Hassanzadeh-Nazarabadi et al. Lightchain: A dht-based blockchain for resource constrained environments
CN112541758A (en) Multi-round voting type fault-tolerant sequencing consensus mechanism and method based on block chain
CN111371905B (en) Block chain layering consensus proving system and method based on cloud computing
CN111082943B (en) Efficient block chain consensus method
Zhang et al. Cycledger: A scalable and secure parallel protocol for distributed ledger via sharding
Wang et al. A trusted consensus fusion scheme for decentralized collaborated learning in massive IoT domain
CN109039847A (en) Method and device for solving block chain whole network message consistency problem by using DMT
CN112636905B (en) System and method for extensible consensus mechanism based on multiple roles
CN112200681B (en) Service processing method, information processing method and node equipment of block chain network
Wang et al. Beh-Raft-Chain: a behavior-based fast blockchain protocol for complex networks
CN112769580A (en) Block chain layered excitation consensus algorithm
KR20200081533A (en) Blockchain Consensus Method based Improved Dynamic Blind Voting for Internet of Things Environment
CN112187866B (en) Novel block chain consensus method based on shared storage
CN110098938B (en) Trusted committee under-chain acceleration solution method and system
Vizier et al. Comchain: Bridging the gap between public and consortium blockchains
Liu et al. Cross-shard transaction processing in sharding blockchains
CN114003584A (en) Byzantine fault-tolerant consensus method based on evolutionary game
CN114938292A (en) Node reliability-based multi-level optimization PBFT consensus method
Xu et al. Improved PBFT algorithm based on vague sets

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
GR01 Patent grant
GR01 Patent grant