Sidechain testing system for improving security and stability of smart contract
AssigneeHuazhong University of Science and Technology
InventorsWeiqi Dai, Hai Jin, Deqing Zou, Bingcheng Zhao
Life of this patent
Estimating the term…
Abstract
The present disclosure involves a sidechain testing system and method for improving security and stability of a smart contract.
Claims7
A sidechain testing system for improving security and stability of a smart contract, at least a part of modules of the system being arranged on blockchain nodes of a blockchain network and being configured to connect the blockchain network, for discovering a vulnerability of the smart contract, the sidechain testing system comprises:
- a first module, used to connect the blockchain network and to receive the smart contract promulgated by a first account,
- the sidechain testing system being characterized in that:
- a second account decides whether to participate in a test for the smart contract when it acquires the smart contract through the first module, a third account, when it has acquired the smart contract, forks a mainchain so as to form a sidechain and deploys the smart contract on the sidechain;
- wherein, the system further comprises:
- a second module, being used to, when the second account decides to participate in the test of the smart contract, transfer a part or all of assets of the second account from the mainchain to the sidechain and generate a corresponding mirror image account, so that the second account is able to, independent of the mainchain, perform the test against the smart contract on the sidechain, and is configured to permit the third account to conduct mining on the sidechain;
- a third module, being used to receive the vulnerability of the smart contract promulgated by the mirror image account during the test and to receive a vote made when a total call frequency of the smart contract reaches a preset value;
- and being configured to promulgate the vulnerability and the vote to a fourth module;
- the fourth module, being configured to perform data interaction with the third modules of plural said mirror image accounts and being configured to, based on information about the plural said mirror image accounts, determine whether it is appropriate to deploy the smart contract onto the mainchain;
- a supervision module, being used to receive requests from the mirror image accounts during the sidechain tests for the smart contract, so as to allow data interaction between the first account and the mirror image accounts with an access permission granted by the supervision module;
- and/or allow data interaction between the plural mirror image accounts with an access permission granted by the supervision module;
- and
- a sidechain creation module, in which when the second account decides to participate in the test for the smart contract, the sidechain creation module at least creates at least one said sidechain based on information about the second account, so that the mirror image account is able to perform the test on its corresponding sidechain.
A sidechain testing method for improving security and stability of a smart contract, for discovering a vulnerability of the smart contract, the method comprising:
- a second account deciding whether to participate in a test for the smart contract when it acquires the smart contract through the first module, a third account, when it has acquired the smart contract, forks a mainchain so as to form a sidechain and deploys the smart contract on the sidechain;
- when the second account decides to participate in the test of the smart contract, a second module transferring a part or all of assets of the second account from the mainchain to the sidechain and generating a corresponding mirror image account, so that the second account is able to, independent of the mainchain, perform the test against the smart contract on the sidechain, and is able to permit the third account to conduct mining on the sidechain;
- a third module promulgating the vulnerability of the smart contract promulgated by the mirror image account during the test and a vote made when a total call frequency of the smart contract reaches a preset value to a fourth module;
- the fourth module, based on information about the plural said mirror image accounts, determining whether it is appropriate to deploy the smart contract onto the mainchain;
- wherein the fourth module is able to perform data interaction with the third modules of plural said mirror image accounts;
- a supervision module receiving requests from the mirror image accounts during the sidechain tests for the smart contract, so as to allow data interaction between the first account and the mirror image accounts with an access permission granted by the supervision module;
- and/or allowing data interaction between the plural mirror image accounts with an access permission granted by the supervision module;
- and
- a sidechain creation module, in which when the second account decides to participate in the test for the smart contract, the sidechain creation module creating at least one said sidechain based on information about the second account, so that the mirror image account is able to perform the test on its corresponding sidechain.
Dependencies are inferred from the claim text.