CN111782551A - Test method and device for block chain item and computer equipment - Google Patents

Test method and device for block chain item and computer equipment Download PDF

Info

Publication number
CN111782551A
CN111782551A CN202010772197.6A CN202010772197A CN111782551A CN 111782551 A CN111782551 A CN 111782551A CN 202010772197 A CN202010772197 A CN 202010772197A CN 111782551 A CN111782551 A CN 111782551A
Authority
CN
China
Prior art keywords
test
code
file
proposal message
consensus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010772197.6A
Other languages
Chinese (zh)
Other versions
CN111782551B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010772197.6A priority Critical patent/CN111782551B/en
Publication of CN111782551A publication Critical patent/CN111782551A/en
Application granted granted Critical
Publication of CN111782551B publication Critical patent/CN111782551B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • 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

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Computing Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a testing method, a testing device and computer equipment for a block chain project, wherein the method comprises the following steps: compiling the code data packet injected with the logic codes for simulating the attack scene by the test platform to generate an executable file, and sending the executable file to the target consensus node; in the process of executing the executable file, after executing the instruction corresponding to the logic code, the target consensus node broadcasts a first test proposal message in the blockchain network, and records the consensus result and the execution log related to the first test proposal message into the test file; and the test platform acquires the test file from the target consensus node and analyzes the test result based on the test file. The method and the device for testing the abnormal situation can effectively improve the abnormal testing efficiency and the simulation effect and accuracy of the attack scene.

Description

Test method and device for block chain item and computer equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a testing method for a blockchain item, a testing apparatus for a blockchain item, a computer device, and a computer-readable storage medium.
Background
The block chain is a multi-party common maintenance, transmission and access safety is guaranteed by using cryptography, and a data consistent storage, difficult tampering and repudiation prevention accounting technology, namely a distributed accounting book technology, can be realized.
In the iteration cycle of the blockchain product, a research and development engineer provides a developed blockchain project to a REQ platform (i.e., a software research and development providing process management platform), and then triggers test execution. After completing basic function test on the blockchain item, a tester can further perform an exception test, wherein the exception test mainly tests the robustness of the blockchain item by simulating an attack scene, so as to detect whether the blockchain item is abnormal.
At present, a network packet capturing mode is generally adopted, protocol data are filtered manually, and certain data are tampered, so that the purpose of a mode attack scene is achieved. However, in such a manner, the workload is large, the blockchain protocol data needs to be known in advance, and technical risks of network unpacking, packetization, group packaging and packet encryption exist, so that the problems of poor attack scene simulation effect caused by low abnormal test efficiency and poor data tampering accuracy exist.
Disclosure of Invention
The embodiment of the application provides a testing method and device for a block chain project and computer equipment, which can effectively improve the abnormal testing efficiency and the simulation effect and accuracy of an attack scene.
In a first aspect, an embodiment of the present application provides a testing method for a blockchain item, where the method is performed by a target consensus node in a blockchain network, and the method includes:
acquiring an executable file, wherein the executable file is obtained by compiling a code data packet of a block chain project to be tested, and the code data packet comprises a logic code for simulating an attack scene;
in the process of executing the executable file, after the instruction corresponding to the logic code is executed, broadcasting a first test proposal message in a blockchain network, and recording a consensus result and an execution log related to the first test proposal message into a test file;
when a second test proposal message is received, performing consensus on the second test proposal message, and recording the consensus result and the execution log of the second test proposal message into the test file;
and responding to a file acquisition request, and sending the test file to a test platform so that the test platform analyzes the test result of the block chain item to be tested based on the test file.
In a second aspect, an embodiment of the present application provides another testing method for a blockchain item, where the method includes:
acquiring a code data packet of a block chain project to be tested;
determining a stake inserting point from codes of the code data packet, and injecting logic codes for simulating an attack scene at the stake inserting point;
compiling the code data packet injected into the logic code to generate an executable file, and sending the executable file to a target consensus node in a block chain network;
and activating the attack scenario simulated by the logic code so as to test the blockchain item to be tested in the attack scenario in the process that the target consensus node executes the executable file.
Corresponding to the method in the first aspect, an embodiment of the present application provides a testing apparatus for a blockchain item, where the apparatus includes:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an executable file, the executable file is obtained by compiling a code data packet of a block chain project to be tested, and the code data packet comprises a logic code for simulating an attack scene;
the processing unit is used for triggering the receiving and sending unit to broadcast a first test proposal message in the block chain network after executing the instruction corresponding to the logic code in the process of executing the executable file;
a recording unit for recording the consensus result and the execution log about the first test proposal message into a test file;
the processing unit is further configured to perform consensus on a second test proposal message when the transceiver unit receives the second test proposal message;
the recording unit is further configured to record the consensus result and the execution log about the second test proposal message into the test file;
the processing unit is further configured to respond to a file acquisition request, and trigger the transceiver unit to send the test file to a test platform, so that the test platform analyzes a test result of the to-be-tested blockchain item based on the test file.
In an embodiment, the processing unit is specifically configured to:
in the process of executing the executable file, executing an instruction corresponding to the logic code to construct a false block proposal message; the false block proposal message is used as a first test proposal message, and the transceiver unit is triggered to broadcast the first test proposal message in a block chain network.
In an embodiment, the processing unit is specifically configured to:
executing the instruction corresponding to the logic code to tamper the generated normal block proposal message; and taking the tampered block proposal message as a false block proposal message.
Corresponding to the method in the second aspect, an embodiment of the present application provides another testing apparatus for blockchain items, where the apparatus includes:
the acquisition unit is used for acquiring a code data packet of a block chain item to be tested;
the processing unit is used for determining a peg-inserting point from codes of the code data packet and injecting logic codes for simulating an attack scene at the peg-inserting point;
the processing unit is further configured to compile the code data packet into which the logic code is injected, and generate an executable file;
the receiving and sending unit is used for sending the executable file to a target consensus node in a block chain network;
the processing unit is further configured to activate an attack scenario simulated by the logic code, so that the blockchain item to be tested is tested in the attack scenario in the process that the target consensus node executes the executable file.
In an embodiment, the processing unit is specifically configured to:
determining a first association code associated with a block proposal message from codes of the code data packet; determining a pile inserting point based on the position of the first association code; injecting logic code at the instrumentation point for simulating an attack scenario for constructing a dummy block proposal message.
In an embodiment, the processing unit is specifically configured to:
determining a second association code related to block proposal consensus from the codes of the code data packet; determining a pile inserting point based on the position of the second correlation code; injecting logic code at the instrumentation point for simulating an attack scenario for constructing false consensus data.
In an embodiment, the code packet includes at least one code file, and the processing unit is specifically configured to:
compiling the code file of the logic code injected into the at least one code file to generate an intermediate file; and compiling the code data packet of the block chain item to be tested based on the intermediate file to generate an executable file.
In an embodiment, the processing unit is specifically configured to:
triggering the transceiver unit to send an activation code to the target consensus node, so that the target consensus node triggers activation of the attack scenario simulated by the logic code by running the activation code; or, the activation of the attack scene simulated by the logic code is triggered by modifying the environment variable of the target consensus node.
Accordingly, an embodiment of the present application provides a computer device, including: the system comprises a processor, a communication interface and a memory, wherein the processor, the communication interface and the memory are connected with each other, the memory stores executable program codes, and the processor is used for calling the executable program codes, executing the test method for the blockchain item in the first aspect, or executing the test method for the blockchain item in the second aspect.
Accordingly, the present invention also provides a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to execute the testing method for the blockchain item according to the first aspect or execute the testing method for the blockchain item according to the second aspect.
Accordingly, embodiments of the present application also provide a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and executes the computer instructions to cause the computer device to perform the testing method for blockchain items according to the first aspect or to perform the testing method for blockchain items according to the second aspect.
By adopting the testing method for the blockchain item provided by the embodiment of the application, on one hand, the logic code for simulating the attack scene is injected into the code of the blockchain item to be tested, so that the data can be accurately tampered in the testing process, the simulation accuracy of the attack scene is ensured, and the simulation effect of the attack scene is effectively improved. On the other hand, the automation of the abnormal test of the block chain project can be realized, and the abnormal test efficiency is effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic architecture diagram of a distributed system according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a block according to an embodiment of the present disclosure;
fig. 3 is a block chain network according to an embodiment of the present invention;
fig. 4 is a schematic architecture diagram of another blockchain network provided in an embodiment of the present application;
fig. 5 is a flowchart illustrating a testing method for a blockchain item according to an embodiment of the present disclosure;
FIG. 6 illustrates logic code for simulating an attack scenario;
FIG. 7 illustrates the compiled intermediate file contents of a code file that injects the logic code shown in FIG. 6;
fig. 8 is a flowchart illustrating another testing method for blockchain items according to an embodiment of the present application;
FIG. 9 illustrates an exception test flow;
FIG. 10 illustrates another exception test flow;
FIG. 11 is a flowchart illustrating another testing method for blockchain items according to an embodiment of the present disclosure;
FIG. 12 is a block chain test apparatus according to an embodiment of the present disclosure;
FIG. 13 is a block chain test apparatus according to another embodiment of the present invention;
fig. 14 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
First, some key terms referred to in the embodiments of the present application are described:
accounting node: and also calls out block nodes and master nodes (Leader nodes). In a block chain application scene, in each packing period, a node needing accounting packs a plurality of transaction lists into a block structure and broadcasts the block structure to other nodes in a block chain network for consensus; the accounting node is the node that generates the block and initiates the block proposal.
And (3) BFT consensus: namely the byzantine fault-tolerant consensus. The Byzantine fault-tolerant technology is a fault-tolerant technology in the field of distributed computing, and if a distributed system is assumed to have n nodes, and if the number of Byzantine nodes in the whole distributed system is not more than m (n is more than or equal to 3m +1), the whole distributed system can normally operate, namely n/3 nodes are allowed to be abnormal.
And (3) block proposal: at the beginning of the life cycle of the block chain, the accounting node scans the transaction pool of the current node, when the transaction pool list is not empty, the block proposal is triggered to be generated, and a block proposal message is generated based on the block proposal. The block proposal message includes a block height, a block header, a merkle root, transaction data (such as a transaction list), and the like, and is broadcast to other nodes in the blockchain network to complete the BFT consensus.
P2P network: the node in the peer-to-peer network can be a client or a server. That is, each computer in the network can both act as a requester of network services and provide resources, services and content in response to requests from other computers.
FailPoint: the method is a Golang implementation of FreeBSD failpoints, can inject errors or abnormal behaviors into codes, and is used for simulating error processing in various complex systems to improve the fault tolerance, the correctness and the stability of the systems.
REQ, a software development and testing process management platform, which manages software version development, testing, defect submission, regression testing and releasing of the whole life cycle.
With the coming of the scientific and technological era and the development of the mobile internet, the pace of network revolution is getting faster and faster, the information fusion of the same field or multiple fields is realized, and the process of providing an all-dimensional informatization scheme for customers also faces new challenges of improving the system structure, supporting gravity center transfer and the like. Therefore, the blockchain technology, as a specific implementation of the distributed ledger, is gradually becoming the preferred way to store data and transaction data in various fields by virtue of its natural advantages of storing and managing data.
A blockchain network is a distributed system that may be formed by a plurality of nodes connected in a network communication. The node may be any computing device in the access network, such as a server, a terminal, and other computing devices. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and a big data and artificial intelligence platform. The terminal may be a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The nodes may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
Referring to fig. 1, an alternative architecture diagram of the distributed system applied to the blockchain network is shown. The blockchain network is formed by a plurality of nodes, a point-To-point (P2P, Peer To Peer) network is formed among the nodes, and the P2P Protocol is an application layer Protocol operating on a Transmission Control Protocol (TCP). In a blockchain network, any machine such as a server or a terminal can be added to become a node, and the node comprises a hardware layer, a middle layer, an operating system layer and an application layer.
Referring to the functions of each node in the blockchain network shown in fig. 1, the functions involved include:
1) routing, a basic function that a node has, is used to support communication between nodes.
Besides the routing function, the node may also have the following functions:
2) the Block chain comprises a series of blocks (blocks) which are connected with each other according to the generated chronological order, new blocks cannot be removed once being added into the Block chain, and recorded data submitted by nodes in the Block chain network, such as transaction data and the like, are recorded in the blocks.
Referring to fig. 2, which is an optional schematic diagram of a Block Structure (Block Structure) provided in the embodiment of the present application, each Block includes a hash value of a data record stored in the Block (hash value of the Block) and a hash value of a previous Block, and the blocks are connected by the hash values to form a Block chain (Block chain). The block may include information such as a time stamp at the time of block generation. A blockchain, which is essentially a decentralized database, is a string of data blocks associated using cryptography, each data block containing relevant information for verifying the validity of the information (anti-counterfeiting) and generating the next block.
3) The application is used for being deployed in a block chain, realizing specific services according to actual service requirements, recording data related to the realization function to form recording data, carrying a digital signature in the recording data to represent a source of task data, and sending the recording data to other nodes in the block chain network, so that the other nodes add the recording data to a temporary block when the source and integrity of the recording data are verified successfully.
For example, the services implemented by the application include:
and 3.1) the wallet is used for providing a function of carrying out transaction of virtual resources, and the function comprises initiating transaction, namely, sending the transaction record of the current transaction to other nodes in the block chain network, and storing the record data of the transaction into a temporary block of the block chain as a response for confirming that the transaction is valid after the other nodes are successfully verified.
And 3.2) sharing the account book, wherein the shared account book is used for providing functions of operations such as storage, inquiry and modification of account data, the recorded data of the operations on the account data are sent to other nodes in the block chain network, and after the other nodes verify the validity, the recorded data are stored in the temporary block as a response for acknowledging that the account data are valid, and confirmation can be sent to the node initiating the operations.
3.3) Intelligent contracts, computerized agreements, which can execute the terms of a certain contract, are realized by codes deployed on a shared book for execution when certain conditions are met, and are used for completing automated transactions according to actual business requirement codes, such as querying the logistics state of goods purchased by buyers, and transferring virtual resources of the buyers to the addresses of merchants after the buyers sign for goods; of course, smart contracts are not limited to executing contracts for trading, but may also execute contracts that process received information.
4) And the consensus is used for solving and ensuring the consistency and correctness of each transaction or data on all accounting nodes. The consensus mechanism of blockchains is the way to determine a certain consensus and maintain consensus. The consensus mechanism of the block chain enables the block chain to still cooperate and complete the operation efficiently in a large scale without depending on centralized organization.
Fig. 3 is a schematic diagram of a block chain network according to an embodiment of the present disclosure. As shown in fig. 3, the nodes in the block chain network may include terminal devices corresponding to banks, insurance companies, government buildings, shops, schools, hospitals, and the like. The terminal devices corresponding to the bank, the insurance company, the government building, the shop, the school and the hospital all participate in the management and the processing of the same block chain network, and also participate in the monitoring of the legality of the transaction so as to achieve the fairness of the block chain network in processing or storing the transaction data. Meanwhile, the bank, the insurance company, the government building, the shop, the school and the hospital belong to different fields, and the quality and the efficiency of social work can be better improved through information fusion and interaction in the different fields. Any node in the blockchain network can check the acquired transaction data, and when the check result is that the check is successful, a block can be generated based on the transaction data and issued to the blockchain, so that other terminal devices in the blockchain network can perform distributed storage on the block. And each terminal device can perform distributed storage on the block after the block consensus passes. For example, as shown in fig. 3, the nodes in the block chain network may include terminal devices corresponding to banks, insurance companies, government buildings, shops, schools, and hospitals, and the terminal devices corresponding to the banks, insurance companies, government buildings, shops, schools, and hospitals may store the identity information of the same user a in a distributed manner, so that the user a to any institution may query the identity information of the user a.
The life cycle of the blockchain is as follows: 1. the client sends the transaction to the node, which broadcasts the transaction to other nodes in the blockchain network through the P2P network. 2. And randomly selecting the accounting node by using a consensus mechanism. 3. The accounting node packs and assembles a plurality of transaction lists into a block structure to generate a block proposal, generates a block proposal message based on the block proposal, and then broadcasts the block proposal message to other nodes; if the transaction list is empty, the transaction list is packed into an empty block and broadcasted. 4. After receiving the block proposal message, other nodes verify the transactions contained in the block carried by the other nodes, and broadcast voting information for the corresponding block proposal based on the verification result. 5. After the BFT consensus is achieved for the block, the block is committed to the blockchain storage layer and the next round of election and consensus begins.
In a typical BFT consensus-based blockchain network, a transaction list of a transaction pool is loaded by an accounting node, and after a blockchain proposal is constructed, the blockchain proposal is broadcast to other nodes in the blockchain network. And the other nodes verify after receiving the block proposal, and can approve the ticket or disapprove the ticket according to the verification result. Each node collects voting information of the block proposal and verifies whether the number of votes for the block proposal is greater than or equal to 2/3; if the number of the nodes is greater than or equal to 2/3, submitting the corresponding blocks to the block chain stored by the node; if the number of nodes is less than 2/3, the blockchain network does not complete BFT consensus, the blockchain network runs abnormally, and blocks. When the blockchain network is in an unsafe state of man-in-the-middle attack, false block proposal information or false voting information can be constructed, and further the consensus state is influenced. The traditional exception test for the blockchain item generally adopts a network packet capturing mode, and manually filters protocol data and tampers some data (such as constructing false blockproposal information), so as to achieve the purpose of a modular attack scene. However, in such a manner, the workload is large, the blockchain protocol data needs to be known in advance, and technical risks of network unpacking, packetization, group packaging and packet encryption exist, so that the problems of poor attack scene simulation effect caused by low abnormal test efficiency and poor data tampering accuracy exist.
Based on this, the embodiment of the application provides a testing method for a block chain project, so as to realize automation of an abnormal test of the block chain project, thereby effectively improving the efficiency of the abnormal test; the data are accurately tampered through the logic codes for simulating the attack scene, so that the simulation effect of the attack scene is effectively improved. Fig. 4 shows a system architecture to which the testing method for the blockchain item is applied. The system comprises a test platform and a block chain network, wherein the block chain network comprises a plurality of common nodes. The testing platform obtains a code data packet of a block chain project to be tested, determines a pile inserting point from codes of the code data packet, and injects logic codes for simulating an attack scene into the pile inserting point; then, compiling is performed on the code data packet injected into the logic code, an executable file is generated, and the executable file is sent to target consensus nodes in the block chain network, such as consensus nodes a and B in fig. 4. And the target consensus node receives the executable file sent by the test platform, and executes a corresponding attack task in the process of executing the executable file and under the condition that the attack scene simulated by the logic code is activated, so as to perform exception test on the block chain item to be tested. In the testing process, the target consensus node records consensus results and execution logs related to the block proposal messages, and generates a test file. The test platform obtains a test file generated by the target consensus node, and analyzes a test result of the to-be-tested block chain item based on the test file.
The common node is a node having a block extracting function and a common function in the blockchain network, and may be a full node storing a complete blockchain in the blockchain network. The common nodes in the blockchain network can be divided into a master node and a slave node, wherein the master node is the common node responsible for the block (namely, the accounting block) at the current stage, and the slave node is the common node except the master node in the blockchain network. The test platform may be a REQ platform.
The main steps of the test method for the blockchain item are introduced above, and the detailed description of the steps of the test method for the blockchain item is described below.
Please refer to fig. 5, which is a flowchart illustrating a testing method for a blockchain item according to an embodiment of the present application. The testing method described in the embodiments of the present application is executed by a testing platform, and includes, but is not limited to, the following steps:
s501, obtaining a code data packet of the block chain item to be tested. The code data packet comprises codes for realizing various functions of the blockchain item to be tested, and the codes for realizing different functions can be stored in different code files of the code data packet.
S502, determining a peg point from the code of the code data packet, and injecting a logic code for simulating an attack scene at the peg point.
In the embodiment of the application, the test platform can display the codes in the code data packet, determine the instrumentation point and inject logic codes for simulating the attack scene at the instrumentation point based on the input operation of a tester for the displayed codes. The test platform can also automatically determine a peg point from the code of the code data packet and inject logic code for simulating the attack scenario at the peg point based on preset code injection rules and the attack scenario to be simulated. The simulated attack scenario may be an attack scenario related to the block proposal message, an attack scenario related to the block proposal consensus, or the like.
In an embodiment, when the simulated attack scenario is an attack scenario related to the block proposal message, the way for the test platform to automatically determine the instrumentation point and automatically inject the logic code at the instrumentation point may be: determining a first associated code associated with the block proposal message from the codes of the code data packet, for example a code for constructing a block proposal or broadcasting a block proposal message; determining a stake inserting point based on the position of the first associated code, for example, determining a next code line of the first associated code as the stake inserting point; logic code for simulating an attack scenario associated with the block proposal message is then injected at the instrumented point. Wherein the attack scenario associated with the block proposal message comprises constructing a false block proposal message. Constructing the dummy block proposal message includes "tampering with the normal block proposal message" or "directly generating a dummy block proposal message".
For example, as shown in fig. 6, if the code "proposal:" csi. constrained proposal (height, round, level) "in the dashed box is the code for constructing the block proposal, then the logic code for simulating the attack scenario related to the block proposal message may be injected in the next code line of the code, and the injected logic code includes the code in the solid box in fig. 6. The logic code in the solid box is as follows:
Figure BDA0002617058810000111
the logic code is operable to null block data (e.g., transaction data) prior to broadcasting the block proposal message. Based on the logic code, the block proposal message can be tampered, so that the simulation of an attack scene for constructing the false block proposal message is realized.
In another embodiment, when the simulated attack scenario is an attack scenario related to block proposal consensus, the way for the test platform to automatically determine the instrumentation point and automatically inject the logic code at the instrumentation point may be: determining a second association code associated with the block proposal consensus from the codes of the code data packet, for example, a code for generating consensus data about the block proposal or broadcasting the consensus data; determining a peg inserting point based on the position of the second associated code, for example, determining a next code line of the second associated code as the peg inserting point; logic code for simulating an attack scenario associated with block proposal consensus is then injected at the instrumented point. Wherein the attack scenario related to block proposal consensus comprises constructing false consensus data. Constructing false consensus data includes "tampering with correct consensus data" or "directly generating a false consensus data".
In a possible implementation, the test platform may inject logic code for simulating an attack scenario at the instrumentation point based on the fault simulation tool FailPoint.
By injecting the logic code for simulating the attack scene into the code of the block chain item to be tested, accurate data tampering is realized by executing the instruction corresponding to the logic code, so that the simulation accuracy of the attack scene is ensured, and the simulation effect of the attack scene is effectively improved.
S503, compiling the code data packet injected with the logic code to generate an executable file.
In a possible embodiment, the code data packet of the blockchain item to be tested includes at least one code file, codes in the respective code files are used for implementing different functions, and logic codes for simulating an attack scenario may be injected into codes of some code files. The test platform compiles the code file which is injected with the logic code in the at least one code file to generate an intermediate file. As shown in fig. 7, the intermediate file corresponding to the code file into which the logic code shown in fig. 6 is injected is a part of the content. And compiling the code data packet of the block chain project to be tested based on the generated intermediate file to generate an executable file. The executable file may be a binary file.
S504, the executable file is sent to a target consensus node in the block chain network.
In the embodiment of the present application, the target consensus node may be one or more. The test platform can determine the number of the target consensus nodes according to different BFT consensus scenes and the total number of the consensus nodes in the blockchain network, and then determine the corresponding number of the consensus nodes from the blockchain network as the target consensus nodes. For example, the BFT consensus scenario to be implemented is that the consensus nodes exceeding 2/3 in the blockchain network are byzantine nodes, and there are 12 consensus nodes in the blockchain network; then 9 or 10 consensus nodes can be selected from them as target consensus nodes. If the BFT consensus scene to be realized is that the consensus nodes less than 2/3 in the block chain network are Byzantine nodes, 3 or 4 consensus nodes can be selected as target consensus nodes. Based on the above, a plurality of BFT common recognition scenes such as the Byzantine node number of 'more than 2/3 node number', 'equal 2/3 node number', 'less than 2/3 node number' and the like can be covered.
In a possible implementation manner, the test platform may also take the selected consensus node as the target consensus node based on a selection operation of the tester on the consensus node.
After determining each target consensus node, the test platform distributes the executable file to each target consensus node.
And S505, activating the attack scenario simulated by the logic code, so as to test the blockchain item to be tested in the attack scenario in the process that the target consensus node executes the executable file.
In the embodiment of the application, the test platform may send the activation code to the target consensus node, so that the target consensus node triggers activation of the attack scenario simulated by the logic code by running the activation code. Or the test platform can trigger the activation of the attack scenario simulated by the logic code by modifying the environment variable of the target consensus node. In a possible implementation manner, the test platform may activate the attack scenario simulated by the logic code after the target consensus node receives the executable file and before the executable file is executed; the attack scenario simulated by the logic code can also be activated during the execution of the executable file by the target consensus node.
The test platform triggers execution of normal use cases (e.g., transaction data records, block generation, block chaining, etc.) in the blockchain project to be tested, so as to execute the normal use cases in the blockchain network. In the process, the consensus node executes the executable file to complete the corresponding normal task. And in the process of executing the executable file and under the condition that the attack scene simulated by the logic code is activated, the target consensus node executes a corresponding attack task, so that the abnormal test of the block chain item to be tested is realized. In the abnormal test process, the target consensus node records consensus results and execution logs related to the block proposal messages, and generates a test file. The test platform obtains a test file generated by the target consensus node, and analyzes a test result of the to-be-tested block chain item based on the test file.
By adopting the mode, on one hand, the logic code for simulating the attack scene is injected into the code of the block chain item to be tested, so that the data can be accurately tampered in the test process, the simulation accuracy of the attack scene is ensured, and the simulation effect of the attack scene is effectively improved. On the other hand, the automation of the abnormal test of the block chain project can be realized, and the abnormal test efficiency is effectively improved.
The above embodiments mainly describe a generation manner of an executable file related to the test method, and a detailed description is given below of a test application scenario related to the test method.
Please refer to fig. 8, which is a flowchart illustrating another testing method for a blockchain item according to an embodiment of the present application. The testing method described in the embodiment of the present application is executed by a target consensus node in a blockchain network that receives an executable file sent by a testing platform, and performs an anomaly test in a simulated attack scenario of "constructing a false blockchain proposal message" for a blockchain item to be tested, including, but not limited to, the following steps:
s801, obtaining an executable file.
In the embodiment of the application, the target consensus node receives the executable file sent by the test platform. The executable file is obtained by compiling a code data packet of a block chain item to be tested by the test platform, wherein the code data packet comprises a logic code for simulating an attack scene. The attack scenario simulated by the logic code may be an attack scenario related to a block proposal message, including constructing a false block proposal message. Constructing the dummy block proposal message includes "tampering with the normal block proposal message" or "directly generating a dummy block proposal message".
S802, in the process of executing the executable file, after the instruction corresponding to the logic code is executed, broadcasting a first test proposal message in the block chain network.
In the embodiment of the application, in the process of executing the normal use case of the blockchain item to be tested by the blockchain network, the target consensus node completes the corresponding normal task by executing the executable file. In the process of executing the executable file and under the condition that the attack scene simulated by the logic code is activated, when the target consensus node is elected as a main node (namely, a block-out node or a billing node) in the current stage, the target consensus node executes an instruction corresponding to the logic code and then broadcasts a first test proposal message in the blockchain network. The first test proposal message is a dummy block proposal message.
Specifically, the target consensus node constructs a false block proposal message by executing an instruction corresponding to the logic code; the constructed dummy block proposal message is used as a first test proposal message and is broadcast in a block chain network.
In an embodiment, the target consensus node performs tampering on the normal block proposal message generated by the target consensus node as the master node by executing the instruction corresponding to the logic code, where the tampering includes tampering transaction data (such as a transaction list) carried by a block in the block proposal message, for example, emptying the transaction data carried by the block, and so on. Further, the target consensus node takes the tampered block proposal message as a false block proposal message and broadcasts the false block proposal message in the block chain network, so that other consensus nodes in the block chain network can agree on the block proposal corresponding to the false block proposal message. In this way, the block proposal message can be accurately tampered by the logic code for simulating the attack scene of 'constructing the false block proposal message', so that the simulation of the attack scene of 'tampering the block proposal message' is accurately realized.
In another embodiment, the target consensus node directly generates a false block proposal message by executing the instruction corresponding to the logic code, wherein one or more of the block height, the block head, the merkle root, the transaction data and the block generation time included in the false block proposal message can be constructed false data. Further, the target consensus node broadcasts the generated false block proposal message to the block chain network, so that other consensus nodes in the block chain network perform consensus on the block proposal corresponding to the false block proposal message.
And S803, recording the consensus result and the execution log about the first test proposal message into a test file.
In the embodiment of the present application, consensus data generated by consensus of each consensus node in the collection block chain network on a block proposal corresponding to the first test proposal message includes voting information for the block proposal, where the voting information includes a vote casting a vote or a vote casting a vote. Determining a final consensus result about the block proposal corresponding to the first test proposal message based on the collected consensus data, wherein the consensus result is a pass consensus when a predetermined proportion (e.g. 2/3) of consensus nodes vote; otherwise, the consensus result is failed. An execution log is obtained about the first test proposal message, the execution log being used to record information such as a plurality of execution steps related to the first test proposal message and executors of the respective steps, e.g., when the first test proposal message is generated by the consensus node M, when the first test proposal message is broadcast by the consensus node M, etc. Further, the consensus result and the execution log with respect to the first test proposal message are recorded into a test file.
S804, when the second test proposal message is received, the second test proposal message is identified.
In this embodiment, the second test proposal message is a normal or false block proposal message sent by other consensus nodes in the block chain network. When receiving a second test proposal message sent by other consensus nodes in the blockchain network, the target consensus node performs consensus on the blockchain proposal corresponding to the second test proposal message, and generates consensus data according to a consensus result. When the consensus result is agreement, the voting information in the consensus data is a vote for approval; when the consensus result is disagreement, the voting information in the consensus data is a vote for objection. Further, the consensus data generated by the target consensus node performing consensus on the second test proposal message is broadcasted in the blockchain network, so that the consensus nodes in the blockchain network determine the consensus result of the blockchain proposal corresponding to the second test proposal message based on the consensus data generated by the consensus nodes performing consensus on the second test proposal message.
And S805, recording the consensus result and the execution log of the second test proposal message into the test file.
In the embodiment of the application, consensus data generated by consensus of all consensus nodes in the blockchain network on the blockproposal corresponding to the second test proposal is collected, and a final consensus result of the blockproposal corresponding to the second test proposal message is determined based on the collected consensus data. An execution log is acquired about the second test proposal message, the execution log being used to record information such as a plurality of execution steps related to the second test proposal message and executors of the respective steps, e.g., when the second test proposal message is generated by the consensus node N, when the second test proposal message is broadcast by the consensus node N, etc. Further, the consensus result and the execution log on the second test proposal message are recorded into a test file.
It should be noted that steps S802 and S803 and steps S804 and S805 may be performed alternately.
S806, responding to the file acquisition request, and sending the test file to a test platform, so that the test platform analyzes the test result of the block chain item to be tested based on the test file.
In the embodiment of the application, after receiving a file acquisition request sent by a test platform, a target consensus node responds to the file acquisition request and sends a stored test file to the test platform. In a feasible implementation manner, after the target consensus node records the consensus result and the execution log of the new test proposal message to the test file, the test file with the updated data is automatically sent to the test platform.
And the test platform analyzes the test result of the block chain item to be tested based on the test file. For example, the consensus node X is a target consensus node in the blockchain network that receives an executable file sent by the test platform, and since the test proposal message broadcast by the consensus node X when serving as the master node is a false blockchain proposal message, when the blockchain project to be tested has no other abnormality, the consensus result about the test proposal message should be failed. If the consensus result of the test proposal message obtained by analyzing the test file is passed, the block chain item to be tested has other exceptions. For another example, when the consensus result of the test proposal message broadcasted by a certain consensus node is failed, the certain consensus node may be considered as an attack node (or a byzantine node), and the consensus data of the certain consensus node for the block proposal message needs to be discarded when determining the consensus result. Analyzing a BFT consensus state of the block chain network, and when a simulated BFT consensus scene does not meet the fault-tolerant node of the BFT, if 4 consensus nodes, 2 normal nodes and 2 attack nodes exist in total, the BFT does not meet the condition that the number of the normal nodes is larger than the number of 2/3 nodes; at this time, if the block chain item to be tested has no other abnormality, the consensus is not achieved for a certain block proposal message, and an error message should be returned. But if the consensus is reached for the block proposal message according to the analysis of the test file, it indicates that there are other exceptions in the block chain project to be tested.
By adopting the mode, on one hand, the automation of the block chain project exception test can be realized, and the exception test efficiency is effectively improved. On the other hand, by injecting the logic code for simulating the attack scene of 'constructing the false block proposal message' into the code of the block chain item to be tested, the false block proposal message can be automatically constructed and broadcast in the test process, thereby ensuring the simulation accuracy of the attack scene of 'constructing the false block proposal message' and effectively improving the simulation effect of the attack scene.
For a better understanding of the above described testing methods, some specific steps and implementations involved in the actual testing process are exemplified below.
In the iteration cycle of the blockchain product, a research and development engineer provides a developed blockchain project to a REQ platform (i.e., a software research and development providing process management platform), and then triggers test execution. After completing basic function test on the blockchain item, a tester can further perform an exception test, wherein the exception test mainly tests the robustness of the blockchain item by simulating an attack scene, so as to detect whether the blockchain item is abnormal. The simulated attack scenario for the "tampered block proposal message (or tampered block proposal)" in the "constructed false block proposal message" can be exception-tested by using the flow shown in fig. 9 or fig. 10, where fig. 10 also shows some other steps related to the testing flow. As shown in fig. 9 or fig. 10, the test flow of the automated test platform to the block chain item to be tested is as follows:
1. pulling a project of the block chain item to be tested from a distributed version control system Git, analyzing a source code of the block chain item to be tested, and importing the source code into FailPoint; injecting FailPoint-inject instrumentation points to the code needing to simulate the 'tampering block proposal message', and injecting the 'tampering block proposal message' attack (or exception) at the instrumentation points, for example, as shown in FIG. 6. The block proposal can be accurately tampered by attack (exception) injection. Enabling the enable to generate the intermediate file, and specifically activating the FailPoint code through the activation instruction to generate the intermediate file. For example, as shown in fig. 7, a part of the content included in the generated intermediate file includes an activation instruction:
$GOPATH/src/github.com/pingcap/failpoint/bin/failpoint-ctl enable
in some scenarios, the intermediate file may be cleared through a clear instruction, for example:
$GOPATH/src/github.com/pingcap/failpoint/bin/failpoint-ctl disable
2. and automatically compiling the project of the block chain item to be tested based on the codes of the intermediate files to generate an executable file, wherein the executable file is a binary file.
3. Submitting related parameters issued by the executable file, for example, if a single node 'tampering block proposal message' is selected for execution, machine information of the single node needs to be submitted; if multi-node execution is selected, machine information of the multi-node needs to be configured. The multi-node implementation can simulate various BFT consensus scenarios, such as a Byzantine node number "greater than 2/3 node number", "equal to 2/3 node number", "less than 2/3 node number", and the like. And issuing the executable file to each node according to the BFT consensus scene needing to be simulated.
4. The activation of the attack scenario is triggered, and the activation of the "tamper block proposal message" scenario can be triggered in a manner of modifying an environment variable or a code-driven manner. The activation instruction is, for example:
GO_FAILPOINTS="github.com/package/proposal_nil_error=return(true)"nohup./yourproject&
wherein, the package is the package name of the file of the code for simulating the attack, the proposal _ nil _ error is the failure name of the "tampered block proposal message", and the youmprject is the executable file of the block chain item to be tested.
5. Triggering the execution of a normal case of a block chain item to be tested on an automatic test platform, and triggering each node to execute an executable file issued by the test platform in the execution process so as to simulate an attack scene of tampering a block proposal message, and carrying out abnormal test on the block chain item to be tested in the simulated attack scene; and in the test process, the execution log is recorded under the specified directory, so that subsequent query is facilitated.
6. And the automatic test platform analyzes the execution result of the case and analyzes whether the BFT consensus is met. For example, if a single-node man-in-the-middle attack of 'tampering with a block proposal message' is simulated, the node a is bad, but the BFT consensus mechanism allows a fault-tolerant node in the block chain network composed of 4 nodes, so that the whole block chain service still operates normally, and the case execution is normal. However, if the simulation nodes a and B simultaneously execute the "tamper block proposal message" attack, the BFT consensus is not satisfied, and finally the entire blockchain network is unavailable, the use case execution fails, and the blockchain enters a blocking state.
7. And the automatic test platform generates a corresponding test result by combining the analyzed case execution result and the actual case execution result in the abnormal test process determined based on the execution log. If the two are consistent, the abnormal test of the block chain item to be tested is passed, and if the two are not consistent, the abnormal test of the block chain item to be tested is not passed, so that some problems need to be solved. In a possible implementation manner, the automated testing platform may further generate a corresponding test report in combination with the execution log, so as to facilitate a tester to locate the problem.
The test method is that in the test stage, a code pile inserting point which needs to simulate the 'tampered block proposal message' is defined, the code is automatically scanned, and the 'tampered block proposal message' logic is dynamically inserted based on FailPoint. Including various tamper logic such as: constructing an illegal proposal; constructing a proposal of a man-in-the-middle, namely changing the signature of the initiator, wherein the proposal content is not changed; tampering the proposal content and modifying the transaction data; and so on. Then, automatically compiling the project of the block chain item to be tested, and triggering the activation of an attack scene of tampering the block proposal message by adopting a code-driven or environment variable-driven method; under the drive of the block chain automation use case, the influence range of tampering the block proposal message on the block chain BFT consensus is automatically detected. The method has no invasion to the source code, automatic compiling and deployment can cover a plurality of BFT common recognition scenes of Byzantine node number, such as 'more than 2/3 node number', 'equal to 2/3 node number' and 'less than 2/3 node number', and the like, and has the advantages of high automation degree, strong expansibility, no need of intervention of developers and the like.
Please refer to fig. 11, which is a flowchart illustrating another testing method for a blockchain item according to an embodiment of the present application. The testing method described in the embodiment of the present application is executed by a target consensus node in a blockchain network that receives an executable file sent by a testing platform, and performs an anomaly test on a blockchain item to be tested in a simulated attack scenario of "constructing false consensus data", including but not limited to the following steps:
s1101, obtaining an executable file, and executing the executable file.
In the embodiment of the application, the target consensus node receives the executable file sent by the test platform. The executable file is obtained by compiling a code data packet of a block chain item to be tested by the test platform, wherein the code data packet comprises a logic code for simulating an attack scene. The attack scenario simulated by the logic code may be an attack scenario related to block proposal consensus, including constructing false consensus data. Constructing false consensus data includes "tampering with correct consensus data" or "directly generating a false consensus data". And in the process of executing the normal use case of the blockchain item to be tested by the blockchain network, the target consensus node completes the corresponding normal task by executing the executable file.
S1102, broadcasting a first test proposal message in the block chain network.
In the embodiment of the present application, in the process of executing the executable file, when the target consensus node is elected as the main node (i.e. the out-block node or the accounting node) of the current stage, the target consensus node broadcasts the first test proposal message in the blockchain network. The first test proposal message is a normal block proposal message generated by the target consensus node as the master node.
And S1103, recording the consensus result and the execution log about the first test proposal message into a test file.
In the embodiment of the application, consensus data generated by consensus of all consensus nodes in the blockchain network on the blockproposal corresponding to the first test proposal message is collected, and a consensus result of the blockproposal corresponding to the first test proposal message is determined based on the collected consensus data. An execution log is obtained about the first test proposal message, the execution log being used to record information such as a plurality of execution steps related to the first test proposal message and executors of the respective steps, e.g., when the first test proposal message is generated by the consensus node M, when the first test proposal message is broadcast by the consensus node M, etc. Further, the consensus result and the execution log with respect to the first test proposal message are recorded into a test file.
S1104, when a second test proposal message is received, after the instruction corresponding to the logic code is executed, the consensus data about the second test proposal message is broadcasted in the block chain network.
In the embodiment of the present application, in the process of executing the executable file and under the condition that the attack scenario simulated by the logic code is activated, when a second test proposal message (i.e., a block proposal message) sent by other consensus nodes in the blockchain network is received, after the target consensus node executes an instruction corresponding to the logic code, consensus data about the second test proposal message is broadcast in the blockchain network. The broadcasted consensus data is false consensus data about the second test proposal message.
Specifically, the target consensus node constructs false consensus data by executing the instruction corresponding to the logic code; and broadcasting the constructed false consensus data into the blockchain network so that the consensus nodes in the blockchain network determine a final consensus result of the blockchain proposal corresponding to the second test proposal message based on the consensus data about the second test proposal message broadcast by each consensus node.
In one embodiment, correct consensus data generated by the target consensus node performing consensus on the block proposal corresponding to the second test proposal message is obtained, and the correct consensus data is tampered by executing the instruction corresponding to the logic code, wherein the voting information in the correct consensus data is null or changed into a vote of an opposite type (for example, the vote of approval is changed into the vote of disapproval), and the like. The tampered consensus data is constructed false consensus data. In the mode, the consensus data can be accurately tampered through the logic codes for simulating the attack scene of 'constructing the false consensus data', so that the simulation of the attack scene of 'tampering the consensus data' is accurately realized.
In another embodiment, the target consensus node executes the instruction corresponding to the logic code to directly generate false consensus data about the second test proposal message, where one or more of voting information, consensus data generation time, information related to the second test proposal message (such as receiving time, identification of the consensus node generating the second test proposal message, etc.) may be constructed false data.
S1105, recording the consensus result and the execution log of the second test proposal message into a test file.
In the embodiment of the application, consensus data generated by consensus of all consensus nodes in the blockchain network on the blockproposal corresponding to the second test proposal is collected, and a final consensus result of the blockproposal corresponding to the second test proposal message is determined based on the collected consensus data. An execution log about the second test proposal message is acquired, and the execution log is used for recording a plurality of execution steps related to the second test proposal message, and information such as executors of the steps, for example, approval tickets of the consensus node Y to be submitted for the block proposal corresponding to the second test proposal message, when the consensus node Y broadcasts consensus data about the second test proposal message, and the like. Further, the consensus result and the execution log on the second test proposal message are recorded into a test file.
It should be noted that steps S1102 and S1103 and steps S1104 and S1105 may be performed alternately.
S1106, responding to the file acquisition request, and sending the test file to a test platform, so that the test platform analyzes the test result of the block chain item to be tested based on the test file.
In the embodiment of the application, after receiving a file acquisition request sent by a test platform, a target consensus node responds to the file acquisition request and sends a stored test file to the test platform. In a feasible implementation manner, after the target consensus node records the consensus result and the execution log of the new test proposal message to the test file, the test file with the updated data is automatically sent to the test platform.
And the test platform analyzes the test result of the block chain item to be tested based on the test file. For example, the consensus node Y is a target consensus node in the block chain network that receives an executable file sent by the test platform, and since the consensus data of the block proposal initiated by the consensus node Y for other consensus nodes is false consensus data, when there is no other abnormality in the block chain project to be tested and the final consensus result for the block proposal initiated by the consensus node Z is passed, the voting information of the block proposal initiated by the consensus node Y for the consensus node Z should be null or a negative vote. And if the voting information of the block proposal initiated by the consensus node Y aiming at the consensus node Z is obtained through analysis according to the test file and is a vote casting, indicating that the block chain project to be tested is abnormal. For another example, when the simulated BFT consensus scene does not satisfy the fault-tolerant nodes of BFT, if there are 4 consensus nodes, 2 normal nodes, and 2 attack nodes in total, the BFT does not satisfy the condition that the number of normal nodes "is greater than the number of 2/3 nodes"; at this time, if the block chain item to be tested has no other abnormality, the block proposal initiated by any common identification node can not achieve common identification, and error information should be returned. But if the consensus is achieved for the block proposal according to the analysis of the test file, the other abnormity exists in the block chain project to be tested.
By adopting the mode, on one hand, the automation of the block chain project exception test can be realized, and the exception test efficiency is effectively improved. On the other hand, by injecting the logic code for simulating the attack scene of 'constructing the false consensus data' into the code of the block chain item to be tested, the false consensus data can be automatically constructed and broadcast in the test process, so that the simulation accuracy of the attack scene of 'constructing the false consensus data' is ensured, and the simulation effect of the attack scene is effectively improved.
Please refer to fig. 12, which is a block chain test apparatus according to an embodiment of the present disclosure. The apparatus described in the embodiment of the present application, corresponding to the target consensus node described above, includes:
an obtaining unit 1201, configured to obtain an executable file, where the executable file is obtained by compiling a code data packet of a block chain item to be tested, and the code data packet includes a logic code for simulating an attack scenario;
a processing unit 1202, configured to trigger the transceiver unit 1203 to broadcast a first test proposal message in the blockchain network after executing the instruction corresponding to the logic code in the process of executing the executable file;
a recording unit 1204, configured to record the consensus result and the execution log about the first test proposal message into a test file;
the processing unit 1202 is further configured to perform consensus on a second test proposal message when the transceiving unit 1203 receives the second test proposal message;
the recording unit 1204 is further configured to record the consensus result and the execution log about the second test proposal message into the test file;
the processing unit 1202 is further configured to respond to a file obtaining request, and trigger the transceiving unit 1203 to send the test file to a test platform, so that the test platform analyzes a test result of the to-be-tested blockchain item based on the test file.
In an embodiment, the processing unit 1202 is specifically configured to:
in the process of executing the executable file, executing an instruction corresponding to the logic code to construct a false block proposal message; the false block proposal message is used as a first test proposal message, and the transceiving unit 1203 is triggered to broadcast the first test proposal message in the block chain network.
In an embodiment, the processing unit 1202 is specifically configured to:
executing the instruction corresponding to the logic code to tamper the generated normal block proposal message; and taking the tampered block proposal message as a false block proposal message.
Please refer to fig. 13, which is a block chain test apparatus according to another embodiment of the present disclosure. The apparatus described in the embodiments of the present application, corresponding to the test platform described above, includes:
an obtaining unit 1301, configured to obtain a code data packet of a blockchain item to be tested;
a processing unit 1302, configured to determine a instrumentation point from the code of the code packet, and inject logic code for simulating an attack scenario at the instrumentation point;
the processing unit 1302 is further configured to compile a code data packet into which the logic code is injected, and generate an executable file;
the transceiver unit 1303 is configured to send the executable file to a target consensus node in a block chain network;
the processing unit 1302 is further configured to activate an attack scenario simulated by the logic code, so as to test the blockchain item to be tested in the attack scenario during the process that the target consensus node executes the executable file.
In an embodiment, the processing unit 1302 is specifically configured to:
determining a first association code associated with a block proposal message from codes of the code data packet; determining a pile inserting point based on the position of the first association code; injecting logic code at the instrumentation point for simulating an attack scenario for constructing a dummy block proposal message.
In an embodiment, the processing unit 1302 is specifically configured to:
determining a second association code related to block proposal consensus from the codes of the code data packet; determining a pile inserting point based on the position of the second correlation code; injecting logic code at the instrumentation point for simulating an attack scenario for constructing false consensus data.
In an embodiment, the code data packet includes at least one code file, and the processing unit 1302 is specifically configured to:
compiling the code file of the logic code injected into the at least one code file to generate an intermediate file; and compiling the code data packet of the block chain item to be tested based on the intermediate file to generate an executable file.
In an embodiment, the processing unit 1302 is specifically configured to:
triggering the transceiver unit 1303 to send an activation code to the target consensus node, so that the target consensus node triggers activation of the attack scenario simulated by the logic code by running the activation code; or, the activation of the attack scene simulated by the logic code is triggered by modifying the environment variable of the target consensus node.
It can be understood that the functions of each functional unit of the test apparatus for the blockchain item in the embodiment of the present application may be specifically implemented according to the corresponding method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
By adopting the testing device for the blockchain item provided by the embodiment of the application, on one hand, through injecting the logic code for simulating the attack scene into the code of the blockchain item to be tested, the data can be accurately tampered in the testing process, so that the simulation accuracy of the attack scene is ensured, and the simulation effect of the attack scene is effectively improved. On the other hand, the automation of the abnormal test of the block chain project can be realized, and the abnormal test efficiency is effectively improved.
Fig. 14 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device described in the embodiment of the present application corresponds to the target consensus node described above, and the computer device includes: a processor 1401, a communication interface 1402, and a memory 1403. The processor 1401, the communication interface 1402, and the memory 1403 may be connected by a bus or other means, and the embodiment of the present application is exemplified by being connected by a bus.
The processor 1401 (or CPU) is a computing core and a control core of the computer device, and can analyze various instructions in the computer device and process various data of the computer device, for example: the CPU can be used for analyzing a power-on and power-off instruction sent to the computer equipment by a user and controlling the computer equipment to carry out power-on and power-off operation; the following steps are repeated: the CPU may transmit various types of interactive data between the internal structures of the computer device, and so on. The communication interface 1402 may optionally include standard wired interfaces, wireless interfaces (e.g., Wi-Fi, mobile communication interfaces, etc.), controlled by the processor 1401 for transceiving data. Memory 1403(Memory) is a Memory device in a computer device for storing programs and data. It will be appreciated that the memory 1403 herein can comprise both the built-in memory of the computer device and, of course, the expansion memory supported by the computer device. Memory 1403 provides storage space that stores the operating system of the computer device, which may include, but is not limited to: android system, iOS system, Windows Phone system, etc., which are not limited in this application.
In the embodiment of the present application, the processor 1401 executes the executable program code in the memory 1403 to perform the following operations:
acquiring an executable file through a communication interface 1402, wherein the executable file is obtained by compiling a code data packet of a block chain project to be tested, and the code data packet comprises a logic code for simulating an attack scene; in the process of executing the executable file, after the instruction corresponding to the logic code is executed, broadcasting a first test proposal message in a block chain network through a communication interface 1402, and recording a consensus result and an execution log about the first test proposal message into a test file; when a second test proposal message is received through the communication interface 1402, the second test proposal message is identified in common, and the result of the identification and the execution log about the second test proposal message are recorded in the test file; in response to the file acquisition request, the test file is sent to the test platform through the communication interface 1402, so that the test platform analyzes the test result of the blockchain item to be tested based on the test file.
In an embodiment, in the process of executing the executable file, after executing the instruction corresponding to the logic code, when the processor 1401 broadcasts the first test proposal message in the block chain network through the communication interface 1402, specifically, the processor is configured to: in the process of executing the executable file, executing an instruction corresponding to the logic code to construct a false block proposal message; the false block proposal message is treated as a first test proposal message and is broadcast in the block chain network through the communication interface 1402.
In one embodiment, when the processor 1401 executes the instruction corresponding to the logic code to construct the dummy block proposal message, it is specifically configured to: executing the instruction corresponding to the logic code to tamper the generated normal block proposal message; and taking the tampered block proposal message as a false block proposal message.
In a possible embodiment, the computer device described in this embodiment of the present application may correspond to the foregoing test platform, and the computer device includes a processor 1401, a communication interface 1402 and a memory 1403, which may be used to implement the method corresponding to the test platform in the foregoing method embodiment, and specifically, the processor 1401 executes the executable program code in the memory 1403 to perform the following operations:
acquiring a code data packet of a block chain project to be tested; determining a stake inserting point from codes of the code data packet, and injecting logic codes for simulating an attack scene at the stake inserting point; compiling the code data packet injected with the logic code to generate an executable file, and sending the executable file to a target consensus node in a block chain network through a communication interface 1402; and activating the attack scenario simulated by the logic code so as to test the blockchain item to be tested in the attack scenario in the process that the target consensus node executes the executable file.
In an embodiment, when the processor 1401 determines a stub point from the code of the code packet, it is specifically configured to: determining a first association code associated with a block proposal message from codes of the code data packet; determining a pile inserting point based on the position of the first association code; when the processor 1401 injects logic code for simulating an attack scenario at the instrumentation point, it is specifically configured to: injecting logic code at the instrumentation point for simulating an attack scenario for constructing a dummy block proposal message.
In an embodiment, when the processor 1401 determines a stub point from the code of the code packet, it is specifically configured to: determining a second association code related to block proposal consensus from the codes of the code data packet; determining a pile inserting point based on the position of the second correlation code; when the processor 1401 injects logic code for simulating an attack scenario at the instrumentation point, it is specifically configured to: injecting logic code at the instrumentation point for simulating an attack scenario for constructing false consensus data.
In an embodiment, the code data packet includes at least one code file, and the processor 1401 is configured to compile the code data packet into which the logic code is injected, and when generating an executable file, specifically: compiling the code file of the logic code injected into the at least one code file to generate an intermediate file; and compiling the code data packet of the block chain item to be tested based on the intermediate file to generate an executable file.
In an embodiment, when the processor 1401 activates the attack scenario simulated by the logic code, it is specifically configured to: the communication interface 1402 sends an activation code to the target consensus node, so that the target consensus node triggers activation of the attack scenario simulated by the logic code by running the activation code; or, the activation of the attack scene simulated by the logic code is triggered by modifying the environment variable of the target consensus node.
In a possible embodiment, the computer device may further include a user interface, which is a medium for enabling a user to interact and exchange information with the computer device, and the specific embodiment may include a Display screen (Display) for output, a speaker, and a Keyboard (Keyboard) for input, a touch screen, a sound pickup device, and the like.
In specific implementation, the processor 1401, the communication interface 1402, and the memory 1403 described in this embodiment of the present application may execute an implementation manner of the target consensus node or the test platform described in the test method for the blockchain item provided in this embodiment of the present application, and may also execute an implementation manner described in the test apparatus for the blockchain item provided in this embodiment of the present application, which is not described herein again.
By adopting the computer equipment provided by the embodiment of the application, on one hand, the logic code for simulating the attack scene is injected into the code of the block chain item to be tested, so that the data can be accurately tampered in the test process, the simulation accuracy of the attack scene is ensured, and the simulation effect of the attack scene is effectively improved. On the other hand, the automation of the abnormal test of the block chain project can be realized, and the abnormal test efficiency is effectively improved.
The embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, the computer is enabled to execute the method for testing the block chain item according to the embodiment of the present application, and the specific implementation manner may refer to the foregoing description, and is not described herein again.
Embodiments of the present application also provide a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the test method for the blockchain item in the embodiment of the present application.
It should be noted that, for simplicity of description, the above-mentioned embodiments of the method are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the order of acts described, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above disclosure is only a few examples of the present application, and certainly should not be taken as limiting the scope of the present application, which is therefore intended to cover all modifications that are within the scope of the present application and which are equivalent to the claims.

Claims (12)

1. A method of testing for blockchain items, the method performed by a target consensus node in a blockchain network, the method comprising:
acquiring an executable file, wherein the executable file is obtained by compiling a code data packet of a block chain project to be tested, and the code data packet comprises a logic code for simulating an attack scene;
in the process of executing the executable file, after the instruction corresponding to the logic code is executed, broadcasting a first test proposal message in a blockchain network, and recording a consensus result and an execution log related to the first test proposal message into a test file;
when a second test proposal message is received, performing consensus on the second test proposal message, and recording the consensus result and the execution log of the second test proposal message into the test file;
and responding to a file acquisition request, and sending the test file to a test platform so that the test platform analyzes the test result of the block chain item to be tested based on the test file.
2. The method of claim 1, wherein broadcasting a first test proposal message in a blockchain network after executing instructions corresponding to the logic code during the execution of the executable file comprises:
in the process of executing the executable file, executing an instruction corresponding to the logic code to construct a false block proposal message;
the false block proposal message is taken as a first test proposal message and the first test proposal message is broadcast in a block chain network.
3. The method of claim 1, wherein the executing the instruction corresponding to the logic code constructs a dummy block proposal message comprising:
executing the instruction corresponding to the logic code to tamper the generated normal block proposal message;
and taking the tampered block proposal message as a false block proposal message.
4. A method for testing a blockchain item, the method comprising:
acquiring a code data packet of a block chain project to be tested;
determining a stake inserting point from codes of the code data packet, and injecting logic codes for simulating an attack scene at the stake inserting point;
compiling the code data packet injected into the logic code to generate an executable file, and sending the executable file to a target consensus node in a block chain network;
and activating the attack scenario simulated by the logic code so as to test the blockchain item to be tested in the attack scenario in the process that the target consensus node executes the executable file.
5. The method of claim 4, wherein said determining a peg point from the code of the code packet comprises:
determining a first association code associated with a block proposal message from codes of the code data packet;
determining a pile inserting point based on the position of the first association code;
the injecting logic code at the instrumentation point for simulating an attack scenario, comprising:
injecting logic code at the instrumentation point for simulating an attack scenario for constructing a dummy block proposal message.
6. The method of claim 4, wherein said determining a peg point from the code of the code packet comprises:
determining a second association code related to block proposal consensus from the codes of the code data packet;
determining a pile inserting point based on the position of the second correlation code;
the injecting logic code at the instrumentation point for simulating an attack scenario, comprising:
injecting logic code at the instrumentation point for simulating an attack scenario for constructing false consensus data.
7. The method of any of claims 4-6, wherein the code package includes at least one code file, and wherein compiling the code package for injection into the logic code to generate an executable file comprises:
compiling the code file of the logic code injected into the at least one code file to generate an intermediate file;
and compiling the code data packet of the block chain item to be tested based on the intermediate file to generate an executable file.
8. The method of any of claims 4-6, wherein the activating the attack scenario simulated by the logic code comprises:
sending an activation code to the target consensus node, so that the target consensus node triggers activation of the attack scenario simulated by the logic code by running the activation code; alternatively, the first and second electrodes may be,
and triggering the activation of the attack scene simulated by the logic code by modifying the environment variable of the target consensus node.
9. A testing apparatus for blockchain items, the apparatus comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an executable file, the executable file is obtained by compiling a code data packet of a block chain project to be tested, and the code data packet comprises a logic code for simulating an attack scene;
the processing unit is used for triggering the receiving and sending unit to broadcast a first test proposal message in the block chain network after executing the instruction corresponding to the logic code in the process of executing the executable file;
a recording unit for recording the consensus result and the execution log about the first test proposal message into a test file;
the processing unit is further configured to perform consensus on a second test proposal message when the transceiver unit receives the second test proposal message;
the recording unit is further configured to record the consensus result and the execution log about the second test proposal message into the test file;
the processing unit is further configured to respond to a file acquisition request, and trigger the transceiver unit to send the test file to a test platform, so that the test platform analyzes a test result of the to-be-tested blockchain item based on the test file.
10. A testing apparatus for blockchain items, the apparatus comprising:
the acquisition unit is used for acquiring a code data packet of a block chain item to be tested;
the processing unit is used for determining a peg-inserting point from codes of the code data packet and injecting logic codes for simulating an attack scene at the peg-inserting point;
the processing unit is further configured to compile the code data packet into which the logic code is injected, and generate an executable file;
the receiving and sending unit is used for sending the executable file to a target consensus node in a block chain network;
the processing unit is further configured to activate an attack scenario simulated by the logic code, so that the blockchain item to be tested is tested in the attack scenario in the process that the target consensus node executes the executable file.
11. A computer device, comprising: a processor, a communication interface and a memory, the processor, the communication interface and the memory being interconnected, wherein the memory stores executable program code, and the processor is configured to invoke the executable program code, to perform a test method for a blockchain item according to any one of claims 1 to 3, or to perform a test method for a blockchain item according to any one of claims 4 to 8.
12. A computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to perform a method of testing for blockchain items according to any one of claims 1 to 3 or a method of testing blockchain items according to any one of claims 4 to 8.
CN202010772197.6A 2020-08-04 2020-08-04 Test method and device for block chain item and computer equipment Active CN111782551B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010772197.6A CN111782551B (en) 2020-08-04 2020-08-04 Test method and device for block chain item and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010772197.6A CN111782551B (en) 2020-08-04 2020-08-04 Test method and device for block chain item and computer equipment

Publications (2)

Publication Number Publication Date
CN111782551A true CN111782551A (en) 2020-10-16
CN111782551B CN111782551B (en) 2021-07-27

Family

ID=72766430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010772197.6A Active CN111782551B (en) 2020-08-04 2020-08-04 Test method and device for block chain item and computer equipment

Country Status (1)

Country Link
CN (1) CN111782551B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527905A (en) * 2020-12-17 2021-03-19 内蒙古民族大学 Multi-node block chain Internet of things data fusion method for pumping unit
CN113268711A (en) * 2021-05-25 2021-08-17 国网山东省电力公司电力科学研究院 Transformer substation relay protection device software version management method based on Git and block chain
CN114091078A (en) * 2021-11-26 2022-02-25 中国联合网络通信集团有限公司 Test report processing method, test platform and user terminal
CN116107913A (en) * 2023-04-06 2023-05-12 阿里云计算有限公司 Test control method, device and system of single-node server

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834590A (en) * 2014-02-11 2015-08-12 腾讯科技(深圳)有限公司 Software test method and system
CN109189396A (en) * 2018-08-16 2019-01-11 北京京东尚科信息技术有限公司 intelligent contract engine module, operation method and storage medium
CN109617759A (en) * 2018-12-04 2019-04-12 中钞***产业发展有限公司杭州区块链技术研究院 Block catenary system stability test method, apparatus, equipment and storage medium
WO2019180701A1 (en) * 2018-03-18 2019-09-26 Valid Network Ltd A method and system for detecting and preventing issues in smart contracts based on historical behavior analysis
CN106339309B (en) * 2015-07-14 2020-01-31 腾讯科技(深圳)有限公司 Application program testing method, client and system
CN110868337A (en) * 2019-11-15 2020-03-06 腾讯科技(深圳)有限公司 Fault-tolerant consensus mechanism testing method and device, storage medium and computer equipment
CN110933163A (en) * 2019-11-27 2020-03-27 腾讯科技(深圳)有限公司 Block chain contract deployment method, device, equipment and storage medium
WO2020103545A1 (en) * 2018-11-19 2020-05-28 苏宁云计算有限公司 Blockchain-based smart contract debugging and releasing method and system
CN111324591A (en) * 2020-01-20 2020-06-23 腾讯科技(深圳)有限公司 Block chain bifurcation detection method and related device
CN111327490A (en) * 2020-01-20 2020-06-23 腾讯科技(深圳)有限公司 Byzantine fault-tolerant detection method of block chain and related device
CN111386523A (en) * 2019-11-08 2020-07-07 支付宝(杭州)信息技术有限公司 System and method for block chain based decentralized application development
CN111444090A (en) * 2020-03-24 2020-07-24 腾讯科技(深圳)有限公司 Contract testing method and device in block chain, electronic equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834590A (en) * 2014-02-11 2015-08-12 腾讯科技(深圳)有限公司 Software test method and system
CN106339309B (en) * 2015-07-14 2020-01-31 腾讯科技(深圳)有限公司 Application program testing method, client and system
WO2019180701A1 (en) * 2018-03-18 2019-09-26 Valid Network Ltd A method and system for detecting and preventing issues in smart contracts based on historical behavior analysis
CN109189396A (en) * 2018-08-16 2019-01-11 北京京东尚科信息技术有限公司 intelligent contract engine module, operation method and storage medium
WO2020103545A1 (en) * 2018-11-19 2020-05-28 苏宁云计算有限公司 Blockchain-based smart contract debugging and releasing method and system
CN109617759A (en) * 2018-12-04 2019-04-12 中钞***产业发展有限公司杭州区块链技术研究院 Block catenary system stability test method, apparatus, equipment and storage medium
CN111386523A (en) * 2019-11-08 2020-07-07 支付宝(杭州)信息技术有限公司 System and method for block chain based decentralized application development
CN110868337A (en) * 2019-11-15 2020-03-06 腾讯科技(深圳)有限公司 Fault-tolerant consensus mechanism testing method and device, storage medium and computer equipment
CN110933163A (en) * 2019-11-27 2020-03-27 腾讯科技(深圳)有限公司 Block chain contract deployment method, device, equipment and storage medium
CN111324591A (en) * 2020-01-20 2020-06-23 腾讯科技(深圳)有限公司 Block chain bifurcation detection method and related device
CN111327490A (en) * 2020-01-20 2020-06-23 腾讯科技(深圳)有限公司 Byzantine fault-tolerant detection method of block chain and related device
CN111444090A (en) * 2020-03-24 2020-07-24 腾讯科技(深圳)有限公司 Contract testing method and device in block chain, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
倪远东; 张超; 殷婷婷: "智能合约安全漏洞研究综述", 《信息安全学报》 *
白杨: "区块链智能合约安全威胁实时防御框架", 《通信技术》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527905A (en) * 2020-12-17 2021-03-19 内蒙古民族大学 Multi-node block chain Internet of things data fusion method for pumping unit
CN112527905B (en) * 2020-12-17 2023-01-17 内蒙古民族大学 Multi-node block chain Internet of things data fusion method for pumping unit
CN113268711A (en) * 2021-05-25 2021-08-17 国网山东省电力公司电力科学研究院 Transformer substation relay protection device software version management method based on Git and block chain
CN113268711B (en) * 2021-05-25 2022-03-08 国网山东省电力公司电力科学研究院 Transformer substation relay protection device software version management method based on Git and block chain
CN114091078A (en) * 2021-11-26 2022-02-25 中国联合网络通信集团有限公司 Test report processing method, test platform and user terminal
CN116107913A (en) * 2023-04-06 2023-05-12 阿里云计算有限公司 Test control method, device and system of single-node server
CN116107913B (en) * 2023-04-06 2023-11-14 阿里云计算有限公司 Test control method, device and system of single-node server

Also Published As

Publication number Publication date
CN111782551B (en) 2021-07-27

Similar Documents

Publication Publication Date Title
CN111782551B (en) Test method and device for block chain item and computer equipment
KR102606945B1 (en) Computer-implemented systems and methods for combining blockchain technology and digital twins
CN110442652B (en) Cross-chain data processing method and device based on block chain
AU2019295815B2 (en) Blockchain-based data verification method and apparatus, and electronic device
CN112073269B (en) Block chain network testing method, device, server and storage medium
CN111309594B (en) System testing method, device, equipment and storage medium
US20210049715A1 (en) Blockchain-based data procesing method, apparatus, and electronic device
CN110046523B (en) Intelligent contract checking method and device and electronic equipment
CN111949531B (en) Block chain network testing method, device, medium and electronic equipment
CN112035350B (en) Test method and device for block chain system and computer equipment
CN109189396A (en) intelligent contract engine module, operation method and storage medium
CN116155771A (en) Network anomaly test method, device, equipment, storage medium and program
CN111429250A (en) Data management method and device in escort scene
CN110738783A (en) System, method, device, equipment and readable storage medium for updating voting data
CN111917729B (en) Dynamic injection test method and device and related equipment
Tsai et al. Beagle: A new framework for smart contracts taking account of law
CN112202647A (en) Test method, device and test equipment in block chain network
CN116596551A (en) Supply chain product tracing method based on block chain, storage medium and electronic equipment
CN117251354A (en) Abnormality test method and device applied to blockchain system and computer equipment
US11573975B2 (en) Data migration method, data migration system, and node
Nystrøm Network Performance in Hyperledger Fabric-Investigating the network resource consumption of transactions in a Distributed Ledger Technology system
Buterchi et al. Dapp for rating
Kulkarni Framework for Design and Development of Blockchain Application Using Smart Contracts
Touloupou et al. Validating the Blockchain Benchmarking Framework Through Controlled Deployments of XRPL and Ethereum
CN117009345A (en) Verification method and device for data reporting function and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40030656

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant