CN115941191A - Method for generating and checking non-consensus block in block chain and witness node - Google Patents

Method for generating and checking non-consensus block in block chain and witness node Download PDF

Info

Publication number
CN115941191A
CN115941191A CN202211017975.6A CN202211017975A CN115941191A CN 115941191 A CN115941191 A CN 115941191A CN 202211017975 A CN202211017975 A CN 202211017975A CN 115941191 A CN115941191 A CN 115941191A
Authority
CN
China
Prior art keywords
witness
block
block chain
node
nodes
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
CN202211017975.6A
Other languages
Chinese (zh)
Other versions
CN115941191B (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.)
Mingqi Intelligent Technology Guangdong Co ltd
Original Assignee
Mingqi Intelligent Technology Guangdong 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 Mingqi Intelligent Technology Guangdong Co ltd filed Critical Mingqi Intelligent Technology Guangdong Co ltd
Priority to CN202211017975.6A priority Critical patent/CN115941191B/en
Publication of CN115941191A publication Critical patent/CN115941191A/en
Application granted granted Critical
Publication of CN115941191B publication Critical patent/CN115941191B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The method for generating and checking the non-consensus blocks in the block chain and the witness nodes can achieve the purposes of improving transaction throughput, reducing confirmation time delay and further reducing operation and maintenance cost of the block chain; the method comprises the following steps: setting a transaction and block conflict global judgment method in a block chain protocol, and independently judging the conflict transaction and block by all block chain nodes to obtain the same result; and splitting the block chain generation process into a collection stage and a witness and casting stage, wherein the two stages are respectively completed by different block chain link points, and after each stage is completed, randomly and dynamically selecting an execution node of the next stage according to the current data.

Description

Method for generating and checking non-consensus block in block chain and witness node
Technical Field
The present invention relates to the field of block chains, and in particular, to a method for generating and verifying a block without consensus in a block chain and a witness node.
Background
The block chain is a distributed account book (distributed data technology), and since 2008, the book has been developed widely in the world after being proposed in the bit currency paper, and is known as one of the most important inventions in the 21 st century.
The block chain has the characteristics of decentralization, openness and transparency, no falsification, credibility, collective maintenance, traceability and the like, and based on the characteristics, the block chain not only roots on the ground in the financial industry, but also flowers all the time in other industries, and the production relationship change is promoted.
The block chain stores data by using blocks, and the blocks are linked by using hash digests, so that the data cannot be tampered, and the consistency of distributed storage is guaranteed.
In the current block chain technology, data is written into a block chain, and a consensus process is required to ensure that the data stored in different nodes are consistent, that is, a plurality of block chain link points perform calculation verification on incoming chain data, and the incoming chain data is written into the block chain through one of the nodes.
In order to guarantee consistency of block chains in a distributed peer-to-peer network environment, a current block chain consensus algorithm includes categories such as workload certificates (PoW, proof-of-Work), equity certificates (PoS, proof-of-stamp), proxy equity certificates (DPoS), and the like; the resources such as workload (CPU time) and rights (virtual token) required by verification are accumulated by using a block chain respectively, and the longer the chain is, the more the accumulation is, and the higher the cost required by an attacker for counterfeiting and tampering is; based on the method, the consensus algorithm can guarantee the safety of the block chain.
For example, FIG. 1 shows the structure of a block chain in the prior art, in FIG. 1, each rectangle represents a block of the block chain, the rings between the blocks are buckled, and any modification to the preamble node will cause the complete change of the subsequent node; each block is generated after nodes in the blockchain peer-to-peer network win calculation or voting competition, which means that an attacker can forge or tamper with the same or even more cost, and the cost is not good, so that the consistency and the safety of blockchain data are guaranteed.
However, the existing consensus-based technology of the blockchain has the defects of serious resource consumption, low transaction throughput and prolonged confirmation time;
in terms of resource consumption:
such as: the consensus algorithm PoW is simple and easy to understand, but has the disadvantages of performance bottleneck and resource waste.
For another example: although the energy consumption is reduced, the consensus algorithms PoS and DPoS improve the complexity of the completion of the consensus protocol, are high in development cost, are inferior to PoW in safety, and have the possibility of decentralization weakening.
In terms of throughput and acknowledgement latency:
the time delay of the common recognition algorithm PoW is only 7TPS/10-60m (7 strokes per second/10-60 minutes), and the improvement of various PoWs is not more than 100TPS/10m;
the difference between PoS and PoW is small, DPoS is improved, but the DPoS is not used much, and the maximum value is not more than 200TPS/1m.
As can be seen from the above, the current block chain consensus algorithm only has two of the number of consensus nodes, transaction performance, and security, and needs to be improved.
Disclosure of Invention
In order to solve the technical problems in the prior art, the invention provides a generation and verification method and a witness node for a block without common identification in a block chain, and provides a generation and verification scheme for a block without common identification, so that the aims of improving transaction throughput, reducing confirmation delay and further reducing operation and maintenance cost of the block chain are fulfilled.
The method for generating and checking the non-consensus blocks in the block chain comprises the following steps:
s01, setting a transaction and block conflict global judgment method in a block chain protocol, and independently judging the conflict transaction and block by all block chain nodes to obtain the same result;
s02, splitting a block chain generation process into a collection stage and a witness and casting stage, wherein the two stages are respectively completed by different block chain link points, and after each stage is completed, randomly and dynamically selecting an execution node of the next stage according to current data;
specifically, in the collection phase, the method comprises the following steps:
s10, monitoring and collecting transaction messages by the nodes of the block chain peer-to-peer network until the transaction quantity of the blocks specified by the protocol is reached, and generating block suggestions;
s20, generating a node suggested by the block, and broadcasting witness and casting requests to the block chain peer-to-peer network;
in the witness and casting stage, the method comprises the following steps:
s30, judging whether the node is a witness node or not after other nodes in the block chain peer-to-peer network receive witness and casting requests;
s40, verifying and witnessing the block suggestions by the witness nodes, attaching witness records to the witness nodes after the legal block suggestions are verified, performing hash package and signature, and mounting the witness nodes to a block chain for broadcasting;
wherein the block suggestion includes: all transaction data, the hash abstract of the last block and the witness request record; the witness request record includes: the node public key and the verifier public key comparison value obtained after the hash operation is carried out on the block proposal.
Optionally, the method for generating and checking a block without consensus in a block chain, where in step S30, determining whether the node is a witness node specifically includes:
and calculating the witness distance based on the witness request record, wherein when the calculated witness distance is smaller than a witness distance threshold set by the protocol, the node is the witness node.
Optionally, a method for generating and checking a block without common knowledge in a block chain, where the block chain protocol further states: multiple rounds of witnesses are made to the block proposal.
Optionally, there is no consensus block generation and verification method in the block chain, in step S40, the witness node performs verification witness on the block suggestion, after the verification is passed, the witness node attaches witness record to the legal block suggestion, performs hash encapsulation and signature, and mounts the result to the block chain for broadcasting; the method specifically comprises the following steps:
s401, verifying the block validity by the witness node, attaching witness records after the block suggestion is verified, and executing the step S402, otherwise, discarding the illegal block suggestion and terminating the witness and casting processes;
s402, judging whether the number of witness records added to the block at present is equal to the number of witness rounds, if so, completing witness of the witness nodes, performing hash package and signature, mounting the witness nodes to a block chain for broadcasting, and otherwise, executing the step S403;
s403, attaching a new witness request after the witness record, and broadcasting the new witness and casting request to the peer-to-peer network of the block chain;
s404, after receiving the new witness and casting request, other nodes in the block chain peer-to-peer network judge whether the node is the witness node, if so, the step S401 is executed, otherwise, the new witness and casting request is not responded.
Optionally, the generating and checking method for a block without common identification in a block chain, in step S401, checking the validity of the block includes:
and judging the height of the block and the legality of all transactions, if the block is legal, checking to pass, otherwise, discarding the illegal block suggestion, and terminating the witness and casting process.
Optionally, the method for generating and checking a block without common knowledge in a block chain, where in step S01, the block collision global determination method includes:
when the blocks conflict, the block with the lowest transaction score value is selected to be won, and other blocks are discarded.
The present application also provides a witness node, comprising: the nodes of the block chain peer-to-peer network monitor and collect transaction messages until the transaction number of the blocks specified by the protocol is reached, block suggestions are generated, and witness and casting requests are broadcast to the block chain peer-to-peer network;
the response module is used for judging whether the node is the witness node or not after receiving the witness and casting requests;
and the checking module is used for checking and witnessing the block suggestion when the node is the witness node, attaching witness records to the witness node after the valid block suggestion after the validation is passed, performing hash package and signature, and mounting the witness node to a block chain for broadcasting.
Optionally, in a witness node, the blockchain protocol further states: performing multiple rounds of witnesses on the block suggestions;
the verification module comprises:
the validity judging module is used for verifying the block height and the transaction validity by the witness nodes, attaching witness records after the block suggestions are passed through the verification, discarding the illegal block suggestions if the block suggestions are not passed through the verification, and terminating the witness and casting processes;
and the iteration frequency judging module is used for judging whether the maximum witness rounds are reached, if so, the witness node completes witness, carries out Hash packaging and signature, and then mounts the witness node to the block chain for broadcasting, otherwise, a new witness request is attached after witness recording, and a new witness and casting request is broadcasted to the peer-to-peer network of the block chain, so that a new witness meeting the conditions continues to be verified.
The technical scheme that this application provided's advantage lies in:
in the invention, a basic mechanism for solving block conflicts based on consensus in the existing block chain network is changed to replace the basic mechanism with a global block conflict solution based on a global rule, and based on the scheme, a brand-new block generation and verification scheme is provided, so that the dependence of the existing block chain technology on consensus is removed, the consensus is fundamentally removed, the resource consumption, the bottleneck of throughput and the confirmation delay caused by the consensus are eliminated, and the practicability is strong.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the related art, the drawings required to be used in the description of the embodiments or the related art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a prior art block chain structure;
fig. 2 is a flowchart illustrating an embodiment of a method for generating and checking a block without a consensus in a block chain according to the present invention;
fig. 3 is a schematic flowchart illustrating a step S40 in the method for generating and verifying a block without consensus in a block chain according to an embodiment of the present invention;
FIG. 4 is a block generation and verification block diagram according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of hash packing and signature;
FIG. 6 is a block diagram illustrating a manner in which an embodiment of the present invention provides conflict resolution;
FIG. 7 is a block diagram illustrating an exemplary structure of a transaction validity check according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a witness node provided by an embodiment of the present invention;
in the figure:
10 is a response module, and 20 is a check module;
a validity judgment module 201 and an iteration number judgment module 202.
Detailed Description
The invention provides a method for generating and checking a block without consensus in a block chain and a witness node, and solves the problems of low transaction throughput and prolonged confirmation time in the prior art by constructing a new method for generating and checking the block without consensus.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments, but not all embodiments, of the present invention; all other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 2, the method for generating and verifying the block without consensus in the block chain includes:
s01, setting a transaction and block conflict global judgment method in a block chain protocol, and independently judging the conflict transaction and block by all block chain nodes to obtain the same result;
s02, splitting a block chain generation process into a collection stage and a witness and casting stage, wherein the two stages are respectively completed by different block chain link points, and after each stage is completed, randomly and dynamically selecting an execution node of the next stage according to current data;
specifically, in the collection phase, the method comprises the following steps:
s10, monitoring and collecting transaction messages by the nodes of the block chain peer-to-peer network until the transaction quantity of the blocks specified by a protocol is reached, and generating a block suggestion;
s20, generating a node suggested by the block, and broadcasting witness and casting requests to the block chain peer-to-peer network;
in the witness and casting stage, the method comprises the following steps:
s30, judging whether the node is a witness node or not after other nodes in the block chain peer-to-peer network receive witness and casting requests;
s40, verifying and witnessing the block suggestions by the witness nodes, attaching witness records to the witness nodes after the legal block suggestions are verified, performing hash package and signature, and mounting the witness nodes to a block chain for broadcasting;
wherein the block suggestion includes: all transaction data, hash digests of the last block and witness request records; the witness request record includes: the node public key and the verifier public key comparison value obtained after the hash operation is carried out on the block suggestion.
In the prior art, in order to ensure that the system meets different degrees of consistency and solves global conflicts, a consensus algorithm is usually adopted to achieve, in the existing block chain technology, the casting process is completed at one node, in the application, the process is divided into a plurality of nodes which are completed in a coordinated mode and divided into two stages of collection (collection), witness and casting (witness & mint), and since the witness needs to be selected (for example, determined by a plurality of transactions and the hash value of the public key of the selector), a counterfeiter cannot acquire the conspiracy account in advance and cannot prepare the conspiracy account in advance before the transactions are generated, so that counterfeiting is effectively eliminated and collusion events are avoided.
Specifically, in the collection phase:
all nodes of the blockchain peer-to-peer network participate in BLOCK collection, and they listen to transaction messages and collect them until the number of BLOCK transactions specified by the protocol (BLOCK _ TX _ COUNT) is reached, and then generate BLOCK Proposal (BLOCK prompt).
In this embodiment, the chunk suggestion includes all transaction data and hash digests of the previous chunk, and adds a WITNESS request RECORD (ASK _ FOR _ WITNESS _ RECORD); thereafter, the node broadcasts a WITNESS AND cast request (AFW: ASK _ FOR _ WITNESS _ AND _ MINT) to the blockchain peer-to-peer network.
Wherein, the WITNESS request record comprises the public key of the NODE (NODE _ PK) and the WITNESS public key comparison VALUE (WITNESS _ PK _ COMPARING _ VALUE) obtained after the hash is carried out on the block proposal;
further, in the witness and casting stage:
after receiving WITNESS and casting requests, the nodes in the peer-to-peer network of the block chain use a DISTANCE function to calculate WITNESS DISTANCEs, and when the calculation result is smaller than a WITNESS DISTANCE THRESHOLD (WITNESS _ DISTANCE _ THRESHOLD) set by a protocol, the nodes are WITNESS nodes and carry out verification WITNESS on the block suggestions.
The witness nodes verify the validity of the block proposal, discard the illegal block proposal and terminate the witness and casting process.
In the application, a basic mechanism for solving block conflicts based on consensus in the existing block chain network is changed, a global block conflict solution based on global rules is replaced, based on the scheme, a brand-new block generation and verification scheme is provided, dependence of the existing block chain technology on consensus is eliminated, consensus is fundamentally eliminated, resource consumption, throughput bottleneck and confirmation time delay caused by the consensus are eliminated, and the practicability is strong.
In this embodiment, in the step S30, determining whether the node is a witness node specifically includes:
and calculating the WITNESS DISTANCE based on the WITNESS request record, and when the calculated WITNESS DISTANCE is smaller than a WITNESS DISTANCE THRESHOLD (WITNESS _ DISTANCE _ THRESHOLD) set by the protocol, the node is the WITNESS node.
It should be noted that the selection of the witness node may include various ways, and is not limited to the calculation of the witness distance by the distance function provided in this embodiment.
In this embodiment, the distance function may be any monotonic distance function, such as: the absolute value of the difference. When the distance function is used for calculation, if the prover public key comparison value is 0x07, the received public key of the node a is 0x10, and the received public key of the node b is 0x5, the witness distance of a is |10-7| =3, and the witness distance of b is |5-7| =2.
The above is a description of an embodiment of a method for generating and checking a block without common knowledge in a block chain provided by the present invention, and another embodiment of the method for generating and checking a block without common knowledge in a block chain provided by the present invention is described below.
Example two
On the basis of the first embodiment, there is no consensus block generation and check method in the block chain, and the block chain protocol further states: multiple rounds of witnesses are made to the block proposal.
Referring to fig. 3 and 4, in the step S40, the witness node performs verification witness on the block suggestion, and after the verification is passed, the witness node attaches witness records to the legal block suggestion, performs hash package and signature, and mounts the result to the block chain for broadcasting; the method specifically comprises the following steps:
s401, verifying the block legality by the witness node, attaching witness records after the block suggestion is verified, and executing the step S402, otherwise, discarding the illegal block suggestion and terminating the witness and casting processes;
s402, judging whether the number of witness records added to the block at present is equal to the number of witness rounds, if so, completing witness of the witness nodes, performing hash package and signature, mounting the witness nodes to a block chain for broadcasting, and otherwise, executing the step S403;
s403, attaching a new witness request after witness record, and broadcasting the new witness and casting request to the block chain peer-to-peer network;
s404, after receiving the new witness and casting request, other nodes in the block chain peer-to-peer network judge whether the node is the witness node, if so, the step S401 is executed, otherwise, the new witness and casting request is not responded.
In this embodiment, different WITNESS ROUNDs (WITNESS _ ROUND _ COUNT) may be set for different needs, and multiple WITNESS ROUNDs may be performed to enhance the security of data.
When multi-round verification is carried out, a first WITNESS node verifies the block legality, after the verification is passed, WITNESS RECORDs (WITNESS _ RECORD) are attached to the block after the block is recommended, meanwhile, whether the number of WITNESS RECORDs attached to the block currently is equal to the number of WITNESS rounds is judged, if yes, the WITNESS node completes WITNESS, carries out Hash packaging and signature and then attaches to a block chain for broadcasting, and if not, after the WITNESS RECORDs of the WITNESS node, a new WITNESS request is attached to the WITNESS node and broadcasts to a peer-to-peer network of the block chain; thereafter, the new witnesses eligible in the blockchain peer-to-peer network will repeat the witness and casting process in multiple rounds until the number of witness records appended to the blockproposal equals the number of witness rounds.
And after the witness record number is equal to the witness round number, the block proposal at the moment is regarded as a legal block, and after the witness node completes witness, the Hash package and signature are carried out and are mounted on a chain to broadcast the whole network.
Referring to fig. 5, hash encapsulation and signature are performed to generate a Merkle Tree (Merkle Tree) using the current transaction, and the hash digests with the leaf nodes as transactions and the intermediate nodes and the root node as children.
The above is a description of a second embodiment of the method for generating and checking a block without common knowledge in a block chain provided by the present invention, and another embodiment of the method for generating and checking a block without common knowledge in a block chain provided by the present invention is described below.
EXAMPLE III
Referring to fig. 6, on the basis of the first embodiment, the method for generating and checking a block without common knowledge in a block chain includes, in step S401, checking the validity of the block, including:
and judging the height of the block and the legality of all transactions, if the block is legal, checking to pass, otherwise, discarding the illegal block suggestion, and terminating the witness and casting process.
In step S01, the block collision global determination method includes: when the blocks conflict, the block with the lowest transaction score value is selected to be won, and other blocks are discarded.
In this embodiment, the conflict resolution algorithm may be any monotonic function from the block to the real number domain, e.g., a simple function may be tx _ score = concatenation of transaction addresses for ascending transaction sequences of blocks.
When a collision occurs, the block with the smallest tx _ score value wins, as shown in fig. 7:
tx _ score for transaction tx is 12 and tx '_ score for transaction tx' is 13, and transaction tx wins when the two conflict.
Referring to fig. 7, in the present embodiment, a method for determining the validity of a transaction includes:
the public key of the deposit party of the transaction in the transaction message and the hash operation of the previous transaction are carried out, and the result is the same as the hash value in the message, so that the transaction deposit party is ensured to be the deposit party in the previous transaction;
the public key of the deposit party of the previous transaction (the payment party of the transaction) is taken out, and then the signature of the transaction message is verified according to the digital signature technology to be the true public key of the payment party of the transaction (the signature is verified through the private key).
It should be noted that, in this embodiment, when checking the validity of the block, only the height of the block is the current height of the block +1, and when all transactions are valid, the block is a valid block.
In the application, the block legality and the block conflict solution algorithm are globally effective and consistent, any node in the distributed environment performs independent operation, and the same result (output) is obtained for the same input.
The above is a description of another embodiment of the generation and verification method for a block without common knowledge in a block chain provided by the present invention, and an embodiment of a witness node provided by the present invention is described below.
Referring to fig. 8, a witness node, comprising: the nodes of the block chain peer-to-peer network monitor and collect transaction messages until the transaction number of the blocks specified by the protocol is reached, block suggestions are generated, and witness and casting requests are broadcast to the block chain peer-to-peer network;
the response module 10 is configured to determine whether the node is a witness node after receiving the witness and casting request;
and the checking module 20 is used for checking and witnessing the block suggestion when the node is the witness node, attaching witness records to the witness node after the valid block suggestion after the validation is passed, performing hash package and signature, and mounting the witness node to a block chain for broadcasting.
It should be noted that, the block chain protocol also states: multiple rounds of witnesses are made to the block proposal.
The verification module 20 includes:
the validity judging module 201 is used for verifying the block height and the transaction validity by the witness nodes, attaching witness records after the block suggestions are passed through the verification, discarding the illegal block suggestions if the block suggestions are not passed through the verification, and terminating the witness and casting processes;
the iteration number judging module 202 judges whether the number of witness records added to the block currently is equal to the number of witness rounds, if so, the witness node completes witness, performs hash package and signature, mounts the witness records to the block chain for broadcasting, and otherwise, attaches a new witness request after the witness records, and broadcasts a new witness request and a casting request to the peer-to-peer network of the block chain so as to enable a new witness meeting the conditions to continue checking.
In addition, the invention also provides a storage device, wherein a plurality of instructions are stored, and the instructions are suitable for being loaded by a processor and executing the method for generating and checking the block chain without the consensus block.
The storage device may be a computer-readable storage medium, and may include: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The present invention also provides a terminal, which may include:
a processor adapted to implement instructions; and
the storage device is suitable for storing a plurality of instructions which are suitable for being loaded by a processor and executing the block chain non-consensus block generation and verification method.
The terminal may be any device capable of generating and verifying the non-consensus block in the block chain, and the device may be various terminal devices, for example: desktop computers, laptop computers, mobile phones, ioT devices, etc., may be implemented in particular by software and/or hardware.
In conclusion, the invention removes the dependence of the prior block chain technology on consensus, replaces the prior block chain technology with a globally consistent deterministic algorithm, designs a corresponding block generation and verification protocol, and eliminates resource consumption, throughput bottleneck and confirmation delay caused by the consensus as the consensus is removed fundamentally.
The operation and maintenance cost of the block chain is greatly reduced, and the cost of one block is one percent, one thousandth or even one ten thousandth of the current calculation; the performance will be greatly improved, and even under the simplest and non-optimized condition, the throughput and acknowledgement delay can easily exceed the existing all-block-chain technology, which is better than 1000TPS/10s. And the existing frame has a large optimization space, and is expected to further greatly improve across orders of magnitude.
The block chain technology is the key foundation of the new generation of Web3 revolution, and the invention plays a fundamental and decisive role.
In the description of the present invention, it should be understood that, for convenience and conciseness of description, specific working processes of the system, the apparatus and the unit described above may refer to corresponding processes in the foregoing method embodiments, and details are not described herein.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed indirect coupling or direct coupling or communication connection between each other may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. The method for generating and checking the block without the consensus in the block chain is characterized in that: the method comprises the following steps:
s01, setting a transaction and block conflict global judgment method in a block chain protocol, and independently judging the conflict transaction and block by all block chain nodes to obtain the same result;
s02, splitting a block chain generation process into a collection stage and a witness and casting stage, wherein the two stages are respectively completed by different block chain link points, and after each stage is completed, randomly and dynamically selecting an execution node of the next stage according to current data;
specifically, in the collection phase, the method comprises the following steps:
s10, monitoring and collecting transaction messages by the nodes of the block chain peer-to-peer network until the transaction quantity of the blocks specified by the protocol is reached, and generating block suggestions;
s20, generating a node suggested by the block, and broadcasting witness and casting requests to the block chain peer-to-peer network;
in the witness and casting stage, the method comprises the following steps:
s30, judging whether the node is a witness node or not after other nodes in the block chain peer-to-peer network receive witness and casting requests;
s40, verifying and witnessing the block suggestions by the witness nodes, attaching witness records to the witness nodes after the legal block suggestions are verified, performing Hash packaging and signature, and mounting the witness nodes to a block chain for broadcasting;
wherein the block suggestion includes: all transaction data, the hash abstract of the last block and the witness request record; the witness request record includes: the node public key and the verifier public key comparison value obtained after the hash operation is carried out on the block proposal.
2. The method of claim 1, wherein the method comprises: in step S30, determining whether the node is a witness node specifically includes:
and calculating the witness distance based on the witness request record, wherein when the calculated witness distance is smaller than a witness distance threshold value set by the protocol, the node is the witness node.
3. The method of claim 1, wherein the method comprises: also stated in the block chain protocol are: multiple rounds of witnesses are made to the block proposal.
4. The method of claim 3, wherein the method comprises: in the step S40, the witness node performs verification witness on the block suggestion, and after the verification is passed, the witness node attaches witness records to the legal block suggestion, performs hash package and signature, and then mounts the block suggestion to the block chain for broadcasting; the method specifically comprises the following steps:
s401, verifying the block validity by the witness node, attaching witness records after the block suggestion is verified, and executing the step S402, otherwise, discarding the illegal block suggestion and terminating the witness and casting processes;
s402, judging whether the number of witness records added to the block at present is equal to the number of witness rounds, if so, completing witness of the witness nodes, performing hash package and signature, mounting the witness nodes to a block chain for broadcasting, and otherwise, executing the step S403;
s403, attaching a new witness request after witness record, and broadcasting the new witness and casting request to the block chain peer-to-peer network;
s404, after receiving the new witness and casting request, the other nodes in the block chain peer-to-peer network judge whether the node is the witness node, if yes, the step S401 is executed, otherwise, the new witness and casting request is not responded.
5. The method of claim 4, wherein the method comprises: in step S401, checking the validity of the block includes:
and judging the height of the block and the legality of all transactions, if the block is legal, checking to pass, otherwise, discarding the illegal block suggestion, and terminating the witness and casting process.
6. The method of claim 1, wherein the method comprises: in step S01, the block collision global determination method includes:
when the blocks conflict, the block with the lowest transaction score value is selected to be won, and other blocks are discarded.
7. A witness node, comprising: the method comprises the following steps: the nodes of the block chain peer-to-peer network monitor and collect transaction messages until the transaction number of the blocks specified by the protocol is reached, block suggestions are generated, and witness and casting requests are broadcast to the block chain peer-to-peer network;
the response module (10) is used for judging whether the node is the witness node or not after receiving the witness and casting requests;
and the checking module (20) is used for checking and witnessing the block suggestions when the node is the witnessing node, attaching witness records to the witness nodes after the legal block suggestions are checked and passed, performing hash encapsulation and signature, and mounting the witness nodes to the block chain for broadcasting.
8. A witness node as claimed in claim 7, wherein: also stated in the block chain protocol are: performing multiple rounds of witnesses on the block suggestions;
the verification module (20) comprises:
the legality judging module (201) is used for verifying the block height and the transaction legality by the witness nodes, after the verification is passed, witness records are attached to the block suggestions, if the block suggestions do not pass, the illegal block suggestions are discarded, and the witness and casting processes are terminated;
and an iteration number judging module (202) for judging whether the number of witness records added to the block currently is equal to the number of witness rounds, if so, completing witness by the witness nodes, performing hash package and signature, mounting to the block chain for broadcasting, and otherwise, attaching a new witness request after witness records, and broadcasting a new witness request and a casting request to the peer-to-peer network of the block chain so as to continuously check the new witness meeting the conditions.
CN202211017975.6A 2022-08-24 2022-08-24 Generation and verification method for non-consensus blocks in block chain and witness nodes Active CN115941191B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211017975.6A CN115941191B (en) 2022-08-24 2022-08-24 Generation and verification method for non-consensus blocks in block chain and witness nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211017975.6A CN115941191B (en) 2022-08-24 2022-08-24 Generation and verification method for non-consensus blocks in block chain and witness nodes

Publications (2)

Publication Number Publication Date
CN115941191A true CN115941191A (en) 2023-04-07
CN115941191B CN115941191B (en) 2023-09-22

Family

ID=86552871

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211017975.6A Active CN115941191B (en) 2022-08-24 2022-08-24 Generation and verification method for non-consensus blocks in block chain and witness nodes

Country Status (1)

Country Link
CN (1) CN115941191B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109936457A (en) * 2019-02-20 2019-06-25 深圳前海微众银行股份有限公司 Block chain witnesses method, apparatus, equipment and computer readable storage medium in many ways
WO2020022958A1 (en) * 2018-07-27 2020-01-30 Aioz Pte Ltd Method and apparatus for transaction verification in a blockchain-based network
CN110875893A (en) * 2018-08-29 2020-03-10 深圳启元信息服务有限公司 Consensus verification method, check node and block chain system
CN112073382A (en) * 2020-08-12 2020-12-11 北京大学 Graph type account book node maintenance method and device based on random consensus
CN112116349A (en) * 2020-08-12 2020-12-22 北京智融云河科技有限公司 High-throughput-rate-oriented graph type account book randomization consensus method and device
CN112116470A (en) * 2020-08-12 2020-12-22 北京大学 Method and device for creating schema book based on random witnesses

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020022958A1 (en) * 2018-07-27 2020-01-30 Aioz Pte Ltd Method and apparatus for transaction verification in a blockchain-based network
CN110875893A (en) * 2018-08-29 2020-03-10 深圳启元信息服务有限公司 Consensus verification method, check node and block chain system
CN109936457A (en) * 2019-02-20 2019-06-25 深圳前海微众银行股份有限公司 Block chain witnesses method, apparatus, equipment and computer readable storage medium in many ways
CN112073382A (en) * 2020-08-12 2020-12-11 北京大学 Graph type account book node maintenance method and device based on random consensus
CN112116349A (en) * 2020-08-12 2020-12-22 北京智融云河科技有限公司 High-throughput-rate-oriented graph type account book randomization consensus method and device
CN112116470A (en) * 2020-08-12 2020-12-22 北京大学 Method and device for creating schema book based on random witnesses

Also Published As

Publication number Publication date
CN115941191B (en) 2023-09-22

Similar Documents

Publication Publication Date Title
CN110868440B (en) Block chain male chain
CN108108967B (en) Multi-stage PBFT consensus system and method for complex digital assets
CN107220130B (en) Method, device and system for realizing information consensus at nodes of block chain
CN109360100A (en) Transaction rapid acknowledgment method and device based on block chain technology
CN110011974A (en) Bookkeeping methods, device, terminal and the computer readable storage medium of block chain
WO2020133148A1 (en) Data processing method and apparatus for blockchain, and blockchain system
CN113407632A (en) PBFT (proxy-based policy and authorization-based ft) trust certification block chain consensus algorithm
Spain et al. The impact of ethereum throughput and fees on transaction latency during icos
CN111010284B (en) Processing method of block to be identified, related device and block chain system
Sun et al. Rtchain: A reputation system with transaction and consensus incentives for e-commerce blockchain
CN113518005B (en) Block consensus method, device, equipment and storage medium
CN110784521B (en) Block chain consensus method, electronic device and storage medium
CN114281888A (en) Block chain consensus method, device, equipment and storage medium
CN111556115A (en) Data processing method, device and equipment based on block chain and storage medium
CN110661656B (en) Block chain rapid consensus method and device
CN115801407A (en) Abnormal node shielding method and device, storage medium and target node
CN113448694B (en) Block chain consensus method for improving transaction processing capability
WO2021233109A1 (en) Blockchain-based message processing method and apparatus, and device and storage medium
CN110990790A (en) Data processing method and equipment
Ivanov et al. Blockumulus: a scalable framework for smart contracts on the cloud
CN113269543A (en) Multilayer mixed transaction capacity expansion system and method for block chain
CN111881147B (en) Processing method and device of computing task, storage medium and processor
CN115941191A (en) Method for generating and checking non-consensus block in block chain and witness node
CN112132669A (en) Online auction system, method, device and electronic equipment
CN112995167A (en) Kafka mechanism-based power utilization information acquisition method, block chain network and user side

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