WO2020103545A1 - Blockchain-based smart contract debugging and releasing method and system - Google Patents

Blockchain-based smart contract debugging and releasing method and system

Info

Publication number
WO2020103545A1
WO2020103545A1 PCT/CN2019/106021 CN2019106021W WO2020103545A1 WO 2020103545 A1 WO2020103545 A1 WO 2020103545A1 CN 2019106021 W CN2019106021 W CN 2019106021W WO 2020103545 A1 WO2020103545 A1 WO 2020103545A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
smart contract
channel
contract
transaction
Prior art date
Application number
PCT/CN2019/106021
Other languages
French (fr)
Chinese (zh)
Inventor
王玥
李蕊
姚平
韩松江
Original Assignee
苏宁云计算有限公司
苏宁易购集团股份有限公司
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 苏宁云计算有限公司, 苏宁易购集团股份有限公司 filed Critical 苏宁云计算有限公司
Priority to CA3161753A priority Critical patent/CA3161753A1/en
Publication of WO2020103545A1 publication Critical patent/WO2020103545A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment

Definitions

  • the invention relates to the field of blockchain technology, in particular to a method and system for debugging and issuing blockchain smart contracts.
  • an embodiment of the present invention provides a method for debugging and issuing a blockchain smart contract to overcome the need to frequently perform contract content on the transaction channel for each modification and deployment of smart contracts in the prior art
  • the consensus has increased the workload of various parties in the blockchain, and added many worthless test data to the transaction channel, affecting the query and storage of blocks and transactions on the channel.
  • a method for debugging and releasing a blockchain smart contract includes the following steps:
  • test channel is automatically created at the same time when the trading channel is created, and when the user joins or exits the trading channel, the user is simultaneously added or exited from the test channel;
  • S2 Deploy the smart contract to be tested on the test channel, and all users on the test channel jointly perform business tests on the contract content;
  • step S3 Determine whether the test of the smart contract to be tested passes. If it passes, perform step S4. If it fails, return the smart contract to the developer to modify or select a new smart contract and then return to step S2. Test it;
  • the smart contract to be tested includes a newly submitted smart contract and / or a historical version of the smart contract.
  • the S3 specifically includes:
  • step S4 is executed, and if the test fails, the smart contract is returned to the developer and then returned to step S2 after modification to retest it; and / or,
  • step S4 is executed. If the test fails, a new smart contract is selected and the process returns to step S2 to test it again.
  • the S2 further includes:
  • test data generated by running the smart contract on the test channel is recorded on the test channel, and the user can query the test data on the test channel.
  • step S2 further includes:
  • the user may delete the test data.
  • step S4 further includes:
  • a blockchain smart contract debugging and release system at least including:
  • a new module is provided for users to create a trading channel, and a test channel is automatically created when the trading channel is created;
  • the registration module is used to provide users to join or exit the trading channel, and when the user joins or exits the trading channel, the user is added or exited from the test channel synchronously;
  • a test module which is used to deploy the smart contract to be tested on the test channel, and all users on the test channel jointly perform business tests on the contract content;
  • the judgment module is used to judge whether the test of the smart contract to be tested passes. If it passes, the smart contract to be tested is sent to the release module. If it fails, the smart contract is returned to the developer for modification or Select a new smart contract and send it to the test module to test it again;
  • the release module is used for all users on the test channel to reach a consensus on the content of the smart contract, and after obtaining feedback that the deployment is agreed, deploy the smart contract on the transaction channel.
  • system further includes:
  • a first storage module for recording test data generated by the smart contract running on the test channel in the test channel
  • the first query module is used for the user to query the test data in the test channel.
  • system further includes:
  • the deletion module is used for the user to delete the test data after obtaining the consensus of all users on the test channel.
  • system further includes:
  • a second storage module configured to record the blocks and / or transaction data generated by the smart contract running on the transaction channel on the transaction channel;
  • the second query module is used for the user to query the block and / or transaction data in the transaction channel.
  • the method and system for debugging and issuing a blockchain smart contract provided by an embodiment of the present invention.
  • the system automatically creates a test channel with the same participants for the transaction channel, which is used for testing before the contract is officially deployed.
  • the content of the smart contract only needs to be guaranteed by the participants of the transaction channel during the test whether it is in line with its business. It is not necessary to conduct consensus certification of the contract content before each deployment test, reducing the workload of the participants and shortening the operation cycle of updating the contract;
  • the method and system for debugging and issuing blockchain smart contracts provided by the embodiments of the present invention store test data and transaction data separately, and the two sets of data do not interfere with each other, which effectively improves the operation and query efficiency of the underlying network of the blockchain and improves stability. Sex
  • the method and system for debugging and releasing blockchain smart contracts provided by the embodiments of the present invention introduces the process standardization and manageability in the software development project into the contract debugging and release of the blockchain channel, reducing contract maintenance costs Maximize the team's cooperation efficiency.
  • Fig. 1 is a flowchart of a method for debugging and issuing a blockchain smart contract according to an exemplary embodiment
  • Fig. 2 is a schematic structural diagram of a blockchain smart contract debugging and issuance system according to an exemplary embodiment.
  • Fig. 1 is a flowchart of a method for debugging and issuing a blockchain smart contract according to an exemplary embodiment. Referring to Fig. 1, the method includes the following steps:
  • test channel is automatically created when a trading channel is created, and when a user joins or exits the trading channel, the user is simultaneously added or exited from the test channel.
  • blockchain users create a new transaction channel according to business needs.
  • the system will automatically create a test channel for users with the same participating users when they create a transaction channel.
  • New blockchain users join or exit the transaction channel At the same time, it will also join or exit the corresponding test channel synchronously.
  • S2 Deploy the smart contract to be tested on the test channel, and all users on the test channel jointly perform business tests on the contract content.
  • users in the blockchain can deploy the smart contract to be tested submitted by the contract developer to the test channel, and all users on the test channel jointly conduct business tests on the contract content.
  • the content of the smart contract only needs to be guaranteed by the participants of the test channel (these parties are also participants of the transaction channel) during the test, and does not need to be Before each deployment test, the consensus authentication of the smart contract content is performed, which reduces the workload of each participant and shortens the operation cycle of updating the contract.
  • Each participant can use the following process to test whether the content of the smart contract is consistent with its business:
  • the user enters test parameters on the functional test page and performs functional tests on the smart contract to be tested.
  • test data generated by running the smart contract on the test channel is recorded on the test channel, and the user can query the test data on the test channel.
  • test data generated by running on the test channel will be recorded on the test channel, and the test data will be queried and displayed on the test channel, which means that the user can query on the test channel Test Data.
  • the user may delete the test data.
  • the consensus of all users on the channel needs to be obtained, and it cannot be deleted by itself.
  • the channel user occupying more storage space for the test data can initiate the deletion of the test data, and the storage space occupied by the data can only be used after consensus of all users on the test channel To release. By doing so, you can ensure that the data on the blockchain cannot be deleted at will.
  • the application can call the SDK to write transactions to the test channel, and can limit the transaction submission speed in the SDK when the application calls the SDK to write transactions to the test channel, preventing The test operation of the test channel interferes with the performance of the trading channel.
  • step S3 Determine whether the test of the smart contract to be tested passes. If it passes, perform step S4. If it fails, return the smart contract to the developer to modify or select a new smart contract and then return to step S2. It's tested.
  • step S4 After all users on the test channel jointly conduct a business test on the contract content, according to the test result, it is determined whether the test of the smart contract to be tested passes, if the test passes, step S4 is executed, and if the test fails, the smart contract is transferred After modifying or selecting a new smart contract for the developer, return to step S2 to test it again.
  • the blocks and / or transaction data generated by the smart contract running on the transaction channel are recorded on the transaction channel, and the user can query the blocks and / or transaction data on the transaction channel.
  • the block and / or transaction data generated by the smart contract running on the transaction channel will be recorded on the transaction channel, and the block and / or transaction data will be queried and displayed in the transaction channel, that is to say, the user can Channel query block and / or transaction data.
  • the data of the transaction channel and the test channel will have the characteristics that the data on the blockchain cannot be tampered with. And store the test data and transaction data separately, so that the two sets of data do not interfere with each other, effectively improve the operation and query efficiency of the underlying network of the blockchain, and further improve the stability.
  • the smart contract to be tested includes a newly submitted smart contract and / or a historical version of the smart contract.
  • the S3 specifically includes:
  • step S4 is executed, and if the test fails, the smart contract is returned to the developer and then returned to step S2 after modification to retest it; and / or,
  • step S4 is executed. If the test fails, a new smart contract is selected and the process returns to step S2 to test it again.
  • the smart contract to be tested includes a newly submitted smart contract and / or a historical version of the smart contract. Regardless of whether it is a newly submitted smart contract or a historical version of a smart contract, if the test passes, step S4 is performed. However, if the two fail the test, the subsequent operations will be slightly different. The details are as follows: if the newly submitted smart contract test fails, the smart contract is returned to the developer and then modified to return to step S2 to re-test it; and if the smart contract test of the historical version fails, the new smart contract is selected Return to step S2 and test it again.
  • users in the blockchain can choose to use the new smart contract submitted by the developer or use it on the current transaction channel
  • the historical version of the smart contract is deployed on the test channel, and all users of the test channel conduct business tests on the contract content of the test channel. If the test fails, the newly submitted smart contract can be transferred to the contract developer for modification and then submitted and tested. The historical version of the smart contract cannot be modified, and only the new smart contract can be selected for redeployment into the test channel
  • the test is conducted, and the last officially deployed contract is still executed in the transaction channel. If the test passes, all users in the channel agree on the content of the smart contract and get feedback on the deployment of the agreement, then officially deploy the updated contract to the transaction Used on the channel.
  • Fig. 2 is a schematic structural diagram of a blockchain smart contract debugging and issuance system according to an exemplary embodiment. Referring to Fig. 2, the system includes at least:
  • a new module is provided for users to create a trading channel, and a test channel is automatically created when the user creates a trading channel, where the test channel corresponds to the trading channel.
  • the registration module is used to provide users with access to or exit from the trading channel, and to synchronously add or exit users to the test channel when the user joins or exits the trading channel.
  • the test module is used to deploy the smart contract to be tested on the test channel, and all users on the test channel jointly perform business tests on the contract content.
  • the content of the smart contract only needs to be guaranteed by the participants of the test channel (these parties are also participants of the transaction channel) during the test, and does not need to be checked every time. Consensus certification of smart contract content is carried out before deployment testing, which reduces the workload of each participant and shortens the operation cycle of updating contracts.
  • the judgment module is used to judge whether the test of the smart contract to be tested passes. If it passes, the smart contract to be tested is sent to the release module. If it fails, the smart contract is returned to the developer for modification or Select a new smart contract and send it to the test module to test it again.
  • the smart contracts to be tested include newly submitted smart contracts and / or historical versions of smart contracts. If the test fails, the newly submitted smart contract can be transferred to the contract developer for modification and then submitted and tested. The historical version of the smart contract can no longer be modified, and only a new smart contract can be selected for redeployment into the test channel test.
  • the release module is used for all users on the test channel to reach a consensus on the content of the smart contract, and after obtaining feedback that the deployment is agreed, deploy the smart contract on the transaction channel.
  • system further includes:
  • a first storage module for recording test data generated by the smart contract running on the test channel in the test channel
  • the first query module is used for the user to query the test data in the test channel
  • the deletion module is used for the user to delete the test data after obtaining the consensus of all users on the test channel;
  • a second storage module configured to record the blocks and / or transaction data generated by the smart contract running on the transaction channel on the transaction channel;
  • the second query module is used for the user to query the block and / or transaction data in the transaction channel.
  • the data of the transaction channel and the test channel will have the characteristics that the data on the blockchain cannot be tampered with. And store the test data and transaction data separately, so that the two sets of data do not interfere with each other, effectively improve the operation and query efficiency of the underlying network of the blockchain, and further improve the stability.
  • the method and system for debugging and issuing a blockchain smart contract provided by an embodiment of the present invention.
  • the system automatically creates a test channel with the same participants for the transaction channel, which is used for testing before the contract is officially deployed.
  • the content of the smart contract only needs to be guaranteed by the participants of the transaction channel during the test whether it is in line with its business. It is not necessary to conduct consensus certification of the contract content before each deployment test, reducing the workload of the participants and shortening the operation cycle of updating the contract;
  • the method and system for debugging and issuing blockchain smart contracts provided by the embodiments of the present invention store test data and transaction data separately, and the two sets of data do not interfere with each other, which effectively improves the operation and query efficiency of the underlying network of the blockchain and improves stability. Sex
  • the method and system for debugging and releasing blockchain smart contracts provided by the embodiments of the present invention introduces the process standardization and manageability in the software development project into the contract debugging and release of the blockchain channel to reduce the maintenance cost of the contract. Maximize the team's cooperation efficiency.
  • the program may be stored in a computer-readable storage medium.
  • the mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A blockchain-based smart contract debugging and releasing method and apparatus. The method comprises: S1: automatically create a test channel while creating a transaction channel, and enable a user to join or exit the test channel synchronously when the user joins or exits the transaction channel; S2: deploy a smart contract to be tested on the test channel, and all users on the test channel jointly perform service test on contract contents; S3: determine whether the test of said contract passes or not, if yes, execute step S4, and if not, return said contract to a developer to modify or select a new smart contract, return to step S2, and re-test said contract; S4: carry out consensus on the content of said contract by all users on the test channel, and deploy said contract on the transaction channel after obtaining feedback of the agreed deployment. According to the method, the workload of participants can be reduced, the contract updating operation period is shortened, and the operation and query efficiency of the blockchain underlying network is effectively improved.

Description

一种区块链智能合约调试发布方法及系统Method and system for debugging and releasing blockchain smart contract 技术领域Technical field
本发明涉及区块链技术领域,特别涉及一种区块链智能合约调试发布方法及系统。The invention relates to the field of blockchain technology, in particular to a method and system for debugging and issuing blockchain smart contracts.
背景技术Background technique
随着区块链技术的兴起和发展,越来越多的企业和组织开始探索区块链技术在多种商业和生活场景中的落地应用,以使这项新技术为社会的各项生产和生活活动带来切实可见的好处。作为一种为各类上层业务提供合约运行环境和技术支撑的基础平台,区块链平台既要保证自身运行的稳定性,同时也要为上层业务的稳定性和可用性提供支撑和担保。With the rise and development of blockchain technology, more and more enterprises and organizations begin to explore the application of blockchain technology in various business and life scenarios, so that this new technology can be Life activities bring tangible benefits. As a basic platform that provides contract operating environment and technical support for various upper-layer services, the blockchain platform must not only guarantee the stability of its own operation, but also provide support and guarantee for the stability and availability of the upper-layer business.
当前,区块链技术已经在金融、物流、版权保护等多种场景中展开了应用实践,而由于上层业务存在其复杂性和多变性,使得区块链上部署的智能合约往往需要多次的修改和测试才能验证其是否满足业务运行的要求。而通常区块链平台采用的方法是反复修改、反复部署,这种实现方式有两个问题:At present, blockchain technology has been applied in many scenarios such as finance, logistics, and copyright protection. Due to the complexity and variability of upper-layer services, smart contracts deployed on the blockchain often require multiple Modification and testing can verify whether it meets the requirements of business operations. And the method usually adopted by the blockchain platform is repeated modification and repeated deployment. This implementation has two problems:
1、智能合约每次的修改和部署都需要频繁地进行合约内容在交易通道上的共识,增加了区块链中各参与方的工作量;1. Each modification and deployment of a smart contract requires frequent consensus on the contract content in the transaction channel, which increases the workload of each participant in the blockchain;
2、使交易通道中增加了许多没有价值的测试数据,影响通道上区块和交易的查询和存储。2. Added a lot of worthless test data to the trading channel, affecting the query and storage of blocks and transactions on the channel.
发明内容Summary of the invention
为了解决现有技术的问题,本发明实施例提供了一种区块链智能合约调试发布方法,以克服现有技术中智能合约每次的修改和部署都需要频繁地进行合 约内容在交易通道上的共识,增加了区块链中各参与方的工作量,以及使交易通道中增加了许多没有价值的测试数据,影响通道上区块和交易的查询和存储等问题。In order to solve the problems of the prior art, an embodiment of the present invention provides a method for debugging and issuing a blockchain smart contract to overcome the need to frequently perform contract content on the transaction channel for each modification and deployment of smart contracts in the prior art The consensus has increased the workload of various parties in the blockchain, and added many worthless test data to the transaction channel, affecting the query and storage of blocks and transactions on the channel.
一方面,提供了一种区块链智能合约调试发布方法,所述方法包括如下步骤:On the one hand, a method for debugging and releasing a blockchain smart contract is provided. The method includes the following steps:
S1:在创建交易通道的同时自动创建一条测试通道,且用户加入或退出所述交易通道时同步将用户加入或退出所述测试通道;S1: A test channel is automatically created at the same time when the trading channel is created, and when the user joins or exits the trading channel, the user is simultaneously added or exited from the test channel;
S2:将待测试的智能合约部署到所述测试通道上,所述测试通道上所有用户共同对合约内容进行业务测试;S2: Deploy the smart contract to be tested on the test channel, and all users on the test channel jointly perform business tests on the contract content;
S3:判断所述待测试的智能合约测试是否通过,若通过,则执行步骤S4,若不通过,则将所述智能合约返回给开发者修改或选择新的智能合约后返回步骤S2,重新对其进行测试;S3: Determine whether the test of the smart contract to be tested passes. If it passes, perform step S4. If it fails, return the smart contract to the developer to modify or select a new smart contract and then return to step S2. Test it;
S4:所述测试通道上所有用户对所述智能合约的内容进行共识,得到同意部署的反馈后,将所述智能合约部署到所述交易通道上。S4: All users on the test channel agree on the content of the smart contract, and after obtaining feedback that the deployment is agreed, deploy the smart contract on the transaction channel.
进一步的,所述待测试的智能合约包括新提交的智能合约和/或历史版本的智能合约。Further, the smart contract to be tested includes a newly submitted smart contract and / or a historical version of the smart contract.
进一步的,所述S3具体包括:Further, the S3 specifically includes:
若所述新提交的智能合约测试通过,则执行步骤S4,若测试不通过,则将所述智能合约返回给开发者修改后返回步骤S2,重新对其进行测试;和/或,If the newly submitted smart contract passes the test, step S4 is executed, and if the test fails, the smart contract is returned to the developer and then returned to step S2 after modification to retest it; and / or,
若所述历史版本的智能合约测试通过,则执行步骤S4,若测试不通过,则选择新的智能合约返回步骤S2,重新对其进行测试。If the smart contract of the historical version passes the test, step S4 is executed. If the test fails, a new smart contract is selected and the process returns to step S2 to test it again.
进一步的,所述S2还包括:Further, the S2 further includes:
将所述智能合约在所述测试通道上运行生成的测试数据记录在所述测试通道上,用户可在所述测试通道查询所述测试数据。The test data generated by running the smart contract on the test channel is recorded on the test channel, and the user can query the test data on the test channel.
进一步的,所述步骤S2还包括:Further, the step S2 further includes:
用户在得到所述测试通道上所有用户的共识后,可将所述测试数据删除。After obtaining the consensus of all users on the test channel, the user may delete the test data.
进一步的,所述步骤S4还包括:Further, the step S4 further includes:
将所述智能合约在所述交易通道上运行生成的区块和/或交易数据记录在所述交易通道上,用户可在所述交易通道查询所述区块和/或交易数据。Record the blocks and / or transaction data generated by the smart contract running on the transaction channel on the transaction channel, and the user can query the block and / or transaction data on the transaction channel.
另一方面,提供了一种区块链智能合约调试发布系统,所述系统至少包括:On the other hand, a blockchain smart contract debugging and release system is provided, the system at least including:
新建模块,用于提供给用户创建交易通道,且在创建交易通道的同时自动创建一条测试通道;A new module is provided for users to create a trading channel, and a test channel is automatically created when the trading channel is created;
注册模块,用于提供给用户加入或退出所述交易通道,且在用户加入或退出所述交易通道时同步将用户加入或退出所述测试通道;The registration module is used to provide users to join or exit the trading channel, and when the user joins or exits the trading channel, the user is added or exited from the test channel synchronously;
测试模块,用于将待测试的智能合约部署到所述测试通道上,所述测试通道上所有用户共同对合约内容进行业务测试;A test module, which is used to deploy the smart contract to be tested on the test channel, and all users on the test channel jointly perform business tests on the contract content;
判断模块,用于判断所述待测试的智能合约测试是否通过,若通过,则将所述待测试的智能合约发送至发布模块,若不通过,则将所述智能合约返回给开发者修改或选择新的智能合约后发送至测试模块,重新对其进行测试;The judgment module is used to judge whether the test of the smart contract to be tested passes. If it passes, the smart contract to be tested is sent to the release module. If it fails, the smart contract is returned to the developer for modification or Select a new smart contract and send it to the test module to test it again;
发布模块,用于在所述测试通道上所有用户对所述智能合约的内容进行共识,得到同意部署的反馈后,将所述智能合约部署到所述交易通道上。The release module is used for all users on the test channel to reach a consensus on the content of the smart contract, and after obtaining feedback that the deployment is agreed, deploy the smart contract on the transaction channel.
进一步的,所述系统还包括:Further, the system further includes:
第一存储模块,用于将所述智能合约在所述测试通道上运行生成的测试数据记录在所述测试通道;A first storage module for recording test data generated by the smart contract running on the test channel in the test channel;
第一查询模块,用于用户在所述测试通道查询所述测试数据。The first query module is used for the user to query the test data in the test channel.
进一步的,所述系统还包括:Further, the system further includes:
删除模块,用于用户在得到所述测试通道上所有用户的共识后,将所述测试数据删除。The deletion module is used for the user to delete the test data after obtaining the consensus of all users on the test channel.
进一步的,所述系统还包括:Further, the system further includes:
第二存储模块,用于将所述智能合约在所述交易通道上运行生成的区块和/或交易数据记录在所述交易通道上;A second storage module, configured to record the blocks and / or transaction data generated by the smart contract running on the transaction channel on the transaction channel;
第二查询模块,用于用户在所述交易通道查询所述区块和/或交易数据。The second query module is used for the user to query the block and / or transaction data in the transaction channel.
本发明实施例提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solutions provided by the embodiments of the present invention are:
1、本发明实施例提供的区块链智能合约调试发布方法及系统,在用户新建交易通道的同时系统自动为交易通道新建一条具有相同参与方的测试通道,用于合约正式部署前的测试,智能合约内容只需要在测试时由交易通道各参与方保证是否与其业务相符合而不需要在每次部署测试前都进行合约内容的共识认证,减少参与方工作量,缩短更新合约的操作周期;1. The method and system for debugging and issuing a blockchain smart contract provided by an embodiment of the present invention. When a user creates a new transaction channel, the system automatically creates a test channel with the same participants for the transaction channel, which is used for testing before the contract is officially deployed. The content of the smart contract only needs to be guaranteed by the participants of the transaction channel during the test whether it is in line with its business. It is not necessary to conduct consensus certification of the contract content before each deployment test, reducing the workload of the participants and shortening the operation cycle of updating the contract;
2、本发明实施例提供的区块链智能合约调试发布方法及系统,将测试数据和交易数据分别存储,两组数据互不干扰,有效提高区块链底层网络的运行和查询效率,提高稳定性;2. The method and system for debugging and issuing blockchain smart contracts provided by the embodiments of the present invention store test data and transaction data separately, and the two sets of data do not interfere with each other, which effectively improves the operation and query efficiency of the underlying network of the blockchain and improves stability. Sex
3、本发明实施例提供的区块链智能合约调试发布方法及系统,将软件开发工程中的流程规范性和可管理性引入到区块链通道的合约调试发布中,减少合约的维护成本,最大限度的提高团队的合作效率。3. The method and system for debugging and releasing blockchain smart contracts provided by the embodiments of the present invention introduces the process standardization and manageability in the software development project into the contract debugging and release of the blockchain channel, reducing contract maintenance costs Maximize the team's cooperation efficiency.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the technical solutions in the embodiments of the present invention, the drawings required in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without paying any creative work, other drawings can be obtained based on these drawings.
图1是根据一示例性实施例示出的区块链智能合约调试发布方法流程图;Fig. 1 is a flowchart of a method for debugging and issuing a blockchain smart contract according to an exemplary embodiment;
图2是根据一示例性实施例示出的区块链智能合约调试发布系统的结构示意图。Fig. 2 is a schematic structural diagram of a blockchain smart contract debugging and issuance system according to an exemplary embodiment.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中 的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are merely Some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
图1是根据一示例性实施例示出的区块链智能合约调试发布方法流程图,参照图1所示,所述方法包括如下步骤:Fig. 1 is a flowchart of a method for debugging and issuing a blockchain smart contract according to an exemplary embodiment. Referring to Fig. 1, the method includes the following steps:
S1:在创建交易通道的同时自动创建一条测试通道,且用户加入或退出所述交易通道时同步将用户加入或退出所述测试通道。S1: A test channel is automatically created when a trading channel is created, and when a user joins or exits the trading channel, the user is simultaneously added or exited from the test channel.
具体的,区块链的用户根据业务需要新建一条交易通道,系统会在用户创建交易通道的同时自动为其创建一条具有相同参与用户的测试通道,新的区块链用户在加入或退出交易通道的同时也将同步加入或退出对应的测试通道。Specifically, blockchain users create a new transaction channel according to business needs. The system will automatically create a test channel for users with the same participating users when they create a transaction channel. New blockchain users join or exit the transaction channel At the same time, it will also join or exit the corresponding test channel synchronously.
S2:将待测试的智能合约部署到所述测试通道上,所述测试通道上所有用户共同对合约内容进行业务测试。S2: Deploy the smart contract to be tested on the test channel, and all users on the test channel jointly perform business tests on the contract content.
具体的,区块链中的用户可以将合约开发者提交的待测试的智能合约部署到测试通道中,测试通道上所有用户共同对合约内容进行业务测试。这里需要说明的是,在本发明实施例中,智能合约内容只需要在测试时由测试通道的各参与方(同时这些参与方也是交易通道的参与方)保证是否与其业务相符合,而不需要在每次部署测试前都进行智能合约内容的共识认证,减少了各参与方工作量,缩短更新合约的操作周期。Specifically, users in the blockchain can deploy the smart contract to be tested submitted by the contract developer to the test channel, and all users on the test channel jointly conduct business tests on the contract content. It should be noted here that in the embodiment of the present invention, the content of the smart contract only needs to be guaranteed by the participants of the test channel (these parties are also participants of the transaction channel) during the test, and does not need to be Before each deployment test, the consensus authentication of the smart contract content is performed, which reduces the workload of each participant and shortens the operation cycle of updating the contract.
各参与方测试智能合约内容与其业务是否相符合可采用如下过程:Each participant can use the following process to test whether the content of the smart contract is consistent with its business:
获取待测试的智能合约对应的智能合约的代码,对智能合约代码进行编译,获取编译文件;Obtain the smart contract code corresponding to the smart contract to be tested, compile the smart contract code, and obtain the compiled file;
对编译文件进行分析后,生成功能测试页面;After analyzing the compiled files, a functional test page is generated;
用户在功能测试页面上输入测试参数,对待测试的智能合约进行功能测试。The user enters test parameters on the functional test page and performs functional tests on the smart contract to be tested.
进一步的,将所述智能合约在所述测试通道上运行生成的测试数据记录在所述测试通道上,用户可在所述测试通道查询所述测试数据。Further, the test data generated by running the smart contract on the test channel is recorded on the test channel, and the user can query the test data on the test channel.
具体的,智能合约在交易通道上正式部署之前,在测试通道上运行生成的测试数据将记录在测试通道上,且测试数据将在测试通道进行查询和展示,也 就是说用户可在测试通道查询测试数据。Specifically, before the smart contract is officially deployed on the trading channel, the test data generated by running on the test channel will be recorded on the test channel, and the test data will be queried and displayed on the test channel, which means that the user can query on the test channel Test Data.
进一步的,用户在得到所述测试通道上所有用户的共识后,可将所述测试数据删除。Further, after obtaining the consensus of all users on the test channel, the user may delete the test data.
具体的,当需要对区块链中的数据进行删除时,需要得到通道上所有用户的共识,不能自行删除。例如,当区块链中的数据量达到负载瓶颈时,可由测试数据占用存储空间较多的通道用户发起对测试数据的删除,得到测试通道上所有用户共识后,才可将数据占用的存储空间进行释放。如此操作,可以保证区块链上的数据不能被随意删除。Specifically, when the data in the blockchain needs to be deleted, the consensus of all users on the channel needs to be obtained, and it cannot be deleted by itself. For example, when the amount of data in the blockchain reaches the load bottleneck, the channel user occupying more storage space for the test data can initiate the deletion of the test data, and the storage space occupied by the data can only be used after consensus of all users on the test channel To release. By doing so, you can ensure that the data on the blockchain cannot be deleted at will.
这里需要说明的是,在本发明实施例中,应用程序可以调用SDK向测试通道写入交易,且可以在应用程序调用SDK向测试通道写入交易的时候在SDK中限制交易的提交速度,防止测试通道的测试操作对交易通道性能造成干扰。It should be noted here that in the embodiment of the present invention, the application can call the SDK to write transactions to the test channel, and can limit the transaction submission speed in the SDK when the application calls the SDK to write transactions to the test channel, preventing The test operation of the test channel interferes with the performance of the trading channel.
S3:判断所述待测试的智能合约测试是否通过,若通过,则执行步骤S4,若不通过,则将所述智能合约返回给开发者修改或选择新的智能合约后返回步骤S2,重新对其进行测试。S3: Determine whether the test of the smart contract to be tested passes. If it passes, perform step S4. If it fails, return the smart contract to the developer to modify or select a new smart contract and then return to step S2. It's tested.
具体的,测试通道上所有用户共同对合约内容进行业务测试后,根据测试结果,判断待测试的智能合约测试是否通过,若测试通过,则执行步骤S4,若测试不通过,则将智能合约转交给开发者修改或选择新的智能合约后返回步骤S2,重新对其进行测试。Specifically, after all users on the test channel jointly conduct a business test on the contract content, according to the test result, it is determined whether the test of the smart contract to be tested passes, if the test passes, step S4 is executed, and if the test fails, the smart contract is transferred After modifying or selecting a new smart contract for the developer, return to step S2 to test it again.
S4:所述测试通道上所有用户对所述智能合约的内容进行共识,得到同意部署的反馈后,将所述智能合约部署到正式的交易通道上使用。S4: All users on the test channel agree on the content of the smart contract, and after obtaining feedback that the deployment is agreed, deploy the smart contract to the official transaction channel for use.
具体的,测试通过以后,还需要测试通道上所有用户对智能合约的内容进行共识并得到同意部署的反馈后,才能将智能合约部署到所述交易通道上Specifically, after the test is passed, all users on the test channel need to agree on the content of the smart contract and get feedback on the deployment of the smart contract before the smart contract can be deployed on the transaction channel
进一步的,将所述智能合约在所述交易通道上运行生成的区块和/或交易数据记录在所述交易通道上,用户可在所述交易通道查询所述区块和/或交易数据。Further, the blocks and / or transaction data generated by the smart contract running on the transaction channel are recorded on the transaction channel, and the user can query the blocks and / or transaction data on the transaction channel.
具体的,智能合约在交易通道上运行生成的区块和/或交易数据将记录在交易通道上,且区块和/或交易数据将在交易通道进行查询和展示,也就是说用户 可在交易通道查询区块和/或交易数据。这里需要说明的是,交易通道和测试通道的数据都将具备区块链上数据不可篡改的特性。且将测试数据和交易数据分别进行存储,使得两组数据互不干扰,有效提高区块链底层网络的运行和查询效率,进一步提高稳定性。Specifically, the block and / or transaction data generated by the smart contract running on the transaction channel will be recorded on the transaction channel, and the block and / or transaction data will be queried and displayed in the transaction channel, that is to say, the user can Channel query block and / or transaction data. What needs to be explained here is that the data of the transaction channel and the test channel will have the characteristics that the data on the blockchain cannot be tampered with. And store the test data and transaction data separately, so that the two sets of data do not interfere with each other, effectively improve the operation and query efficiency of the underlying network of the blockchain, and further improve the stability.
进一步的,所述待测试的智能合约包括新提交的智能合约和/或历史版本的智能合约。Further, the smart contract to be tested includes a newly submitted smart contract and / or a historical version of the smart contract.
进一步的,所述S3具体包括:Further, the S3 specifically includes:
若所述新提交的智能合约测试通过,则执行步骤S4,若测试不通过,则将所述智能合约返回给开发者修改后返回步骤S2,重新对其进行测试;和/或,If the newly submitted smart contract passes the test, step S4 is executed, and if the test fails, the smart contract is returned to the developer and then returned to step S2 after modification to retest it; and / or,
若所述历史版本的智能合约测试通过,则执行步骤S4,若测试不通过,则选择新的智能合约返回步骤S2,重新对其进行测试。If the smart contract of the historical version passes the test, step S4 is executed. If the test fails, a new smart contract is selected and the process returns to step S2 to test it again.
具体的,在本发明实施例中,待测试的智能合约包括新提交的智能合约和/或历史版本的智能合约。无论是新提交的智能合约还是历史版本的智能合约,若测试通过,均执行步骤S4,但是,两者若是测试不通过,则后续操作会略有不同。具体如下:若新提交的智能合约测试不通过,则将智能合约返回给开发者修改后返回步骤S2,重新对其进行测试;而若历史版本的智能合约测试不通过,则选择新的智能合约返回步骤S2,重新对其进行测试。Specifically, in the embodiment of the present invention, the smart contract to be tested includes a newly submitted smart contract and / or a historical version of the smart contract. Regardless of whether it is a newly submitted smart contract or a historical version of a smart contract, if the test passes, step S4 is performed. However, if the two fail the test, the subsequent operations will be slightly different. The details are as follows: if the newly submitted smart contract test fails, the smart contract is returned to the developer and then modified to return to step S2 to re-test it; and if the smart contract test of the historical version fails, the new smart contract is selected Return to step S2 and test it again.
也就是说,如需根据业务调整等变化对智能合约的内容进行更新或回滚到之前的合约版本时,区块链中的用户可选择将开发者提交的新智能合约或当前交易通道上使用过的历史版本的智能合约部署到测试通道上,由测试通道的所有用户对测试通道的合约内容进行业务测试。如测试不通过,则新提交的智能合约可转给合约的开发者进行修改后再提交和测试,历史版本的智能合约则无法再进行修改,只能选择新的智能合约重新部署到测试通道中进行测试,而交易通道中仍然执行上一个正式部署的合约,如测试通过,则由通道中的所有用户对智能合约的内容进行共识并得到同意部署的反馈后,将更新的合约正式部署到交易通道上使用。In other words, if the content of the smart contract needs to be updated or rolled back to the previous contract version according to changes such as business adjustments, users in the blockchain can choose to use the new smart contract submitted by the developer or use it on the current transaction channel The historical version of the smart contract is deployed on the test channel, and all users of the test channel conduct business tests on the contract content of the test channel. If the test fails, the newly submitted smart contract can be transferred to the contract developer for modification and then submitted and tested. The historical version of the smart contract cannot be modified, and only the new smart contract can be selected for redeployment into the test channel The test is conducted, and the last officially deployed contract is still executed in the transaction channel. If the test passes, all users in the channel agree on the content of the smart contract and get feedback on the deployment of the agreement, then officially deploy the updated contract to the transaction Used on the channel.
上述所有可选技术方案,可以采用任意结合形成本发明的可选实施例,在此不再一一赘述。All of the above optional technical solutions may be combined in any combination to form optional embodiments of the present invention, and details are not repeated herein.
图2是根据一示例性实施例示出的区块链智能合约调试发布系统的结构示意图,参照图2所示,该系统至少包括:Fig. 2 is a schematic structural diagram of a blockchain smart contract debugging and issuance system according to an exemplary embodiment. Referring to Fig. 2, the system includes at least:
新建模块,用于提供给用户创建交易通道,且在用户创建交易通道的同时自动创建一条测试通道,其中,测试通道与交易通道相对应。A new module is provided for users to create a trading channel, and a test channel is automatically created when the user creates a trading channel, where the test channel corresponds to the trading channel.
注册模块,用于提供给用户加入或退出所述交易通道,且在用户加入或退出所述交易通道时同步将用户加入或退出所述测试通道。The registration module is used to provide users with access to or exit from the trading channel, and to synchronously add or exit users to the test channel when the user joins or exits the trading channel.
测试模块,用于将待测试的智能合约部署到所述测试通道上,所述测试通道上所有用户共同对合约内容进行业务测试。The test module is used to deploy the smart contract to be tested on the test channel, and all users on the test channel jointly perform business tests on the contract content.
具体的,在本发明实施例中,智能合约内容只需要在测试时由测试通道的各参与方(同时这些参与方也是交易通道的参与方)保证是否与其业务相符合,而不需要在每次部署测试前都进行智能合约内容的共识认证,减少了各参与方工作量,缩短更新合约的操作周期。Specifically, in the embodiment of the present invention, the content of the smart contract only needs to be guaranteed by the participants of the test channel (these parties are also participants of the transaction channel) during the test, and does not need to be checked every time. Consensus certification of smart contract content is carried out before deployment testing, which reduces the workload of each participant and shortens the operation cycle of updating contracts.
判断模块,用于判断所述待测试的智能合约测试是否通过,若通过,则将所述待测试的智能合约发送至发布模块,若不通过,则将所述智能合约返回给开发者修改或选择新的智能合约后发送至测试模块,重新对其进行测试。The judgment module is used to judge whether the test of the smart contract to be tested passes. If it passes, the smart contract to be tested is sent to the release module. If it fails, the smart contract is returned to the developer for modification or Select a new smart contract and send it to the test module to test it again.
这里需要说明的是,待测试的智能合约包括新提交的智能合约和/或历史版本的智能合约。如测试不通过,新提交的智能合约可转给合约的开发者进行修改后再提交和测试,历史版本的智能合约则无法再进行修改,只能选择新的智能合约重新部署到测试通道中进行测试。It should be noted here that the smart contracts to be tested include newly submitted smart contracts and / or historical versions of smart contracts. If the test fails, the newly submitted smart contract can be transferred to the contract developer for modification and then submitted and tested. The historical version of the smart contract can no longer be modified, and only a new smart contract can be selected for redeployment into the test channel test.
发布模块,用于在所述测试通道上所有用户对所述智能合约的内容进行共识,得到同意部署的反馈后,将所述智能合约部署到所述交易通道上。The release module is used for all users on the test channel to reach a consensus on the content of the smart contract, and after obtaining feedback that the deployment is agreed, deploy the smart contract on the transaction channel.
进一步的,所述系统还包括:Further, the system further includes:
第一存储模块,用于将所述智能合约在所述测试通道上运行生成的测试数据记录在所述测试通道;A first storage module for recording test data generated by the smart contract running on the test channel in the test channel;
第一查询模块,用于用户在所述测试通道查询所述测试数据;The first query module is used for the user to query the test data in the test channel;
删除模块,用于用户在得到所述测试通道上所有用户的共识后,将所述测试数据删除;The deletion module is used for the user to delete the test data after obtaining the consensus of all users on the test channel;
第二存储模块,用于将所述智能合约在所述交易通道上运行生成的区块和/或交易数据记录在所述交易通道上;A second storage module, configured to record the blocks and / or transaction data generated by the smart contract running on the transaction channel on the transaction channel;
第二查询模块,用于用户在所述交易通道查询所述区块和/或交易数据。The second query module is used for the user to query the block and / or transaction data in the transaction channel.
具体的,在本发明实施例中,交易通道和测试通道的数据都将具备区块链上数据不可篡改的特性。且将测试数据和交易数据分别进行存储,使得两组数据互不干扰,有效提高区块链底层网络的运行和查询效率,进一步提高稳定性。Specifically, in the embodiment of the present invention, the data of the transaction channel and the test channel will have the characteristics that the data on the blockchain cannot be tampered with. And store the test data and transaction data separately, so that the two sets of data do not interfere with each other, effectively improve the operation and query efficiency of the underlying network of the blockchain, and further improve the stability.
这里需要说明的,上述区块链智能合约调试发布系统可以是基于上述区块链智能合约调试发布方法来实现的。It should be noted here that the above-mentioned blockchain smart contract debugging and release system may be implemented based on the above-mentioned blockchain smart contract debugging and release method.
综上所述,本发明实施例提供的技术方案带来的有益效果是:In summary, the beneficial effects brought by the technical solutions provided by the embodiments of the present invention are:
1、本发明实施例提供的区块链智能合约调试发布方法及系统,在用户新建交易通道的同时系统自动为交易通道新建一条具有相同参与方的测试通道,用于合约正式部署前的测试,智能合约内容只需要在测试时由交易通道各参与方保证是否与其业务相符合而不需要在每次部署测试前都进行合约内容的共识认证,减少参与方工作量,缩短更新合约的操作周期;1. The method and system for debugging and issuing a blockchain smart contract provided by an embodiment of the present invention. When a user creates a new transaction channel, the system automatically creates a test channel with the same participants for the transaction channel, which is used for testing before the contract is officially deployed. The content of the smart contract only needs to be guaranteed by the participants of the transaction channel during the test whether it is in line with its business. It is not necessary to conduct consensus certification of the contract content before each deployment test, reducing the workload of the participants and shortening the operation cycle of updating the contract;
2、本发明实施例提供的区块链智能合约调试发布方法及系统,将测试数据和交易数据分别存储,两组数据互不干扰,有效提高区块链底层网络的运行和查询效率,提高稳定性;2. The method and system for debugging and issuing blockchain smart contracts provided by the embodiments of the present invention store test data and transaction data separately, and the two sets of data do not interfere with each other, which effectively improves the operation and query efficiency of the underlying network of the blockchain and improves stability. Sex
3、本发明实施例提供的区块链智能合约调试发布方法及系统,将软件开发工程中的流程规范性和可管理性引入到区块链通道的合约调试发布中,减少合约的维护成本,最大限度的提高团队的合作效率。3. The method and system for debugging and releasing blockchain smart contracts provided by the embodiments of the present invention introduces the process standardization and manageability in the software development project into the contract debugging and release of the blockchain channel to reduce the maintenance cost of the contract. Maximize the team's cooperation efficiency.
需要说明的是:上述实施例提供的区块链智能合约调试发布系统在触发调试发布业务时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将系统的内部结构划分 成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的区块链智能合约调试发布系统与区块链智能合约调试发布方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the blockchain smart contract debug and release system provided in the above embodiment triggers the debug and release service, only the division of the above functional modules is used as an example for illustration. In actual applications, the above functions can be allocated as needed Different functional modules are completed, that is, the internal structure of the system is divided into different functional modules to complete all or part of the functions described above. In addition, the blockchain smart contract debugging and release system provided in the above embodiment and the blockchain smart contract debugging and release method embodiment belong to the same concept. For the specific implementation process, see the method embodiment, and details are not described here.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person of ordinary skill in the art may understand that all or part of the steps for implementing the above-described embodiments may be completed by hardware, or may be completed by a program instructing related hardware. The program may be stored in a computer-readable storage medium. The mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present invention should be included in the protection of the present invention Within range.

Claims (10)

  1. 一种区块链智能合约调试发布方法,其特征在于,所述方法包括如下步骤:A method for debugging and issuing a blockchain smart contract, characterized in that the method includes the following steps:
    S1:在创建交易通道的同时自动创建一条测试通道,且用户加入或退出所述交易通道时同步将用户加入或退出所述测试通道;S1: A test channel is automatically created at the same time when the trading channel is created, and when the user joins or exits the trading channel, the user is simultaneously added or exited from the test channel;
    S2:将待测试的智能合约部署到所述测试通道上,所述测试通道上所有用户共同对合约内容进行业务测试;S2: Deploy the smart contract to be tested on the test channel, and all users on the test channel jointly perform business tests on the contract content;
    S3:判断所述待测试的智能合约测试是否通过,若通过,则执行步骤S4,若不通过,则将所述智能合约返回给开发者修改或选择新的智能合约后返回步骤S2,重新对其进行测试;S3: Determine whether the test of the smart contract to be tested passes. If it passes, perform step S4. If it fails, return the smart contract to the developer to modify or select a new smart contract and then return to step S2. Test it;
    S4:所述测试通道上所有用户对所述智能合约的内容进行共识,得到同意部署的反馈后,将所述智能合约部署到所述交易通道上。S4: All users on the test channel agree on the content of the smart contract, and after obtaining feedback that the deployment is agreed, deploy the smart contract on the transaction channel.
  2. 根据权利要求1所述的区块链智能合约调试发布方法,其特征在于,所述待测试的智能合约包括新提交的智能合约和/或历史版本的智能合约。The method for debugging and issuing a blockchain smart contract according to claim 1, wherein the smart contract to be tested includes a newly submitted smart contract and / or a historical version of the smart contract.
  3. 根据权利要求2所述的区块链智能合约调试发布方法,其特征在于,所述S3具体包括:The method for debugging and issuing a blockchain smart contract according to claim 2, wherein the S3 specifically includes:
    若所述新提交的智能合约测试通过,则执行步骤S4,若测试不通过,则将所述智能合约返回给开发者修改后返回步骤S2,重新对其进行测试;和/或,If the newly submitted smart contract passes the test, step S4 is executed, and if the test fails, the smart contract is returned to the developer and then returned to step S2 after modification to retest it; and / or,
    若所述历史版本的智能合约测试通过,则执行步骤S4,若测试不通过,则选择新的智能合约返回步骤S2,重新对其进行测试。If the smart contract of the historical version passes the test, step S4 is executed. If the test fails, a new smart contract is selected and the process returns to step S2 to test it again.
  4. 根据权利要求1至3任意一项所述的区块链智能合约调试发布方法,其特征在于,所述步骤S2还包括:The method for debugging and issuing a blockchain smart contract according to any one of claims 1 to 3, wherein the step S2 further comprises:
    将所述智能合约在所述测试通道上运行生成的测试数据记录在所述测试通道上,用户可在所述测试通道查询所述测试数据。The test data generated by running the smart contract on the test channel is recorded on the test channel, and the user can query the test data on the test channel.
  5. 根据权利要求4所述的区块链智能合约调试发布方法,其特征在于,所 述步骤S2还包括:The method for debugging and issuing a blockchain smart contract according to claim 4, wherein the step S2 further comprises:
    用户在得到所述测试通道上所有用户的共识后,可将所述测试数据删除。After obtaining the consensus of all users on the test channel, the user may delete the test data.
  6. 根据权利要求1至3任意一项所述的区块链智能合约调试发布方法,其特征在于,所述步骤S4还包括:The method for debugging and issuing a blockchain smart contract according to any one of claims 1 to 3, wherein the step S4 further comprises:
    将所述智能合约在所述交易通道上运行生成的区块和/或交易数据记录在所述交易通道上,用户可在所述交易通道查询所述区块和/或交易数据。Record the blocks and / or transaction data generated by the smart contract running on the transaction channel on the transaction channel, and the user can query the block and / or transaction data on the transaction channel.
  7. 一种区块链智能合约调试发布系统,其特征在于,所述系统至少包括:A blockchain smart contract debugging and release system, characterized in that the system includes at least:
    新建模块,用于提供给用户创建交易通道,且在创建交易通道的同时自动创建一条测试通道;A new module is provided for users to create a trading channel, and a test channel is automatically created when the trading channel is created;
    注册模块,用于提供给用户加入或退出所述交易通道,且在用户加入或退出所述交易通道时同步将用户加入或退出所述测试通道;The registration module is used to provide users to join or exit the trading channel, and when the user joins or exits the trading channel, the user is added or exited from the test channel synchronously;
    测试模块,用于将待测试的智能合约部署到所述测试通道上,所述测试通道上所有用户共同对合约内容进行业务测试;A test module, which is used to deploy the smart contract to be tested on the test channel, and all users on the test channel jointly perform business tests on the contract content;
    判断模块,用于判断所述待测试的智能合约测试是否通过,若通过,则将所述待测试的智能合约发送至发布模块,若不通过,则将所述智能合约返回给开发者修改或选择新的智能合约后发送至测试模块,重新对其进行测试;The judgment module is used to judge whether the test of the smart contract to be tested passes. If it passes, the smart contract to be tested is sent to the release module. Select a new smart contract and send it to the test module to test it again;
    发布模块,用于在所述测试通道上所有用户对所述智能合约的内容进行共识,得到同意部署的反馈后,将所述智能合约部署到所述交易通道上。The release module is used for all users on the test channel to reach a consensus on the content of the smart contract, and after obtaining feedback that the deployment is agreed, deploy the smart contract on the transaction channel.
  8. 根据权利要求7所述的区块链智能合约调试发布系统,其特征在于,所述系统还包括:The blockchain smart contract debugging and release system according to claim 7, wherein the system further comprises:
    第一存储模块,用于将所述智能合约在所述测试通道上运行生成的测试数据记录在所述测试通道;A first storage module for recording test data generated by the smart contract running on the test channel in the test channel;
    第一查询模块,用于用户在所述测试通道查询所述测试数据。The first query module is used for the user to query the test data in the test channel.
  9. 根据权利要求8所述的区块链智能合约调试发布系统,其特征在于,所述系统还包括:The blockchain smart contract debugging and release system according to claim 8, wherein the system further comprises:
    删除模块,用于用户在得到所述测试通道上所有用户的共识后,将所述测 试数据删除。The deletion module is used for the user to delete the test data after obtaining the consensus of all users on the test channel.
  10. 根据权利要求7或8所述的区块链智能合约调试发布系统,其特征在于,所述系统还包括:The blockchain smart contract debugging and release system according to claim 7 or 8, wherein the system further comprises:
    第二存储模块,用于将所述智能合约在所述交易通道上运行生成的区块和/或交易数据记录在所述交易通道上;A second storage module, configured to record the blocks and / or transaction data generated by the smart contract running on the transaction channel on the transaction channel;
    第二查询模块,用于用户在所述交易通道查询所述区块和/或交易数据。The second query module is used for the user to query the block and / or transaction data in the transaction channel.
PCT/CN2019/106021 2018-11-19 2019-09-16 Blockchain-based smart contract debugging and releasing method and system WO2020103545A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CA3161753A CA3161753A1 (en) 2018-11-19 2019-09-16 Blockchain-smart-contract debugging and releasing method and system thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811381098.4 2018-11-19
CN201811381098.4A CN109670951B (en) 2018-11-19 2018-11-19 Block chain intelligent contract debugging and publishing method and system

Publications (1)

Publication Number Publication Date
WO2020103545A1 true WO2020103545A1 (en) 2020-05-28

Family

ID=66141813

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/106021 WO2020103545A1 (en) 2018-11-19 2019-09-16 Blockchain-based smart contract debugging and releasing method and system

Country Status (3)

Country Link
CN (1) CN109670951B (en)
CA (1) CA3161753A1 (en)
WO (1) WO2020103545A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782551A (en) * 2020-08-04 2020-10-16 腾讯科技(深圳)有限公司 Test method and device for block chain item and computer equipment
CN113672632A (en) * 2021-08-06 2021-11-19 戈尔特西斯科技(济南)有限公司 Quick query and call method for change records of historical data on chain based on intelligent contract
CN117667676A (en) * 2023-11-21 2024-03-08 上海金仕达卫宁软件科技有限公司 AIGC-based block chain intelligent contract IDE verification test method and system

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109670951B (en) * 2018-11-19 2021-03-26 南京苏宁软件技术有限公司 Block chain intelligent contract debugging and publishing method and system
CN110290168B (en) * 2019-05-08 2022-04-12 深圳壹账通智能科技有限公司 Data transmission method, device, server and storage medium
CN110347609B (en) * 2019-07-18 2023-05-23 腾讯科技(深圳)有限公司 Method and device for testing blockchain software
CN110543419B (en) * 2019-08-28 2021-09-03 杭州趣链科技有限公司 Intelligent contract code vulnerability detection method based on deep learning technology
CN111290958B (en) * 2020-02-20 2023-05-30 联动优势科技有限公司 Method and device for debugging intelligent contract
CN111459504B (en) * 2020-03-30 2023-07-04 百度国际科技(深圳)有限公司 Intelligent contract processing method, device, equipment and storage medium
CN111723102A (en) * 2020-08-21 2020-09-29 支付宝(杭州)信息技术有限公司 Intelligent contract updating method and device
CN111984271B (en) * 2020-08-27 2023-11-03 京东科技信息技术有限公司 Block chain application program processing method and device and block chain application system
CN112433939B (en) * 2020-11-19 2024-08-13 腾讯科技(深圳)有限公司 Intelligent contract testing method and device
CN113961202B (en) * 2021-12-21 2022-02-22 北京中科金财科技股份有限公司 Method and system for automatically debugging intelligent contract

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9934138B1 (en) * 2016-12-07 2018-04-03 International Business Machines Corporation Application testing on a blockchain
CN107943691A (en) * 2017-11-17 2018-04-20 深圳圣马歌科技有限公司 A kind of method and device for the functional test page for automatically generating intelligent contract
CN108073513A (en) * 2017-04-21 2018-05-25 富士通株式会社 The apparatus and method tested the intelligent contract based on block chain
CN108763058A (en) * 2018-04-24 2018-11-06 苏州同济区块链研究院有限公司 A kind of block chain evaluation system
CN108776890A (en) * 2018-06-04 2018-11-09 青岛大学 A kind of believable intelligent paying out wages method and system based on block chain
CN109670951A (en) * 2018-11-19 2019-04-23 苏宁易购集团股份有限公司 A kind of block chain intelligence contract debugging dissemination method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304307B (en) * 2018-01-24 2022-03-04 深圳圣马歌科技有限公司 Performance detection method of intelligent contract on block chain
CN108446947B (en) * 2018-02-07 2021-05-18 平安科技(深圳)有限公司 Real estate transaction method and device
CN108628745A (en) * 2018-05-03 2018-10-09 深圳市牛鼎丰科技有限公司 Track record system, method, computer equipment and the storage medium of application program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9934138B1 (en) * 2016-12-07 2018-04-03 International Business Machines Corporation Application testing on a blockchain
CN108073513A (en) * 2017-04-21 2018-05-25 富士通株式会社 The apparatus and method tested the intelligent contract based on block chain
CN107943691A (en) * 2017-11-17 2018-04-20 深圳圣马歌科技有限公司 A kind of method and device for the functional test page for automatically generating intelligent contract
CN108763058A (en) * 2018-04-24 2018-11-06 苏州同济区块链研究院有限公司 A kind of block chain evaluation system
CN108776890A (en) * 2018-06-04 2018-11-09 青岛大学 A kind of believable intelligent paying out wages method and system based on block chain
CN109670951A (en) * 2018-11-19 2019-04-23 苏宁易购集团股份有限公司 A kind of block chain intelligence contract debugging dissemination method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782551A (en) * 2020-08-04 2020-10-16 腾讯科技(深圳)有限公司 Test method and device for block chain item and computer equipment
CN111782551B (en) * 2020-08-04 2021-07-27 腾讯科技(深圳)有限公司 Test method and device for block chain item and computer equipment
CN113672632A (en) * 2021-08-06 2021-11-19 戈尔特西斯科技(济南)有限公司 Quick query and call method for change records of historical data on chain based on intelligent contract
CN117667676A (en) * 2023-11-21 2024-03-08 上海金仕达卫宁软件科技有限公司 AIGC-based block chain intelligent contract IDE verification test method and system

Also Published As

Publication number Publication date
CN109670951A (en) 2019-04-23
CA3161753A1 (en) 2020-05-28
CN109670951B (en) 2021-03-26

Similar Documents

Publication Publication Date Title
WO2020103545A1 (en) Blockchain-based smart contract debugging and releasing method and system
EP3504626B1 (en) Multi-layer test suite generation
Molyneaux The art of application performance testing: from strategy to tools
US8356056B2 (en) Functional extensions for business objects
US8635056B2 (en) System and method for system integration test (SIT) planning
US9747194B2 (en) Systems and methods to maintain consistency between software specification and code
WO2019037203A1 (en) Application program performance testing method, device, computer equipment, and storage medium
US20220058115A1 (en) System and Method for Automated Application Testing
JP2010506294A (en) Method and system for enabling access to development applications via a multi-tenant on-demand database service
CN108845954A (en) Method for testing pressure, system and storage medium
WO2019104916A1 (en) Development role creation method, device and equipment for test case, and storage medium
Espadas et al. Application development over software-as-a-service platforms
CN110659018A (en) Flow engine implementation method and device
CN106600226B (en) Method and device for optimizing process management system
Sebu et al. Applied process mining in software development
CN111897738B (en) Automatic testing method and device based on atomic service
Oliveira Junior et al. SMartySPEM: a SPEM-based approach for variability management in software process lines
US11086696B2 (en) Parallel cloned workflow execution
CN111782207A (en) Method, device and equipment for generating task stream code and storage medium
US11232019B1 (en) Machine learning based test coverage in a production environment
CN114756293A (en) Service processing method, device, computer equipment and storage medium
WO2023038716A1 (en) Source code editing combining edit and continue with hot reload
US9990274B2 (en) Testing integrated business systems
CN114936152A (en) Application testing method and device
CN108563578A (en) SDK compatibility detection method, device, equipment and readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19886102

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19886102

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3161753

Country of ref document: CA

122 Ep: pct application non-entry in european phase

Ref document number: 19886102

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 19/01/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19886102

Country of ref document: EP

Kind code of ref document: A1