CN110336677B - Block packing and broadcasting method and system, equipment and storage medium - Google Patents

Block packing and broadcasting method and system, equipment and storage medium Download PDF

Info

Publication number
CN110336677B
CN110336677B CN201910633127.XA CN201910633127A CN110336677B CN 110336677 B CN110336677 B CN 110336677B CN 201910633127 A CN201910633127 A CN 201910633127A CN 110336677 B CN110336677 B CN 110336677B
Authority
CN
China
Prior art keywords
block
node
transaction
block chain
broadcasting
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
CN201910633127.XA
Other languages
Chinese (zh)
Other versions
CN110336677A (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.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei Technology 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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN201910633127.XA priority Critical patent/CN110336677B/en
Publication of CN110336677A publication Critical patent/CN110336677A/en
Application granted granted Critical
Publication of CN110336677B publication Critical patent/CN110336677B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

The invention discloses a block packing and broadcasting method, a block packing and broadcasting system, block packing and broadcasting equipment and a storage medium, and belongs to the technical field of block chains. After the first block chain node receives the first block, recording the first block and sending the first block to the node of the first block chain node; detecting whether a first block exists in the first block link points; if so, broadcasting the first block to at least one second blockchain node connected to the first blockchain link node except for a node that transmits the first block to the first blockchain node; if the first block is not stored in the first block chain node, caching the second block and verifying, and if the verification is passed, broadcasting the first block to at least one second block chain node connected with the first block chain node except the node which sends the first block to the first block chain node; aiming at the problem that the prior art seed block broadcast occupies the bandwidth resource of a block chain network and influences the stability of the block chain network; the technical scheme of the application can reduce the occupation of the block chain network bandwidth resources by the block broadcasting.

Description

Block packing and broadcasting method and system, equipment and storage medium
Technical Field
The present invention relates to the field of block chain technology, and in particular, to a block packing and broadcasting method, system, device, and storage medium.
Background
No matter which consensus algorithm is adopted in the existing block chain project, block broadcasting is carried out after the blocks are packaged, and the block content of the block broadcasting comprises a block header and transaction original information content in the blocks; the transaction content is more space-consuming, and therefore more space is occupied for the block containing multiple transactions. The concept of transaction group (see the chinese patent application with application number 201810695527.9 for details) is added to the existing blockchain project, such as the bottom blockchain of the complex michain 33 architecture. The transaction group is formed by assembling a plurality of transactions into a special transaction buffer in the Mempool module, and the size of one transaction is at least 250 bytes, so the size of the transaction group containing the plurality of transactions is more than 500 bytes. Then the footprint is larger for a block containing multiple transaction groups and multiple transactions.
In the existing block chain project scheme, at most 25 block chain link points can be allocated and connected to one block chain node, when the block is broadcast, the whole content of the block is broadcast, each block chain node may receive 25 same block contents broadcast from different block chain nodes, a larger block containing a transaction group is repeatedly broadcast, the larger the block occupation space is, undoubtedly, more block chain network bandwidth resources are occupied in the block broadcasting process, the block chain network bandwidth resources are further occupied, and the stability of the block chain network is affected.
Disclosure of Invention
1. Technical problem to be solved by the invention
To overcome the above technical problems, the present invention provides a block packing and broadcasting method and system, a device and a storage medium. The occupation of the bandwidth resources of the block chain network can be reduced.
2. Technical scheme
In order to solve the problems, the technical scheme provided by the invention is as follows:
in a first aspect, the present invention provides a block packing method, including: packing the block header, all sub-transactions of at least one transaction group and the block size of the first block into a first block; the Mercker tree root node hash value of the block header is calculated from all sub-transactions and mine excavation transactions of at least one transaction group.
In a further improvement, the first block includes at least one transaction in addition to at least one transaction group, and the method includes: packing the block header, the at least one transaction, all sub-transactions of the at least one transaction group, and the block size of the first block into a first block; the Mercker tree root node of the block head is calculated from at least one transaction, all sub-transactions of at least one transaction group and the mine excavation transaction.
In a further refinement, said first block further comprises a transaction counter; the block header, the transaction counter, the at least one transaction group, and the block size of the first block are packed into a first block.
In a further refinement, the chunk header comprises a hash value constructed from a parent chunk hash value, a timestamp, and a root node hash value of the merkel tree.
In a further improvement, the transaction group comprises the number of the sub-transactions, the signature of each sub-transaction, the hash value of each sub-transaction and the transaction fee of each sub-transaction.
In a further improvement, when the block size SI of the first block is greater than the block size threshold TH, the block header, the transaction group identification list, and the block size of the first block are packed into a second block; wherein the list of transaction group identifications includes mine excavation transactions and an identification sufficient to uniquely identify the transaction group.
In a further improvement, the transaction group hash value is the number of sub-transactions of the transaction group and each sub-transaction hash value; the identification sufficient to uniquely identify the transaction group includes: all transaction hash values or part bytes thereof in the transaction group, or any transaction hash value or part bytes thereof in the transaction group, or the ID number or name of each transaction in the transaction group, or the ID number or name of any transaction in the transaction group, or the ID number of the transaction group, or the name of the transaction group.
In a second aspect, the present invention provides a block broadcasting method, which is suitable for a mining node according to the above-mentioned block packing method, and broadcasts a first block to at least one first block chain node connected to the mining node.
In a further improvement, it is determined whether the block size SI of the first block is less than or equal to a block size threshold TH; if so, broadcasting the first block to at least one first block chain node connected with the mining node; if not, broadcasting the second block to at least one first block chain node connected with the mining digging node.
In a third aspect, the present invention provides a block broadcasting method, which is suitable for a non-excavation node, and according to the above block packing method and the above block broadcasting method, the method includes: after the first block chain node receives the first block, recording the first block and sending the first block to the node of the first block chain node; detecting whether a first block exists in the first block link points; if so, broadcasting the first block to at least one second blockchain node connected to the first blockchain link node except for a node that transmits the first block to the first blockchain node; if the first block is not stored in the first block chain node, caching the second block and verifying, and if the verification is passed, broadcasting the first block to at least one second block chain node connected with the first block chain node except the node which sends the first block to the first block chain node; or the like, or, alternatively,
after the first block chain node receives the second block, recording the second block and sending the second block to the node of the first block chain node, and detecting whether the second block exists in the first block chain node; if so, broadcasting the second block to at least one second block chain node connected with the first block chain link node except for the node sending the second block to the first block chain node; if the transaction group identifier does not exist, comparing the transaction group identifier list with the transaction cached by the link point of the first block; judging whether the first block link point lacks the transaction in the second block transaction group identification list or not; if yes, requesting a node which sends a second block to a first block chain node to acquire a transaction which contains a missing second block transaction group identification list, verifying the second block together with the transaction of the second block which is cached by the first block chain node, and broadcasting the first block to at least one second block chain node which is connected with a first block chain link point except the node which sends the first block to the first block chain node if the verification is passed; if not, verifying the second block, and if the verification is passed, broadcasting the first block to at least one second block chain node connected with the first block chain node except the node which sends the first block to the first block chain node; the transaction group identification list comprises mine excavation transactions and hash values of each transaction group in the first block or a plurality of bytes of the hash values.
In a further improvement, the node that records the first block and sends the first block to the first blockchain node further comprises: recording an identification sufficient to uniquely identify the first block; recording the node name of the first block to be sent to the first block chain node; in the node that records the second block and sends the second block to the first block chaining node, a further improvement comprises: recording an identification sufficient to uniquely identify the second block; and recording the node name of the node which sends the second block to the first block chain node.
In a further improvement, the transaction group comprises the number of the sub-transactions, the signature of each sub-transaction, the hash value of each sub-transaction and the transaction fee of each sub-transaction.
In a further improvement, the transaction group hash value is the number of sub-transactions of the transaction group and each sub-transaction hash value.
In a further refinement, the first block includes at least one transaction in addition to a transaction group, and the transaction group identification list includes a mine excavation transaction and an identification sufficient to uniquely identify the transaction group and an identification sufficient to uniquely identify the transaction.
In a further improvement, before requesting to a node that sends the second block to the first blockchain node to acquire a transaction in the second blockchain identifier list that includes the missing second blockchain node, after determining that the first blockchain node lacks a transaction in the second blockchain identifier list, the method includes: judging whether the transaction missing quantity exceeds a transaction missing proportion threshold TR-TH; if yes, requesting a node which sends the second block to the first block chain node to acquire the transaction of the whole second block, caching the transaction to the first block chain node, verifying the second block, and if the transaction passes the verification, broadcasting the first block to at least one second block chain node which is connected with the first block chain node except the node which sends the first block to the first block chain node; and if the verification is passed, broadcasting the first block to at least one second block chain node connected with the first block chain link node except the node which sends the first block to the first block chain node.
In a further improvement, the node sending the second block to the first blockchain node requests to acquire the transaction in the absent second block transaction group identification list, caches the transaction in the first blockchain node, and verifies the second block together with the transaction of the second block cached by the first blockchain node; if the verification is not passed, requesting the node which sends the second block to the first block chain node to acquire the transaction of the whole second block, caching the transaction to the first block chain node, and verifying the second block; if the verification is passed, broadcasting the first block to at least one second block chain node connected with the first block chain link node except for the node which sends the first block to the first block chain node; if the verification fails, no processing is performed.
In a further improvement, adapted for use with blockchain non-minedigging nodes, a method of block broadcasting according to claim 10, comprising: a receiving module, configured to receive the first block or the second block, or receive a transaction and/or a transaction group sent from a node that sends the second block to the first block link node; the block judging module is used for detecting whether the first block or the second block exists in the first block link point; the first block link point is also used for judging whether the first block link point lacks the transaction in the received second block transaction group identification list; a request module, configured to request a node that sends the second block to the first block link node to acquire a transaction and/or a transaction group in a transaction group identifier list that includes the missing second block; the verification module is used for verifying the first block or the second block; a broadcasting module for broadcasting the first block or the second block to at least one second block chain node connected with the first block chain node except for a node that transmits the first block or the second block to the first block chain node, and for transmitting the transaction, and/or the transaction group.
In a further improvement, when the blockchain node is a mine excavation node that generates the first block or the second block, the method further comprises: a block packing module, for packing to form a first block, or a second block, according to the block packing method of claim 1; after the block packing module packs the first block, the block determining module is further configured to determine a relationship between the block size SI of the first block and the block size threshold TH, so as to determine whether the second block needs to be packed.
In a further improvement, the system further comprises a cache module for caching the first block or the second block and the transaction thereof, and/or the transaction group.
The further improvement is that the system further comprises a recording module for recording the first block and sending the first block to a node of the first block chain node; or, recording the second block and sending the second block to a node of the first blockchain node.
In a further improvement, the block judgment module is further configured to judge whether the transaction missing amount exceeds a transaction missing ratio threshold TR-TH.
In a fourth aspect, the present invention provides an apparatus, comprising: one or more processors; memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to perform a method as described above.
In a fifth aspect, the invention proposes a storage medium storing a computer program which, when executed by a processor, implements a method as defined in any one of the above.
3. Advantageous effects
Compared with the prior art, the technical scheme provided by the invention has the following beneficial effects:
aiming at the problem that the prior art seed block broadcast occupies the bandwidth resource of a block chain network and influences the stability of the block chain network; the technical scheme of the application can reduce the occupation of the block chain network bandwidth resources by the block broadcasting and provide the stability of the block chain network.
Drawings
Fig. 1 is a flowchart of a broadcasting method including transaction group blocks according to embodiment 2.
Fig. 2 is a merkel state tree diagram of a block containing transaction groups provided in example 1.
Fig. 3 is a flowchart of a broadcasting method including transaction group blocks according to embodiment 2.
Fig. 4 is a flow chart of a preferred embodiment provided in fig. 3.
Fig. 5 is a flow chart provided by a preferred embodiment of fig. 1.
Fig. 6 is a flow chart provided by a preferred embodiment of fig. 5.
Fig. 7 is a schematic structural diagram of a block broadcasting system according to embodiment 4.
Fig. 8 is a schematic structural diagram provided in the first preferred embodiment of fig. 7.
Fig. 9 is a schematic structural diagram provided in the second preferred embodiment of fig. 7.
Fig. 10 is a schematic structural diagram provided in the third preferred embodiment of fig. 7.
FIG. 11 is a schematic diagram of an apparatus according to the present invention.
Detailed Description
For a further understanding of the present invention, reference will now be made in detail to the embodiments illustrated in the drawings.
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
The terms first, second, and the like in the present invention are provided for convenience of describing the technical solution of the present invention, and have no specific limiting effect, but are all generic terms, and do not limit the technical solution of the present invention.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Example 1
The embodiment provides a block packing method including a transaction group, which includes:
packing the block header, all sub-transactions of at least one transaction group and the block size of the first block into a first block; the Mercker tree root node hash value of the block header is calculated from all sub-transactions and mine excavation transactions of at least one transaction group. The transaction group comprises the number of sub-transactions, the signature of each sub-transaction, each sub-transaction and the hash value thereof, and the transaction fee of each sub-transaction.
For each sub-transaction in the transaction group, the contents of the transaction group itself are shown as follows:
Figure BDA0002129367580000071
in order to reduce the reconstruction of the existing blockchain project structure as much as possible when the existing blockchain project is used for packing blocks by using the technical scheme of the embodiment, the first block further comprises a transaction counter on the basis of the existing blockchain project; the block header, the transaction counter, the at least one transaction group, and the block size of the first block are packed into a first block.
The first block comprises at least one transaction group and also comprises at least one transaction, and the method comprises the following steps:
packing the block header, the at least one transaction, all sub-transactions of the at least one transaction group, and the block size of the first block into a first block; the root node of the block header is computed from at least one transaction, all sub-transactions of at least one transaction group, and the mine excavation transaction, as shown in fig. 2 as R1.
Wherein the chunk header comprises a hash value construct formed from a parent chunk hash value, a timestamp, and a root of the Merckel tree; the leaf nodes of the Mercker tree are sub-transactions of a transaction or transaction group, as shown in FIG. 2, assuming a Mercker state tree of a block with a certain block height, then L1 is a transaction, and L2, L3, L4, L5, L6, L7 and L8 are a transaction group containing 7 transactions; r1 is the root node of the Merck tree.
The first block includes, in addition to the block header, a block size of the first block, transaction L1, and a transaction group including transactions L2, L3, L4, L5, L6, L7, and L8.
In order to further reduce the block size of the broadcast and further reduce the occupation of the network bandwidth of the block chain, the first block is further modified, and when the block size SI of the first block is larger than the block size threshold TH, the block header, the transaction group identification list and the block size of the first block are packaged into a second block; wherein the transaction group identification list includes mine excavation transactions, and sufficient identification to uniquely identify a transaction group, sufficient identification to uniquely identify a transaction.
In view of the atomicity and integrity of a transaction group, on any blockchain node, the content of all transactions in the transaction group is received or not received; because the transaction group is broadcast as a whole, the transaction group can be uniquely identified by recording any transaction hash value in the transaction group.
In a certain blockchain item, the transaction hash value has the characteristic of uniquely identifying the transaction because the transmitting and receiving address, the transaction content and the like of each transaction are different. The transaction ID number is similar to the identity card number used by Chinese citizens, and in a certain block chain item, the transaction name can also uniquely identify a transaction, but does not represent all the block chain items.
Partial bytes of transaction hash value: assuming that F (x) is a function taking partial bytes for the transaction Hash value, the function F (x), taking F (Hash-Tm) as an example, achieves the effect that, for the Hash value Hash-Tm of the transaction Tm, the first 1-5 bytes, the last 1-5 bytes, or the 1-5 bytes in the middle position, or the middle 9 bytes, or the last 9 bytes, or the first 9 bytes are taken, but no matter how the value is taken, the Hash value Hash-Tm enough to uniquely identify the transaction Tm can be ensured, and further the transaction group can be identified, thereby further reducing the size of the block broadcast.
The transaction group hash value is the number of sub-transactions of the transaction group and each sub-transaction hash value; the transaction group hash value is a plurality of bytes, namely the number of sub-transactions of the transaction group and the hash value of each sub-transaction is a plurality of bytes. Such as the first 5 bytes, or the first 8 bytes, or the last 5 bytes, or the 1 st, 3 rd, 5 th, 7 th, 8 th, and 9 th bytes of the transaction hash value, or in short, several bytes of the transaction hash value are taken, thereby further reducing the size of the second chunk. The bytes of the transaction group hash value refer to bytes of each sub-transaction hash value in the transaction group, such as the first 5 bytes, or the first 8 bytes, or the last 5 bytes, or the 1 st, 3 rd, 5 th, 7 th, 8 th, and 9 th bytes of each sub-transaction hash value in the transaction group, and in short, the bytes of the sub-transaction hash value are taken, so as to further reduce the size of the second block containing the transaction group.
When the block size SI of the first chunk including L1, L2, L3, L4, L5, L6, L7, and L8 is less than or equal to the block size threshold TH, the second chunk includes, in addition to the block header, the block size of the first chunk, bytes of the transaction L1 hash value, bytes of the transaction group hash value, i.e., bytes of the transaction L1, L2, L3, L4, L5, L6, L7, and L8 hash value, and the transaction number (the number of sub-transactions in the transaction group).
When each transaction group Hash value and each transaction Hash value in the first block are stored in the transaction group identification list, Minertx is a mine excavation transaction, and Hash-Minertx is a mine excavation transaction Hash value; tra1 is any transaction in the first block, and Hash-Tra1 is the Hash value of the corresponding transaction; GTra is any transaction group in the first block, as shown in Table 1, and includes transactions Tx1, Tx2, Tx3, Txn, Hash-Tx1, Hash-Tx2, Hash-Tx3, and Hash-Txn are corresponding transaction Hash values, as shown in Table 2.
TABLE 1 transaction group GTra Contents
Figure BDA0002129367580000091
Figure BDA0002129367580000101
Table 2 transaction group identification list with transaction hash values
Figure BDA0002129367580000102
Table 3 transaction group identification list containing transaction hash value bytes
Figure BDA0002129367580000103
When the transaction group identifier list stores a number of bytes of each transaction group hash value and a number of bytes of each transaction hash value in the first block, as shown in table 3, for example, a function f (x) is used to implement the function of taking a number of bytes from the transaction group hash value, specifically, which bytes to take, and can be determined according to actual needs; since no ore excavation transaction exists in other non-ore excavation nodes except for the ore excavation node of the blockchain, the ore excavation transaction content and the hash value thereof must be completely contained in both the transaction hash value list containing the transaction hash value in table 2 and the transaction hash value list containing several bytes of the transaction hash value in table 3.
Example 2
The present embodiment provides a block broadcasting method, which is applied to a mining node or a block packing node of a block according to any one of the technical solutions in embodiment 1, and broadcasts a first block to at least one first block chain node connected to the mining node.
In order to further reduce the size of the broadcast block and further reduce the occupation of the network bandwidth of the block chain, the first block is further improved before the mining node broadcasts the block, and whether the block size SI of the first block is less than or equal to the block size threshold TH is judged;
if so, broadcasting the first block to at least one first block chain node connected with the mining node;
if not, broadcasting the second block to at least one first block chain node connected with the mining digging node.
In the block broadcasting method applicable to the mining node in this embodiment, the implementation method includes two methods, a first method is, as shown in fig. 3, that after the mining node packs the first block according to the block packing method in any one of the technical solutions in embodiment 1, or packs the second block, it determines whether the block size SI of the first block is smaller than or equal to the block size threshold TH;
if so, broadcasting the first block to at least one first block chain node connected with the mining node;
if not, broadcasting the second block to at least one first block chain node connected with the mining digging node.
The second method, in order to further reduce the occupation of the computing resources of the mining node itself, may also be as shown in fig. 4:
the mining node packs the first block according to the block packing method in any one of the technical solutions in embodiment 1, and then determines whether a block size SI of the first block is equal to or smaller than a block size threshold TH;
if so, broadcasting the first block to at least one first block chain node connected with the mining node;
if not, packing the second block according to the block packing method in any technical scheme of the embodiment 1, and broadcasting the second block to at least one first block chain node connected with the mining excavation node.
Accordingly, the present embodiment further provides a block broadcasting method, which is suitable for non-excavation nodes of a block chain, the block packing method according to any of the technical solutions of embodiment 1, and the block broadcasting method according to the foregoing description, as shown in fig. 1, including:
s101, a first block chain node receives a first block;
s102, recording a first block and sending the first block to a node of a first block chain node;
s103, detecting whether a first block exists in the first block link points;
if so, S104, broadcasting the first block to at least one second block chain node connected with the first block chain link node except the node sending the first block to the first block chain node;
if not, S105, caching and verifying the second block;
s106, whether the verification passes?
If yes, executing S104; otherwise, S107 does not process the first block, or sends a message that the first block fails to be verified to the node that sends the first block to the first blockchain node.
Wherein the node that records the first block and sends the first block to the first blockchain node is further improved by comprising: recording an identification sufficient to uniquely identify the first block; and recording the node name of the node which sends the first block to the first block chain node.
The identifier sufficient to uniquely identify the first block is a block height of the first block, or a block hash value, or a partial byte of the block hash value, or a mine excavation transaction hash value of the first block, or a partial byte of the mine excavation transaction hash value, or a mine excavation transaction ID, or a mine excavation transaction name.
Alternatively, as shown in FIG. 5,
s201, the first block chain node receives a second block;
s202, recording the second block and sending the second block to a node of the first block chain node;
s203, detecting whether a second block exists in the link points of the first block;
if so, S204, broadcasting the second block to at least one second block chain node connected with the first block chain link node except the node sending the second block to the first block chain node;
if not, S205, comparing the transaction group identifier list with the transaction cached in the link point of the first block;
s206, judging whether the first block link point lacks the transaction in the second block transaction group identification list;
if yes, S207, requesting the node sending the second block to the first block chain node to acquire the transaction in the absent second block transaction group identifier list, and the transaction together with the transaction of the second block cached by the first block chain node;
s208, verifying the second block, and if the verification is passed; step S204 is executed;
if not, executing steps S208 and S204;
wherein the recording the second block and the sending the second block to the node of the first blockchain node is further improved by comprising: recording an identification sufficient to uniquely identify the second block; and recording the node name of the node which sends the second block to the first block chain node.
The transaction group identification list includes the mine excavation transaction, an identification sufficient to uniquely identify the transaction group, and an identification sufficient to uniquely identify the transaction.
The identifier sufficient to uniquely identify the second block is a block height of the second block, or a block hash value, or a partial byte of the block hash value, or a mine excavation transaction hash value of the second block, or a partial byte of the mine excavation transaction hash value, or a mine excavation transaction ID, or a mine excavation transaction name.
For the POW consensus algorithm, the block height of the second block is unreliable as an identifier sufficient to uniquely identify the second block, all mining nodes participate in mining due to the characteristics of POW, the blocks are packed, multiple blocks may exist in the same block height, and the block finally reserved as the block with the block height is the block with the greatest calculation difficulty. But those blocks that are not reserved are also broadcast in the blockchain network, and the block height does not distinguish them. But for the common recognition algorithms such as POS, DPOS, etc., this problem does not exist, and the block height of the second block can be used as an identification sufficient to uniquely identify the second block.
The Hash value of the BLOCK is unique, and the partial bytes of the Hash value of the BLOCK are, for example, the Hash value Hash-BLOCK256 of the BLOCK256, the first 1-5 bytes, the second 1-5 bytes, or the 1-5 bytes at the middle position, or the middle 9 bytes, or the last 9 bytes, or the first 9 bytes are represented by a function F (x), and F (Hash-BLOCK256) is the partial bytes of the Hash value of the BLOCK, but no matter how the value is taken, the Hash value Hash-BLOCK256 of the BLOCK256 can be guaranteed to be sufficient to uniquely identify.
The mine excavation transaction hash value, or a partial byte of the mine excavation transaction hash value, or the mine excavation transaction ID, or the mine excavation transaction name of the second block. It is needless to say that only one ore mining transaction exists in one BLOCK, and the ore mining transaction hash value is used as an identifier sufficient to uniquely identify the second BLOCK, and it is also feasible that a part of bytes of the ore mining transaction hash value is similar to a part of bytes of the BLOCK hash value, and when the ore mining transaction ID and the ore mining transaction name are unique in a certain BLOCK chain network, that is, one transaction corresponds to one transaction name and one ID, and the ore mining transaction ID and the ore mining transaction name can also be used as an identifier sufficient to uniquely identify the BLOCK 256.
Judging whether the second block exists in the second block link point comprises the following steps: there are many ways to query whether the second block exists, and this embodiment uses the identifier sufficient to uniquely identify the second block, including performing query comparison determination, such as block hash value, or backward pushing according to function f (x), and determining by partial bytes of the block hash value, or the mine excavation transaction hash value corresponding to the block, or partial bytes of the mine excavation transaction hash value, or the mine excavation transaction ID, and the mine excavation transaction name. In practical application, other ways can be adopted for judgment.
The transaction group includes the number of sub-transactions, the signature of each sub-transaction, the hash value of each sub-transaction, and the transaction fee of each sub-transaction as described in embodiment 1. The transaction group hash value is the number of sub-transactions of the transaction group and each sub-transaction hash value. The transaction group hash value is a plurality of bytes, namely the number of sub-transactions of the transaction group and the hash value of each sub-transaction is a plurality of bytes.
The first block comprises at least one transaction besides a transaction group, and the transaction group identification list comprises mine digging transactions, identifications sufficient for uniquely identifying the transaction group and identifications sufficient for uniquely identifying the transaction.
As shown in fig. 6, before requesting the node that sends the second block to the first blockchain node to acquire the transaction in the second block transaction group id list that includes the missing transaction, after determining that the first blockchain node lacks the transaction in the second block transaction group id list, the method includes:
s301, judging whether the transaction missing quantity exceeds a transaction missing proportion threshold TR-TH;
if yes, S302, requesting a node which sends the second block to the first block chain node to acquire the transaction of the whole second block, and caching the transaction to the first block chain node;
s303, verifying the second block;
s304, whether the verification passes?
If the verification is passed, S305, broadcasting the second block to at least one second block chain node connected to the first block chain link node except for a node that transmits the second block to the first block chain node; if the verification fails, S306, not processing, and/or sending a message that the second block verification fails to the node that sends the second block to the first block chain node;
if not, S307, requesting the node sending the second block to the first block chain node to acquire the absent transaction in the second block transaction group identifier list, caching the transaction in the first block chain node, and caching the transaction together with the transaction of the second block cached by the first block chain node; steps S303, S304, S305, and S306 are performed.
Step S307, requesting a node that sends the second block to the first block chain node to acquire a missing transaction in the second block transaction group identifier list, caching the transaction in the first block chain node, and verifying the second block together with the transaction of the second block that has been cached by the first block chain node;
if the verification is not passed, a request is made to the node sending the second block to the first blockchain node to acquire the transaction of the whole second block, the transaction is cached in the first blockchain node, and steps S303, S304, S305 and S306 are executed.
Example 3
A block broadcasting system, which is suitable for mining nodes, packing nodes, non-mining nodes, and/or non-packing nodes of a block chain, as shown in fig. 7, and according to any technical solution of embodiment 1, a block broadcasting method includes:
a receiving module, configured to receive the first block or the second block, or receive a transaction and/or a transaction group sent from a node that sends the second block to the first block link node;
the block judging module is used for detecting whether the first block or the second block exists in the first block link point;
the first block link point is also used for judging whether the first block link point lacks the transaction in the received second block transaction group identification list;
a request module, configured to request a node that sends the second block to the first block link node to acquire a transaction and/or a transaction group in a transaction group identifier list that includes the missing second block;
the verification module is used for verifying the first block or the second block;
a broadcasting module for broadcasting the first block or the second block to at least one second block chain node connected with the first block chain node except for a node that transmits the first block or the second block to the first block chain node, and for transmitting the transaction, and/or the transaction group.
As shown in fig. 8, when the blockchain node is a mining node that generates the first block or the second block, the method further includes:
a block packing module, for packing to form a first block, or a second block, according to the block packing method of claim 1;
after the block packing module packs the first block, the block determining module is further configured to determine a relationship between the block size SI of the first block and the block size threshold TH, so as to determine whether the second block needs to be packed.
As shown in fig. 9, in a further improvement, the system further comprises a cache module for caching the first block or the second block and the transaction thereof, and/or the transaction group.
As shown in fig. 10, the apparatus further includes a recording module, configured to record the first block and send the first block to a node of the first blockchain node; or, recording the second block and sending the second block to a node of the first blockchain node. The recording method was the same as that described in example 2 or example 4.
The block judgment module is also used for judging whether the transaction missing quantity exceeds a transaction missing proportion threshold TR-TH.
Example 4
The Hangzhou complex American 33 male Chain-Chain 33 has the core technical characteristics of low delay and high concurrency, and in order to further improve the performance of a male Chain-Chain 33, a block packing method, a block broadcasting method and a corresponding system thereof are provided, so that the method is suitable for mining nodes of Chain33, namely block packing nodes, and as the Chain-Chain 33 can be compatible with various block consensus algorithms, no matter which consensus algorithm is adopted, the block packing and broadcasting are all involved, and for the technical scheme provided by the embodiment, the method is not limited by the consensus algorithm and can be popularized and used.
The nodes W1, W2 and W3 are any three ore digging nodes on the common Chain Chan 33, the nodes M1, M2, M3, M26 are any 26 non-ore digging nodes on the common Chain Chan 33, and the three ore digging nodes and the non-ore digging nodes are connected with each other.
GTx1, GTx2, GT3, GTx4, and GTx5 are five transaction groups in a tile having a tile height 367, wherein transaction group GTx1 includes 9 transactions Tx11, Tx12, Tx13, Tx14, Tx 18; transaction group GTx2 includes 8 transactions Tx21, Tx22, Tx23, Tx24, Tx 29; transaction group GTx3 includes 15 transactions Tx31, Tx32, Tx33, Tx34, Tx 315; transaction group GTx4 includes 20 transactions Tx41, Tx42, Tx43, Tx44, Tx 420; transaction group GTx5 includes 17 transactions Tx51, Tx52, Tx53, Tx54, Tx 517; transactions Tx1, Tx2, Tx3, Tx4, Tx8 are 8 transactions in a tile with tile height 367.
Taking the mining node W1 as an example, the block packing method with the block height 367 is described as follows: constructing a block hash value with the block height of 366, a time stamp and a hash value of a Merck tree root to form a block head; the construction of the merkel tree is shown in fig. 2, and the sub-transactions, the mining transactions MiW1, and the transactions Tx1, Tx2, Tx3, Tx4, and Tx8 contained in the transaction groups GTx1, GTx2, GT3, GTx4, and GTx5 are used as leaf nodes to construct the merkel tree and calculate the hash value of the merkel root.
The block header, block size SI, and all sub-transactions contained in the transaction groups GTx1, GTx2, GT3, GTx4, and GTx5, the number of transactions (including sub-transactions of the transaction group, mine excavation transactions, and transactions in the block) 78, the signature of each transaction (including sub-transactions of the transaction group, mine excavation transactions, and transactions in the block), each transaction and its hash value, the transaction fee for each transaction are then packaged into a first block.
Assuming that the broadcasted block size threshold TH is set to 100M, when the block size SI is greater than 100M, the first block is modified to construct a second block, where the second block includes the block header of the first block, the block size SI, the transaction number 78, the transaction group identifier list, and the transaction hash value list containing the transaction hash value: the mine digging transaction Hash value Hash-MiW1, the transaction group Hash value Hash-GTx1, Hash-GTx2, Hash-GT3, Hash-GTx4 and Hash-GTx5 correspond to the Hash value of each sub-transaction, namely the transaction group Hash value Hash-GTx1 comprises Hash-Tx11, Hash-Tx12, Hash-Tx13, Hash-Tx14, Hash-Tx 18; the transaction group Hash value Hash-GTx2 includes 8 transaction Hash values Hash-Tx21, Hash-Tx22, Hash-Tx23, Hash-Tx24, Hash-Tx 29; the transaction group Hash value Hash-GTx3 includes 15 transactions Hash-Tx31, Hash-Tx32, Hash-Tx33, Hash-Tx34, Hash-Tx 315; the transaction group Hash value Hash-GTx4 includes 20 transactions Hash-Tx41, Hash-Tx42, Hash-Tx43, Hash-Tx44, Hash-Tx 420; the transaction group Hash value Hash-GTx5 includes 17 transactions Hash-Tx51, Hash-Tx52, Hash-Tx53, Hash-Tx54, Hash-Tx 517; the transaction Hash values Hash-Tx1, Hash-Tx2, Hash-Tx3, Hash-Tx4, Hash-Tx 8.
The mine excavation node W1 broadcasts the first block having the block height 367, the first block to the mine excavation nodes W2 and W3 connected to the mine excavation node W1, and the nodes M1, M2, M3, M26. After receiving the first tile with tile height 367, these nodes (here illustrated as node M3) record the first tile hash value and mine node W1; since this is the first tile with tile height 367 being broadcast to other nodes for the first time after being bundled by the mine digging node W1, the tile must not exist on node M3; then node M3 buffers the tile and verifies, and if verified, node M3 broadcasts the first tile with tile height 367 to other blockchain nodes connected to node M3, e.g., mine digging nodes M2, M3, in addition to mine digging node W1; nodes M1, M2, M4, M26. If the verification is not passed, no processing is done or a message is sent to the mining node W1 that the first tile with tile height 367 has not been verified.
Suppose node M2 received the first tile with tile height 367 sent by the mining node W1 at the same time as node M3 and verified; at this time, the block M2 receives the block sent from the mining node W1, records the hash value of the block, and node M3; node M2 detects that the tile already exists, broadcasts the tile to nodes connected to node M2, except for mining node W1 and node M3.
In order to further reduce the size of the broadcast block, a transaction group identifier list is modified, the transaction group identifier list stores a plurality of bytes of hash values of each transaction group and a plurality of bytes of hash values of each transaction group in the first block, and a function f (x) is used for realizing the function of taking a plurality of bytes from the hash values of the transaction groups, specifically which bytes are taken, and can be determined according to actual needs, as shown in table 3; because the mining transaction does not exist in other non-mining nodes except for the mining node of the block chain, the mining transaction content and the hash value of the mining transaction content must be completely contained in both the transaction hash value list containing the transaction hash value and the transaction hash value list containing a plurality of bytes of the transaction hash value.
The transaction hash value list containing several bytes of transaction hash value is: the mine digging transaction Hash value Hash-MiW1, the transaction group Hash value F (Hash-GTx1), F (Hash-GTx2), F (Hash-GT3), F (Hash-GTx4) and F (Hash-GTx5) correspond to the Hash value of each sub-transaction, namely the transaction group Hash value F (Hash-GTx1) comprises F (Hash-Tx11), F (Hash-Tx12), F (Hash-Tx13), F (Hash-Tx14), F (Hash-Tx 18); the transaction group Hash value F (Hash-GTx2) includes 8 transaction Hash values F (Hash-Tx21), F (Hash-Tx22), F (Hash-Tx23), F (Hash-Tx24), F (Hash-Tx 29); the transaction group Hash value F (Hash-GTx3) includes 15 transactions F (Hash-Tx31), F (Hash-Tx32), F (Hash-Tx33), F (Hash-Tx34), F (Hash-Tx 315); the transaction group Hash value F (Hash-GTx4 includes 20 transactions F (Hash-Tx41), F (Hash-Tx42), F (Hash-Tx43), F (Hash-Tx44), F (Hash-Tx420), the transaction group Hash value F (Hash-GTx5) includes 17 transactions F (Hash-Tx51), F (Hash-Tx52), F (Hash-Tx53), F (Hash-Tx54), F (Hash-Tx517), and the transaction Hash value F (Hash-Tx1), F (Hash-Tx2), F (Hash-Tx3), F (Hash-Tx4), F (Hash-Tx 8).
To prevent duplicate broadcasting of blocks, the mine excavation node W1 broadcasts a second block having a block height 367, which is broadcast to the mine excavation nodes W2 and W3 connected to mine excavation node W1, and nodes M1, M2, M3, M26. After receiving the second tile having tile height 367, these nodes (illustrated here as node M3) record the second tile hash value and mine node W1; since this is the first time the second tile with tile height 367 is broadcast to other nodes after being bundled by the mine digging node W1, the tile must not exist on node M3; then node M3 buffers the block. The case is divided into 2 cases.
First, broadcast is the second block of the trade hash value list containing trade hash value
The node M3 judges whether the transaction in the transaction hash value list containing the transaction hash value is lacked; if not, verifying the second block, and if the verification is passed, broadcasting the second block to other nodes except the mining node W1; if the verification is not passed, no processing is done or a message is sent to the mine excavation node W1 that the second tile with tile height 367 has not passed verification.
If the node M3 judges that there is no transaction in the transaction hash value list containing transaction hash values; assuming that the transaction missing proportion threshold TR-TH is 3/4, there are two cases that need to be separately explained here:
in the first case, if the transaction group GTx5 is absent from the node M3 and the transactions Tx1-Tx5, i.e., the transaction miss count ratio 0.28 does not exceed the transaction miss ratio threshold 3/4, the missing second block transaction group GTx5 is obtained from the mining node W1 and the transactions Tx1-Tx5 are cached in the node M3, and the above process is repeated for verification. In this case, if the verification is not passed, the transaction information content of the whole second block is acquired from the mining node W1, and is cached on the node M3, and the above process is repeated for verification.
In the second case, if the transaction group GTx1-GTx4 and the transaction Tx1-Tx8 are absent from the node M3, i.e., the transaction miss amount ratio 0.77 exceeds the transaction miss ratio threshold 3/4, the transaction information content of the whole second block is obtained from the mining node W1, and is cached in the node M3, and the above process is repeated for verification.
Second, when the second block of the transaction hash value list containing the transaction hash value part or several bytes is broadcasted, the difference from the above process is that when determining whether the node M3 lacks the transactions listed in the second block transaction hash value list, the local transaction hash value of the node M3 needs to be compared and analyzed with the transactions listed in the second block transaction hash value list according to the rule of the function f (x), so as to determine whether the node M3 lacks the transactions listed in the second block.
Suppose node M2 received the second tile with tile height 367 sent by the mining node W1 at the same time as node M3 and verified; at this time, the block M2 receives the block sent from the mining node W1, records the hash value of the block, and node M3; node M2 detects that the tile already exists, broadcasts the tile to nodes connected to node M2, except for mining node W1 and node M3.
Example 5
An apparatus, the apparatus comprising: one or more processors; memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to perform a method as described above.
A storage medium storing a computer program which, when executed by a processor, implements the method as described in embodiment 1 above.
Fig. 5 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 5, as another aspect, the present application also provides an apparatus 500 including one or more Central Processing Units (CPUs) 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the apparatus 500 are also stored. The CPU501, ROM502, and RAM503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to embodiments disclosed herein, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments disclosed herein include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method described in any of the embodiments above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described herein.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (12)

1. A block broadcasting method is characterized in that a mining node packs a block header, all sub-transactions of at least one transaction group and the block size of a first block into the first block; or the mining node packages and generates the first block, and broadcasts the first block to at least one first block chain node connected with the mining node; the block head's Mercker tree root node hash value is calculated by all sub-transactions and mine excavation transactions of at least one transaction group; the method is applicable to non-excavation nodes, and comprises the following steps:
after the first block chain node receives the first block, recording the first block and sending the first block to the node of the first block chain node; detecting whether a first block exists in the first block link points;
if so, broadcasting the first block to at least one second blockchain node connected to the first blockchain link node except for a node that transmits the first block to the first blockchain node;
if the first block does not exist, caching the first block and verifying, and if the first block passes the verification, broadcasting the first block to at least one second block chain node which is connected with the link point of the first block except the node which sends the first block to the link point of the first block chain node;
or the like, or, alternatively,
after the first block chain node receives the second block, recording the second block and sending the second block to the node of the first block chain node, and detecting whether the second block exists in the first block chain node;
if so, broadcasting the second block to at least one second block chain node connected with the first block chain link node except for the node sending the second block to the first block chain node;
if the transaction group identifier does not exist, comparing the transaction group identifier list with the transaction cached by the link point of the first block;
judging whether the first block link point lacks the transaction in the second block transaction group identification list or not;
if yes, requesting a node which sends a second block to a first block chain node to acquire a transaction which contains a missing second block transaction group identification list, verifying the second block together with the transaction of the second block which is cached by the first block chain node, and broadcasting the first block to at least one second block chain node which is connected with a first block chain link point except the node which sends the first block to the first block chain node if the verification is passed;
if not, verifying the second block, and if the verification is passed, broadcasting the first block to at least one second block chain node connected with the first block chain node except the node which sends the first block to the first block chain node;
wherein the transaction group identification list includes mine excavation transactions and sufficient identification to uniquely identify the transaction group;
before requesting to acquire a transaction in the missing second block transaction group identifier list from the node that sends the second block to the first block link node, after determining that the first block link node lacks a transaction in the second block transaction group identifier list, the method further includes:
judging whether the transaction missing quantity exceeds a transaction missing proportion threshold TR-TH;
if yes, requesting a node which sends the second block to the first block chain node to acquire the transaction of the whole second block, caching the transaction to the first block chain node, verifying the second block, and if the transaction passes the verification, broadcasting the first block to at least one second block chain node which is connected with the first block chain node except the node which sends the first block to the first block chain node;
and if the verification is passed, broadcasting the first block to at least one second block chain node connected with the first block chain link node except the node which sends the first block to the first block chain node.
2. In a method as set forth in claim 1 wherein the recording of the first block and the sending of the first block to a node of the first blockchain node is further improved by comprising: recording an identification sufficient to uniquely identify the first block; recording the node name of the first block to be sent to the first block chain node;
in the node that records the second block and sends the second block to the first block chaining node, a further improvement comprises: recording an identification sufficient to uniquely identify the second block; and recording the node name of the node which sends the second block to the first block chain node.
3. The method of claim 1, wherein the transaction group comprises a number of sub-transactions, a signature for each sub-transaction, a hash value for each sub-transaction, and a transaction fee for each sub-transaction.
4. The method of claim 1, wherein the identification sufficient to uniquely identify the transaction group comprises:
all transaction hash values or part bytes thereof in the transaction group, or any transaction hash value or part bytes thereof in the transaction group, or the ID number or name of each transaction in the transaction group, or the ID number or name of any transaction in the transaction group, or the ID number of the transaction group, or the name of the transaction group.
5. The method of claim 1, wherein the first block includes at least one transaction in addition to a transaction group, and wherein the list of transaction group identifications includes mine excavation transactions and an identification sufficient to uniquely identify the transaction group and an identification sufficient to uniquely identify the transaction.
6. The method of claim 1, wherein requesting the node that sent the second block to the first blockchain node for a transaction to obtain the entire second block is buffered to the first blockchain node, and wherein verifying the second block further comprises:
if the verification fails, the processing is not carried out, or a message that the second block verification fails is sent to a node which sends the second block to the first block chain node;
the requesting, from the node that sends the second block to the first blockchain node, the transaction in the missing second block transaction group identification list, caching to the first blockchain node, and verifying the second block together with the transaction of the second block that has been cached by the first blockchain node further comprises:
and if the verification is not passed, requesting the node which sends the second block to the first block chain node to acquire the transaction of the whole second block, caching the transaction to the first block chain node, and verifying the second block.
7. A block broadcasting system adapted for use with a block chain non-excavation node, comprising:
a receiving module, configured to receive the first block or the second block, or receive a transaction and/or a transaction group sent from a node that sends the second block to the first block link node;
the block judging module is used for detecting whether the first block or the second block exists in the first block link point; and also for determining whether the transaction missing quantity exceeds a transaction missing proportion threshold TR-TH;
the first block link point is also used for judging whether the first block link point lacks the transaction in the received second block transaction group identification list;
a request module, configured to request a node that sends the second block to the first block link node to acquire a transaction and/or a transaction group in a transaction group identifier list that includes the missing second block;
the verification module is used for verifying the first block or the second block;
a broadcasting module for broadcasting the first block or the second block to at least one second block chain node connected with the first block chain node except for a node that transmits the first block or the second block to the first block chain node, and for transmitting the transaction, and/or the transaction group.
8. The system of claim 7, wherein when the blockchain node is a mine excavation node that generates the first block or the second block, further comprising:
a block packing module, for packing to form a first block, or a second block, according to the block packing method of claim 1;
after the block packing module packs the first block, the block determining module is further configured to determine a relationship between the block size SI of the first block and the block size threshold TH, so as to determine whether the second block needs to be packed.
9. The system of claim 7, further comprising a buffer module for buffering the first block or the second block and the transaction thereof, and/or the transaction group.
10. The system of claim 7, further comprising a recording module for recording the first block and sending the first block to a node of the first blockchain node; or the like, or, alternatively,
recording the second block and sending the second block to a node of the first blockchain node.
11. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-6.
12. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-6.
CN201910633127.XA 2019-07-15 2019-07-15 Block packing and broadcasting method and system, equipment and storage medium Active CN110336677B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910633127.XA CN110336677B (en) 2019-07-15 2019-07-15 Block packing and broadcasting method and system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910633127.XA CN110336677B (en) 2019-07-15 2019-07-15 Block packing and broadcasting method and system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110336677A CN110336677A (en) 2019-10-15
CN110336677B true CN110336677B (en) 2022-02-11

Family

ID=68145019

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910633127.XA Active CN110336677B (en) 2019-07-15 2019-07-15 Block packing and broadcasting method and system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110336677B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110838924B (en) * 2019-11-19 2022-04-12 北京沃东天骏信息技术有限公司 Block transmission method and device
GB202007808D0 (en) * 2020-05-26 2020-07-08 Univ Manchester Multispectral electro-optical surfaces
CN111638963A (en) * 2020-06-08 2020-09-08 杭州复杂美科技有限公司 Transaction pool dynamic control method, device and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101924026B1 (en) * 2017-11-10 2018-11-30 부산대학교 산학협력단 System and method for blockchain using hash-based signature scheme
CN108182635A (en) * 2017-12-18 2018-06-19 深圳前海微众银行股份有限公司 Block chain common recognition method, system and computer readable storage medium
CN108234470B (en) * 2017-12-28 2020-08-04 江苏通付盾科技有限公司 Block packing method and system in block chain network, electronic equipment and storage medium
CN109345388B (en) * 2018-09-20 2020-09-08 百度在线网络技术(北京)有限公司 Block chain intelligent contract verification method and device and storage medium
CN109474682B (en) * 2018-11-12 2022-03-11 杭州秘猿科技有限公司 Block chain network transmission method and device and electronic equipment
CN109586934A (en) * 2018-12-27 2019-04-05 链极智能科技(上海)有限公司 A kind of block chain bottom-layer network transaction Synchronous fluorimetry method

Also Published As

Publication number Publication date
CN110336677A (en) 2019-10-15

Similar Documents

Publication Publication Date Title
CN110336677B (en) Block packing and broadcasting method and system, equipment and storage medium
CN111680050B (en) Fragment processing method, device and storage medium for alliance chain data
CN109035016B (en) Multi-chain concurrent transaction method
CN108694241B (en) Data storage method and device
CN109255057B (en) Block generation method, device, equipment and storage medium
CN109391645B (en) Block chain lightweight processing method, block chain node and storage medium
CN109756536B (en) Data transmission method, device and system
US9569742B2 (en) Reducing costs related to use of networks based on pricing heterogeneity
CN110401720B (en) Information processing method, device, system, application server and medium
US7957392B2 (en) Method and apparatus for high-performance bonding resequencing
CN110191428B (en) Data distribution method based on intelligent cloud platform
CN110784501B (en) Method, system, device and storage medium for packaging and broadcasting transaction group containing block
CN110490734B (en) Transaction group construction and broadcasting method and system, equipment and storage medium
CN112565115A (en) Transmission method and device of TCP data, computer equipment and storage medium
US20220131873A1 (en) Transaction Replacement Method, Device, and Storage Medium
CN109872139B (en) Transaction replacement method, apparatus and storage medium
US20230336368A1 (en) Block chain-based data processing method and related apparatus
CN109829822B (en) Transaction replacing method, transaction queuing method, device and storage medium
CN112929432B (en) Broadcasting method, equipment and storage medium based on repeated broadcasting history
CN111768196B (en) Transaction information confirmation method and device
CN114363379A (en) Vehicle data transmission method and device, electronic equipment and medium
CN106909528B (en) A kind of dispatching method and device of data transmission
CN115114009A (en) Data query method, master node and slave nodes
CN106407307A (en) Interaction method and interaction device for node data of distributed database
CN112950171A (en) Bank business processing system and method

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