CN111523896B - Attack prevention method, apparatus and storage medium - Google Patents

Attack prevention method, apparatus and storage medium Download PDF

Info

Publication number
CN111523896B
CN111523896B CN202010373105.7A CN202010373105A CN111523896B CN 111523896 B CN111523896 B CN 111523896B CN 202010373105 A CN202010373105 A CN 202010373105A CN 111523896 B CN111523896 B CN 111523896B
Authority
CN
China
Prior art keywords
block
transaction
root
hash
meckel
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
CN202010373105.7A
Other languages
Chinese (zh)
Other versions
CN111523896A (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 CN202010373105.7A priority Critical patent/CN111523896B/en
Publication of CN111523896A publication Critical patent/CN111523896A/en
Application granted granted Critical
Publication of CN111523896B publication Critical patent/CN111523896B/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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3823Payment protocols; Details thereof insuring higher security of transaction combining multiple encryption tools for a transaction
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides an anti-attack method, equipment and a storage medium, wherein the method comprises the following steps: receiving a first data set broadcast by a first block chain node after packaging a first block; the first data set comprises first block header information of a first block and a transaction hash list, the first block header information comprises a first Meckel root, the first Meckel root is generated according to transaction full hash calculation of each transaction of the first block, and the transaction full hash is generated according to transaction content and signature information of corresponding transactions; searching each transaction of the first block in a local transaction pool according to the transaction hash list; calculating a second Meckel root according to the full hash of each searched transaction, and assembling and restoring a first block according to the first data set and each searched transaction when the second Meckel root is the same as the first Meckel root; and requesting the first block from the first block link point when the second merkel root and the first merkel root are different. The above method improves blockchain stability.

Description

Attack prevention method, apparatus and storage medium
Technical Field
The application relates to the technical field of blockchains, in particular to an anti-attack method, anti-attack equipment and a storage medium.
Background
In a transaction broadcasting mechanism previously proposed by the applicant (refer to patent text such as various transaction broadcasting or block broadcasting applied by the applicant specifically), a transaction hash is generated by transaction content of a transaction, a merkel root in block header information of a block is generated by transaction hash calculation of each transaction of the block, when a block chain node receives a transaction, assuming that the transaction content is content (X), the block chain node firstly determines whether another transaction identical to the content (X) is already stored locally: if so, discarding the newly received transaction; if not, the newly received transaction is stored in the local transaction pool. In the block verification mechanism (specifically, refer to patent texts such as various block generation, block broadcasting or block verification applied by the applicant) previously proposed by the applicant, a block link point of a generated block sends a data set of the generated block (including block header information and a transaction hash list of the generated block) to other block chain nodes; when other blockchain nodes receive the block, searching each transaction of the received block in a local transaction pool according to a transaction hash list, calculating a merkel root according to the transaction hash of each searched transaction, when the calculated merkel root is judged to be the same as the merkel root in the block head information, assembling and restoring the first block according to the received data set and each searched transaction, executing the restored first block to obtain an execution result, and when the execution result is inconsistent with the execution result in the block head information, the blockchain node considers that the problem (the merkel root is the same and the execution result is different) is caused by inconsistent versions, stopping running the block chain link point and waiting for version updating.
Assuming that there are four blockchain nodes in the blockchain, user a is a malicious user, and the user a signs the same transaction content by using the private keys of two accounts to generate two different transactions tx1 (sig_a1 (content (M))) and tx2 (sig_a2 (content (M))); suppose A, B receives tx1 first and C, D receives tx2 first; A. when receiving tx1 and then receiving tx2, the A, B will not store tx2 into the local transaction pool because the transaction contents of tx1 and tx2 are the same; similarly, C, D does not store tx1 in the local transaction pool; suppose a generates a block (N) that includes tx1 and broadcasts blockheader (N) and a transaction hash list of block (N) to B, C, D; since the transaction hash is generated from the transaction contents of the transaction, the merkel root of A, B, C, D is identical; under the condition that the merkel root is the same, B, C, D assembles and restores the block (N) according to the searched transaction; b finds tx1 locally from hash (content (M)), and C, D finds tx2 locally from hash (content (M)); thus, A, B executes block (N) to produce the same first execution result, C, D executes block (N) to produce the same second execution result, and the first execution result is different from the second execution result. C. D considers the problem to be caused by version inconsistency, C, D stops running and waits for version update. Therefore, in the transaction broadcasting mechanism, one transaction can make many block link points not work normally, so that the stability of the block chain operation is reduced.
Disclosure of Invention
In view of the foregoing drawbacks or deficiencies of the prior art, it is desirable to provide an anti-attack method, apparatus and storage medium that improves blockchain stability.
In a first aspect, the present invention provides an anti-attack method applicable to a blockchain node, where the method includes:
receiving a first data set broadcast by a first block chain node after packaging a first block; the first data set comprises first block header information of a first block and a transaction hash list, the first block header information comprises a first Meckel root, the first Meckel root is generated according to transaction full hash calculation of each transaction of the first block, and the transaction full hash is generated according to transaction content and signature information of corresponding transactions;
searching each transaction of the first block in a local transaction pool according to the transaction hash list;
calculating a second Meckel root according to the searched transaction full hash of each transaction, and judging whether the second Meckel root and the first Meckel root are identical or not:
if yes, assembling and restoring the first block according to the first data set and each searched transaction;
if not, the first block is requested from the first block link point.
In a second aspect, the present invention provides an anti-attack method applicable to a blockchain node, where the method includes:
packaging the first block and generating a first data set of the first block; the first data set comprises first block header information of a first block and a transaction hash list, the first block header information comprises a first Meckel root, the first Meckel root is generated according to transaction full hash calculation of each transaction of the first block, and the transaction full hash is generated according to transaction content and signature information of corresponding transactions;
broadcasting the first data set to other blockchain nodes for the other blockchain nodes to:
searching each transaction of the first block in a local transaction pool according to the transaction hash list;
calculating a second Meckel root according to the searched transaction full hash of each transaction, and judging whether the second Meckel root and the first Meckel root are identical or not:
if yes, assembling and restoring the first block according to the first data set and each searched transaction;
and if not, requesting the first block from the current node.
In a third aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform the anti-attack method provided according to embodiments of the present invention.
In a fourth aspect, the present invention also provides a storage medium storing a computer program that causes a computer to execute the anti-attack method provided according to the embodiments of the present invention.
The anti-attack method, the anti-attack device and the storage medium provided by the embodiments of the invention are used for receiving the first data set broadcast by the first blockchain node after the first block is packed; the first data set comprises first block header information of a first block and a transaction hash list, the first block header information comprises a first Meckel root, the first Meckel root is generated according to transaction full hash calculation of each transaction of the first block, and the transaction full hash is generated according to transaction content and signature information of corresponding transactions; searching each transaction of the first block in a local transaction pool according to the transaction hash list; calculating a second Meckel root according to the full hash of each searched transaction, and assembling and restoring a first block according to the first data set and each searched transaction when the second Meckel root is the same as the first Meckel root; and when the second Meckel root is different from the first Meckel root, requesting the first block from the first block link point, and improving the stability of the block chain.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings, in which:
fig. 1 is a flowchart of an anti-attack method according to an embodiment of the present invention.
Fig. 2 is a flowchart of another anti-attack method according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The present application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the invention are shown in the drawings.
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a flowchart of an anti-attack method according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides an anti-attack method applicable to a blockchain node, where the method includes:
s12: receiving a first data set broadcast by a first block chain node after packaging a first block; the first data set comprises first block header information of a first block and a transaction hash list, the first block header information comprises a first Meckel root, the first Meckel root is generated according to transaction full hash calculation of each transaction of the first block, and the transaction full hash is generated according to transaction content and signature information of corresponding transactions;
s14: searching each transaction of the first block in a local transaction pool according to the transaction hash list;
s161: calculating a second Meckel root according to the searched transaction full hash of each transaction, and judging whether the second Meckel root and the first Meckel root are identical or not:
if yes, step S162 is executed: assembling and restoring the first block according to the first data set and each searched transaction;
if not, then step S163 is performed: the first block is requested from the first block link point.
Specifically, assuming that there are four blockchain nodes of ABCD in the blockchain, user a is a malicious user, and user a signs the same transaction content with the private keys of two accounts to generate two different transactions tx1 (sig_a1 (content (M))) and tx2 (sig_a2 (content (M))); A. b receives tx1 first and C, D receives tx2 first; assuming that a generated block (N), block (N) included tx1 (sig_a1 (content (M))), tx3 (sig_b (content (R))), tx4 (sig_c (content (S))), a broadcast a transaction hash list of blockheader (N) and block (N) to B, C, D;
in the transaction broadcasting mechanism previously proposed by the applicant (refer to various transaction broadcasting or block broadcasting patent text applied by the applicant specifically), transaction hash is generated by transaction content of a transaction, merkel root in block header information of a block is generated by transaction hash calculation of various transactions of the block, when a block chain node receives a transaction, assuming that the transaction content is content (X), the block chain node firstly determines whether another transaction identical to content (X) is stored locally: if so, discarding the newly received transaction; if not, the newly received transaction is stored in the local transaction pool. In the block verification mechanism (specifically, refer to patent texts such as various block generation, block broadcasting or block verification applied by the applicant) previously proposed by the applicant, a block link point of a generated block sends a data set of the generated block (including block header information and a transaction hash list of the generated block) to other block chain nodes; when other blockchain nodes receive the block, searching each transaction of the received block in a local transaction pool according to a transaction hash list, calculating a merkel root according to the transaction hash of each searched transaction, when the calculated merkel root is judged to be the same as the merkel root in the block head information, assembling and restoring the first block according to the received data set and each searched transaction, executing the restored first block to obtain an execution result, and when the execution result is inconsistent with the execution result in the block head information, the blockchain node considers that the problem (the merkel root is the same and the execution result is different) is caused by inconsistent versions, stopping running the block chain link point and waiting for version updating.
A. When receiving tx1 and then receiving tx2, the A, B will not store tx2 into the local transaction pool because the transaction contents of tx1 and tx2 are the same; similarly, C, D does not store tx1 in the local transaction pool; a broadcasts blockheader (N) (including meckerr root (generated from hash (content (M)), hash (content (R)), hash (content (S)), transaction hash list (hash (content (M)), hash (content (R)), hash (content (S))) to B, C, D;
b finds tx1 locally from hash (content (M)), and C, D finds tx2 locally from hash (content (M)); since the transaction hash is generated from the transaction contents of the transaction, the merkel root of A, B, C, D is identical; in the case where the merkel root is the same, B, C, D restores block (N) based on the found transaction assembly, but A, B executes block (N) to generate the same first execution result (tx 1, tx3, tx4 are actually executed), and C, D executes block (N) to generate the same second execution result (tx 2, tx3, tx4 are actually executed), and the first execution result is different from the second execution result. C. D considers the problem to be caused by version inconsistency, C, D stops running and waits for version update. Therefore, in the transaction broadcasting mechanism, one transaction can make many block link points not work normally, so that the stability of the block chain operation is reduced.
The problems arising from the above-described scenario can be solved by steps S12 to S163;
packaging tx1, tx3 and tx4 into block (N) and generating a data set of block (N); the data set of block (N) includes blockheader (N) (including merkel root (generated from hash (content (M) +sig_a1), hash (content (R) +sig_b), hash (content (S) +sig_c)) and transaction hash list (hash (content (M)), hash (content (R)), hash (content (S)));
B. c, D executing step S12, receiving a data set of block (N);
B. c, D executing step S14 to search each transaction of the first block in the local transaction pool according to the transaction hash list; b, locally searching tx1, tx3 and tx4; C. d, locally searching tx2, tx3 and tx4;
B. c, D it performs step S161:
b calculates mekerr root blockheader (N) _b from the transaction full hash of tx1, tx3, tx4 (generated from hash (content (M) +sig_a1), hash (content (R) +sig_b), hash (content (S) +sig_c)), and determines blockheader (N) _b and blockheader (N) are the same, then step S162 is performed: the restored block (N) is assembled according to the data set of the block (N) and tx1, tx3 and tx 4.
C calculates merkel root blockheader (N) _c (generated from hash (content (M) +sig_a2), hash (content (R) +sig_b), hash (content (S) +sig_c)) from the transaction full hash of tx2, tx3, tx4, determines blockheader (N) _c and blockheader (N) are different, and performs step S163: request block (N) from a.
D calculates merkel root blockheader (N) _d (generated from hash (content (M) +sig_a2), hash (content (R) +sig_b), hash (content (S) +sig_c)) from the transaction full hash of tx2, tx3, tx4, determines blockheader (N) _d and blockheader (N) are different, and performs step S163: request block (N) from a.
In the above embodiment, C, D does not stop running, increasing the stability of the blockchain operation.
Preferably, requesting the first block from the first block link point comprises:
requesting a first block from a first block link point;
and verifying the correctness of the first block, and deleting all transactions included in the first block in the local transaction pool when verification passes.
Fig. 2 is a flowchart of another anti-attack method according to an embodiment of the present invention. As shown in fig. 2, in this embodiment, the present invention provides an anti-attack method applicable to a blockchain node, where the method includes:
s22: packaging the first block and generating a first data set of the first block; the first data set comprises first block header information of a first block and a transaction hash list, the first block header information comprises a first Meckel root, the first Meckel root is generated according to transaction full hash calculation of each transaction of the first block, and the transaction full hash is generated according to transaction content and signature information of corresponding transactions;
s24: broadcasting the first data set to other blockchain nodes for the other blockchain nodes to:
searching each transaction of the first block in a local transaction pool according to the transaction hash list;
calculating a second Meckel root according to the searched transaction full hash of each transaction, and judging whether the second Meckel root and the first Meckel root are identical or not:
if yes, assembling and restoring the first block according to the first data set and each searched transaction;
and if not, requesting the first block from the current node.
The principle of the foregoing embodiment of the attack prevention may refer to the method shown in fig. 1, and will not be described herein.
Preferably, requesting the first block from the first block link point comprises:
requesting a first block from a first block link point;
and verifying the correctness of the first block, and deleting all transactions included in the first block in the local transaction pool when verification passes.
Fig. 3 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 3, as another aspect, the present application also provides an apparatus 300 including one or more Central Processing Units (CPUs) 301 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage section 308 into a Random Access Memory (RAM) 303. In the RAM303, various programs and data required for the operation of the device 300 are also stored. The CPU301, ROM302, and RAM303 are connected to each other through a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
The following components are connected to the I/O interface 305: an input section 306 including a keyboard, a mouse, and the like; an output portion 307 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 308 including a hard disk or the like; and a communication section 309 including a network interface card such as a LAN card, a modem, or the like. The communication section 309 performs communication processing via a network such as the internet. The drive 310 is also connected to the I/O interface 305 as needed. A removable medium 311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 310 as needed, so that a computer program read therefrom is installed into the storage section 308 as needed.
In particular, according to embodiments of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 309, and/or installed from the removable medium 311.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be a computer-readable storage medium contained in the apparatus of the above-described embodiment; or may be a computer-readable storage medium, alone, that is not assembled into a device. The computer readable storage medium stores one or more programs for use by one or more processors to perform the methods described herein.
The flowcharts 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 may be implemented by hardware. The described units or modules may also be provided in a processor, for example, each of the units may be a software program provided in a computer or a mobile smart device, or may be separately configured hardware devices. Wherein the names of the units or modules do not in some cases constitute a limitation of the units or modules themselves.
The foregoing description is only of the preferred embodiments of the present application and is presented as a description of the principles of the technology being utilized. It will be appreciated by persons skilled in the art that the scope of the invention referred to in this application is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or their equivalents without departing from the spirit of the application. Such as the above-described features and technical features having similar functions (but not limited to) disclosed in the present application are replaced with each other.

Claims (6)

1. An attack prevention method, the method being applicable to blockchain nodes, the method comprising:
receiving a first data set broadcast by a first block chain node after packaging a first block; the first data set comprises first block header information and a transaction hash list of the first block, the first block header information comprises a first merkel root, the first merkel root is generated according to transaction full hash calculation of each transaction of the first block, and the transaction full hash is generated according to transaction content and signature information of corresponding transactions;
searching each transaction of the first block in a local transaction pool according to the transaction hash list;
calculating a second Meckel root according to the searched transaction full hash of each transaction, and judging whether the second Meckel root and the first Meckel root are identical or not:
if yes, assembling and restoring the first block according to the first data set and each searched transaction;
and if not, requesting the first block from the first block link point.
2. The method of claim 1, wherein the requesting the first block from the first block link point comprises:
requesting the first block from the first block link point;
and verifying the correctness of the first block, and deleting all transactions included in the first block in the local transaction pool when verification passes.
3. An attack prevention method, the method being applicable to blockchain nodes, the method comprising:
packaging a first block and generating a first data set of the first block; the first data set comprises first block header information and a transaction hash list of the first block, the first block header information comprises a first merkel root, the first merkel root is generated according to transaction full hash calculation of each transaction of the first block, and the transaction full hash is generated according to transaction content and signature information of corresponding transactions;
broadcasting the first set of data to other blockchain nodes for other blockchain nodes:
searching each transaction of the first block in a local transaction pool according to the transaction hash list;
calculating a second Meckel root according to the searched transaction full hash of each transaction, and judging whether the second Meckel root and the first Meckel root are identical or not:
if yes, assembling and restoring the first block according to the first data set and each searched transaction;
and if not, requesting the first block from the current node.
4. The method of claim 3, wherein the requesting the first block from the current node comprises:
requesting the first block from a current node;
and verifying the correctness of the first block, and deleting all transactions included in the first block in the local transaction pool when verification passes.
5. An apparatus, the apparatus 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 of any of claims 1-4.
6. 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-4.
CN202010373105.7A 2020-05-06 2020-05-06 Attack prevention method, apparatus and storage medium Active CN111523896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010373105.7A CN111523896B (en) 2020-05-06 2020-05-06 Attack prevention method, apparatus and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010373105.7A CN111523896B (en) 2020-05-06 2020-05-06 Attack prevention method, apparatus and storage medium

Publications (2)

Publication Number Publication Date
CN111523896A CN111523896A (en) 2020-08-11
CN111523896B true CN111523896B (en) 2023-05-30

Family

ID=71912136

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010373105.7A Active CN111523896B (en) 2020-05-06 2020-05-06 Attack prevention method, apparatus and storage medium

Country Status (1)

Country Link
CN (1) CN111523896B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112712366A (en) * 2021-01-11 2021-04-27 杭州复杂美科技有限公司 Block execution method, computer device and storage medium
CN114826801A (en) * 2022-03-03 2022-07-29 杭州复杂美科技有限公司 Block broadcasting method, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017204943A1 (en) * 2016-05-24 2017-11-30 Mastercard International Incorporated Method and system for an efficient consensus mechanism for permissioned blockchains using audit guarantees
CN108667836A (en) * 2018-05-08 2018-10-16 众安信息技术服务有限公司 Block chain common recognition method
CN109033422A (en) * 2018-08-08 2018-12-18 云南天之游科技股份有限公司 A kind of method, apparatus and block chain generating block chain
WO2019093574A1 (en) * 2017-11-10 2019-05-16 부산대학교 산학협력단 Block chain system and method employing hash-based signature scheme
CN110753080A (en) * 2019-08-30 2020-02-04 深圳壹账通智能科技有限公司 Block transmission method, device, equipment and readable storage medium

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107040585B (en) * 2017-02-22 2020-06-19 创新先进技术有限公司 Service checking method and device
US11177961B2 (en) * 2017-12-07 2021-11-16 Nec Corporation Method and system for securely sharing validation information using blockchain technology
CN108108487B (en) * 2018-01-10 2019-11-22 杭州复杂美科技有限公司 A kind of common recognition method of block chain
CN108984662B (en) * 2018-06-28 2021-02-09 杭州复杂美科技有限公司 Block chain data synchronization method
CN109087098A (en) * 2018-07-27 2018-12-25 杭州复杂美科技有限公司 A kind of transaction processing method, system, equipment and storage medium for permitting chain
CN109359222B (en) * 2018-08-06 2021-07-06 杭州复杂美科技有限公司 Data storage method and system, equipment and storage medium
CN109242500B (en) * 2018-09-20 2021-07-02 百度在线网络技术(北京)有限公司 Block chain transaction validity verification method and device and storage medium
CN109345388B (en) * 2018-09-20 2020-09-08 百度在线网络技术(北京)有限公司 Block chain intelligent contract verification method and device and storage medium
GB2577751A (en) * 2018-10-05 2020-04-08 Dragon Infosec Ltd A consensus method and framework for a blockchain system
CN109992998A (en) * 2019-03-31 2019-07-09 杭州复杂美科技有限公司 A kind of information storage means and system, equipment and storage medium
CN110278211B (en) * 2019-06-24 2023-04-07 深圳前海微众银行股份有限公司 Data inspection method and device based on block chain
CN110471795B (en) * 2019-07-31 2020-10-02 阿里巴巴集团控股有限公司 Block chain state data recovery method and device and electronic equipment
CN110784501B (en) * 2019-07-15 2022-02-25 杭州复杂美科技有限公司 Method, system, device and storage medium for packaging and broadcasting transaction group containing block
CN110430067A (en) * 2019-07-15 2019-11-08 杭州复杂美科技有限公司 For reducing method and system, equipment and the storage medium of block repeated broadcast
CN110740033B (en) * 2019-08-19 2022-07-19 杭州云象网络技术有限公司 Block chain multi-party data sharing method based on secret sharing technology
CN110647582B (en) * 2019-09-17 2024-01-02 腾讯科技(深圳)有限公司 Method, device, storage medium and computer equipment for block chain network consensus verification
CN111047441A (en) * 2019-11-16 2020-04-21 北京比特时刻图像科技有限公司 Block chain system for issuing multiple integral certificates
CN110889729B (en) * 2019-11-29 2024-03-26 腾讯科技(深圳)有限公司 Data verification method and device based on blockchain network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017204943A1 (en) * 2016-05-24 2017-11-30 Mastercard International Incorporated Method and system for an efficient consensus mechanism for permissioned blockchains using audit guarantees
WO2019093574A1 (en) * 2017-11-10 2019-05-16 부산대학교 산학협력단 Block chain system and method employing hash-based signature scheme
CN108667836A (en) * 2018-05-08 2018-10-16 众安信息技术服务有限公司 Block chain common recognition method
CN109033422A (en) * 2018-08-08 2018-12-18 云南天之游科技股份有限公司 A kind of method, apparatus and block chain generating block chain
CN110753080A (en) * 2019-08-30 2020-02-04 深圳壹账通智能科技有限公司 Block transmission method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN111523896A (en) 2020-08-11

Similar Documents

Publication Publication Date Title
CN109410045B (en) Parallel chain consensus method, equipment and storage medium
US11237844B2 (en) Method and apparatus for loading kernel module
CN110825479A (en) Page processing method and device, terminal equipment, server and storage medium
CN109508326B (en) Method, device and system for processing data
CN111523896B (en) Attack prevention method, apparatus and storage medium
CN112583811B (en) Wallet finding method, equipment and storage medium
CN111275438B (en) Consensus method, device, equipment and storage medium of block chain network
CN109873863B (en) Asynchronous calling method and device of service
CN111242780A (en) Method, device and storage medium for sending consensus transaction
CN112600664A (en) Delayed transaction generation method, delayed transaction execution device and storage medium
CN110837505A (en) State data storage method, state data synchronization device and storage medium
CN111523897B (en) Anti-attack method, device and storage medium
CN111338834B (en) Data storage method and device
US11487819B2 (en) Threaded leaf nodes in database journal
US20200403797A1 (en) Digest proofs in a journaled database
US20200403800A1 (en) Symmetric function for journaled database proof
CN113704222A (en) Method and device for processing service request
CN111405037A (en) Block synchronization method, device and storage medium
CN108804442B (en) Serial number generation method and device
CN115658171A (en) Method and system for solving dynamic refreshing of java distributed application configuration in lightweight mode
CN110968497A (en) Tree-shaped interceptor-based request verification method, device, medium and electronic equipment
CN111639939A (en) Block restoring method, equipment and storage medium
CN113449039A (en) System and method for processing data of different databases in distributed microservice
CN108491448B (en) Data pushing method and device
CN113225192A (en) Transaction storage method, computer device and storage medium

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