CN112422341A - Fault detection method of block chain network and related equipment - Google Patents

Fault detection method of block chain network and related equipment Download PDF

Info

Publication number
CN112422341A
CN112422341A CN202011294211.2A CN202011294211A CN112422341A CN 112422341 A CN112422341 A CN 112422341A CN 202011294211 A CN202011294211 A CN 202011294211A CN 112422341 A CN112422341 A CN 112422341A
Authority
CN
China
Prior art keywords
current
node
fault
block
accounting
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
CN202011294211.2A
Other languages
Chinese (zh)
Other versions
CN112422341B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011294211.2A priority Critical patent/CN112422341B/en
Publication of CN112422341A publication Critical patent/CN112422341A/en
Application granted granted Critical
Publication of CN112422341B publication Critical patent/CN112422341B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure provides a fault detection method and device for a block chain network, a computer readable storage medium and an electronic device. The method comprises the following steps: acquiring a current block and block information thereof of a distributed account book to be written into the block chain network; determining that a master node switch occurs when the current block goes out of block based on the block information of the current block; acquiring the switching times of the current main node of the current block and the current block level; determining a current fault node from current accounting nodes in a current accounting period of the block chain network according to the switching times of the current main node and the current block level; and determining the current fault node with the continuous fault times meeting the fault recovery rule as a target fault node in the block chain network. The technical scheme provided by the embodiment of the disclosure can automatically and quickly detect the target fault node in the block chain network.

Description

Fault detection method of block chain network and related equipment
Technical Field
The present disclosure relates to the field of computer and communication technologies, and in particular, to a method and an apparatus for detecting a fault of a block chain network, a computer-readable storage medium, and an electronic device.
Background
A Distributed Ledger (DL) is a database that is shared, replicated and synchronized between members (also referred to as "nodes") of a Distributed accounting system (DLSs). The distributed ledger records transactions between members of the distributed accounting system, such as the exchange of assets or data. DLS is a decentralized, distributed accounting system. In DLS, each node replicates and maintains a ledger, which is updated independently at each node and does not require a central node for maintenance.
DLS may also be referred to as a consensus network, blockchain network, and/or blockchain system. The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm.
With the development of the blockchain technology, the blockchain technology is applied to more and more fields. For example, the method is widely applied to the fields of finance, information security, computing resource sharing, entertainment, social contact, supply chain management or medical treatment.
In the block chain network in the related art, log information is read by an external monitoring system in the whole network operation process, and whether the block chain network has a fault or not is judged by the log information. The method for detecting the fault in the blockchain network has long response period, and can not quickly identify the node with the fault in the blockchain network, thereby causing the reduction of the service performance externally provided by the blockchain network, having larger influence on the service and having high time cost.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure.
Disclosure of Invention
The embodiment of the disclosure provides a fault detection method and device for a block chain network, a computer-readable storage medium, and an electronic device, which can automatically and quickly identify a node with a fault in the block chain network, effectively save time, and improve service performance provided by the block chain network to the outside.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
The embodiment of the disclosure provides a fault detection method for a block chain network, which includes: acquiring a current block and block information thereof of a distributed account book to be written into the block chain network; determining that a master node switch occurs when the current block goes out of block based on the block information of the current block; acquiring the switching times of the current main node of the current block and the current block level; determining a current fault node from current accounting nodes in a current accounting period of the block chain network according to the switching times of the current main node and the current block level; and determining the current fault node with the continuous fault times meeting the fault recovery rule as a target fault node in the block chain network.
The disclosed embodiment provides a fault detection device of a block chain network, the device includes: a current block information obtaining unit, configured to obtain a current block of a distributed account book to be written in the block chain network and block information of the current block; a master node switching determination unit, configured to determine, based on the block information of the current block, that master node switching occurs when the current block goes out of block; a node switching information obtaining unit, configured to obtain the current master node switching frequency and the current block level of the current block; a current fault node determining unit, configured to determine, according to the current master node switching frequency and the current block level, a current fault node from current accounting nodes in a current accounting period of the block chain network; and the target fault node determining unit is used for determining the current fault node with the continuous fault times meeting the fault recovery rule as the target fault node in the block chain network.
In some exemplary embodiments of the present disclosure, the apparatus further comprises: a fault detection contract deployment unit, configured to deploy a fault detection intelligent contract on the blockchain network; and the contract multi-table maintenance unit is used for maintaining the fault table, the node table and the accounting node table of the block chain network through the fault detection intelligent contract. The fault table is used for recording fault information of fault nodes in accounting nodes in the block chain network, and the fault information comprises accounting node identifications of the corresponding fault nodes, the height of a last fault block and the number of continuous faults; the node table is used for recording nodes in the block chain network, and the nodes comprise the accounting nodes; the accounting node list comprises a current accounting node list in the current accounting period maintained by the fault detection intelligent contract, and the current accounting node list comprises current accounting node identification of the current accounting node in the current accounting period.
In some exemplary embodiments of the present disclosure, the current failed node determination unit may include: a current accounting node list length determining unit, configured to read the current accounting node list from the accounting node table of the fault detection intelligent contract, and determine a length of the current accounting node list; a current fault node index determining unit, configured to determine a current fault node index of the current block according to the number of times of switching the current master node, the current block level, and the length of the current accounting node list; and the current fault node identification determining unit is used for determining the current fault node identification of the current fault node from the current accounting node identification of the current accounting node list according to the current fault node index.
In some exemplary embodiments of the present disclosure, the current failed node index determining unit includes: a difference value calculating unit, configured to obtain a difference value between the current master node switching frequency and the current block level if the current accounting node in the current accounting period adopts a polling-out block; and the fault node index calculating unit is used for taking a modulus of the difference value between the switching times of the current main node and the current block level and the length of the current accounting node list to obtain the current fault node index.
In some exemplary embodiments of the present disclosure, the target failed node determination unit includes: a current fault block height obtaining unit, configured to obtain a current fault block height of the current block if an accounting node identifier of a fault node matching the current fault node identifier exists in the fault table; a continuous fault frequency accumulation unit, configured to add one to the continuous fault frequency corresponding to the current fault node identifier if a difference between the current fault block height and a previous fault block height corresponding to the current fault node identifier is equal to a subtraction of one from the length of the current accounting node list; and the target fault node obtaining unit is used for judging that the fault recovery rule is met and determining the current fault node as the target fault node if the continuous fault frequency is greater than a fault threshold value.
In some exemplary embodiments of the present disclosure, the apparatus further comprises: and the continuous fault frequency resetting unit is used for resetting the continuous fault frequency corresponding to the current fault node identifier to be one if the difference between the current fault block height and the previous fault block height corresponding to the current fault node identifier is not equal to the length of the current accounting node list minus one.
In some exemplary embodiments of the present disclosure, the apparatus further comprises: and the fault information adding unit is used for inserting fault information of the fault node corresponding to the current fault node identification into the fault table if the accounting node identification of the fault node matched with the current fault node identification does not exist in the fault table.
In some exemplary embodiments of the present disclosure, the failure information further includes a historical number of failures of the corresponding failed node. Wherein the apparatus further comprises: and the historical fault frequency accumulation unit is used for adding one to the historical fault frequency corresponding to the current fault node identification in the fault table if the accounting node identification of the fault node matched with the current fault node identification exists in the fault table. The fault information further comprises the switching times of the last main node corresponding to the fault node and the last block level.
In some exemplary embodiments of the present disclosure, the apparatus further comprises: a target failure node deleting unit, configured to delete the target failure node from the node table maintained by the failure detection intelligent contract; an accounting node selecting unit, configured to select a next accounting node in a next accounting period maintained by the fault detection intelligent contract from the node table after the target fault node is deleted; and the accounting node table updating unit is used for updating the accounting node table in the fault detection intelligent contract according to the next accounting node to obtain a next accounting node list.
In some exemplary embodiments of the disclosure, the blockchain network further comprises a consensus module. Wherein the apparatus further comprises: a contract accounting period reading unit, configured to read, by the consensus module, a next accounting period maintained by the fault detection intelligent contract after the current block is written into the distributed account book; a contract accounting node list reading unit, configured to, if a next accounting period maintained by the fault detection intelligent contract is greater than an accounting period maintained by the consensus module, read, by the consensus module, the next accounting node list from the fault detection intelligent contract; and the consensus accounting node updating unit is used for updating the accounting node list maintained by the consensus module by using the next accounting node list and updating the accounting period maintained by the consensus module by using the next accounting period.
In some exemplary embodiments of the present disclosure, the apparatus further comprises: a block number determination unit, configured to determine whether the number of blocks in the block chain network reaches a predetermined number if it is determined that master node switching does not occur when the current block goes out of the block based on the block information of the current block; an accounting node reselection unit, configured to reselect a next accounting node in a next accounting period from candidate accounting nodes of the blockchain network and a current accounting node in the current accounting period if it is determined that the number of blocks in the blockchain network reaches the predetermined number; and the accounting node identifier updating unit is used for updating the next accounting node identifier in the next accounting period in the accounting node table according to the next accounting node.
In some exemplary embodiments of the present disclosure, the apparatus further comprises: and the fault detection notification message sending unit is used for triggering a fault detection notification message through the fault detection intelligent contract so as to notify that the target fault node is detected.
The disclosed embodiments provide a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the method of fault detection for a blockchain network as described in the embodiments above.
An embodiment of the present disclosure provides an electronic device, including: at least one processor; a storage device configured to store at least one program that, when executed by the at least one processor, causes the at least one processor to implement the method of fault detection for a blockchain network as described in the above embodiments.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations of the embodiments described above.
In the technical solutions provided in some embodiments of the present disclosure, on one hand, before writing a current block into a distributed account book of a block chain network, whether a master node switching occurs when the current block goes out of the block is determined according to block information of the current block, and if the master node is switched, it may be directly determined that an accounting node originally used for the current block going out of the block has a fault, so that an accounting node having a fault in the block chain network may be automatically and quickly identified; on the other hand, the current fault node can be further determined from the current accounting nodes in the current accounting period of the block chain network based on the current master node switching times and the current block level of the current block, and the current fault node with the continuous fault times meeting the fault recovery rule is identified as the target fault node in the block chain network, so that the current fault node can be accurately and quickly positioned, the quality of service provided by the block chain network to the outside is improved, and the time cost of subsequent fault recovery can be reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
fig. 1 schematically shows a flow chart of a method of fault detection of a blockchain network according to an embodiment of the present disclosure.
Fig. 2 is a block chain network architecture diagram according to an embodiment of the disclosure.
Fig. 3 is a schematic structural diagram of a block according to an embodiment of the disclosure.
Fig. 4 is a schematic view of an application scenario of a blockchain network according to an embodiment of the present disclosure.
Fig. 5 is a block chain network architecture diagram according to an embodiment of the disclosure.
Fig. 6 schematically shows a flow chart of a method of fault detection of a blockchain network according to an embodiment of the present disclosure.
Fig. 7 schematically shows a block diagram of a failure detection apparatus of a blockchain network according to an embodiment of the present disclosure.
FIG. 8 shows a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
The described features, structures, or characteristics of the disclosure may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The drawings are merely schematic illustrations of the present disclosure, in which the same reference numerals denote the same or similar parts, and thus, a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in at least one hardware module or integrated circuit, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and steps, nor do they necessarily have to be performed in the order described. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
In this specification, the terms "a", "an", "the", "said" and "at least one" are used to indicate the presence of at least one element/component/etc.; the terms "comprising," "including," and "having" are intended to be inclusive and mean that there may be additional elements/components/etc. other than the listed elements/components/etc.; the terms "first," "second," and "third," etc. are used merely as labels, and are not limiting on the number of their objects.
The following detailed description of exemplary embodiments of the disclosure refers to the accompanying drawings.
Fig. 1 schematically shows a flow chart of a method of fault detection of a blockchain network according to an embodiment of the present disclosure.
The blockchain in the embodiment of the disclosure is a distributed book, and is a technical scheme for collectively maintaining a reliable database in a decentralized and trust-removed manner. Wherein the blockchain network is a network of computing nodes for managing, updating and maintaining one or more blockchain structures. The blockchain network may include a public blockchain network (referred to as a public chain for short), a private blockchain network (referred to as a private chain for short), or a federation blockchain network (referred to as a federation chain for short). The corresponding block chain network can be selected according to the actual application scenario.
Any node in the public chain is open to anyone, and each person can participate in the blockchain to perform calculation, and anyone can download and obtain the data (all accounts) of the complete blockchain. The greatest advantages of the public chain are decentralization and safety. However, it is difficult to achieve consensus among such many casual nodes, because some nodes may be down at any time and hackers may forge many false nodes. Therefore, the public chain has a very strict consensus mechanism.
In some application scenarios of the blockchain, it is not desirable that anyone can participate in the system, and can view all data, and only permitted nodes can participate in and view all data, and such a blockchain structure is called a private chain. The private chain can customize the policy completely by itself and is therefore extremely fast. Private chains can prevent a single node within an organization from intentionally concealing or tampering with data, and can quickly discover the source even if an error occurs. Many large financial institutions are more inclined to use private chain technology. Such as user access and transactions within only one financial, auditing institution.
Since the industry and application needing to be kept secret do not need the public chain to be publicly transparent, the alliance chain is produced, the alliance chain is limited to alliance members, and all or part of functions are opened for the members, so that the read-write authority and the accounting rule on the alliance chain are 'privately customized' according to the alliance rule.
The alliance chain only aims at members of a specific certain group and limited third parties, a plurality of preselected nodes are internally designated as bookkeepers, the generation of each block is determined by all the preselected nodes, access nodes of other third parties can participate in transactions, but the billing process is not asked, and other third parties can carry out limited query through an Application Programming Interface (API) opened by the alliance chain. Generally, a federation chain is applicable to a Business-to-Business scenario such as B2B (Business-to-Business) for inter-enterprise transactions, settlement, or clearing. For example, multiple financial institutions may connect together their respective blockchain networks to form a federated network, thereby facilitating data interfacing and collaboration with one another.
To achieve better performance, the federation chain places certain requirements on the configuration and network environment of the consensus or authentication node. With the admission mechanism, the transaction performance can be improved more easily, and problems caused by the participants with uneven participation can be avoided. The processing speed of the alliance chain is higher than that of the public chain, because the number and the identity of the nodes are well defined, a relatively loose consensus mechanism can be used, and therefore the processing speed of data is greatly improved compared with that of the public chain.
Embodiments of the present disclosure are described in detail with reference to federation chains in embodiments of the present disclosure. However, it is contemplated that the disclosed embodiments may be implemented in any suitable blockchain network.
Based on the above description, the embodiments of the present disclosure provide a method for detecting a fault in a blockchain network, where the method for detecting a fault in a blockchain network may be implemented based on a federation chain technology, and a federation chain underlying platform may include processing modules such as user management, basic service, an intelligent contract, and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and the identity information management comprises public and private key generation maintenance (account management), key management, user real identity and alliance chain address corresponding relation maintenance (authority management) and the like.
The blockchain technology, as a specific implementation of the distributed ledger, is gradually becoming the preferred way to store data and transaction data in various fields by virtue of its natural advantages of storing and managing data.
A blockchain network is a distributed system that can be formed by connecting a plurality of nodes (computing devices in any form in an access network, such as servers and terminal devices) in a network communication manner.
Referring to fig. 2, an alternative architecture diagram of a blockchain network provided in the embodiment of the present disclosure is shown. The blockchain network comprises a plurality of nodes, a point-To-point (P2P, Peer To Peer) network is formed among the nodes, and the P2P Protocol is an application layer Protocol operating on a Transmission Control Protocol (TCP). In a blockchain network, any machine, such as a server or a terminal device, can be added to become a node, and the node comprises a hardware layer, a middle layer, an operating system layer and an application layer.
Referring to the functionality of each node in the blockchain network shown in fig. 2, the functions involved include:
1) routing, a basic function that a node has, is used to support communication between nodes.
Besides the routing function, the node may also have the following functions:
2) and the Block chain comprises a series of blocks (blocks) which are mutually connected according to the generated chronological order, new blocks cannot be removed once being added into the Block chain, and recorded data submitted by nodes in the Block chain network are recorded in the blocks.
3) The application is used for being deployed in a block chain, realizing specific services according to actual service requirements, recording data related to the realization function to form recording data, carrying a digital signature in the recording data to represent a source of task data, and sending the recording data to other nodes in the block chain network, so that the other nodes add the recording data to a temporary block when the source and integrity of the recording data are verified successfully.
For example, the services implemented by the application include:
and 3.1) the wallet is used for providing a function of carrying out transaction of virtual resources, and the function comprises initiating transaction, namely sending a transaction record of the current transaction to other nodes in the block chain network, and storing the record data of the transaction into a temporary block of the block chain as a response for confirming that the transaction is valid after the other nodes are successfully verified.
And 3.2) sharing the account book, wherein the shared account book is used for providing functions of operations such as storage, inquiry and modification of account data, the recorded data of the operations on the account data are sent to other nodes in the block chain network, and after the other nodes verify the validity, the recorded data are stored in the temporary block as a response for acknowledging that the account data are valid, and confirmation can be sent to the node initiating the operations.
3.3) Intelligent contracts, computerized agreements, which can execute the terms of a certain contract, are realized by codes deployed on a shared book for execution when certain conditions are met, and are used for completing automated transactions according to actual business requirement codes, such as querying the logistics state of goods purchased by buyers, and transferring virtual resources of the buyers to the addresses of merchants after the buyers sign for goods; of course, smart contracts are not limited to executing contracts for trading, but may also execute contracts that process received information.
4) And the consensus is used for solving and ensuring the consistency and correctness of each transaction or data on all accounting nodes. The consensus mechanism of blockchains is the way to determine a certain consensus and maintain consensus. The consensus mechanism of the block chain enables the block chain to still cooperate and complete the operation efficiently in a large scale without depending on centralized organization. As shown in fig. 2, the node with the consensus function is called an accounting node.
As shown in fig. 1, the method provided by the embodiment of the present disclosure may include the following steps.
In step S110, a current block of the distributed book to be written in the block chain network and block information thereof are obtained.
Referring to fig. 3, after the current block is written into the distributed book of the blockchain network, the current block may be any one of the blocks in fig. 3, such as any one of block 1, block 2, and block 3. Fig. 3 is an optional schematic diagram of a Block Structure (Block Structure) provided in the embodiment of the present disclosure, where the Block information of each Block may include a hash value of a data record stored in the Block (hash value of the Block) and a hash value of a previous Block, and the blocks are connected by the hash values to form a Block chain (Block chain). The block may include information such as a time stamp at the time of block generation. A blockchain, which is essentially a decentralized database, is a string of data blocks associated using cryptography, each data block containing relevant information for verifying the validity of the information (anti-counterfeiting) and generating the next block.
As shown in fig. 4, the nodes in the block chain network may include terminal devices corresponding to banks, insurance companies, government buildings, shops, schools, hospitals, and the like. The terminal devices corresponding to banks, insurance companies, government buildings, shops, schools, hospitals and the like all participate in the management and processing of the same blockchain network, and also participate in monitoring the legality of transactions so as to achieve the fairness of processing or storing transaction data by the blockchain network. Meanwhile, the bank, the insurance company, the government building, the shop, the school and the hospital belong to different fields, and the quality and the efficiency of social work can be better improved through information fusion and interaction in the different fields. Any accounting node in the blockchain network can verify the acquired transaction data, and when the verification result is successful, a current block can be generated based on the transaction data and issued to the blockchain. And each terminal device can perform distributed storage on the current block after the current block is identified and passed.
For example, as shown in fig. 4, the nodes in the block chain network may include terminal devices corresponding to banks, insurance companies, government buildings, shops, schools, hospitals, and the like, and the terminal devices corresponding to the banks, insurance companies, government buildings, shops, schools, hospitals, and the like may store the identity information and the like of the same user a in a distributed manner, so that the user a may query the identity information of the user a to any institution.
It should be noted that fig. 4 is only used to illustrate an application scenario of the method provided by the embodiment of the present disclosure, and the method provided by the embodiment of the present disclosure belongs to a basic platform block chain technology, and is not limited to a certain scenario and application.
In step S120, it is determined that master node switching occurs when the current block goes out of block based on the block information of the current block.
In the embodiment of the present disclosure, the accounting node may also be referred to as a consensus node. The accounting node is a node with a block outlet function and a consensus function in the blockchain network, and can be a full node for storing a complete blockchain in the blockchain network. Each block includes a block header and a block body, the block body contains transactions included in the block, and the block body only needs to maintain a root hash value obtained by calculating all transactions through a merkle tree. A full node is a node that synchronizes all blockchain data, including various block volumes, transaction lists, and other related information. Because the node is full of data, the dependency intermediary is not needed to verify the data.
Wherein, the accounting nodes in the block chain network can be divided into a main node and a slave node. The master node refers to the accounting node responsible for the block generation (i.e. generating the current block, which may also be referred to as a new block) at the current stage. The slave node refers to an accounting node in the blockchain network except the master node. In the embodiments of the present disclosure, the current stage may refer to a current block height of the current block.
The accounting node in the embodiment of the present disclosure may be a terminal device or a computer device such as a server.
The server may be an independent server, a server integrated or distributed system composed of a plurality of servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a web service, cloud communication, middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform, and the like.
The terminal may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like. The billing nodes may be directly or indirectly connected via wired or wireless communication, and the disclosure is not limited thereto.
As shown in FIG. 5, the published content of a node is shown. After generating the current block, the master node generates a block proposal message based on the current block and broadcasts the block proposal message to each slave node in the block chain network; the block proposal message is used for instructing a slave node in the block chain network to perform consensus on a current block in the block proposal message, and to uplink the current block after the current block consensus passes, and the like.
After receiving the block proposal message broadcast by the master node, the slave nodes (such as slave node a, slave node B, slave node C and slave node D in fig. 5, which are used for illustration only), the slave nodes perform consensus on the current block in the block proposal message and broadcast the consensus data obtained by consensus to the accounting node in the block chain network.
The consensus data includes voting data generated by the node performing consensus on the current block, and the voting data may include voting results obtained by voting according to the validity of the transaction data in the current block and/or the execution sequence of each transaction corresponding to the transaction data and the like. The master node receives the consensus data of each slave node and determines whether to uplink the current block based on the consensus data of the slave nodes.
For example, if a slave node exceeding 2/3 agrees to link up a current block, then the current block is added to the stored block chain. The slave node may also acquire consensus data about the current block from other slave nodes in the block chain network, and determine whether to add the current block to its own stored block chain based on the acquired consensus data.
In the consensus process, there may be a malicious behavior of the current master node (the accounting node of the current block) or a communication failure of the current master node (i.e., the current master node fails), which may result in the current consensus process not being completed normally. In this case, a master change flow needs to be started to reselect a new master node from the slave nodes, the new master node initiates a consensus process for completing the current block again, and the process can be recorded in the block information of the current block, so that whether master node switching occurs when the current block is blocked can be determined according to the block information of the current block, and if it is determined that master node switching occurs, it can be determined that a fault occurs in the accounting node of the current block (referred to as a current fault, and a corresponding accounting node is referred to as a current fault node); if the main node switching is not determined, it can be determined that the current block has the accounting node without failure and is normal.
In step S130, the current master node switching times and the current block level of the current block are obtained.
In the embodiment of the present disclosure, the current master node switching frequency is used to record how many times the master node is changed during the block output process of the current block.
For example, if the current master node fails, reselecting a new accounting node from the slave nodes as a new master node, and if the new master node is normal, the new master node blocks the current block, and at this time, recording the current master node switching frequency Round of the current block as 1; if the new master node also fails, another new recording node needs to be selected from the remaining slave nodes again to serve as another new master node, and if the another new master node is normal, the another new master node blocks the current block, and at this time, the current master node switching frequency Round of the current block is recorded to be 2. Others may be analogized.
In the embodiment of the disclosure, if the current master node is normal, the level of the current block is consistent with the Height of the current block; and if the current main node has a fault, determining the current block Level according to the current block Height of the current block and the current main node switching frequency Round. Here, the current block Height refers to a position of the current block in the entire block chain, for example, if the current block is the 10 th block in the entire block chain, Height is 10. And when the main node switching occurs to the current block, namely when the current main node has a fault, the current block Height is called as the current fault block Height.
For example, if the current master node is normal, assuming that the current block is the 10 th block generated in the blockchain network, the current block Height is 10, and assuming that the block Level is calculated from 0, the corresponding current block Level is 10-1-9; if the current master node fails, the current block Level is equal to the current block height + the current master node switching frequency-1 is equal to 9+ Round.
In step S140, according to the current master node switching times and the current block hierarchy, a current fault node is determined from current accounting nodes in a current accounting period of the block chain network.
In an exemplary embodiment, the method may further include: if it is determined that master node switching does not occur when the current block goes out of blocks based on the block information of the current block, determining whether the number of blocks in the block chain network reaches a predetermined number; if the block number in the block chain network is judged to reach the preset number, reselecting a next accounting node in a next accounting period from the candidate accounting nodes of the block chain network and the current accounting node in the current accounting period; and updating the next accounting node identifier in the next accounting period in the accounting node table according to the next accounting node.
In an exemplary embodiment, the method may further include: deploying a fault detection intelligence contract on the blockchain network; and maintaining a fault table, a node table and a billing node table of the block chain network through the fault detection intelligent contract. The fault table is used for recording fault information of fault nodes in accounting nodes in the block chain network, and the fault information comprises accounting node identifications of the corresponding fault nodes, the height of a last fault block and the number of continuous faults; the node table is used for recording nodes in the block chain network, and the nodes comprise the accounting nodes; the accounting node list comprises a current accounting node list in the current accounting period maintained by the fault detection intelligent contract, and the current accounting node list comprises current accounting node identification of the current accounting node in the current accounting period.
In the embodiment of the present disclosure, under a normal operation condition of the blockchain network, the current accounting period of the current accounting node may be switched periodically according to the number of blocks.
For example, assuming that the current accounting node is configured to be switched once every 10000 blocks (which is used for illustration only, but not limited to this), the predetermined number is an integer multiple of 10000, that is, each time the number of blocks in the blockchain network reaches an integer multiple of 10000, a next accounting node in a next accounting period is reselected from the candidate accounting node and the current accounting node in the current accounting period, and the accounting node table is updated by using the reselected next accounting node, that is, the next accounting node is re-used as a new current accounting node in the accounting node table, accounting of the new block is performed in the next accounting period, the old current accounting node may exit accounting, or may be reselected as a new current accounting node, and the next accounting period is updated as a new current accounting period, and so on, accounting is repeatedly performed.
It should be noted that the candidate accounting node in the embodiment of the present disclosure refers to a node that may be elected as an accounting node, and does not include a light node. The light node is a node that only needs to maintain a block header in the block chain.
The intelligent contract for fault detection in the embodiment of the disclosure can realize automatic governance of the block chain network, and does not need to judge whether the block chain network has a fault by means of an external monitoring system, so the intelligent contract for fault detection can also be called a governance contract, wherein the governance contract is a component of the whole intelligent contract for the block chain network, and is a set of contract rules for automatically triggering execution and detecting whether the block chain network has a fault.
The intelligent contract in the embodiment of the disclosure describes contract terms, transaction conditions, transaction business logic and the like by using a computer language, and realizes automatic execution of transactions and operation of account book data by calling the intelligent contract. It can be understood that: the related transaction logic is implemented and saved as a specific file in a programming language. The intelligent contract is a contract program automatically executed according to specific conditions, and is an important way for a user to interact with the block chain and realize business logic by utilizing the block chain. For example, each organization may store and share information through an intelligent contract on the block chain, and may trigger the intelligent contract to execute a corresponding step when a certain condition is reached based on a received request, acquired information, or pre-stored information, so as to implement a service processing function corresponding to the request. Smart contracts allow trusted transactions to be conducted without third parties, which transactions are traceable and irreversible. Compared with the traditional contract, the intelligent contract can automatically execute the predetermined agreement, and reduces other transaction costs.
In the embodiment of the present disclosure, a set of governance contracts is deployed on a blockchain network, and a fault table is maintained through the governance contracts, where the fault table is used to record fault information of each faulty billing node (referred to as a faulty node) in the blockchain network, and the fault information may include an identification (identity, ID) of the billing node corresponding to the faulty node, which is used to uniquely identify each billing node, for example, may further include a historical fault number History (which is used to record how many faults have occurred in the corresponding faulty node so far, how many faults have occurred in total, and a sustained fault number context (which is used to record how many faults have occurred in the corresponding faulty node so far, and how to determine whether a fault is a sustained fault may refer to the following example), may further include a previous fault block height LastHeight lastfault, and may further include a previous main node switching number lastroute (i.e., how many faults have occurred in the corresponding faulty node most recent from the current stage) The number of master node switching times in the block height), and may further include last block level LastLevel (i.e., the block level at which the corresponding failed node has failed the last time from the current stage). LastRound and LastLevel are recorded to facilitate subsequent tracing.
In the embodiment of the present disclosure, the last failure block height LastHeight is a height of the last failed block from the corresponding failed node to the current stage, that is, a position of the last failed block of the corresponding failed node in the entire block chain. For example, assuming that there are N blocks in the current phase block chain, where N is a positive integer greater than or equal to 1, and assuming that the corresponding failed node has failed recently to be the 5 th block, LastHeight is 5.
In addition, the governance contract also maintains a plurality of tables, one of which is a node table NodeList and includes all nodes in the block chain network, such as accounting nodes (including all candidate accounting nodes and the current accounting node in the current accounting period), data synchronization nodes (being full-volume nodes, only performing distributed accounting book synchronization, and not participating in consensus), light nodes, and the like. The other is an accounting node table MemberList, which contains the current accounting node in the current accounting period (also called current tenure), for example, the current accounting node id of the current accounting node can be included.
In an exemplary embodiment, determining a current failure node from current accounting nodes in a current accounting period of the blockchain network according to the current master node switching times and the current blockchain level may include: reading the current accounting node list from the accounting node table of the fault detection intelligent contract, and determining the length of the current accounting node list; determining a current fault node index of the current block according to the switching times of the current main node, the current block level and the length of the current accounting node list; and determining the current fault node identification of the current fault node from the current accounting node identification of the current accounting node list according to the current fault node index.
In the embodiment of the disclosure, the governance contract additionally introduces a fault detection mode for automatically solving the block chain network. Specifically, before each new block (current block) of the block chain network is written into a distributed account book (hereinafter, referred to as an account book), a governance contract may be invoked for fault detection, first, whether master node switching occurs in the current block is checked based on block information of the current block, if master node switching occurs, a current accounting node list membersof a current accounting period are read from an accounting node list MemberList of the governance contract, and a master node (current fault node) of the current block that is blocked is obtained based on a current master node switching frequency Round of the current block and a current block Level.
In an exemplary embodiment, determining the current failed node index of the current block according to the current master node switching number, the current block hierarchy level and the current accounting node list length may include: if the current accounting node in the current accounting period adopts a polling-out block, acquiring a difference value between the switching times of the current main node and the current block level; and modulo the difference value between the switching times of the current main node and the current block level and the length of the current accounting node list to obtain the current fault node index.
In the embodiment of the present disclosure, if the current accounting node in the current accounting period adopts a polling block-out manner, the per-block primary node index (i.e. current failure node index) index of each new block can be calculated by the following formula:
index=(Level-Round) mod members.length (1)
mod in the above formula represents a modulo operation, and member.length represents the length of the current accounting node list, i.e. how many current accounting nodes are in total in the current accounting node list member in the current accounting period. And then obtaining the current failure node identification of the master node of the current block from the current accounting node list (number) ("number [ index").
For example, suppose there are 5 current accounting nodes (for illustration only) in the current accounting period in the blockchain network, and the 5 current accounting nodes poll the block, that is, normally, the 1 st current accounting node should be the master node for the 1 st block, the 2 nd current accounting node should be the master node for the 2 nd block, the 3 rd current accounting node should be the master node for the 3 rd block, the 4 th current accounting node should be the master node for the 4 th block, the 5 th current accounting node should be the master node for the 5 th block, the 1 st current accounting node should be the master node for the 6 th block, the 2 nd current accounting node should be the master node for the 7 th block, the 3 rd current accounting node should be the master node for the 8 th block, and the 4 th current accounting node should be the master node for the 9 th block, the 5 th current accounting node acts as the master node for the 10 th block out, … and so on. Here, assuming that the 5 th current accounting node has a fault, it will have a master node switch when going out the 5 th block, and assuming that all other 4 current accounting nodes are normal, in the case of polling out a block, it may directly select the next current accounting node as a new master node, that is, the 5 th block is taken out by the 1 st current accounting node, at this time, the 1 st current accounting node becomes the master node for the 1 st block out, the 2 nd current accounting node becomes the master node for the 2 nd block out, the 3 rd current accounting node becomes the master node for the 3 rd block out, the 4 th current accounting node becomes the master node for the 4 th block out, assuming that the 5 th block is the current block, it is supposed that the 5 th current accounting node according to the polling out block, but the 5 th accounting current node has a fault, so, a master node switch occurs, that is, the 1 st current accounting node is actually the master node for the 5 th block, and the 2 nd current accounting node is the master node … for the 6 th block, where Round is 1, Level is 5, and Height is 5.
Then (5-1) mod 5 is 4 according to the above equation (1). That is, it is assumed here that the subscripts of members are also counted from 0, that is, index is 0 to store the ID of the 1 st current accounting node, index is 1 to store the ID of the 2 nd current accounting node, index is 2 to store the ID of the 3 rd current accounting node, index is 3 to store the ID of the 4 th current accounting node, and index is 4 to store the ID of the 5 th current accounting node, that is, it is assumed that the indexes are arranged in order from the 1 st to the 5 th current accounting nodes in the current accounting node list. If the index calculated according to the above formula (1) is 4, the ID of the 5 th current accounting node can be found from the memberss.
Also take the above 5 current accounting nodes as an example, here, it is assumed that the 5 th current accounting node has a fault, when it goes out of the 5 th block of the block, a master node switching may occur, and at the same time, it is assumed that the 1 st current accounting node also has a fault, and all the other 3 current accounting nodes are normal, when the block is polled, first, the next current accounting node is elected as a new master node, when the 1 st current accounting node also has a fault, then, the next current accounting node of the next current accounting node, that is, the 2 nd current accounting node, is elected as a new master node, that is, the 5 th block is come out of the 2 nd current accounting node, at this time, Round is 2, and Level is 6.
Then (6-2) mod 5 is 4 according to the above equation (1). I.e. the ID of the 5 th current accounting node can be looked up from the memberships.
Meanwhile, by adopting the method provided by the embodiment of the disclosure, the main node of the current block can be located, and other fault nodes can also be located. For example, whether Round is greater than 1 or not may be determined, when Round is greater than 1, the index obtained by the above calculation may be incremented by 1 each time according to the value of (Round-1), and a module of number.
For example, taking Round as 2 as an example, index +1 is 5, and 5mod 5 is 0, so that the ID of the 1 st current accounting node that has also failed, that is, member is member [0], can be obtained.
In step S150, the current failed node whose number of continuous failures satisfies the failure recovery rule is determined as the target failed node in the blockchain network.
In an exemplary embodiment, determining a current failed node with a continuous failure number satisfying a failure recovery rule as a target failed node in the blockchain network may include: if the accounting node identification of the fault node matched with the current fault node identification exists in the fault table, acquiring the current fault block height of the current block; if the difference between the height of the current fault block and the height of the last fault block corresponding to the current fault node identification is equal to the length of the current accounting node list minus one, adding one to the number of continuous faults corresponding to the current fault node identification; and if the continuous failure times are larger than a failure threshold value, judging that the failure recovery rule is met, and determining the current failure node as the target failure node.
In an exemplary embodiment, the method may further include: if the difference between the height of the current fault block and the height of the last fault block corresponding to the current fault node identification is not equal to the length of the current accounting node list minus one, resetting the number of continuous faults corresponding to the current fault node identification to be one.
In the embodiment of the present disclosure, if the current fault node has a record in the fault table, adding 1 to the historical fault frequency History of the corresponding current fault node, and then determining whether the current fault is a persistent fault, for example, the following formula may be used to determine:
Height-LastHeight==members.length-1 (2)
that is, it is determined whether the current faulty block Height minus the last faulty block Height LastHeight of the currently faulty node recorded in the fault table is equal to the current accounting node list length number. length minus one, if the above formula (2) is satisfied, it may be determined that the current fault is a persistent fault, and then one is added to the persistent fault frequency continity of the currently faulty node, and if the above formula (2) is not satisfied, it may be determined that the current fault is not a persistent fault, and then the persistent fault frequency continity of the currently faulty node is reset to 1. And after the fault information of the current fault node is updated, updating the fault table.
For example, it is assumed here that the 5 th current accounting node has a fault, when it goes out of the 5 th block, it will have a master node switch, and meanwhile, assuming that all other 4 current accounting nodes are normal, in the case of polling out a block, it can directly select the next current accounting node as a new master node, that is, the 5 th block is taken out of the 1 st current accounting node, at this time, it becomes the 1 st current accounting node as the master node for the 1 st block out, the 2 nd current accounting node as the master node for the 2 nd block out, the 3 rd current accounting node as the master node for the 3 rd block out, the 4 th current accounting node as the master node for the 4 th block out, the 1 st current node as the accounting node for the 5 th block out, and the 2 nd current accounting node as the master node for the 6 th block out, the 3 rd current accounting node is used as the master node of the 7 th block, the 4 th current accounting node is used as the master node of the 8 th block, and if the 9 th block is the current block, the current master node of the block should be the 5 th current accounting node according to polling. Then 9-5-1, i.e. equation (2) above is satisfied.
It should be noted that, in the above embodiments, the polling block is taken as an example for illustration, but the present disclosure is not limited thereto, and in other embodiments, a random block, a VRF (verifiable random function) block, and the like may also be adopted.
When the block chain network is normal, randomly selecting a current accounting node from current accounting nodes in a current accounting period according to a certain Hash rule as a current main node for outputting a current block of the block; and when the current main node fails, randomly selecting one current accounting node from the rest current accounting nodes except the current main node according to a certain Hash rule as a new main node for the current block.
Where VRFs can generate random values and cannot be predicted, and are also verifiable (output includes a non-interactive zero knowledge proof), replayable. For example, assuming that the 10 th block is the current block, each current accounting node takes its own private key plus a random number (such as 10) known by the whole network as input to generate a random number (between 0 and 100); and setting a condition, wherein each current accounting node takes lots in turn, and the current main node of the current block is the random number which is taken out first and is greater than 10. Assuming that 11 is extracted by the 5 th current accounting node, only the 5 th current accounting node may know that other current accounting nodes do not know, so that the 5 th current accounting node broadcasts the random number and also broadcasts a zero knowledge proof, through the zero knowledge proof, the whole network can be verified only by the public key of the 5 th current accounting node, and the 5 th current accounting node is accepted as the current master node of the current block.
In an exemplary embodiment, the method may further include: and if the accounting node identification of the fault node matched with the current fault node identification does not exist in the fault table, inserting fault information of the fault node corresponding to the current fault node identification into the fault table.
In the embodiment of the present disclosure, data is queried from the fault table through the current fault node identifier, if an accounting node corresponding to the current fault node identifier does not exist in the fault table, it indicates that the accounting node has a fault for the first time, and a new fault information is inserted into the fault table and then returned, where the new fault information includes an accounting node ID corresponding to the current fault node, the number of historical faults is equal to 1, the number of sustained faults is equal to 1, and may further include corresponding LastHeight, LastRound, and LastLevel.
In an exemplary embodiment, the failure information further includes a historical number of failures for the corresponding failed node. Wherein the method may further comprise: and if the accounting node identification of the fault node matched with the current fault node identification exists in the fault table, adding one to the historical fault frequency corresponding to the current fault node identification in the fault table. The failure information may further include the number of times of switching of the last master node corresponding to the failed node and the last block level.
In an exemplary embodiment, the method may further include: deleting the target failure node from the node table maintained by the failure detection intelligent contract; selecting a next accounting node in a next accounting period maintained by the intelligent contract for fault detection from the node table after the target fault node is deleted; and updating the accounting node table in the fault detection intelligent contract according to the next accounting node to obtain a next accounting node list.
In the embodiment of the present disclosure, for simplicity, it is assumed that the failure recovery rule is set, and if the number of times of continuous failure is greater than the failure threshold, it is determined that the failure recovery rule is satisfied; otherwise, it is not satisfied. It is understood that the fail-over rule can be set according to actual requirements, and is not limited to the manner illustrated herein.
For example, assuming that the failure threshold is set to 10 times, if the number of sustained failures exceeds 10 times, the target failed node is deleted from the node table NodeList, and the accounting period is switched, a new accounting node list is selected from the new node table NodeList (i.e., the node table after the target failed node is deleted) as a next accounting node list, and the current accounting node list in the accounting node table MemberList is updated to be the next accounting node list and the current accounting period is the next accounting period.
In an exemplary embodiment, the blockchain network may further include a consensus module. Wherein the method further comprises: after the current block is written into the distributed account book, reading the next accounting period maintained by the fault detection intelligent contract through the consensus module; if the next accounting period maintained by the fault detection intelligent contract is greater than the accounting period maintained by the consensus module, the consensus module reads the next accounting node list from the fault detection intelligent contract; and updating the accounting node list maintained by the consensus module by using the next accounting node list, and updating the accounting period maintained by the consensus module by using the next accounting period.
In the embodiment of the disclosure, the consensus module may be configured to implement a consensus function of a block chain network, the consensus module may maintain a self accounting node list, and when the consensus module performs consensus on a new block each time, the consensus module may determine, from the self-maintained accounting node list, a current accounting node in a current accounting period that completes a consensus process, and if a fault node exists in the current accounting node, the consensus process on the new block may be affected.
Therefore, after the account book is written into the new block, the consensus module of the blockchain network reads the current accounting period of the governance contract (which may be updated due to the existence of the target failure node or updated after the normal expiration of the current accounting period), and determines whether the current accounting period is the same as the current accounting period maintained by the consensus module, if the current accounting period maintained by the governance contract is greater than the current accounting period maintained by the consensus module, it indicates that the consensus module needs to switch the current accounting period, the consensus module reads the latest current accounting node list from the governance contract for updating the current accounting node list maintained by the consensus module and the current accounting period, and since the target failure node is deleted from the node table, the updated current accounting node list does not contain the target failure node, so that there is no case that the accounting node needs to be switched due to the failure accounting caused by the target failure node, therefore, the performance of the block chain network for providing the service externally can be recovered to a normal state, and the response time of the service can also be recovered to a state before the failure.
In an exemplary embodiment, the method may further include: triggering a fault detection notification message through the fault detection intelligent contract for notifying the target fault node to be detected.
In the embodiment of the disclosure, a fault checking notification message may be triggered by a governance contract to notify relevant personnel to check and recover a target fault node, and the relevant personnel may reapply to join the blockchain network for billing after the target fault node recovers.
On one hand, before a current block is written into a distributed account book of the block chain network, whether main node switching occurs when the current block goes out of the block is judged according to block information of the current block, if the main node is switched, a failure of an accounting node originally used for the current block going out of the block can be directly judged, and therefore the accounting node with the failure in the block chain network can be automatically and quickly identified; on the other hand, the current fault node can be further determined from the current accounting nodes in the current accounting period of the block chain network based on the current master node switching times and the current block level of the current block, and the current fault node with the continuous fault times meeting the fault recovery rule is identified as the target fault node in the block chain network, so that the current fault node can be accurately and quickly positioned, the quality of service provided by the block chain network to the outside is improved, and the time cost of subsequent fault recovery can be reduced.
The method provided by the above embodiment is illustrated by fig. 6. Fig. 6 schematically shows a flow chart of a method of fault detection of a blockchain network according to an embodiment of the present disclosure.
As shown in fig. 6, the method provided by the embodiment of the present disclosure may include the following steps.
In step S601, a fault detection intelligent contract is deployed on the blockchain network, and a fault table, a node table, and a billing node table are maintained by the fault detection intelligent contract.
Deploying a set of governance contracts, namely fault detection intelligent contracts, on a block chain network, maintaining a fault table through the governance contracts, and simultaneously maintaining a plurality of tables through the governance contracts, wherein one table is a node table NodeList; the other is an accounting node table MemberList.
Under the condition that the block chain network normally operates, the current accounting period of the current accounting node can be switched periodically according to the number of blocks, a new accounting node is selected from the candidate accounting node and the current accounting node in the current tenure, the accounting node does not include a light node, and the candidate accounting node performs data synchronization before being selected as the current accounting node.
In step S602, before each new block of the block chain network is written into the distributed ledger, a failure detection smart contract is invoked to perform the following steps for failure detection.
In step S603, it is determined whether master node switching has occurred; if the master node switching occurs, go to step S604; if the master node switch does not occur, the process goes to step S616.
In step S604, if the master node is switched, the current accounting node list in the current accounting period is read from the accounting node table of the fault detection intelligent contract.
In step S605, based on the switching frequency of the current master node of the corresponding new block and the current block level, the bookkeeping node of the block corresponding to the new block is obtained and determined as the current failure node.
The method for automatically detecting the fault of the block chain network is additionally introduced into a governance contract, specifically, before each new block of the block chain network is written into an account book, a governance contract is called to carry out fault detection, whether main node switching occurs in the new block is checked on the basis of block information, if the main node switching does not occur, the fact that a current accounting node for outputting the new block is normal is shown, and a result is immediately returned; and if the master node switching occurs, reading out the current accounting node list members in the current tenure from an accounting node table of the treatment contract, and acquiring the accounting node of the block corresponding to the new block according to the formula (1) based on the current master node switching times Round and the current block Level of the corresponding new block to determine the accounting node as the current fault node.
In step S606, data is queried from the fault table by the current faulty node identification of the current faulty node.
In step S607, it is determined whether the current failed node already exists in the failure table; if yes, go to step S608; if not, the process proceeds to step S617 described below.
In step S608, when the current failed node already exists in the failure table, the historical failure number of times of the corresponding failure information is incremented by one.
In step S609, it is determined whether the current fault is a persistent fault; if the fault is a persistent fault, the following step S610 is performed; if the failure is not a persistent failure, the process proceeds to step S618.
In step S610, one is added to the number of continuous failures.
If the current fault node has a record in the fault table, adding 1 to the historical fault frequency corresponding to the current fault node, then judging whether the current fault is a persistent fault, if so, adding one to the persistent fault frequency Continuity corresponding to the current fault node, and if not, resetting the persistent fault frequency to be 1, namely, the Continuity is 1. And after the fault information is updated, updating the fault table.
In step S611, it is determined whether the number of sustained failures satisfies a failure recovery rule; if yes, go to the following step S612; if not, the process returns to step S602, and continues to perform the above steps for the next new block cycle for failure detection.
In step S612, if the number of persistent failures satisfies the failure recovery rule, the current failed node is determined as the target failed node, and is deleted from the node table.
In step S613, a new accounting node is selected from the new node table, and the accounting node list and the accounting period are updated.
Then judging whether the continuous failure frequency meets the failure recovery rule, for the sake of simplicity, judging whether the continuous failure frequency exceeds 10 times, and if not, returning to the contract governing; if yes, deleting the target fault node from the node table NodeList, switching the current accounting period, selecting a new current accounting node list from the new node table NodeList, and updating the accounting node table MemberList and the current accounting period, for example, increasing the current accounting period by 1.
It should be noted that, the embodiment of the present disclosure does not limit what specific way to select the current accounting node from the node table, for example, the current accounting node may be selected according to the VRF selection part.
In step S614, after the account book is written into the new block, the consensus module reads that the accounting period of the fault detection smart contract is longer than the accounting period maintained by the consensus module.
In step S615, the consensus module reads out the latest accounting node list from the fault detection intelligent contract, updates the accounting node list and the accounting period maintained by the consensus module, and jumps back to step S602, and continues to perform the above steps for the next new block cycle for fault detection.
The consensus module of the block chain network reads the current accounting period of the governance contract after the new block is written into the account book and judges whether the current accounting period is the same as the current accounting period maintained by the consensus module, if the current accounting period of the governance contract is greater than the current accounting period maintained by the consensus module, the consensus module indicates that the current accounting period of the consensus module needs to be switched, reads the latest current accounting node list from the governance contract, updates the current accounting node list maintained by the consensus module and the current accounting period, since the target failed node has been deleted from the node, the new current accounting node list will not contain the target failed node, so that the situation that accounting failure is caused by the target failure node and the accounting node needs to be switched does not exist, thus, the performance of the external service is restored to the previous state, and the response time of the service is also restored to the state before the failure.
In step S616, if the master node is not switched, it is determined that the accounting node is normal, and the process returns to step S602, where the process continues to be performed for the next new block to perform the fault detection.
In step S617, if the current failed node does not exist in the failure table, a new piece of failure information is inserted into the failure table, and the process returns to step S602, and continues to perform the above steps for the next new block cycle for failure detection.
In step S618, if the current failure is not a persistent failure, the number of persistent failures is reset to 1, and the process returns to step S602 to continue the above steps for the next new block cycle for failure detection.
The method for detecting the fault of the block chain network is realized based on an intelligent contract and a related governing contract, the fault of a bookkeeping node in the block chain network is automatically monitored by adopting a fault detection intelligent contract mode, when the fault triggers the agreed governing contract, a corresponding contract rule is automatically executed, and a target fault node is eliminated from the block chain network, so that the technical problem that the external service performance and experience are reduced due to the bookkeeping node fault in the block chain network is solved, the service performance is improved, and the fault repair time is shortened. The method provided by the embodiment of the disclosure can quickly recover the service, reduce external monitoring and reduce the fault repairing cost.
Fig. 7 schematically shows a block diagram of a failure detection apparatus of a blockchain network according to an embodiment of the present disclosure. As shown in fig. 7, the apparatus 700 for detecting a failure in a blockchain network provided by the embodiment of the present disclosure may include a current-blocking-information obtaining unit 710, a master-node switching determining unit 720, a node switching-information obtaining unit 730, a current-failed-node determining unit 740, and a target-failed-node determining unit 750.
In this embodiment of the present disclosure, the current block information obtaining unit 710 may be configured to obtain a current block of a distributed ledger to be written into the blockchain network and block information thereof. The master node switching determination unit 720 may be configured to determine that master node switching occurs when the current block is out of block based on the block information of the current block. The node switching information obtaining unit 730 may be configured to obtain the current master node switching number and the current block level of the current block. The current faulty node determining unit 740 may be configured to determine, according to the current master node switching frequency and the current block hierarchy, a current faulty node from current accounting nodes in a current accounting period of the blockchain network. The target failed node determination unit 750 may be configured to determine a current failed node, of which the number of persistent failures satisfies the failure recovery rule, as a target failed node in the blockchain network.
On one hand, before a current block is written into a distributed account book of the block chain network, whether main node switching occurs when the current block goes out of the block is judged according to block information of the current block, if the main node is switched, a failure of an accounting node originally used for the current block going out of the block can be directly judged, and therefore the accounting node with the failure in the block chain network can be automatically and quickly identified; on the other hand, the current fault node can be further determined from the current accounting nodes in the current accounting period of the block chain network based on the current master node switching times and the current block level of the current block, and the current fault node with the continuous fault times meeting the fault recovery rule is identified as the target fault node in the block chain network, so that the current fault node can be accurately and quickly positioned, the quality of service provided by the block chain network to the outside is improved, and the time cost of subsequent fault recovery can be reduced.
In an exemplary embodiment, the fault detection apparatus 700 of the blockchain network may further include: a fault detection contract deployment unit, operable to deploy fault detection intelligent contracts over the blockchain network; and the contract multi-table maintenance unit can be used for maintaining a fault table, a node table and an accounting node table of the block chain network through the fault detection intelligent contract. The fault table may be configured to record fault information of a fault node in accounting nodes in the blockchain network, where the fault information includes an accounting node identifier of the corresponding fault node, a previous fault block height, and a number of consecutive faults; the node table may be used to record nodes in the blockchain network, which may include the accounting node; the accounting node table may include a current accounting node list in the current accounting period maintained by the fault detection intelligence contract, and the current accounting node list may include a current accounting node identification of a current accounting node in the current accounting period.
In an exemplary embodiment, the current failed node determination unit 740 may include: a current accounting node list length determining unit, configured to read the current accounting node list from the accounting node table of the fault detection intelligent contract, and determine a current accounting node list length; a current fault node index determining unit, configured to determine a current fault node index of the current block according to the number of times of switching the current master node, the current block level, and the length of the current accounting node list; the current faulty node identifier determining unit may be configured to determine, according to the current faulty node index, a current faulty node identifier of the current faulty node from current accounting node identifiers in the current accounting node list.
In an exemplary embodiment, the current failed node index determining unit may include: a difference calculating unit, configured to obtain a difference between the current master node switching frequency and the current block level if the current accounting node in the current accounting period adopts a polling-out block; and the fault node index calculating unit may be configured to obtain the current fault node index by modulo a difference between the current master node switching frequency and the current block level and the length of the current accounting node list.
In an exemplary embodiment, the target failed node determination unit 750 may include: a current fault block height obtaining unit, configured to obtain a current fault block height of the current block if an accounting node identifier of a fault node matching the current fault node identifier exists in the fault table; a sustained fault frequency accumulation unit, configured to add one to the sustained fault frequency corresponding to the current faulty node identifier if a difference between the current faulty block height and a previous faulty block height corresponding to the current faulty node identifier is equal to the length of the current accounting node list minus one; the target failed node obtaining unit may be configured to determine that the failure recovery rule is satisfied if the number of times of the sustained failure is greater than a failure threshold, and determine the current failed node as the target failed node.
In an exemplary embodiment, the fault detection apparatus 700 of the blockchain network may further include: and a sustained fault frequency resetting unit, configured to reset the sustained fault frequency corresponding to the current faulty node identifier to one if a difference between the current faulty block height and a previous faulty block height corresponding to the current faulty node identifier is not equal to the length of the current accounting node list minus one.
In an exemplary embodiment, the fault detection apparatus 700 of the blockchain network may further include: and the fault information adding unit may be configured to insert the fault information of the fault node corresponding to the current fault node identifier into the fault table if the accounting node identifier of the fault node matching the current fault node identifier does not exist in the fault table.
In an exemplary embodiment, the failure information may further include a historical number of failures of the corresponding failed node. The apparatus 700 for detecting a fault in a blockchain network may further include: and the historical fault frequency accumulating unit may be configured to add one to the historical fault frequency corresponding to the current fault node identifier in the fault table if the accounting node identifier of the fault node matching the current fault node identifier exists in the fault table. The failure information may further include the number of times of switching of the last master node corresponding to the failed node and the last block level.
In an exemplary embodiment, the fault detection apparatus 700 of the blockchain network may further include: a target failure node deleting unit, configured to delete the target failure node from the node table maintained by the failure detection intelligent contract; an accounting node selecting unit, configured to select a next accounting node in a next accounting period maintained by the fault detection intelligent contract from the node table after the target fault node is deleted; and the accounting node table updating unit may be configured to update the accounting node table in the fault detection intelligent contract according to the next accounting node, and obtain a next accounting node list.
In an exemplary embodiment, the blockchain network further comprises a consensus module. The apparatus 700 for detecting a fault in a blockchain network may further include: a contract accounting period reading unit, configured to read, by the consensus module, a next accounting period maintained by the fault detection intelligent contract after the current block is written into the distributed ledger; a contract accounting node list reading unit, configured to, if a next accounting period maintained by the fault detection intelligent contract is greater than an accounting period maintained by the consensus module, read, by the consensus module, the next accounting node list from the fault detection intelligent contract; and the consensus accounting node updating unit may be configured to update the accounting node list maintained by the consensus module with the next accounting node list, and update the accounting period maintained by the consensus module with the next accounting period.
In an exemplary embodiment, the fault detection apparatus 700 of the blockchain network may further include: a block number determination unit, configured to determine whether the number of blocks in the block chain network reaches a predetermined number if it is determined that master node switching does not occur when the current block goes out of the block based on the block information of the current block; an accounting node reselection unit, configured to reselect a next accounting node in a next accounting period from candidate accounting nodes of the blockchain network and a current accounting node in the current accounting period if it is determined that the number of blocks in the blockchain network reaches the predetermined number; and an accounting node identifier updating unit, configured to update, according to the next accounting node, a next accounting node identifier in a next accounting period in the accounting node table.
In an exemplary embodiment, the fault detection apparatus 700 of the blockchain network may further include: and the fault detection notification message sending unit may be configured to trigger a fault detection notification message through the fault detection intelligent contract, so as to notify that the target faulty node is checked.
Other contents of the fault detection device of the blockchain network of the embodiment of the present disclosure may refer to the above-described embodiments.
It should be noted that although in the above detailed description several units of the device for action execution are mentioned, this division is not mandatory. Indeed, the features and functions of two or more units described above may be embodied in one unit, in accordance with embodiments of the present disclosure. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Referring now to FIG. 8, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present application. The electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
Referring to fig. 8, an electronic device provided in an embodiment of the present disclosure may include: a processor 801, a communication interface 802, a memory 803, and a communication bus 804.
Wherein the processor 801, the communication interface 802 and the memory 803 communicate with each other via a communication bus 804.
Alternatively, the communication interface 802 may be an interface of a communication module, such as an interface of a GSM (Global System for Mobile communications) module. The processor 801 is used to execute programs. The memory 803 is used for storing programs. The program may comprise a computer program comprising computer operating instructions. Wherein, can include in the procedure: and (5) a program of the video client.
The processor 801 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present disclosure.
The memory 803 may include a Random Access Memory (RAM) memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
Among them, the procedure can be specifically used for: acquiring a current block and block information thereof of a distributed account book to be written into the block chain network; determining that a master node switch occurs when the current block goes out of block based on the block information of the current block; acquiring the switching times of the current main node of the current block and the current block level; determining a current fault node from current accounting nodes in a current accounting period of the block chain network according to the switching times of the current main node and the current block level; and determining the current fault node with the continuous fault times meeting the fault recovery rule as a target fault node in the block chain network.
It is to be understood that any number of elements in the drawings of the present disclosure are by way of example and not by way of limitation, and any nomenclature is used for differentiation only and not by way of limitation.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (15)

1. A method for detecting faults of a block chain network is characterized by comprising the following steps:
acquiring a current block and block information thereof of a distributed account book to be written into the block chain network;
determining that a master node switch occurs when the current block goes out of block based on the block information of the current block;
acquiring the switching times of the current main node of the current block and the current block level;
determining a current fault node from current accounting nodes in a current accounting period of the block chain network according to the switching times of the current main node and the current block level;
and determining the current fault node with the continuous fault times meeting the fault recovery rule as a target fault node in the block chain network.
2. The method of claim 1, further comprising:
deploying a fault detection intelligence contract on the blockchain network;
maintaining a fault table, a node table and a billing node table of the blockchain network through the fault detection intelligent contract; wherein the content of the first and second substances,
the fault table is used for recording fault information of fault nodes in the accounting nodes in the block chain network, and the fault information comprises accounting node identification of the corresponding fault node, height of a last fault block and continuous fault times;
the node table is used for recording nodes in the block chain network, and the nodes comprise the accounting nodes;
the accounting node list comprises a current accounting node list in the current accounting period maintained by the fault detection intelligent contract, and the current accounting node list comprises current accounting node identification of the current accounting node in the current accounting period.
3. The method of claim 2, wherein determining a current failure node from current accounting nodes within a current accounting period of the blockchain network according to the current master node switching times and the current blockchain level comprises:
reading the current accounting node list from the accounting node table of the fault detection intelligent contract, and determining the length of the current accounting node list;
determining a current fault node index of the current block according to the switching times of the current main node, the current block level and the length of the current accounting node list;
and determining the current fault node identification of the current fault node from the current accounting node identification of the current accounting node list according to the current fault node index.
4. The method of claim 3, wherein determining the current failed node index for the current block based on the current master node switch count, the current block level, and the current accounting node list length comprises:
if the current accounting node in the current accounting period adopts a polling-out block, acquiring a difference value between the switching times of the current main node and the current block level;
and modulo the difference value between the switching times of the current main node and the current block level and the length of the current accounting node list to obtain the current fault node index.
5. The method of claim 3, wherein determining a current failed node with a persistent failure number satisfying a failure recovery rule as a target failed node in the blockchain network comprises:
if the accounting node identification of the fault node matched with the current fault node identification exists in the fault table, acquiring the current fault block height of the current block;
if the difference between the height of the current fault block and the height of the last fault block corresponding to the current fault node identification is equal to the length of the current accounting node list minus one, adding one to the number of continuous faults corresponding to the current fault node identification;
and if the continuous failure times are larger than a failure threshold value, judging that the failure recovery rule is met, and determining the current failure node as the target failure node.
6. The method of claim 5, further comprising:
if the difference between the height of the current fault block and the height of the last fault block corresponding to the current fault node identification is not equal to the length of the current accounting node list minus one, resetting the number of continuous faults corresponding to the current fault node identification to be one.
7. The method of claim 5, further comprising:
and if the accounting node identification of the fault node matched with the current fault node identification does not exist in the fault table, inserting fault information of the fault node corresponding to the current fault node identification into the fault table.
8. The method of claim 5, wherein the fault information further includes a historical number of faults for the corresponding faulty node; wherein the method further comprises:
if the accounting node identification of the fault node matched with the current fault node identification exists in the fault table, adding one to the historical fault times corresponding to the current fault node identification in the fault table;
the fault information further comprises the switching times of the last main node corresponding to the fault node and the last block level.
9. The method of claim 2, further comprising:
deleting the target failure node from the node table maintained by the failure detection intelligent contract;
selecting a next accounting node in a next accounting period maintained by the intelligent contract for fault detection from the node table after the target fault node is deleted;
and updating the accounting node table in the fault detection intelligent contract according to the next accounting node to obtain a next accounting node list.
10. The method of claim 9, wherein the blockchain network further comprises a consensus module; wherein the method further comprises:
after the current block is written into the distributed account book, reading the next accounting period maintained by the fault detection intelligent contract through the consensus module;
if the next accounting period maintained by the fault detection intelligent contract is greater than the accounting period maintained by the consensus module, the consensus module reads the next accounting node list from the fault detection intelligent contract;
and updating the accounting node list maintained by the consensus module by using the next accounting node list, and updating the accounting period maintained by the consensus module by using the next accounting period.
11. The method of claim 2, further comprising:
if it is determined that master node switching does not occur when the current block goes out of blocks based on the block information of the current block, determining whether the number of blocks in the block chain network reaches a predetermined number;
if the block number in the block chain network is judged to reach the preset number, reselecting a next accounting node in a next accounting period from the candidate accounting nodes of the block chain network and the current accounting node in the current accounting period;
and updating the next accounting node identifier in the next accounting period in the accounting node table according to the next accounting node.
12. The method of claim 2, further comprising:
triggering a fault detection notification message through the fault detection intelligent contract for notifying the target fault node to be detected.
13. A fault detection device for a blockchain network, comprising:
a current block information obtaining unit, configured to obtain a current block of a distributed account book to be written in the block chain network and block information of the current block;
a master node switching determination unit, configured to determine, based on the block information of the current block, that master node switching occurs when the current block goes out of block;
a node switching information obtaining unit, configured to obtain the current master node switching frequency and the current block level of the current block;
a current fault node determining unit, configured to determine, according to the current master node switching frequency and the current block level, a current fault node from current accounting nodes in a current accounting period of the block chain network;
and the target fault node determining unit is used for determining the current fault node with the continuous fault times meeting the fault recovery rule as the target fault node in the block chain network.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 12.
15. An electronic device, comprising:
at least one processor;
a storage device configured to store at least one program that, when executed by the at least one processor, causes the at least one processor to implement the method of any one of claims 1 to 12.
CN202011294211.2A 2020-11-18 2020-11-18 Fault detection method of block chain network and related equipment Active CN112422341B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011294211.2A CN112422341B (en) 2020-11-18 2020-11-18 Fault detection method of block chain network and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011294211.2A CN112422341B (en) 2020-11-18 2020-11-18 Fault detection method of block chain network and related equipment

Publications (2)

Publication Number Publication Date
CN112422341A true CN112422341A (en) 2021-02-26
CN112422341B CN112422341B (en) 2021-09-28

Family

ID=74773949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011294211.2A Active CN112422341B (en) 2020-11-18 2020-11-18 Fault detection method of block chain network and related equipment

Country Status (1)

Country Link
CN (1) CN112422341B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113141354A (en) * 2021-04-13 2021-07-20 武汉天梯科技股份有限公司 Automatic block chain repairing method
CN113326165A (en) * 2021-08-04 2021-08-31 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and computer readable storage medium
CN113868216A (en) * 2021-12-03 2021-12-31 中国信息通信研究院 Block chain monitoring method and device
CN114726866A (en) * 2022-04-07 2022-07-08 网易(杭州)网络有限公司 Method for maintaining consensus node of alliance chain, electronic device and storage medium
CN115174129A (en) * 2022-02-22 2022-10-11 中国工商银行股份有限公司 Abnormal node detection method and device, computer equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07311660A (en) * 1994-05-11 1995-11-28 Internatl Business Mach Corp <Ibm> Data processing method of software control system for early detection of fault
CN106789095A (en) * 2017-03-30 2017-05-31 腾讯科技(深圳)有限公司 Distributed system and message treatment method
CN108134706A (en) * 2018-01-02 2018-06-08 中国工商银行股份有限公司 Block chain high-availability system mostly living, computer equipment and method
CN109167699A (en) * 2018-08-20 2019-01-08 众安信息技术服务有限公司 The method and apparatus for handling the state of the node of block chain
US20190044741A1 (en) * 2018-03-20 2019-02-07 Intel Corporation Methods And Apparatus To Manage Timing In A Blockchain Network
CN111242776A (en) * 2018-11-29 2020-06-05 北京京东尚科信息技术有限公司 Accounting method and device based on block chain, storage medium and electronic equipment
CN111444211A (en) * 2020-03-26 2020-07-24 腾讯科技(深圳)有限公司 Block chain consensus node checking method, device, equipment and storage medium
CN111475386A (en) * 2020-06-05 2020-07-31 中国银行股份有限公司 Fault early warning method and related device
CN111698315A (en) * 2020-06-09 2020-09-22 腾讯科技(深圳)有限公司 Data processing method and device for block and computer equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07311660A (en) * 1994-05-11 1995-11-28 Internatl Business Mach Corp <Ibm> Data processing method of software control system for early detection of fault
CN106789095A (en) * 2017-03-30 2017-05-31 腾讯科技(深圳)有限公司 Distributed system and message treatment method
CN108134706A (en) * 2018-01-02 2018-06-08 中国工商银行股份有限公司 Block chain high-availability system mostly living, computer equipment and method
US20190044741A1 (en) * 2018-03-20 2019-02-07 Intel Corporation Methods And Apparatus To Manage Timing In A Blockchain Network
CN109167699A (en) * 2018-08-20 2019-01-08 众安信息技术服务有限公司 The method and apparatus for handling the state of the node of block chain
CN111242776A (en) * 2018-11-29 2020-06-05 北京京东尚科信息技术有限公司 Accounting method and device based on block chain, storage medium and electronic equipment
CN111444211A (en) * 2020-03-26 2020-07-24 腾讯科技(深圳)有限公司 Block chain consensus node checking method, device, equipment and storage medium
CN111475386A (en) * 2020-06-05 2020-07-31 中国银行股份有限公司 Fault early warning method and related device
CN111698315A (en) * 2020-06-09 2020-09-22 腾讯科技(深圳)有限公司 Data processing method and device for block and computer equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113141354A (en) * 2021-04-13 2021-07-20 武汉天梯科技股份有限公司 Automatic block chain repairing method
CN113326165A (en) * 2021-08-04 2021-08-31 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and computer readable storage medium
CN113868216A (en) * 2021-12-03 2021-12-31 中国信息通信研究院 Block chain monitoring method and device
CN115174129A (en) * 2022-02-22 2022-10-11 中国工商银行股份有限公司 Abnormal node detection method and device, computer equipment and storage medium
CN114726866A (en) * 2022-04-07 2022-07-08 网易(杭州)网络有限公司 Method for maintaining consensus node of alliance chain, electronic device and storage medium

Also Published As

Publication number Publication date
CN112422341B (en) 2021-09-28

Similar Documents

Publication Publication Date Title
CN112422341B (en) Fault detection method of block chain network and related equipment
Guerraoui et al. The consensus number of a cryptocurrency
Decker et al. Bitcoin meets strong consistency
Bada et al. Towards a green blockchain: A review of consensus mechanisms and their energy consumption
CN111400112B (en) Writing method and device of storage system of distributed cluster and readable storage medium
CN111291060B (en) Method, device and computer readable medium for managing blockchain nodes
CN111598566A (en) Network payment system based on mixed cross-chain
CN112527912B (en) Data processing method and device based on block chain network and computer equipment
CN112287034B (en) Data synchronization method, equipment and computer readable storage medium
CN110471982B (en) Data processing method and device based on block chain
CN111698315B (en) Data processing method and device for block and computer equipment
Innerbichler et al. Federated byzantine agreement to ensure trustworthiness of digital manufacturing platforms
TWI706283B (en) Block chain-based traffic statistics method, device and equipment
CN112287033B (en) Data synchronization method, equipment and computer readable storage medium
CN109472698A (en) Public good measure of supervision and system based on block chain
CN111582845A (en) Cross-chain transaction method and device of block chain and electronic equipment
CN112671908A (en) Network management method and device, electronic equipment and readable storage medium
CN110321730A (en) A kind of method, block chain node and the storage medium of operation data processing
US20200394162A1 (en) Operation management method for distributed ledger system, operation management system for distributed ledger system, and operation management program for distributed ledger system
Decker On the scalability and security of bitcoin
Yao et al. Sok: A taxonomy for critical analysis of consensus mechanisms in consortium blockchain
WO2023019903A1 (en) Cross-chain transaction system and method, and device and storage medium
CN114448639B (en) Decentralized identity system with uniqueness and secret key safety and implementation method
CN114547655A (en) Block chain node networking and device, and electronic equipment
Görkey et al. Comparative study of Byzantine fault tolerant consensus algorithms on permissioned blockchains

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