CN109410055B - Block chain consensus method based on computational power parasitism - Google Patents

Block chain consensus method based on computational power parasitism Download PDF

Info

Publication number
CN109410055B
CN109410055B CN201811165472.7A CN201811165472A CN109410055B CN 109410055 B CN109410055 B CN 109410055B CN 201811165472 A CN201811165472 A CN 201811165472A CN 109410055 B CN109410055 B CN 109410055B
Authority
CN
China
Prior art keywords
block
chain
hash value
transaction
local
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
CN201811165472.7A
Other languages
Chinese (zh)
Other versions
CN109410055A (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.)
XI'AN ZHIGUI INTERNET TECHNOLOGY Co.,Ltd.
Original Assignee
Putian Zhuhuo Information 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 Putian Zhuhuo Information Technology Co ltd filed Critical Putian Zhuhuo Information Technology Co ltd
Priority to CN201811165472.7A priority Critical patent/CN109410055B/en
Publication of CN109410055A publication Critical patent/CN109410055A/en
Application granted granted Critical
Publication of CN109410055B publication Critical patent/CN109410055B/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

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Storage Device Security (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a block chain consensus method based on computational power parasitism, which relates to the field of block chains and comprises the following steps: firstly, receiving at least one group of current service data in a first time period, and solving the current service data through Hash operation to obtain a first current service Hash value matched with the current service data; then, detecting whether the second transaction which is not confirmed by the first correlation chain is confirmed; then, acquiring a second historical service hash value of a second transaction which is newly added and confirmed by the first correlation chain and a second block number where the second transaction is located; and finally, recording the first current service hash value, the second historical service hash value and the second block number on the block chain network. In the invention, the block chain network depends on the computing power of the related block chain, and only the capability of defending the computing power attack of the related block chain is needed to be higher, so that the capability of defending the computing power attack of the block chain is also improved, and the capability of defending the computing power attack of the block chain is improved.

Description

Block chain consensus method based on computational power parasitism
Technical Field
The invention relates to the field of block chains, in particular to a block chain consensus method based on computational power parasitism.
Background
The non-computing block chain network only carries out Hash solution on a block head containing the Hash value of a previous block to obtain the Hash value of the block, the Hash value is used as a component of a next block head to form a chain type account book structure, each block only carries out one-time Hash value solution, and if the number of the whole blocks is 100 thousands, an ore machine with computing power of 1GH/s for breaking the non-computing block chain network can break the block chain network only in one second.
Com data shows that the total calculation power of Bibi at the end of eight months of this year is 50.13EH/s, the total difficulty of the network is about 6.73T, and the number of unacknowledged transactions is 1500, i.e. the number of hash algorithms executable per second is 5 × 1016Next, the process is carried out. Even if the power of 1 per mill of the block chain network is possessed, the block chain network which is not power can be easily broken.
As blockchain technology evolves, more and more blockchain projects are emerging, and each blockchain project has miners and mine machines responsible for mining. Then, a major larger blockchain network (e.g., bitcoin, ether house), etc. has been created, which has aggregated more computing resources. Compared with the computing power of a large blockchain network, on one hand, the computing power of a small emerging blockchain item has no defense capability on the large emerging blockchain item, and when the small emerging blockchain item is attacked by the large blockchain network, the small blockchain network is instantly broken down; on the other hand, if more and more small-scale blockchain networks are developed into large-scale blockchain networks, social computing resources are further lost, and waste of power resources and hydraulic resources is caused.
Disclosure of Invention
In view of some defects of the prior art, the technical problem to be solved by the present invention is that, in the prior art, constructing a stable blockchain network requires a large amount of computational resources, and there is a possibility of being attacked by the computationally intensive blockchain network and a risk of computational attack. The invention aims to provide a block chain consensus method based on computational power parasitism, and the block chain network formed based on the method can reduce the possibility of being attacked and broken by computational power without higher computational power infrastructure, and improve the capability of preventing the data of the block chain network from being tampered by computational power attack.
To achieve the above object, in a first aspect of the present invention, there is provided a power parasitics-based blockchain consensus method, the method comprising:
receiving at least one group of current service data in a first time period of the block chain network, and solving the current service data through Hash operation to obtain a first current service Hash value matched with the current service data; wherein the first current business hash value is used for generating a first transaction matched with the first current business hash value; the first transaction is used for issuing on a first related chain and is recorded on a main chain block of the first related chain;
detecting whether a second transaction which is matched with each historical service hash value in the first time period and is not confirmed by the first correlation chain is confirmed or not according to each historical service hash value matched with historical service data; the historical service hash value is obtained by solving the historical service data corresponding to the historical service hash value through hash operation;
acquiring the newly added historical service hash value of the second transaction confirmed by the first correlation chain, and taking the historical service hash value as a second historical service hash value; acquiring a second block number corresponding to a block where the second transaction is located on the first related chain;
and recording the first current service hash value, the second historical service hash value and the second block number on the current block of the block chain network corresponding to the first time period.
In one embodiment, the recording the first current traffic hash value, the second historical traffic hash value, and the second block number on the current block of the local blockchain network corresponding to the first time period includes:
and marking the first current service hash value as unconfirmed, marking the second historical service hash value as well as recording the second historical service hash value on the current block of the block chain network corresponding to the first time period.
In a specific embodiment, the local block of the local block chain network includes a block header, a first hash storage area, and a second hash storage area; the first hash storage area is used for storing the first current service hash value of the current service data newly packed by the current block in the first time period, and the second hash storage area is used for storing the second historical service hash value of the second transaction confirmed by the first correlation chain and the second block number corresponding to the second transaction, which are newly added in the first time period.
In a specific embodiment, the receiving at least one set of current service data in a first time period of the local blockchain network, and solving the current service data through a hash operation to obtain a first current service hash value matching the current service data further includes:
acquiring each service unit of the block chain network received in a first time period; the at least one group of current service data is composed of the service units;
solving the unit hash value of each service unit;
and generating a top hash value of the Mercker tree according to each unit hash value and the Mercker tree algorithm, and taking the top hash value of the Mercker tree as the first current business hash value.
In a specific embodiment, the detecting, according to the historical service hash values matching the historical service data, whether the second transaction that is matched with the historical service hash values and not confirmed by the first correlation chain in the first time period is confirmed further includes:
communicating with backbone nodes of at least three different networks on the first associative chain, periodically detecting whether the second transaction of the backbone nodes of at least three different networks is confirmed; the number of the main chain links is odd;
in all of the main chain nodes, if the second transaction is confirmed by more than half of the main chain nodes, the second transaction is considered to be confirmed.
In a specific embodiment, the method further comprises the following steps:
after the second transaction is confirmed, collecting a third block number of a block where the second transaction is located, wherein the third block number corresponds to the second historical service hash value;
in response to the third block number being different from the second block number, performing a first modify operation; the first modifying operation includes: and deleting the second historical service hash value and the second block number which are originally recorded on the first local chain block on the local block chain network aiming at the second exchange, and recording the second historical service hash value and the third block number on the second local chain block on the local block chain network corresponding to the third block number.
In a specific embodiment, the method further comprises:
after the second transaction is confirmed, collecting a third block number of a block where the second transaction is located, wherein the third block number corresponds to the second historical service hash value;
sending a chain data change request to a local node of the local block chain network in response to the third block number being different from the second block number; after receiving the chain data change request, the local chain node requests the main chain node of the first related chain corresponding to the local chain node for the third block number of the second transaction according to the second historical service hash value, and in response to that the third block number is different from the second block number, deletes the second historical service hash value and the second block number, which are originally recorded on the first local chain block on the local chain network for the second transaction, and records the second historical service hash value and the third block number on the second local chain block on the local chain network corresponding to the third block number.
In one embodiment, the previous blh of the blk network is used as an input parameter for solving the next blh; after performing the first modification operation, the method further comprises:
comparing the sizes of the block sequence numbers of the first local chain block and the second local chain block;
and from the smaller block serial number of the first local chain block and the second local chain block, solving the hash value of each block of the local block chain network one by one again, so that each block of the local block chain network forms chain connection.
In a specific embodiment, a plurality of nodes of the local blockchain network are connected to the network of the first relevant chain while being connected to the local blockchain network.
In a specific embodiment, the method further comprises:
storing the service hash value matched with the service data which is not identified in common in a first hash list;
and/or storing the service hash value matched with the identified service data in the second hash list.
The invention has the beneficial effects that: the invention has the beneficial effects that: the block chain network is attached to another related block chain network, the hash value of the service data of the block is recorded on the related block chain in a transaction form, and after the transaction is confirmed, the node of the block chain network writes the transaction information of the service into the block chain after receiving the information that the transaction is confirmed, so that the service data is confirmed, and common identification is realized; the block chain network depends on the computing power of the related block chain, and only the defense computing power attack capability of the related block chain is required to be higher, so that the defense computing power attack capability of the block chain is improved, and the defense computing power attack capability of the block chain is improved. In addition, the block chain technology provided by the invention does not need to build a calculation force foundation by a self network, thereby saving social cost.
Drawings
FIG. 1 is a flow chart illustrating a method for computing power parasitics based blockchain consensus in an embodiment of the present invention;
FIG. 2 is a schematic diagram of data transmission in a computationally-based blockchain consensus method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a Merck tree-based generation of service hash values according to a computational power parasitic-based block chain consensus method according to an embodiment of the present invention;
fig. 4 is a diagram of an association structure between a first association chain network and a local blockchain network according to an embodiment of the present invention;
fig. 5 is a schematic diagram of data transmission during block data modification based on a power-parasitic blockchain consensus method according to an embodiment of the invention.
Fig. 6 is a block diagram of a power-parasitic-based blockchain consensus device according to an embodiment of the present invention.
Detailed Description
The invention is further illustrated by the following examples in conjunction with the accompanying drawings:
as shown in fig. 1-6, in a first embodiment of the present invention, a method for blockchain consensus based on computational power parasitics is provided, the method comprising:
step S1, receiving at least one group of current service data in a first time period of the local block chain network, and solving the current service data through Hash operation to obtain a first current service Hash value matched with the current service data; wherein the first current business hash value is used for generating a first transaction matched with the first current business hash value; the first transaction is used for issuing on a first related chain and is recorded on a main chain block of the first related chain;
it is worth mentioning that the generation of the first current service hash value may be a hash operation performed on one or more groups of service data as a whole; the first current service hash value may also be generated by performing hash operation on each service data in a form of a merkel tree, and then generating two superior hash values until a merkel tree top hash value is solved, where the merkel tree top hash value is the first current service hash value;
in this embodiment, the length of the first time period of the local blockchain network is not limited, and optionally, the first time period is a block generation period of the local blockchain network; optionally, the first time period is independent of a block generation period of the blockchain network.
In the embodiment, a plurality of or all service data in a first time period are packaged as a whole into a hash value and issued in a transaction form on a first correlation chain (such as a bitcoin network and an ether house); in this embodiment, only the first transaction needs to be issued to the first correlation chain, and the confirmation time of the transaction is related to the setting of the first correlation chain, so that the blockchain network only needs to wait for the confirmation of the transaction. For example, in a bitcoin network, a bitcoin transaction is initiated, which after waiting for a certain amount of time can be accounted and confirmed by the miners of the bitcoin network and written into the blockchain.
Step S2, detecting whether a second transaction that is matched with the historical service hash value and not confirmed by the first correlation chain within the first time period is confirmed according to the historical service hash value matched with the historical service data; the historical service hash value is obtained by solving the historical service data corresponding to the historical service hash value through hash operation;
for the block of the local blockchain network, while business data is distributed in the first relevant chain in a transaction form, the transaction which is previously distributed in the first relevant chain is also detected, and after the transaction corresponding to the business data is confirmed, the business data is written into the block of the local blockchain network;
it is worth mentioning that the transaction is considered to be confirmed when the transaction is written into the main chain block of the first related chain for the first time; alternatively, the transaction may be considered confirmed by accumulating writes to the backbone block of the first associative link a plurality of times.
Step S3, obtaining the newly added historical service hash value of the second transaction confirmed by the first correlation chain, and taking the historical service hash value as a second historical service hash value; acquiring a second block number corresponding to a block where the second transaction is located on the first related chain;
step S4, recording the first current service hash value, the second historical service hash value, and the second block number on the current block of the local blockchain network corresponding to the first time period.
Optionally, in this embodiment, the recording the first current service hash value, the second historical service hash value, and the second block number on the current block of the local blockchain network corresponding to the first time period includes:
and marking the first current service hash value as unconfirmed, marking the second historical service hash value as well as recording the second historical service hash value on the current block of the block chain network corresponding to the first time period.
Optionally, in this embodiment, the local chain of blocks of the local block chain network includes a block header, a first hash storage area, and a second hash storage area; the first hash storage area is used for storing the first current service hash value of the current service data newly packed by the current block in the first time period, and the second hash storage area is used for storing the second historical service hash value of the second transaction confirmed by the first correlation chain and the second block number corresponding to the second transaction, which are newly added in the first time period.
It should be noted that, optionally, identifiers are set in the first hash storage area and the second hash storage area so as to determine partitions; optionally, the sizes or the number of bytes of the first hash storage area and the second hash storage area are fixed, so as to determine the respective relative partitions.
Optionally, in this embodiment, the receiving at least one set of current service data in a first time period of the local blockchain network, and performing hash operation on the current service data to solve to obtain a first current service hash value matched with the current service data, further includes:
acquiring each service unit of the block chain network received in a first time period; the at least one group of current service data is composed of the service units;
solving the unit hash value of each service unit;
and generating a top hash value of the Mercker tree according to each unit hash value and the Mercker tree algorithm, and taking the top hash value of the Mercker tree as the first current business hash value.
The common merkel tree algorithm generates two superior hash values by pairwise generating the unit hash values until solving the top hash value of the merkel tree.
Optionally, in this embodiment, the detecting, according to each historical service hash value matched with the historical service data, whether the second transaction that is matched with each historical service hash value in the first time period and is not confirmed by the first correlation chain is confirmed further includes:
communicating with backbone nodes of at least three different networks on the first associative chain, periodically detecting whether the second transaction of the backbone nodes of at least three different networks is confirmed; the number of the main chain links is odd;
in all of the main chain nodes, if the second transaction is confirmed by more than half of the main chain nodes, the second transaction is considered to be confirmed.
In fact, the blockchain network only communicates with one main chain node on the first related chain, and information about whether the transaction is confirmed can be obtained; and the bifurcation rate is reduced by connecting with a plurality of main chain nodes. In a practical application scenario, the main chain node of the first related chain may be set at different mines. Because the same mine field generally excavates the ore collectively, and the time delay of dredging the network is few, and the data in the mine field is relatively unanimous, so can select the different main chain nodes of different mine fields in order to obtain the transaction record information of first transaction.
Optionally, in this embodiment, the method further includes:
after the second transaction is confirmed, collecting a third block number of a block where the second transaction is located, wherein the third block number corresponds to the second historical service hash value;
in response to the third block number being different from the second block number, performing a first modify operation; the first modifying operation includes: and deleting the second historical service hash value and the second block number which are originally recorded on the first local chain block on the local block chain network aiming at the second exchange, and recording the second historical service hash value and the third block number on the second local chain block on the local block chain network corresponding to the third block number.
It is worth mentioning that in the algorithm-based block chain technique, such as bitcoin blocks, which are generated by miners performing mathematical operations continuously, each block must refer to a block thereon, so that the longest chain is also the most difficult to overturn and tamper, and therefore, the node always considers that the longest chain is the valid block chain, and only miners who dig mines on the longest chain can obtain rewards, which is the most common bitcoin longest chain principle. When two or more nodes account at almost the same time, bifurcation occurs, at this time, two accounting modes are temporarily reserved, and finally, a longer chain block is used as a final accounting book.
In an alternative embodiment, when the first correlation chain has a bifurcation and the node of the local blockchain network performs billing according to whether the first transaction is confirmed, the node follows one of the bifurcations, and if the transaction record information of the first transaction of the local blockchain network changes due to the fact that the first correlation chain selects another bifurcation, the node can modify the transaction record information and correspondingly modify the local blockchain.
Optionally, in this embodiment, the method further includes:
after the second transaction is confirmed, collecting a third block number of a block where the second transaction is located, wherein the third block number corresponds to the second historical service hash value;
sending a chain data change request to a local node of the local block chain network in response to the third block number being different from the second block number; after receiving the chain data change request, the local chain node requests the main chain node of the first related chain corresponding to the local chain node for the third block number of the second transaction according to the second historical service hash value, and in response to that the third block number is different from the second block number, deletes the second historical service hash value and the second block number, which are originally recorded on the first local chain block on the local chain network for the second transaction, and records the second historical service hash value and the third block number on the second local chain block on the local chain network corresponding to the third block number.
In a typical blockchain example, the previous blockhash value of the network blockchain is used as an input parameter for solving the next blockhash value, so as to solve the next blockhash value.
Optionally, in this embodiment, the previous block hash value of the blockchain network is used as an input parameter for solving the next block hash value; after performing the first modification operation, the method further comprises:
comparing the sizes of the block sequence numbers of the first local chain block and the second local chain block;
and from the smaller block serial number of the first local chain block and the second local chain block, solving the hash value of each block of the local block chain network one by one again, so that each block of the local block chain network forms chain connection.
Due to factors such as computational competition and network delay, the first related chain is forked, a plurality of block generation periods are reserved, and the longest chain is selected as a final account book; the block chain network also forms a bifurcation due to the first related chain, but along with the operation of the main chain, the block chain network updates the block data, and the bifurcation problem of the block chain network can be solved along with the main chain solving the bifurcation problem.
It should be noted that, when the blocks of the local block chain are connected in a chain manner, that is, when the hash value of the previous block is stored in the next block, the hash value of the block needs to be solved again in response to the change of the first transaction record information, and the hash value after the change is modified at the same time, it is worth mentioning that, for example, the bitcoin network needs 6 times of confirmation to ensure that the data of the block chain is not tampered, so that only the chain connection between the blocks of the local block chain network within 6 block periods of the first related chain needs to be modified, and the computational requirement is not high.
Optionally, in this embodiment, the block header of the blockchain network includes, but is not limited to, a block sequence number, a first current service hash value, a second historical service hash value, a timestamp, and a hash value of a block immediately preceding the current block.
Optionally, a plurality of nodes of the local blockchain network may perform data monitoring on the first relevant chain, so as to obtain whether the first transaction and the second transaction are confirmed; optionally, a plurality of nodes of the local blockchain network are connected to the local blockchain network and also connected to the first related chain network;
optionally, in this embodiment, a plurality of nodes of the local blockchain network are connected to the network of the first relevant chain while being connected to the local blockchain network.
Optionally, in this embodiment, the method further includes:
storing the service hash value matched with the service data which is not identified in common in a first hash list;
and/or storing the service hash value matched with the identified service data in the second hash list.
The first hash management module and/or the second hash management module are/is arranged, so that the initiation, confirmation and tracking of the consensus of the related business data on the first related chain are facilitated to be managed.
In addition, the first initiator of the first transaction receives the confirmation information of the first transaction relatively timely. Optionally, receiving first confirmation information that a first initiator of the first transaction is confirmed about the first transaction; the first initiator is connected with a local block network, and the first initiator is connected with a first related chain network;
the present embodiment provides a block chain consensus technique, wherein when the hash value of the related service data is confirmed on the first related chain, the related service data is considered to be not easily tampered and be known. Meanwhile, after the first transaction is confirmed, the related transaction information, such as the first current service hash value of the service data, may be confirmed in which block of the block chain.
In practical application, the number of the service data packed at one time is set according to the number of the service data of the block chain, transaction handling fee and the throughput capacity of the first related chain network; it is worth mentioning that when a higher single service data packing amount is set, the commission for issuing the first transaction or the second transaction on the first related block chain can be reduced, and the load of the first related block chain is reduced, and on the other hand, when the single service data packing amount is less, the transaction confirmation speed can be effectively improved.
It is worth mentioning that, as shown in fig. 2, after the completion of the block XG L1000 of the first correlation link network 200, in a time period, the service data initiated by the client of the block link network 100 is collected, and the service hash value 1 is generated, and the transaction 1 is generated on the first correlation link network 200, and further the transaction 2 and the transaction 3 are initiated on the first correlation link network 200, and the transaction 1 and the transaction 2 are confirmed on the block XG L1001 of the first correlation link network 200, and finally, the transaction 1 (the matched service hash value), the transaction 2 (the matched service hash value) and the block number of the block XG L1000 on the correlation link are recorded on the block BQK L-1 of the block link network 100, that is, the common identification of the service hash value 1 and the service hash value 2 is completed, and it is worth mentioning that, for the block BQK L-1 of the block link network 100, on the one hand, the service value 4 corresponds to the transaction value of the transaction block XG 391, and the transaction block number of the second transaction block XG 391 is recorded on the second transaction block XG L, and the transaction block number of the second correlation link network 200 is recorded on the block BQK L-1.
As shown in fig. 3, the service data 1-7 are paired pairwise to generate a previous service hash value, and finally form a first current service hash value.
As in fig. 4, there are two common nodes for the present blockchain network 100 and the first correlation chain network 200.
As shown in fig. 5, the first correlation chain in the graph has a bifurcation, the block chain network records the service data for the first time, the billing result of the upper half graph is adopted, and then the first correlation chain is bifurcated and recognized again, and the first correlation chain is changed into the billing result of the lower half graph, first, the block XG L1001 of the first correlation chain is changed, and the confirmation of the original first transaction 3 is changed from the block XG L1001 to the block XG L1002, so the input of the block BQK L1001-1 of the block network is changed, so that the second historical service hash value of the original input transaction 3 needs to be removed first, and then the block value of the block BQK L1001-1 needs to be changed to be used as the input of the block BQK L1001-2 again, and corresponding modification is made.
In a second embodiment of the present invention, as shown in fig. 6, there is provided a power parasitic-based blockchain consensus apparatus, the apparatus comprising:
a first hash obtaining module 101, configured to receive at least one set of current service data in a first time period of a local blockchain network, and solve the current service data through a hash operation to obtain a first current service hash value matching the current service data; wherein the first current business hash value is used for generating a first transaction matched with the first current business hash value; the first transaction is used for issuing on a first related chain and is recorded on a main chain block of the first related chain;
it is worth mentioning that the generation of the first current service hash value may be a hash operation performed on one or more groups of service data as a whole; the first current service hash value may also be generated by performing hash operation on each service data in a form of a merkel tree, and then generating two superior hash values until a merkel tree top hash value is solved, where the merkel tree top hash value is the first current service hash value;
in this embodiment, the length of the first time period of the local blockchain network is not limited, and optionally, the first time period is a block generation period of the local blockchain network; optionally, the first time period is independent of a block generation period of the blockchain network.
In the embodiment, a plurality of or all service data in a first time period are packaged as a whole into a hash value and issued in a transaction form on a first correlation chain (such as a bitcoin network and an ether house); in this embodiment, only the first transaction needs to be issued to the first correlation chain, and the confirmation time of the transaction is related to the setting of the first correlation chain, so that the blockchain network only needs to wait for the confirmation of the transaction. For example, in a bitcoin network, a bitcoin transaction is initiated, which after waiting for a certain amount of time can be accounted and confirmed by the miners of the bitcoin network and written into the blockchain.
The transaction monitoring module 102 is configured to detect, according to each historical service hash value matched with historical service data, whether a second transaction that is matched with each historical service hash value and is not confirmed by the first correlation chain within the first time period is confirmed; the historical service hash value is obtained by solving the historical service data corresponding to the historical service hash value through hash operation;
for the block of the local blockchain network, while business data is distributed in the first relevant chain in a transaction form, the transaction which is previously distributed in the first relevant chain is also detected, and after the transaction corresponding to the business data is confirmed, the business data is written into the block of the local blockchain network;
it is worth mentioning that the transaction is considered to be confirmed when the transaction is written into the main chain block of the first related chain for the first time; alternatively, the transaction may be considered confirmed by accumulating writes to the backbone block of the first associative link a plurality of times.
A second hash obtaining module 103, configured to obtain the new historical service hash value of the second transaction confirmed by the first correlation chain, and use the historical service hash value as a second historical service hash value; acquiring a second block number corresponding to a block where the second transaction is located on the first related chain;
a data recording module 104, configured to record the first current service hash value, the second historical service hash value, and the second block number on a current block of the local blockchain network corresponding to the first time period.
Optionally, in this embodiment, the data recording module 104 includes:
a first marking unit, configured to mark the first current service hash value as unconfirmed;
a second marking unit, configured to mark the second historical service hash value as being known;
and the data recording unit is used for recording the first current service hash value and the second historical service hash value on the current block of the block chain network corresponding to the first time period.
Optionally, in this embodiment, the local chain of blocks of the local block chain network includes a block header, a first hash storage area, and a second hash storage area; the first hash storage area is used for storing the first current service hash value of the current service data newly packed by the current block in the first time period, and the second hash storage area is used for storing the second historical service hash value of the second transaction confirmed by the first correlation chain and the second block number corresponding to the second transaction, which are newly added in the first time period.
It should be noted that, optionally, identifiers are set in the first hash storage area and the second hash storage area so as to determine partitions; optionally, the sizes or the number of bytes of the first hash storage area and the second hash storage area are fixed, so as to determine the respective relative partitions.
Optionally, in this embodiment, the first hash obtaining module 101 further includes:
a service acquisition unit, configured to acquire each service unit of the local blockchain network received in a first time period; the at least one group of current service data is composed of the service units;
the service hash solving unit is used for solving the unit hash value of each service unit;
and the first hash solving unit is used for generating a top hash value of the Mercker tree according to each unit hash value and the Mercker tree algorithm, and taking the top hash value of the Mercker tree as the first current service hash value.
The common merkel tree algorithm generates two superior hash values by pairwise generating the unit hash values until solving the top hash value of the merkel tree.
Optionally, in this embodiment, the transaction monitoring module 102 further includes:
a multi-node detection unit for communicating with the main chain nodes of at least three different networks on the first related chain, and periodically detecting whether the second transaction of the main chain nodes of at least three different networks is confirmed; the number of the main chain links is odd;
a multi-node transaction confirmation unit configured to, in all the main-chain nodes, consider that the second transaction is confirmed if the second transaction is confirmed by more than half of the main-chain nodes.
In fact, the blockchain network only communicates with one main chain node on the first related chain, and information about whether the transaction is confirmed can be obtained; and the bifurcation rate is reduced by connecting with a plurality of main chain nodes. In a practical application scenario, the main chain node of the first related chain may be set at different mines. Because the same mine field generally excavates the ore collectively, and the time delay of dredging the network is few, and the data in the mine field is relatively unanimous, so can select the different main chain nodes of different mine fields in order to obtain the transaction record information of first transaction.
Optionally, in this embodiment, the apparatus further includes:
the transaction continuous monitoring module 105 is configured to collect a third block number of the block where the second transaction is located, where the third block number corresponds to the second historical service hash value, after the second transaction is confirmed;
a first transaction modification module 106, configured to execute a first modification operation in response to that the third block number is different from the second block number; the first modifying operation includes: and deleting the second historical service hash value and the second block number which are originally recorded on the first local chain block on the local block chain network aiming at the second exchange, and recording the second historical service hash value and the third block number on the second local chain block on the local block chain network corresponding to the third block number.
It is worth mentioning that in the algorithm-based block chain technique, such as bitcoin blocks, which are generated by miners performing mathematical operations continuously, each block must refer to a block thereon, so that the longest chain is also the most difficult to overturn and tamper, and therefore, the node always considers that the longest chain is the valid block chain, and only miners who dig mines on the longest chain can obtain rewards, which is the most common bitcoin longest chain principle. When two or more nodes account at almost the same time, bifurcation occurs, at this time, two accounting modes are temporarily reserved, and finally, a longer chain block is used as a final accounting book.
In an alternative embodiment, when the first correlation chain has a bifurcation and the node of the local blockchain network performs billing according to whether the first transaction is confirmed, the node follows one of the bifurcations, and if the transaction record information of the first transaction of the local blockchain network changes due to the fact that the first correlation chain selects another bifurcation, the node can modify the transaction record information and correspondingly modify the local blockchain.
Optionally, in this embodiment, the apparatus further includes:
the transaction continuous monitoring module 105 is configured to collect a third block number of the block where the second transaction is located, where the third block number corresponds to the second historical service hash value, after the second transaction is confirmed;
a second transaction modification module 107, configured to send a chain data change request to a local link point of the local blockchain network in response to that the third block number is different from the second block number; after receiving the chain data change request, the local chain node requests the main chain node of the first related chain corresponding to the local chain node for the third block number of the second transaction according to the second historical service hash value, and in response to that the third block number is different from the second block number, deletes the second historical service hash value and the second block number, which are originally recorded on the first local chain block on the local chain network for the second transaction, and records the second historical service hash value and the third block number on the second local chain block on the local chain network corresponding to the third block number.
In a typical blockchain example, the previous blockhash value of the network blockchain is used as an input parameter for solving the next blockhash value, so as to solve the next blockhash value.
Optionally, in this embodiment, the previous block hash value of the blockchain network is used as an input parameter for solving the next block hash value; the first transaction modification module 106 further comprises a block reconstruction unit;
the block reconstruction unit is configured to compare sizes of block sequence numbers of the first and second local chain blocks;
the block reconstruction unit is further configured to solve the hash value of each block of the local block chain network one by one again from the smaller block sequence number of the first local chain block and the second local chain block, so that each block of the local block chain network forms a chain connection.
Due to factors such as computational competition and network delay, the first related chain is forked, a plurality of block generation periods are reserved, and the longest chain is selected as a final account book; the block chain network also forms a bifurcation due to the first related chain, but along with the operation of the main chain, the block chain network updates the block data, and the bifurcation problem of the block chain network can be solved along with the main chain solving the bifurcation problem.
It should be noted that, when the blocks of the local block chain are connected in a chain manner, that is, when the hash value of the previous block is stored in the next block, the hash value of the block needs to be solved again in response to the change of the first transaction record information, and the hash value after the change is modified at the same time, it is worth mentioning that, for example, the bitcoin network needs 6 times of confirmation to ensure that the data of the block chain is not tampered, so that only the chain connection between the blocks of the local block chain network within 6 block periods of the first related chain needs to be modified, and the computational requirement is not high.
Optionally, in this embodiment, the block header of the blockchain network includes, but is not limited to, a block sequence number, a first current service hash value, a second historical service hash value, a timestamp, and a hash value of a block immediately preceding the current block.
Optionally, a plurality of nodes of the local blockchain network may perform data monitoring on the first relevant chain, so as to obtain whether the first transaction and the second transaction are confirmed; optionally, a plurality of nodes of the local blockchain network are connected to the local blockchain network and also connected to the first related chain network;
optionally, in this embodiment, a plurality of nodes of the local blockchain network are connected to the network of the first relevant chain while being connected to the local blockchain network.
Optionally, in this embodiment, the apparatus further includes:
a first hash management module 108, configured to store a service hash value matched with the service data that is not commonly recognized in a first hash list;
and/or the second hash management module 109 is configured to store the service hash value matching the identified service data in the second hash list.
The first hash management module 108 and/or the second hash management module 109 are arranged to facilitate management of the initiation, confirmation and tracking of the consensus of the related business data on the first correlation chain.
In addition, the first initiator of the first transaction receives the confirmation information of the first transaction relatively timely. Optionally, receiving first confirmation information that a first initiator of the first transaction is confirmed about the first transaction; the first initiator is connected with a local block network, and the first initiator is connected with a first related chain network;
the present embodiment provides a block chain consensus technique, wherein when the hash value of the related service data is confirmed on the first related chain, the related service data is considered to be not easily tampered and be known. Meanwhile, after the first transaction is confirmed, the related transaction information, such as the first current service hash value of the service data, may be confirmed in which block of the block chain.
In practical application, the number of the service data packed at one time is set according to the number of the service data of the block chain, transaction handling fee and the throughput capacity of the first related chain network; it is worth mentioning that when a higher single service data packing amount is set, the commission for issuing the first transaction or the second transaction on the first related block chain can be reduced, and the load of the first related block chain is reduced, and on the other hand, when the single service data packing amount is less, the transaction confirmation speed can be effectively improved.
It is worth mentioning that, as shown in fig. 2, after the completion of the block XG L1000 of the first correlation link network 200, in a time period, the service data initiated by the client of the block link network 100 is collected, and the service hash value 1 is generated, and the transaction 1 is generated on the first correlation link network 200, and further the transaction 2 and the transaction 3 are initiated on the first correlation link network 200, and the transaction 1 and the transaction 2 are confirmed on the block XG L1001 of the first correlation link network 200, and finally, the transaction 1 (the matched service hash value), the transaction 2 (the matched service hash value) and the block number of the block XG L1000 on the correlation link are recorded on the block BQK L-1 of the block link network 100, that is, the common identification of the service hash value 1 and the service hash value 2 is completed, and it is worth mentioning that, for the block BQK L-1 of the block link network 100, on the one hand, the service value 4 corresponds to the transaction value of the transaction block XG 391, and the transaction block number of the second transaction block XG 391 is recorded on the second transaction block XG L, and the transaction block number of the second correlation link network 200 is recorded on the block BQK L-1.
As shown in fig. 3, the service data 1-7 are paired pairwise to generate a previous service hash value, and finally form a first current service hash value.
As in fig. 4, there are two common nodes for the present blockchain network 100 and the first correlation chain network 200.
As shown in fig. 5, the first correlation chain in the graph has a bifurcation, the block chain network records the service data for the first time, the billing result of the upper half graph is adopted, and then the first correlation chain is bifurcated and recognized again, and the first correlation chain is changed into the billing result of the lower half graph, first, the block XG L1001 of the first correlation chain is changed, and the confirmation of the original first transaction 3 is changed from the block XG L1001 to the block XG L1002, so the input of the block BQK L1001-1 of the block network is changed, so that the second historical service hash value of the original input transaction 3 needs to be removed first, and then the block value of the block BQK L1001-1 needs to be changed to be used as the input of the block BQK L1001-2 again, and corresponding modification is made.
The foregoing detailed description of the preferred embodiments of the invention has been presented. It should be understood that numerous modifications and variations could be devised by those skilled in the art in light of the present teachings without departing from the inventive concepts. Therefore, the technical solutions available to those skilled in the art through logic analysis, reasoning and limited experiments based on the prior art according to the concept of the present invention should be within the scope of protection defined by the claims.

Claims (10)

1. A method for algorithm-force-parasitics-based blockchain consensus, the method comprising:
receiving at least one group of current service data in a first time period of the block chain network, and solving the current service data through Hash operation to obtain a first current service Hash value matched with the current service data; wherein the first current business hash value is used for generating a first transaction matched with the first current business hash value; the first transaction is used for issuing on a first related chain and is recorded on a main chain block of the first related chain;
detecting whether a second transaction which is matched with each historical service hash value in the first time period and is not confirmed by the first correlation chain is confirmed or not according to each historical service hash value matched with historical service data; the historical service hash value is obtained by solving the historical service data corresponding to the historical service hash value through hash operation;
acquiring the newly added historical service hash value of the second transaction confirmed by the first correlation chain, and taking the historical service hash value as a second historical service hash value; acquiring a second block number corresponding to a block where the second transaction is located on the first related chain;
and recording the first current service hash value, the second historical service hash value and the second block number on the current block of the block chain network corresponding to the first time period.
2. The method of claim 1, wherein the recording the first current traffic hash value, the second historical traffic hash value, and the second block number on a current block of the blockchain network corresponding to the first time period comprises:
and marking the first current service hash value as unconfirmed, marking the second historical service hash value as well as recording the second historical service hash value on the current block of the block chain network corresponding to the first time period.
3. The method as claimed in claim 1, wherein the local chain blocks of the local chain network comprise a block header, a first hash storage area, and a second hash storage area; the first hash storage area is used for storing the first current service hash value of the current service data newly packed by the current block in the first time period, and the second hash storage area is used for storing the second historical service hash value of the second transaction confirmed by the first correlation chain and the second block number corresponding to the second transaction, which are newly added in the first time period.
4. The method as claimed in claim 1, wherein the receiving at least one set of current traffic data in a first time period of the local blockchain network and performing hash operation on the current traffic data to obtain a first current traffic hash value matching the current traffic data further comprises:
acquiring each service unit of the block chain network received in a first time period; the at least one group of current service data is composed of the service units;
solving the unit hash value of each service unit;
and generating a top hash value of the Mercker tree according to each unit hash value and the Mercker tree algorithm, and taking the top hash value of the Mercker tree as the first current business hash value.
5. The method of claim 1, wherein detecting whether a second transaction is confirmed that the first correlation chain matches each historical traffic hash value and is not confirmed by the first correlation chain within the first time period based on each historical traffic hash value matching historical traffic data further comprises:
communicating with backbone nodes of at least three different networks on the first associative chain, periodically detecting whether the second transaction of the backbone nodes of at least three different networks is confirmed; the number of the main chain links is odd;
in all of the main chain nodes, if the second transaction is confirmed by more than half of the main chain nodes, the second transaction is considered to be confirmed.
6. The method of claim 1, wherein the method further comprises:
after the second transaction is confirmed, collecting a third block number of a block where the second transaction is located, wherein the third block number corresponds to the second historical service hash value;
in response to the third block number being different from the second block number, performing a first modify operation; the first modifying operation includes: and deleting the second historical service hash value and the second block number which are originally recorded on the first local chain block on the local block chain network aiming at the second exchange, and recording the second historical service hash value and the third block number on the second local chain block on the local block chain network corresponding to the third block number.
7. The method of claim 1, wherein the method further comprises:
after the second transaction is confirmed, collecting a third block number of a block where the second transaction is located, wherein the third block number corresponds to the second historical service hash value;
sending a chain data change request to a local node of the local block chain network in response to the third block number being different from the second block number; after receiving the chain data change request, the local chain node requests the main chain node of the first related chain corresponding to the local chain node for the third block number of the second transaction according to the second historical service hash value, and in response to that the third block number is different from the second block number, deletes the second historical service hash value and the second block number, which are originally recorded on the first local chain block on the local chain network for the second transaction, and records the second historical service hash value and the third block number on the second local chain block on the local chain network corresponding to the third block number.
8. The method as claimed in claim 6, wherein the previous blh value of the present blh network is used as the input parameter for solving the next blh value; after performing the first modification operation, the method further comprises:
comparing the sizes of the block sequence numbers of the first local chain block and the second local chain block;
and from the smaller block serial number of the first local chain block and the second local chain block, solving the hash value of each block of the local block chain network one by one again, so that each block of the local block chain network forms chain connection.
9. The method of claim 1, wherein the plurality of nodes of the local blockchain network are connected to the network of the first correlation chain at the same time as the local blockchain network.
10. The method of claim 1, wherein the method further comprises:
storing the service hash value matched with the service data which is not identified in common in a first hash list;
and/or storing the service hash value matched with the identified service data in the second hash list.
CN201811165472.7A 2018-10-08 2018-10-08 Block chain consensus method based on computational power parasitism Active CN109410055B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811165472.7A CN109410055B (en) 2018-10-08 2018-10-08 Block chain consensus method based on computational power parasitism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811165472.7A CN109410055B (en) 2018-10-08 2018-10-08 Block chain consensus method based on computational power parasitism

Publications (2)

Publication Number Publication Date
CN109410055A CN109410055A (en) 2019-03-01
CN109410055B true CN109410055B (en) 2020-08-07

Family

ID=65466773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811165472.7A Active CN109410055B (en) 2018-10-08 2018-10-08 Block chain consensus method based on computational power parasitism

Country Status (1)

Country Link
CN (1) CN109410055B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111598567B (en) * 2020-05-07 2023-11-10 深圳创客区块链技术有限公司 Method, device and storage medium for preventing blockchain powerful attack

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012162748A2 (en) * 2011-06-03 2012-12-06 Rate Validation Services Pty Ltd Method and system for generating a set of rates
CN105488675A (en) * 2015-11-25 2016-04-13 布比(北京)网络技术有限公司 Distributed shared general ledger construction method of block chain
CN106650495A (en) * 2016-12-16 2017-05-10 杭州嘉楠耘智信息科技有限公司 File verification method and device
KR20180041055A (en) * 2017-09-06 2018-04-23 주식회사 코인플러그 Method for providing certificate service based on smart contract and server using the same
CN108235799A (en) * 2017-12-27 2018-06-29 深圳达闼科技控股有限公司 Block generation method, device, storage medium and block chain network
CN207895450U (en) * 2018-03-30 2018-09-21 李欣宇 Knowledge Q-A system based on the double-chain block chain of same root

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150170112A1 (en) * 2013-10-04 2015-06-18 Erly Dalvo DeCastro Systems and methods for providing multi-currency platforms comprising means for exchanging and interconverting tangible and virtual currencies in various transactions, banking operations, and wealth management scenarios

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012162748A2 (en) * 2011-06-03 2012-12-06 Rate Validation Services Pty Ltd Method and system for generating a set of rates
CN105488675A (en) * 2015-11-25 2016-04-13 布比(北京)网络技术有限公司 Distributed shared general ledger construction method of block chain
CN106650495A (en) * 2016-12-16 2017-05-10 杭州嘉楠耘智信息科技有限公司 File verification method and device
KR20180041055A (en) * 2017-09-06 2018-04-23 주식회사 코인플러그 Method for providing certificate service based on smart contract and server using the same
CN108235799A (en) * 2017-12-27 2018-06-29 深圳达闼科技控股有限公司 Block generation method, device, storage medium and block chain network
CN207895450U (en) * 2018-03-30 2018-09-21 李欣宇 Knowledge Q-A system based on the double-chain block chain of same root

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
An Overview of Blockchain Technology :Architecture, Consensus, and Future Trends;Zibin Zheng 等;《2017 IEEE 6th International Congress on Big Data》;20171231;第557-564页 *
区块链共识机制研究与分析;刘童桐;《信息通信技术与政策》;20180731(第7期);第26-33页 *

Also Published As

Publication number Publication date
CN109410055A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
CN109214817B (en) Block chain consensus device based on computational power parasitism
CN109389502B (en) consensus method of block chains depending on related chain computing power
CN109361661B (en) Block chain consensus device depending on related chain computing power
CN107169865B (en) Asset data processing system based on block chain technology
CN107078903B (en) Ore digging method and device for block chain and node equipment
CN110493148B (en) Block processing, block consensus and block synchronization method and device
CN107171810A (en) The verification method and device of block chain
CN110011974A (en) Bookkeeping methods, device, terminal and the computer readable storage medium of block chain
CN108985740B (en) Method for realizing high-performance consensus algorithm
CN108984645A (en) block chain processing method, device, equipment and storage medium
CN101964795A (en) Log collecting system, log collection method and log recycling server
CN109241414A (en) System message method for pushing and terminal device based on message template
CN112039926B (en) Method for realizing double-layer chain type architecture of block chain
CN109543459A (en) A kind of data deposit card method and apparatus
CN109410055B (en) Block chain consensus method based on computational power parasitism
CN110309173B (en) Contract data recording method and device, block chain node and storage medium
CN110457337A (en) Link aggregation method, system and equipment
CN107678892A (en) Recover the continuous data protection method of chain based on jump
CN109033130A (en) A kind of block chain electric power data storage system
Hui-hui et al. A wireless sensor networks based on multi-angle trust of node
CN109525633A (en) Block chain network, the message transmission based on block chain network, message receival method
CN109711842B (en) Account book accounting method of block chain network with regularly converged parallel chains
CN114706871B (en) Data monitoring method and system based on comprehensive monitoring management
CN113079026B (en) Block chain system and block chain network resource management method
CN115422259A (en) Data processing method, system, equipment and storage medium of time sequence database

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
TR01 Transfer of patent right

Effective date of registration: 20210319

Address after: Room 1a201 and 1g201, No.12, Gaoxin 2nd Road, Zhangba Street office, Gaoxin District, Xi'an City, Shaanxi Province, 710065

Patentee after: XI'AN ZHIGUI INTERNET TECHNOLOGY Co.,Ltd.

Address before: 351139 Hualin Industrial Park, Xiagao village, Huating Town, Chengxiang District, Putian City, Fujian Province

Patentee before: PUTIAN ZHUHUO INFORMATION TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right