CN114697344B - Method for determining consensus node in blockchain system, node, storage medium and computing device - Google Patents

Method for determining consensus node in blockchain system, node, storage medium and computing device Download PDF

Info

Publication number
CN114697344B
CN114697344B CN202210325866.4A CN202210325866A CN114697344B CN 114697344 B CN114697344 B CN 114697344B CN 202210325866 A CN202210325866 A CN 202210325866A CN 114697344 B CN114697344 B CN 114697344B
Authority
CN
China
Prior art keywords
node
nodes
access delay
consensus
determining
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.)
Active
Application number
CN202210325866.4A
Other languages
Chinese (zh)
Other versions
CN114697344A (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.)
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Ant Blockchain Technology Shanghai 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 Ant Blockchain Technology Shanghai Co Ltd filed Critical Ant Blockchain Technology Shanghai Co Ltd
Priority to CN202210325866.4A priority Critical patent/CN114697344B/en
Publication of CN114697344A publication Critical patent/CN114697344A/en
Application granted granted Critical
Publication of CN114697344B publication Critical patent/CN114697344B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1087Peer-to-peer [P2P] networks using cross-functional networking aspects
    • H04L67/1093Some peer nodes performing special functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computing Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method of determining a blockchain consensus node, a blockchain, and a blockchain node, the blockchain including a plurality of second nodes and first nodes, the method comprising: the first node and the plurality of second nodes respectively determine respective access delay information to other nodes; the plurality of second nodes respectively send the respective access delay information to the first node; the first node determines a plurality of third nodes from the plurality of first nodes and the plurality of second nodes according to the access delay information of the first node and each second node, and the third nodes are used for determining the consensus node.

Description

Method for determining consensus node in blockchain system, node, storage medium and computing device
Technical Field
The embodiment of the specification belongs to the technical field of block chains, and particularly relates to a block chain consensus node determining method, a block chain and a block chain node.
Background
Blockchains are novel application modes of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, and the like. In the block chain system, the data blocks are combined into a chain data structure in a sequential connection mode according to the time sequence, and the distributed account book which is not tamperable and counterfeit and is ensured in a cryptographic mode is formed. Because the blockchain has the characteristics of decentralization, non-tamperability of information, autonomy and the like, the blockchain is also more and more valued by people, and has been widely applied in a plurality of fields.
Disclosure of Invention
The invention aims to provide a method for determining a block chain consensus node, a corresponding block chain and the block chain node, and the method can achieve the effect of improving the consensus efficiency of the block chain under the complex network state, especially under the network blocking condition.
A first aspect of the present disclosure provides a method for determining a blockchain consensus node, the blockchain including a plurality of second nodes and first nodes, the method comprising:
the first node and the plurality of second nodes respectively determine respective access delay information to other nodes;
the plurality of second nodes respectively send the access delay information to the first node;
the first node determines a plurality of third nodes from the first node and a plurality of second nodes according to the access delay information of the first node and each second node, and the third nodes are used for determining consensus nodes.
A second aspect of the present specification provides a blockchain including a plurality of second nodes and a first node, wherein,
the second node is used for determining access delay information of the second node to other nodes and sending the access delay information to the first node;
the first node is used for determining access delay information of the first node to other nodes, and determining a plurality of third nodes from the first node and a plurality of second nodes according to the access delay information of the first node and each second node, wherein the third nodes are used for determining consensus nodes.
In a third aspect, there is provided a first node in a blockchain, comprising:
a determining unit configured to determine access delay information to other nodes;
a receiving unit, configured to receive access delay information from a plurality of second nodes in the blockchain to other nodes, respectively;
the determining unit is further configured to determine a plurality of third nodes from the first node and the plurality of second nodes according to access delay information of the first node and each of the second nodes, where the third nodes are used to determine a consensus node.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program or instructions which, when executed in a computer, cause the computer to perform the method of the first aspect.
In a fifth aspect, there is provided a computing device comprising a memory having stored therein a computer program or instructions, and a processor which, when executed, implements the method of the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a block chain architecture diagram in one embodiment;
FIG. 2 is a schematic diagram of a method for determining a blockchain consensus node in an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a node determining access delay information to other nodes in an embodiment of the present disclosure;
FIG. 4 is a flow chart of a method of determining a blockchain consensus node in an embodiment of the present disclosure.
Fig. 5 is a schematic diagram of determining a first number of third nodes in an embodiment of the present disclosure.
Fig. 6 is a schematic diagram of a first node in an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
FIG. 1 illustrates a block chain architecture diagram in one embodiment. As shown in FIG. 1, the blockchain 100 includes, for example, 6 nodes. The connections between nodes are schematically represented as P2P (Peer to Peer) connections. The nodes may store a full amount of ledgers, i.e., the state of all blocks and all accounts. Wherein each node in the blockchain generates the same state in the blockchain by performing the same transaction, each node in the blockchain storing the same state database. It will be appreciated that while 6 nodes are shown in FIG. 1 as being included in a blockchain, embodiments of the present description are not so limited, but may include other numbers of nodes. Specifically, the nodes included in the blockchain may meet the bayer fault tolerance (Byzantine Fault Tolerance, BFT) requirements. The bayer fault tolerance requirement is understood to be that the bin node may exist inside the blockchain, and the blockchain does not show the bin behavior. In general, some bayer fault-tolerant algorithms require a node number greater than 3f+1, where f is the number of bayer nodes, e.g., the practical bayer fault-tolerant algorithm PBFT (Practical Byzantine Fault Tolerance).
Transactions in the blockchain domain may refer to task units that execute in the blockchain and are recorded in the blockchain. The transaction typically includes a send field (From), a receive field (To), and a Data field (Data). Where the transaction is a transfer transaction, the From field indicates an account address From which the transaction was initiated (i.e., a transfer task To another account was initiated), the To field indicates an account address From which the transaction was received (i.e., a transfer was received), and the Data field includes the transfer amount. In the case of a transaction calling a smart contract in a blockchain, the From field represents the account address From which the transaction originated, the To field represents the account address of the contract that the transaction called, and the Data field includes Data, such as the name of the function in the calling contract, and the incoming parameters To the function, for retrieving the code of the function From the blockchain and executing the code of the function when the transaction is executed.
Blockchain technology differs from one of the decentralized features of conventional technology in that accounting is performed on individual nodes, otherwise known as distributed accounting, rather than conventional centralized accounting. The blockchain system is to be a hard-to-break, public, untampered, decentralised, honest and trusted system for data records, and needs to be secure, clear and irreversible for distributed data records in as short a time as possible. In different types of blockchain networks, in order to keep account books consistent among nodes of each record account book, a consensus algorithm (i.e., a consensus mechanism) is generally adopted for ensuring. For example, a block granularity consensus mechanism may be implemented between blockchain nodes, such as after a node (e.g., a unique node) generates a block, if the generated block is approved by other nodes, the other nodes record the same block. For another example, a transaction granularity consensus mechanism may be implemented between blockchain nodes, for example, after a node (e.g., a unique node) obtains a blockchain transaction, if the blockchain transaction is approved by other nodes, each node approving the blockchain transaction may respectively add the blockchain transaction to its own maintained latest block, and finally, each node may be ensured to generate the same latest block. The consensus mechanism is a mechanism that the blockchain node achieves the consensus of the whole network about the blockinformation (or blockdata), and can ensure that the latest block is accurately added to the blockchain. The consensus mechanisms of the current mainstream include: proof of Work (POW), proof of equity (POS), proof of commission (Delegated Proof ofStake, DPOS), practical bayer fault tolerance (Practical Byzantine Fault Tolerance, PBFT) algorithms, and the like. In various consensus algorithms, the success of consensus for a consensus proposal is determined, typically after a preset number of nodes agree on the data to be consensus (i.e., the consensus proposal).
Wherein, according to the PBFT consensus algorithm, the consensus process can be divided into four phases of Request, preparation and Commit. Assuming that a blockchain includes four consensus nodes of node n 1-node n4, wherein node n1 is, for example, a master node, and node n 2-node n4 is, for example, a slave node, f=1 malicious nodes can be tolerated in node n 1-node n4 according to the PBFT algorithm. Specifically, during the request phase, a user of the blockchain may send a request, for example in the form of a blockchain transaction, to node n1 through his user device. In the preliminary stage, the node n1 may package a plurality of transactions into a consensus proposal after receiving the plurality of transactions from one or more user devices, and send the consensus proposal and a signature of the consensus proposal by the node n1 to other consensus nodes (i.e. nodes n 2-n 4) for generating blocks, where the consensus proposal may include information such as a transaction body of the plurality of transactions and a submitting sequence of the plurality of transactions. In the preparation phase, each slave node may sign the consensus proposal and send it to the other individual nodes. Assuming node n4 is a malicious node, nodes n1, n2, and n3, after each receiving the signatures of 2 f=2 other consensus nodes for the consensus proposal, may determine that the preparation phase is complete, and may enter the commit phase. In the submitting stage, each consensus node performs signature of the submitting stage on the consensus proposal and sends the signature to other consensus nodes, and each consensus node can determine that the submitting stage is completed and the consensus is successful after receiving the signatures of the submitting stages of 2 f=2 other consensus nodes. For example, the node n1 may determine that the commit phase is completed after receiving the signatures of the commit phases of the node n2 and the node n3 and verifying, so that the node n1 may perform executing the plurality of transactions according to the consensus proposal, generate and store a block (e.g., block B1) including the plurality of transactions, update the world state according to the execution results of the plurality of transactions, and return the execution results of the plurality of transactions to the user device. Similarly, after determining that the commit phase is complete, nodes n2 and n3 execute the plurality of transactions, generate and store block B1, and update the world state based on the execution results of the plurality of transactions. Through the above process, the storage consistency of the node n1, the node n2 and the node n3 is realized.
However, existing blockchain consensus schemes, including the above consensus scheme, typically have the following technical problems: in a real network environment, particularly in a large-scale network environment with a complex network structure, there are often nodes with poor communication conditions and relatively congestion. When these nodes participate in the consensus, this results in a decrease in the efficiency of the consensus of the entire blockchain network.
In order to solve the above technical problems, a method for determining a blockchain consensus node is provided in an embodiment of the present disclosure. The core idea is as follows: and determining network congestion nodes according to access delay information among all nodes of the blockchain, and selecting consensus nodes participating in the subsequent consensus process from non-congestion nodes or removing the congestion nodes from the subsequent consensus process. Specifically, fig. 2 is a schematic diagram of a method for determining a blockchain consensus node in an embodiment of the present disclosure. As shown in fig. 2, the blockchain includes a plurality of nodes, wherein node 1 is a first node, node 2 and node 3 are second nodes, and the first node (node 1) and each second node (nodes 2 to 6) respectively determine access delay information with other nodes. The manner in which the access delay information is determined may vary according to different embodiments. Fig. 3 is a schematic diagram of a node determining access delay information to other nodes in an embodiment of the present disclosure. As shown in fig. 3, for example, the node 2 determines an access delay time R21 to the node 1, an access delay time R23 to the node 3, respectively, an access delay time R26 to the node 6, then averages the access delay times of the node 2 to the respective nodes, obtains an average access delay time Avg (R21, R22..r26) of the node 2 to the respective nodes, and transmits the average access delay time to the first node. Similarly, other nodes may determine their average access delay times to other nodes based on their access delay times to other nodes, and the second node may send the respective average access delay times to node 1 (the first node). After receiving the average access delay time of each second node and determining the average access delay time of the node 1, the node 1 may sort the nodes according to the average access delay time of each node, select the third nodes with the number S according to a predetermined algorithm, and use the third nodes to determine the consensus nodes that participate in the following consensus.
The determination scheme of the block chain consensus node provided by the embodiment of the specification has the following advantages: the network congestion node in the network can be judged according to the access delay information of each node, so that the subsequent consensus node can be determined from the non-congestion nodes in the network, or the congestion node is excluded from the subsequent consensus process. This can greatly increase the efficiency of blockchain consensus in networks, especially in the presence of congestion in complex networks.
The detailed procedure of the method is further described below.
FIG. 4 is a flow chart of a method of determining a blockchain consensus node in an embodiment of the present disclosure. The blockchain includes a plurality of second nodes (the second node of fig. 4 represents the operation of the plurality of second nodes) and a first node, and the method includes the following steps S41-S43, as shown in fig. 4. The respective steps shown in fig. 4 will be described in detail below.
First, in step S41, the first node and the plurality of second nodes determine respective access delay information to other nodes, respectively. In different embodiments, the common knowledge mechanisms employed by the blockchain system may be different, and the types of common nodes in the different common knowledge mechanisms may also be different, and further, in different embodiments, the specific types of the first node and the second node may be different. For example, in one embodiment, the node types participating in the consensus include a consensus master node and a slave node, and the first node may be a master node and the second node may be a slave node. In another embodiment, all nodes which can participate in the consensus do not distinguish between the master node and the slave node, so that each node can pre-determine a first node from all nodes through a preset rule, and the rest nodes are second nodes. In different embodiments, the predetermined rule may be a different specific rule, which the present specification does not limit.
In this step, each node including the first node and the plurality of second nodes in the blockchain network determines access delay information of the node to other nodes, respectively. For example, in the example shown in fig. 3, node 2 determines its access delay information to node 1, node 3, and node …, node 6, respectively. Similarly, node 1 determines its access delay information to node 2, node 3, …, node 6, respectively, and node 3, …, node 6 also determines their access delay information to the other nodes, respectively.
Access delay information, i.e., information representing the access delay state between nodes. According to different embodiments, each node may determine access delay information from the node to other nodes of different specific types according to different specific manners. For example, in one embodiment, the access delay information may be a particular statistical indicator determined from the access delay time of the node to other nodes. Further, in a specific embodiment, the first node and the plurality of second nodes may determine access delay times to the other plurality of nodes, respectively, and determine the first statistical index as the access delay information according to the plurality of access delay times. In different embodiments, the first statistical indicator may be a different specific indicator. In a specific embodiment, the first statistical indicator may be an average access delay of a node to other nodes. For example, as shown in fig. 2, the node 2 transmits the average Avg (R21, R22 … R26) of the access delay times R21, R22 … R26 to the other respective nodes (node 1, node 3, …, node 6) as the access delay information of the node 2 to the node 1. In another specific embodiment, the first statistical indicator may further include one or more of an average access delay, a smooth access delay Srtt, an average delay variance, and an average delay standard deviation, which is not limited in this specification.
In one embodiment, each node may also directly use its access delay time to other nodes as the access delay information of the node without further data processing.
In a specific embodiment, the access delay time from node a to another node B may also be determined based on a preset number of multiple accesses from node a to node B. For example, in fig. 3, the access delay time R23 from node 2 to node 3 may be determined according to an average delay of a preset number of rounds of access from node 2 to node 3, and in one example, may be represented as r23=avg (R23.1, R23.2 … R23. N), where R23.1, R23.2 … R23.N are access delays of respective rounds, avg () is an average function, and n is a preset number of rounds. In another example, the consecutive rounds of the multiple rounds of access may have a predetermined time interval between them, for example 10 minutes in a specific example. In another specific embodiment, each node may directly use the access delay time of all rounds for other nodes as the access delay information of the node.
In step S43, the plurality of second nodes respectively transmit the respective access delay information to the first node.
In this step, each second node transmits the access delay information acquired by the second node to the other nodes, and the access delay information is transmitted to the first node. So that the first node determines in a subsequent step a third node for determining the consensus node based on said access delay information. In the embodiment in which the first node is the master node, each slave node may send its access delay information to the master node. In the above embodiment of not distinguishing the master node from the slave node, each other node may transmit its access delay information to the first node determined in advance by a predetermined rule.
In step S45, the first node determines a plurality of third nodes from the first node and the plurality of second nodes according to the access delay information of the first node and each second node.
In this step, after the first node receives the access delay information sent by each second node in step S42, a plurality of third nodes are determined from the first node and the plurality of second nodes according to the access delay information of the first node to other nodes and the access delay information of each second node to other nodes, where the third nodes are used to determine common nodes in the blockchain network.
As described above, according to different embodiments, the specific type of access delay information transmitted by the second node may be different in step S43. Thus, according to different embodiments, in this step, the first node may determine the third node in different specific manners according to the received access delay information of different specific types. In the embodiment where the access delay information is an average access delay, the first node may sort the first node and the plurality of second nodes according to the average access delay of each node including the first node and the second node, and determine the first number of nodes with the preceding order as the third node. In one or more embodiments in which the access delay information includes one or more of an average access delay, a smooth access delay Srtt, an average delay variance, and an average delay standard deviation, the first node may rank the nodes according to one or more of the average access delay, the smooth access delay Srtt, the average delay variance, and the average delay standard deviation of the respective nodes, and determine a first number of nodes in a preceding order as the third node. For example, in one example, the nodes may be first ranked according to an average access delay, and for nodes with the same average access delay, the average delay standard deviation or average delay variance may be ranked. In the embodiment in which the access delay information is the access delay time from each node to the other nodes, the first node may determine one or more of the average access delay, the smooth access delay Srtt, the average delay variance, and the average delay standard deviation of each node according to the access delay time, and then determine the third node according to one or more of the average access delay, the smooth access delay Srtt, the average delay variance, and the average delay standard deviation in a similar manner to the above embodiment.
In different embodiments, the first number may be a different specific number. In a specific embodiment, the first number is denoted s=a-Min (α×a, f). Wherein S is a first number, a is a total number of the first node and the second node, α is a scaling factor, f is a number of the malignant nodes, and Min (α×a, f) represents a minimum value between α×a and f. In different embodiments, α may be a different value, and in one embodiment may be, for example, 5% to 15%. Fig. 5 is a schematic diagram of determining a first number of third nodes in an embodiment of the present disclosure, where, as shown in fig. 5, the first node ranks the nodes according to an average access delay of the nodes, and then selects a node with a number of a-Min (α×a, f) in a preceding order from the ranked nodes as the third node.
After the plurality of third nodes are acquired, the consensus nodes which follow up participation in the consensus process can be determined according to the third nodes. According to different embodiments, the consensus nodes are determined in different specific ways. In one embodiment, the third node may be determined directly as a consensus node that subsequently participates in the consensus process. In another embodiment, from the third node, a number of nodes may be randomly determined, followed by consensus nodes participating in the consensus process. In yet another embodiment, one or more of the third nodes may be replaced with an existing consensus node by way of random rotation. In the embodiment of the above consensus mechanism including the master node and the slave node, one or more of the third nodes may replace the existing master node or slave node by a random rotation manner.
According to an embodiment of another aspect, a blockchain is also provided. The blockchain includes a plurality of second nodes and a first node, wherein,
the first node is used for determining access delay information of the first node to other nodes and sending the access delay information to the first node;
and the second nodes are used for determining access delay information of the second nodes to other nodes, and determining a plurality of third nodes from the first nodes and the plurality of second nodes according to the access delay information of the first nodes and the access delay information of each second node, wherein the third nodes are used for determining consensus nodes.
According to an embodiment of another aspect, there is also provided a blockchain node. Fig. 6 is an architecture diagram of a first node 600 in an embodiment of the present description. As shown in fig. 6, the first node 600 includes:
a determining unit 61 for determining access delay information to other nodes;
a receiving unit 62, configured to receive access delay information from a plurality of second nodes in the blockchain to other nodes, respectively;
the determining unit 61 is further configured to determine, according to access delay information of the first node and each of the second nodes, a plurality of third nodes from the first node and the plurality of second nodes, where the third nodes are used to determine a common node.
Yet another aspect of the present description provides a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform any of the methods described above.
In yet another aspect, the present description provides a computing device comprising a memory having executable code stored therein and a processor that, when executing the executable code, performs any of the methods described above.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation device is a server system. Of course, the present application does not exclude that as future computer technology evolves, the computer implementing the functions of the above-described embodiments may be, for example, a personal computer, a laptop computer, a car-mounted human-computer interaction device, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Although one or more embodiments of the present description provide method operational steps as described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive means. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. When implemented in an actual device or end product, the instructions may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even in a distributed data processing environment) as illustrated by the embodiments or by the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, it is not excluded that additional identical or equivalent elements may be present in a process, method, article, or apparatus that comprises a described element. For example, if first, second, etc. words are used to indicate a name, but not any particular order.
For convenience of description, the above devices are described as being functionally divided into various modules, respectively. Of course, when one or more of the present description is implemented, the functions of each module may be implemented in the same piece or pieces of software and/or hardware, or a module that implements the same function may be implemented by a plurality of sub-modules or a combination of sub-units, or the like. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, read only compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
One skilled in the relevant art will recognize that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
One or more embodiments of the present specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments. In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present specification. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The foregoing is merely an example of one or more embodiments of the present specification and is not intended to limit the one or more embodiments of the present specification. Various modifications and alterations to one or more embodiments of this description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, or the like, which is within the spirit and principles of the present specification, should be included in the scope of the claims.

Claims (15)

1. A method of determining a consensus node in a blockchain system, the blockchain system including a first node and a plurality of second nodes, the method comprising:
the first node and the plurality of second nodes respectively determine respective access delay information to other plurality of nodes;
the plurality of second nodes respectively send the access delay information to the first node;
the first node determines a plurality of third nodes from the first node and a plurality of second nodes according to the access delay information of the first node and each second node, and the third nodes are used for determining consensus nodes.
2. The method of claim 1, wherein,
the first node and the plurality of second nodes respectively determine respective access delay information to other plurality of nodes, including:
the first node and the plurality of second nodes respectively determine respective access delay times to other plurality of nodes, and determine a first statistical index as the access delay information according to the plurality of access delay times.
3. The method of claim 2, wherein,
determining a first statistical indicator as the access delay information according to the plurality of access delay times, including:
the first node and the plurality of second nodes respectively determine respective average access delays to other plurality of nodes according to the plurality of access delay times;
determining a number of third nodes from the first node and a plurality of second nodes, comprising:
and the first node orders the first node and the plurality of second nodes according to the average access delay, and determines a first number of nodes with the preceding order as a third node.
4. The method of claim 2, wherein the first statistical indicator comprises one or more of an average access delay, a smoothed access delay, an average delay variance, an average delay standard deviation.
5. The method of claim 1, further comprising:
from the third node, a random number of nodes is determined as consensus nodes.
6. The method of claim 1, further comprising:
and replacing one or more of the third nodes with the existing consensus nodes in a random rotation mode.
7. The method of claim 1, wherein the first node is a master node participating in a consensus.
8. A blockchain system includes a first node and a plurality of second nodes, wherein,
the second node is used for determining access delay information of the second node to other multiple nodes and sending the access delay information to the first node;
the first node is used for determining access delay information of the first node to other nodes, and determining a plurality of third nodes from the first node and a plurality of second nodes according to the access delay information of the first node and each second node, wherein the third nodes are used for determining consensus nodes.
9. The blockchain system of claim 8, wherein,
the first node and the second node are further configured to determine access delay times of each node to other nodes, and determine a first statistical index as the access delay information according to the access delay times.
10. The blockchain system of claim 9, wherein,
the first node and the second node, further for,
respectively determining respective average access delays to other multiple nodes according to the multiple access delay times;
the first node is further configured to, in response to a request from a first node,
and sequencing the first node and the plurality of second nodes according to the average access delay, and determining a first number of nodes with the preceding sequence as a third node.
11. The blockchain system of claim 9, wherein the first statistical indicator includes one or more of an average access delay, a smoothed access delay, an average delay variance, an average delay standard deviation.
12. The blockchain system of claim 8, wherein the first node is a master node that participates in a consensus.
13. A first node in a blockchain system, comprising:
a determining unit configured to determine access delay information to other nodes;
a receiving unit, configured to receive access delay information from a plurality of second nodes in the blockchain system to other nodes, respectively;
the determining unit is further configured to determine a plurality of third nodes from the first node and the plurality of second nodes according to access delay information of the first node and each of the second nodes, where the third nodes are used to determine a consensus node.
14. A computer readable storage medium having stored thereon a computer program or instructions which, when executed in a computer, cause the computer to perform the method of any of claims 1-7.
15. A computing device comprising a memory having stored therein a computer program or instructions, and a processor that when executed implements the method of any of claims 1-7.
CN202210325866.4A 2022-03-30 2022-03-30 Method for determining consensus node in blockchain system, node, storage medium and computing device Active CN114697344B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210325866.4A CN114697344B (en) 2022-03-30 2022-03-30 Method for determining consensus node in blockchain system, node, storage medium and computing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210325866.4A CN114697344B (en) 2022-03-30 2022-03-30 Method for determining consensus node in blockchain system, node, storage medium and computing device

Publications (2)

Publication Number Publication Date
CN114697344A CN114697344A (en) 2022-07-01
CN114697344B true CN114697344B (en) 2023-12-19

Family

ID=82140905

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210325866.4A Active CN114697344B (en) 2022-03-30 2022-03-30 Method for determining consensus node in blockchain system, node, storage medium and computing device

Country Status (1)

Country Link
CN (1) CN114697344B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020053565A1 (en) * 2018-09-14 2020-03-19 Arqit Limited Autonomous quality regulation for distributed ledger networks
CN112202765A (en) * 2020-09-28 2021-01-08 北京八分量信息科技有限公司 Block chain common identification block method and device based on trusted computing and related products
CN112351117A (en) * 2020-11-25 2021-02-09 北京邮电大学 Domain name management method and device, electronic equipment and storage medium
CN113141600A (en) * 2021-04-23 2021-07-20 国网河南省电力公司信息通信公司 Block chain distributed data sharing method based on Internet of vehicles
CN113610531A (en) * 2021-10-09 2021-11-05 支付宝(杭州)信息技术有限公司 Consensus method, block chain system and consensus node

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9749427B2 (en) * 2014-11-21 2017-08-29 International Business Machines Corporation Systems and methods for consensus protocol selection based on delay analysis

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020053565A1 (en) * 2018-09-14 2020-03-19 Arqit Limited Autonomous quality regulation for distributed ledger networks
CN112202765A (en) * 2020-09-28 2021-01-08 北京八分量信息科技有限公司 Block chain common identification block method and device based on trusted computing and related products
CN112351117A (en) * 2020-11-25 2021-02-09 北京邮电大学 Domain name management method and device, electronic equipment and storage medium
CN113141600A (en) * 2021-04-23 2021-07-20 国网河南省电力公司信息通信公司 Block chain distributed data sharing method based on Internet of vehicles
CN113610531A (en) * 2021-10-09 2021-11-05 支付宝(杭州)信息技术有限公司 Consensus method, block chain system and consensus node

Also Published As

Publication number Publication date
CN114697344A (en) 2022-07-01

Similar Documents

Publication Publication Date Title
CN113743940B (en) Method for executing transaction in block chain, main node and slave node
CN113743942B (en) Transaction execution method, blockchain, master node and master storage device
CN114827165B (en) Method and block link point for grouping multiple transactions
CN114553434B (en) Consensus method, block chain system and consensus node
CN114710507B (en) Consensus method, blockchain node, medium and consensus node
WO2024001024A1 (en) Method for executing transaction in blockchain system, and blockchain system and nodes
WO2023231337A1 (en) Method for executing transaction in blockchain, and master node and slave node of blockchain
CN114942847A (en) Method for executing transaction and block link point
CN114936092A (en) Method for executing transaction in block chain and main node of block chain
CN113744063A (en) Method and device for executing transaction in block chain
CN114697344B (en) Method for determining consensus node in blockchain system, node, storage medium and computing device
CN116366666A (en) Chain state updating method and block link point in block chain system
CN114785800B (en) Cross-link communication method, device, storage medium and computing equipment
CN115098483A (en) Pre-execution cache data cleaning method and block link point
CN115150409A (en) Method for executing transaction in block chain system, block chain system and node
CN115174572B (en) Data multicasting method in blockchain, blockchain node and storage medium
CN117319409A (en) Consensus method in blockchain system, blockchain node and blockchain system
CN115174573B (en) Data broadcasting method in block chain system, node and block chain system
CN116668001A (en) Transaction processing method in block chain and block chain link point
CN116244373A (en) Transaction execution method, blockchain system, master node and slave storage device
CN116016552A (en) Data transmission method and device of block chain network, electronic equipment and storage medium
CN116668002A (en) Transaction distribution method in blockchain system, blockchain node and blockchain system
CN117808587A (en) Transaction deduplication method and nodes in blockchain system
CN114581232A (en) Method and device for processing digital resources in block chain
CN116305311A (en) Method and device for verifying read-write set in block chain system

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