CN107562513A - A kind of management method of the intelligent contract life cycle based on JAVA - Google Patents

A kind of management method of the intelligent contract life cycle based on JAVA Download PDF

Info

Publication number
CN107562513A
CN107562513A CN201710585455.8A CN201710585455A CN107562513A CN 107562513 A CN107562513 A CN 107562513A CN 201710585455 A CN201710585455 A CN 201710585455A CN 107562513 A CN107562513 A CN 107562513A
Authority
CN
China
Prior art keywords
contract
jcee
clients
request
client
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
CN201710585455.8A
Other languages
Chinese (zh)
Other versions
CN107562513B (en
Inventor
李伟
梁秀波
邱炜伟
李启雷
尹可挺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Qulian Technology Co Ltd
Original Assignee
Hangzhou Qulian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Qulian Technology Co Ltd filed Critical Hangzhou Qulian Technology Co Ltd
Priority to CN201710585455.8A priority Critical patent/CN107562513B/en
Publication of CN107562513A publication Critical patent/CN107562513A/en
Application granted granted Critical
Publication of CN107562513B publication Critical patent/CN107562513B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了一种基于JAVA的智能合约生命周期的管理方法,该方法通过实现一个JCEE服务器来处理客户端的部署、调用、升级、冻结、解冻合约的请求,对每一个合约生成一个唯一的合约地址并实例化一个合约对象,该对象用于处理发送到对应合约地址上的所有请求,JCEE服务器会对每次的合约请求进行安全性检查,检查其字节码的合法性,检查通过后才会进行合约的请求处理,并返回结果给客户端。由于本产品是基于JAVA语言开发的,因此用户可以将其部署到任意区块链平台中进行合约生命周期的管理,提升了区块链平台的可扩展性。

The invention discloses a JAVA-based smart contract life cycle management method. The method handles the client's deployment, calling, upgrading, freezing and unfreezing contract requests by implementing a JCEE server, and generates a unique contract for each contract. address and instantiate a contract object, which is used to process all requests sent to the corresponding contract address, the JCEE server will perform a security check on each contract request, check the legitimacy of its bytecode, and only after the check passes It will process the request of the contract and return the result to the client. Since this product is developed based on the JAVA language, users can deploy it to any blockchain platform for contract lifecycle management, which improves the scalability of the blockchain platform.

Description

一种基于JAVA的智能合约生命周期的管理方法A JAVA-based smart contract life cycle management method

技术领域technical field

本发明涉及区块链技术,尤其涉及一种基于JAVA的智能合约生命周期的管理方法。The present invention relates to blockchain technology, in particular to a JAVA-based smart contract life cycle management method.

背景技术Background technique

区块链技术,区块链是一种新型去中心化协议,能安全地存储数字货币交易或其他数据,信息不可伪造和篡改,区块链上的交易确认由区块链上的所有节点共同完成,由共识算法保证其一致性,区块链上维护一个公共的账本,公共账本位于存储区块上任何节点可见,从而保证其不可伪造和篡改。Blockchain technology, blockchain is a new type of decentralized protocol that can safely store digital currency transactions or other data, information cannot be forged and tampered with, and transaction confirmation on the blockchain is shared by all nodes on the blockchain Completed, the consensus algorithm guarantees its consistency. A public ledger is maintained on the blockchain. The public ledger is visible to any node on the storage block, thus ensuring that it cannot be forged and tampered with.

智能合约是编程在区块链上的汇编语言,该术语是跨领域法律学者尼克·萨博提出来的,他对智能合约的定义是“一个智能合约是一套以数字形式定义的承诺,包括合约参与方可以在上面执行这些承诺的协议”,换句话说,智能合约就是一个在计算机系统上,当一定条件被满足后,可以被自动执行的合约。通常人们不会自己写字节码,但是会从更高级的语言来编译它,例如用Solidity等类似的专用语言。A smart contract is an assembly language programmed on the blockchain. The term was proposed by Nick Szabo, an interdisciplinary legal scholar. His definition of a smart contract is "a smart contract is a set of commitments defined in digital form, including contract Participants can execute the agreement on these commitments.” In other words, a smart contract is a contract that can be automatically executed when certain conditions are met on a computer system. Often people don't write the bytecode themselves, but compile it from a higher level language, such as a specialized language like Solidity.

区块链的去中心化与不可篡改的特性给智能合约提供了一个很好的发展环境,因此近年来,比特币网络、以太坊网络等一系列区块链社区都陆续开始提供了公开的智能合约编程的接口。但是在智能合约的开发过程中,一直缺少一个完善的生命周期的管理方法,尤其缺少一种基于当前主流编程语言的智能合约管理方法。The decentralized and non-tamperable features of the blockchain provide a good development environment for smart contracts. Therefore, in recent years, a series of blockchain communities such as the Bitcoin network and the Ethereum network have begun to provide public smart contracts. Interface for contract programming. However, in the development process of smart contracts, there has been a lack of a complete life cycle management method, especially a smart contract management method based on the current mainstream programming language.

发明内容Contents of the invention

针对现有技术的不足,本发明提出了一种基于JAVA的智能合约管理方法,从智能合约的部署、调用、升级、冻结、解冻等方面的管理来实现整个智能合约生命周期的管理,具体技术方案如下:Aiming at the deficiencies of the prior art, the present invention proposes a JAVA-based smart contract management method, which realizes the management of the entire smart contract life cycle from the management of smart contract deployment, calling, upgrading, freezing, and thawing. The specific technology The scheme is as follows:

一种基于JAVA的智能合约生命周期的管理方法,包括如下步骤:A method for managing the life cycle of an intelligent contract based on JAVA, comprising the following steps:

步骤一:合约部署;Step 1: contract deployment;

基于JAVA虚拟机的智能合约执行引擎(JAVA based Contract ExecutionEngine,以下简称JCEE)的客户端接收用户输入的压缩过的类文件,随后解压类文件并持久化后,生成合约的唯一标识合约地址ContractAddress,连同类文件的地址向JCEE服务器端发送部署请求;JCEE服务器端通过监听指定端口收到JCEE客户端发送过来的合约部署请求,首先对合约进行安全性检查,如果检查通过,则将合约持久化到元数据库中,随后即可将类文件装载到内存中进行合约的部署;如果检查不通过,直接退出本次的合约部署,并向JCEE客户端返回错误信息;The client of the JAVA based Contract Execution Engine (JCEE for short) receives the compressed class file input by the user, and then decompresses the class file and persists it to generate the unique contract address ContractAddress of the contract. Send a deployment request to the JCEE server together with the address of the class file; the JCEE server receives the contract deployment request from the JCEE client by listening to the specified port, first checks the security of the contract, and if the check passes, persists the contract to In the metadata database, the class file can then be loaded into the memory to deploy the contract; if the check fails, it will directly exit the contract deployment and return an error message to the JCEE client;

步骤二:根据用户需求对合约执行对应的操作:Step 2: Perform corresponding operations on the contract according to user needs:

(1)当需要调用合约时:JCEE客户端接收用户输入的调用invoke请求,解析出调用合约的唯一标识ContractAddress、合约调用的方法名与参数,向JCEE服务器端发送合约调用invoke请求;JCEE服务器端通过监听指定端口收到JCEE客户端发送过来的合约调用请求,首先对合约进行安全性检查,如果检查通过,则调用指定合约地址的指定方法并同步账本信息到JCEE客户端,实现合约的调用,如果检查不通过,则终止本次的合约调用,并向JCEE客户端返回错误信息;(1) When the contract needs to be invoked: the JCEE client receives the invoke request input by the user, parses out the unique identifier of the invoked contract ContractAddress, the method name and parameters invoked by the contract, and sends the contract invoke request to the JCEE server; the JCEE server Receive the contract call request sent by the JCEE client by listening to the specified port, first perform a security check on the contract, if the check passes, call the specified method of the specified contract address and synchronize the ledger information to the JCEE client to realize the call of the contract, If the check fails, the contract call is terminated and an error message is returned to the JCEE client;

(2)当需要升级合约时:JCEE客户端接收用户输入的升级update请求,解析出旧合约的唯一标识ContractAddress、连同新合约的类文件地址向JCEE服务器端发送update请求;JCEE服务器端通过监听指定端口收到JCEE客户端发送过来的合约升级请求,首先对合约进行安全性检查,如果检查不通过,则直接退出本次的合约升级,并返回错误信息到JCEE客户端;如果检查通过,则进行旧合约的查询,如果能够查询到旧合约,则先摧毁旧合约,然后持久化新合约并装载新合约的类文件到内存中完成合约的升级,如果不能查到旧合约,则直接进行新合约的持久化与装载,完成合约的升级;(2) When the contract needs to be upgraded: the JCEE client receives the upgrade update request input by the user, parses out the unique ContractAddress of the old contract, and sends the update request to the JCEE server together with the class file address of the new contract; the JCEE server monitors the specified The port receives the contract upgrade request sent by the JCEE client, and first performs a security check on the contract. If the check fails, it will directly exit this contract upgrade and return an error message to the JCEE client; if the check passes, proceed For the query of the old contract, if the old contract can be found, the old contract will be destroyed first, then the new contract will be persisted and the class file of the new contract will be loaded into the memory to complete the contract upgrade. If the old contract cannot be found, the new contract will be executed directly Persistence and loading of the contract to complete the upgrade of the contract;

(3)当需要冻结合约时:JCEE客户端接收用户输入的冻结frozen请求,解析出所要冻结合约的唯一标识ContractAddress、连同合约的新状态位向JCEE服务器端发送冻结请求;JCEE服务器端通过监听指定端口收到JCEE客户端发送过来的合约冻结请求,首先对合约进行安全性检查,如果检查通过,则更新合约的状态位为frozen状态,实现合约的冻结;如果检查不通过,则退出本次的合约冻结,并向JCEE客户端返回错误信息;(3) When the contract needs to be frozen: the JCEE client receives the freeze request input by the user, parses out the ContractAddress, the unique identifier of the contract to be frozen, and sends the freeze request to the JCEE server together with the new status bit of the contract; the JCEE server specifies through monitoring The port receives the contract freeze request sent by the JCEE client, and first checks the security of the contract. If the check is passed, the status bit of the contract is updated to the frozen state to realize the freezing of the contract; if the check fails, exit this time. The contract freezes and returns an error message to the JCEE client;

(4)当需要解冻合约时:JCEE客户端接收用户输入的解冻unfrozen请求,解析出所要解冻合约的唯一标识ContractAddress、连同合约的新状态位向JCEE服务器端发送解冻请求;JCEE服务器端通过监听指定端口收到JCEE客户端发送过来的合约解冻请求,首先对合约进行安全性检查,如果检查通过,则更新合约的状态位为unfrozen状态,实现合约的解冻;如果检查不通过,则退出本次的合约解冻,并向JCEE客户端返回错误信息;(4) When the contract needs to be unfrozen: the JCEE client receives the unfrozen unfrozen request input by the user, parses out the unique ContractAddress of the contract to be unfrozen, and sends the unfreeze request to the JCEE server together with the new status bit of the contract; the JCEE server monitors the specified The port receives the contract unfreezing request sent by the JCEE client, and first performs a security check on the contract. If the check is passed, the status bit of the contract is updated to the unfrozen state, and the contract is unfrozen; if the check fails, exit this time. Unfreeze the contract and return an error message to the JCEE client;

进一步地,所述的步骤一中,JCEE服务器统一管理所有智能合约,每一次的合约部署都只是一次向JCEE服务器的调用,而不用为每一个智能合约单起一个线程去维护,方便了整个平台的合约管理,也减少了系统资源的浪费。Furthermore, in step 1, the JCEE server uniformly manages all smart contracts, and each contract deployment is just a call to the JCEE server, instead of starting a single thread for each smart contract to maintain, which facilitates the entire platform The contract management also reduces the waste of system resources.

进一步地,所述的步骤一中,JCEE服务器通过远程过程调用协议RPC与JCEE客户端进行通信,所述的合约的安全性检查包括检查合约字节码是否合法和检查合约信息中是否包含合约地址。Further, in the step 1, the JCEE server communicates with the JCEE client through the remote procedure call protocol RPC, and the security check of the contract includes checking whether the contract bytecode is legal and checking whether the contract information contains the contract address .

本发明的有益效果:本发明应用于区块链平台上,提供了一套全新的智能合约生命周期的管理,实现了合约的部署、调用、升级、冻结、解冻,为区块链平台的合约管理提供了便捷。同时,在合约生命周期的每一个阶段,本产品都会进行安全性检查,提升了合约生命周期的安全性。Beneficial effects of the present invention: the present invention is applied to the blockchain platform, provides a set of brand-new smart contract life cycle management, and realizes the deployment, calling, upgrading, freezing, and thawing of the contract, and is a contract of the blockchain platform. Management provides convenience. At the same time, at each stage of the contract life cycle, this product will conduct security checks, which improves the security of the contract life cycle.

附图说明Description of drawings

图1是部署合约状态图;Figure 1 is a state diagram of the deployment contract;

图2是升级合约状态图。Figure 2 is an upgrade contract state diagram.

具体实施方式detailed description

下面根据附图和具体实施例详细描述本发明,本发明的目的和效果将变得更加明显。The purpose and effect of the present invention will become more obvious by describing the present invention in detail according to the accompanying drawings and specific embodiments.

本发明是一种基于JAVA的智能合约生命周期管理方法,包括如下步骤:The present invention is a JAVA-based intelligent contract life cycle management method, comprising the following steps:

步骤一:合约部署;Step 1: contract deployment;

基于JAVA虚拟机的智能合约执行引擎JCEE的客户端接收用户输入的压缩过的类文件,随后解压类文件并持久化后,生成合约的唯一标识合约地址ContractAddress,连同类文件的地址向JCEE服务器端发送部署请求;JCEE服务器端通过监听指定端口收到JCEE客户端发送过来的合约部署请求,首先对合约进行安全性检查,如果检查通过,则将合约持久化到元数据库中,随后即可将类文件装载到内存中进行合约的部署;如果检查不通过,直接退出本次的合约部署,并向JCEE客户端返回错误信息;The client of JCEE, the smart contract execution engine based on the JAVA virtual machine, receives the compressed class file input by the user, then decompresses the class file and persists it, generates the unique contract address ContractAddress of the contract, and sends the address of the class file to the JCEE server Send a deployment request; the JCEE server receives the contract deployment request sent by the JCEE client by listening to the specified port, first checks the security of the contract, and if the check passes, the contract is persisted in the metadata database, and then the class can be Load the file into the memory for contract deployment; if the check fails, exit the contract deployment directly and return an error message to the JCEE client;

步骤二:根据用户需求对合约执行对应的操作:Step 2: Perform corresponding operations on the contract according to user needs:

(1)当需要调用合约时:JCEE客户端接收用户输入的调用invoke请求,解析出调用合约的唯一标识ContractAddress、合约调用的方法名与参数,向JCEE服务器端发送合约调用invoke请求;JCEE服务器端通过监听指定端口收到JCEE客户端发送过来的合约调用请求,首先对合约进行安全性检查,如果检查通过,则调用指定合约地址的指定方法并同步账本信息到JCEE客户端,实现合约的调用,如果检查不通过,则终止本次的合约调用,并向JCEE客户端返回错误信息;(1) When the contract needs to be invoked: the JCEE client receives the invoke request input by the user, parses out the unique identifier of the invoked contract ContractAddress, the method name and parameters invoked by the contract, and sends the contract invoke request to the JCEE server; the JCEE server Receive the contract call request sent by the JCEE client by listening to the specified port, first perform a security check on the contract, if the check passes, call the specified method of the specified contract address and synchronize the ledger information to the JCEE client to realize the call of the contract, If the check fails, the contract call is terminated and an error message is returned to the JCEE client;

(2)当需要升级合约时:JCEE客户端接收用户输入的升级update请求,解析出旧合约的唯一标识ContractAddress、连同新合约的类文件地址向JCEE服务器端发送update请求;JCEE服务器端通过监听指定端口收到JCEE客户端发送过来的合约升级请求,首先对合约进行安全性检查,如果检查不通过,则直接退出本次的合约升级,并返回错误信息到JCEE客户端;如果检查通过,则进行旧合约的查询,如果能够查询到旧合约,则先摧毁旧合约,然后持久化新合约并装载新合约的类文件到内存中完成合约的升级,如果不能查到旧合约,则直接进行新合约的持久化与装载,完成合约的升级;(2) When the contract needs to be upgraded: the JCEE client receives the upgrade update request input by the user, parses out the unique ContractAddress of the old contract, and sends the update request to the JCEE server together with the class file address of the new contract; the JCEE server monitors the specified The port receives the contract upgrade request sent by the JCEE client, and first performs a security check on the contract. If the check fails, it will directly exit this contract upgrade and return an error message to the JCEE client; if the check passes, proceed For the query of the old contract, if the old contract can be found, the old contract will be destroyed first, then the new contract will be persisted and the class file of the new contract will be loaded into the memory to complete the contract upgrade. If the old contract cannot be found, the new contract will be executed directly Persistence and loading of the contract to complete the upgrade of the contract;

(3)当需要冻结合约时:JCEE客户端接收用户输入的冻结frozen请求,解析出所要冻结合约的唯一标识ContractAddress、连同合约的新状态位向JCEE服务器端发送冻结请求;JCEE服务器端通过监听指定端口收到JCEE客户端发送过来的合约冻结请求,首先对合约进行安全性检查,如果检查通过,则更新合约的状态位为frozen状态,实现合约的冻结;如果检查不通过,则退出本次的合约冻结,并向JCEE客户端返回错误信息;(3) When the contract needs to be frozen: the JCEE client receives the freeze request input by the user, parses out the ContractAddress, the unique identifier of the contract to be frozen, and sends the freeze request to the JCEE server together with the new status bit of the contract; the JCEE server specifies through monitoring The port receives the contract freeze request sent by the JCEE client, and first checks the security of the contract. If the check is passed, the status bit of the contract is updated to the frozen state to realize the freezing of the contract; if the check fails, exit this time. The contract freezes and returns an error message to the JCEE client;

(4)当需要解冻合约时:JCEE客户端接收用户输入的解冻unfrozen请求,解析出所要解冻合约的唯一标识ContractAddress、连同合约的新状态位向JCEE服务器端发送解冻请求;JCEE服务器端通过监听指定端口收到JCEE客户端发送过来的合约解冻请求,首先对合约进行安全性检查,如果检查通过,则更新合约的状态位为unfrozen状态,实现合约的解冻;如果检查不通过,则退出本次的合约解冻,并向JCEE客户端返回错误信息。(4) When the contract needs to be unfrozen: the JCEE client receives the unfrozen unfrozen request input by the user, parses out the unique ContractAddress of the contract to be unfrozen, and sends the unfreeze request to the JCEE server together with the new status bit of the contract; the JCEE server monitors the specified The port receives the contract unfreezing request sent by the JCEE client, and first performs a security check on the contract. If the check is passed, the status bit of the contract is updated to the unfrozen state, and the contract is unfrozen; if the check fails, exit this time. The contract is unfrozen and an error message is returned to the JCEE client.

所述的步骤一中,JCEE服务器统一管理所有智能合约,每一次的合约部署都只是一次向JCEE服务器的调用,而不用为每一个智能合约单起一个线程去维护。In step 1, the JCEE server uniformly manages all smart contracts, and each contract deployment is just a call to the JCEE server, instead of starting a single thread for each smart contract to maintain.

所述的步骤一中,用户端指定的类文件的同时还需要提供该合约的一些属性信息,方便JCEE客户端定位类文件的位置,JCEE客户端通过区块链平台生成唯一的合约地址后,才能够向JCEE服务器发送部署合约的请求,该请求中需要带上合约地址与合约的相关信息,如合约类文件的位置等,JCEE服务器可以与JCEE客户端可设置同一台主机上,也可以设置在不同主机上,JCEE服务器端通过远程过程调用协议RPC与JCEE客户端进行通信,获取到了JCEE客户端的请求后,会进行合约安全性的检查,检查合约字节码是否合法等,检查通过后,还会进行合约完备性的检查,具体包括检查合约信息中是否包含了合约地址等,完成了两项检查后,才会进行合约的持久化,将新合约存储到元数据库中,完成后才会真正的进行合约的部署,即将合约装载到内存中。In step 1, the class file specified by the client also needs to provide some attribute information of the contract to facilitate the location of the class file for the JCEE client. After the JCEE client generates a unique contract address through the blockchain platform, To be able to send a contract deployment request to the JCEE server, the request needs to bring the contract address and contract-related information, such as the location of the contract file, etc. The JCEE server and the JCEE client can be set on the same host, or can be set On different hosts, the JCEE server communicates with the JCEE client through the remote procedure call protocol RPC. After obtaining the request from the JCEE client, it will check the security of the contract, check whether the contract bytecode is legal, etc. After the check is passed, The completeness of the contract will also be checked, including checking whether the contract information contains the contract address, etc. After completing the two checks, the contract will be persisted, and the new contract will be stored in the metadata database. The actual deployment of the contract is to load the contract into the memory.

所述的步骤二中,合约的调用是用户使用智能合约最直观的感受,用户通过输入合约的方法名、参数,并指定所要调用合约的地址后,向JCEE客户端发送JSON-RPC请求,JCEE客户端仅仅将相关参数封装后就可以转发给JCEE服务器端,JCEE服务器同样会进行安全性与完备性的检查,检查通过后才会进入相应的执行流程。In the second step, the call of the contract is the most intuitive feeling for the user to use the smart contract. After the user enters the method name and parameters of the contract, and specifies the address of the contract to be called, the user sends a JSON-RPC request to the JCEE client, and the JCEE The client only needs to encapsulate the relevant parameters and forward them to the JCEE server. The JCEE server will also check the security and completeness, and will enter the corresponding execution process after the check is passed.

所述的步骤二中,合约的升级需要用户提供新的合约类文件以及旧的合约地址,旧合约地址用于定位摧毁原先的合约,并在该地址上新建一条新的合约,因此合约升级后,合约地址是不变的。In the above step 2, the upgrade of the contract requires the user to provide a new contract file and the old contract address, the old contract address is used to locate and destroy the original contract, and create a new contract on this address, so after the contract is upgraded , the contract address remains unchanged.

所述的步骤二中,合约的冻结只是对合约状态位的进行更改,冻结后的合约不能再进行调用、更新等操作。In the second step, the freezing of the contract is only to change the status bit of the contract, and the frozen contract can no longer be called, updated and other operations.

所述的步骤二中,合约的解冻需要提供已冻结合约的合约地址,同样的,合约解冻也只是对合约状态位的进行更改,解冻后的合约可以继续进行调用、更新等操作。In the second step, the unfreezing of the contract needs to provide the contract address of the frozen contract. Similarly, the unfreezing of the contract is only to change the status bit of the contract, and the unfrozen contract can continue to call, update and other operations.

Claims (3)

1. a kind of management method of the intelligent contract life cycle based on JAVA, it is characterised in that comprise the following steps:
Step 1:Contract is disposed:
The client of intelligent contract enforcement engine JCEE based on JAVA virtual machine receives the compressed class file of user's input, After then decompressing class file and persistence, the unique mark contract address ContractAddress of contract is generated, together with class file Address to JCEE server ends send deployment request;JCEE server ends receive JCEE clients hair by monitoring designated port The contract deployment request brought, carries out security inspection to contract first, passes through if checked, contract is persisted into member In database, class file can be then loaded into the deployment that contract is carried out in internal memory;If check not by directly exiting this Secondary contract deployment, and return to error message to JCEE clients.
Step 2:Operation corresponding to being performed according to user's request to contract:
(1) when needing to call contract:JCEE clients receive the calling invoke requests of user's input, parse calling contract Unique mark ContractAddress, contract call method name and parameter, to JCEE server ends send contract call Invoke is asked;JCEE server ends please by monitoring designated port receives that JCEE clients send over and about invoke Ask, security inspection is carried out to contract first, pass through if checked, call the designation method for specifying contract address and synchronous account This information arrives JCEE clients, realizes the calling of contract, if check not by, terminate this contract call, and to JCEE clients return to error message;
(2) when needing to upgrade contract:JCEE clients receive the upgrading update requests of user's input, parse old contract Unique mark ContractAddress, the class file address together with new contract send update requests to JCEE server ends; The contract upgrade request that JCEE server ends receive JCEE clients and sended over by monitoring designated port, enters to contract first Row security inspection, if checked not by directly exiting this contract upgrading, and return to error message to JCEE client End;If inspection passes through, the inquiry of old contract is carried out, if it is possible to inquire old contract, then first destroy old contract, Ran Houchi Change new contract long and load the class file of new contract and the upgrading of contract is completed into internal memory, if old contract can not be found, directly The persistence and loading of the new contract of row are tapped into, completes the upgrading of contract;
(3) when needing to freeze contract:The frozen that freezes that JCEE clients receive user's input is asked, and parses to be freezed The unique mark ContractAddress of contract, the new state position together with contract send freeze request to JCEE server ends; The contract freeze request that JCEE server ends receive JCEE clients and sended over by monitoring designated port, enters to contract first Row security inspection, pass through if checked, the mode bit of renewal contract is frozen states, realizes freezing for contract;If Check not by the way that the contract for then exiting this freezes, and returns to error message to JCEE clients;
(4) when needing defrosting contract:JCEE clients receive the defrosting unfrozen requests of user's input, parse to be solved The unique mark ContractAddress of jelly contract, the new state position together with contract send request of thawing to JCEE server ends; The contract defrosting request that JCEE server ends receive JCEE clients and sended over by monitoring designated port, enters to contract first Row security inspection, pass through if checked, the mode bit of renewal contract is unfrozen states, realizes the defrosting of contract;Such as Fruit is checked not by then exiting this contract and thawing, and return to error message to JCEE clients.
2. the management method of the intelligent contract life cycle based on JAVA as claimed in claim 1, it is characterised in that described In step 1, JCEE servers are managed collectively all intelligent contracts, and contract deployment each time all simply once services to JCEE The calling of device, and go to safeguard without playing a thread for each intelligent contract sheet.
3. the management method of the intelligent contract life cycle based on JAVA as claimed in claim 1, in described step one, JCEE servers are communicated by remote procedure call protocol RPC with JCEE clients, the security inspection of described contract Including checking whether contract bytecode is legal and checks in contract information whether include contract address.
CN201710585455.8A 2017-07-18 2017-07-18 A JAVA-based smart contract life cycle management method Active CN107562513B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710585455.8A CN107562513B (en) 2017-07-18 2017-07-18 A JAVA-based smart contract life cycle management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710585455.8A CN107562513B (en) 2017-07-18 2017-07-18 A JAVA-based smart contract life cycle management method

Publications (2)

Publication Number Publication Date
CN107562513A true CN107562513A (en) 2018-01-09
CN107562513B CN107562513B (en) 2020-08-07

Family

ID=60972836

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710585455.8A Active CN107562513B (en) 2017-07-18 2017-07-18 A JAVA-based smart contract life cycle management method

Country Status (1)

Country Link
CN (1) CN107562513B (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664787A (en) * 2018-05-15 2018-10-16 深圳市网心科技有限公司 Contract deployment, call method, contract audit equipment, storage medium and system
CN108765158A (en) * 2018-05-31 2018-11-06 杭州秘猿科技有限公司 A kind of intelligent contract automotive engine system and its contract execution method based on block chain
CN108881312A (en) * 2018-08-24 2018-11-23 北京京东尚科信息技术有限公司 Intelligent contract upgrade method, system and relevant device and storage medium
CN108960830A (en) * 2018-07-16 2018-12-07 百度在线网络技术(北京)有限公司 Dispositions method, device, equipment and the storage medium of intelligent contract
CN109146477A (en) * 2018-08-02 2019-01-04 夸克链科技(深圳)有限公司 A kind of method that specified address when intelligent contract is issued in ether mill
CN109189396A (en) * 2018-08-16 2019-01-11 北京京东尚科信息技术有限公司 intelligent contract engine module, operation method and storage medium
CN109375915A (en) * 2018-10-26 2019-02-22 陕西医链区块链集团有限公司 A kind of block chain visual programming system and method
CN109766722A (en) * 2019-01-22 2019-05-17 苏州同济区块链研究院有限公司 The method and its system of intelligent contract are constructed in a kind of block chain
CN110297721A (en) * 2019-06-24 2019-10-01 杭州趣链科技有限公司 A kind of across contract call method of the intelligent contract based on JAVA
CN110535928A (en) * 2019-08-22 2019-12-03 杭州趣链科技有限公司 An event push method for a blockchain JAVA smart contract
CN110532038A (en) * 2019-08-19 2019-12-03 杭州趣链科技有限公司 A Parallel Execution Method Based on Java Smart Contract
CN110580624A (en) * 2018-06-07 2019-12-17 华为技术有限公司 Chaincode upgrade method and device
CN111062060A (en) * 2019-11-28 2020-04-24 杭州趣链科技有限公司 Voting proposal life cycle management method based on intelligent contract
CN111221568A (en) * 2020-01-10 2020-06-02 杭州趣链科技有限公司 Fabric chain code life cycle management system based on physical machine deployment
CN111245910A (en) * 2019-12-31 2020-06-05 杭州趣链科技有限公司 Block chain light node multi-copy deployment method
CN111651169A (en) * 2020-05-19 2020-09-11 鼎链数字科技(深圳)有限公司 Block chain intelligent contract operation method and system based on web container
CN112037055A (en) * 2020-08-17 2020-12-04 成都质数斯达克科技有限公司 Transaction processing method and device, electronic equipment and readable storage medium
CN115375469A (en) * 2021-05-20 2022-11-22 顺丰科技有限公司 Intelligent contract life cycle management method and device and computer equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104320262A (en) * 2014-11-05 2015-01-28 中国科学院合肥物质科学研究院 User public key address binding, searching and verifying method and system based on crypto currency open account book technology
CN105976231A (en) * 2016-06-24 2016-09-28 深圳前海微众银行股份有限公司 Asset management method based on intelligent block chain contracts and nodes
US20160379312A1 (en) * 2015-06-02 2016-12-29 Elwha, Llc Machine/article/composition/process state(s) for tracking philanthropic and/or other efforts
CN106407430A (en) * 2016-09-27 2017-02-15 北京天德科技有限公司 Complex and intelligent contract state synchronization method based on phase buckets
US20170132615A1 (en) * 2015-11-11 2017-05-11 Bank Of America Corporation Block chain alias for person-to-person payments
CN106709704A (en) * 2016-11-23 2017-05-24 杭州秘猿科技有限公司 Intelligent contract upgrading method based on permission chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104320262A (en) * 2014-11-05 2015-01-28 中国科学院合肥物质科学研究院 User public key address binding, searching and verifying method and system based on crypto currency open account book technology
US20160379312A1 (en) * 2015-06-02 2016-12-29 Elwha, Llc Machine/article/composition/process state(s) for tracking philanthropic and/or other efforts
US20170132615A1 (en) * 2015-11-11 2017-05-11 Bank Of America Corporation Block chain alias for person-to-person payments
CN105976231A (en) * 2016-06-24 2016-09-28 深圳前海微众银行股份有限公司 Asset management method based on intelligent block chain contracts and nodes
CN106407430A (en) * 2016-09-27 2017-02-15 北京天德科技有限公司 Complex and intelligent contract state synchronization method based on phase buckets
CN106709704A (en) * 2016-11-23 2017-05-24 杭州秘猿科技有限公司 Intelligent contract upgrading method based on permission chain

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李赫: ""基于区块链 2.0 的以太坊初探"", 《中国金融电脑》 *
等一轮残月: ""以太坊智能合约编程(2):DApp框架,工具以及工作流程"", 《链节点 HTTPS://WWW.CHAINNODE.COM/TUTORIAL/2043》 *

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664787A (en) * 2018-05-15 2018-10-16 深圳市网心科技有限公司 Contract deployment, call method, contract audit equipment, storage medium and system
CN108765158A (en) * 2018-05-31 2018-11-06 杭州秘猿科技有限公司 A kind of intelligent contract automotive engine system and its contract execution method based on block chain
CN108765158B (en) * 2018-05-31 2020-11-24 杭州溪塔科技有限公司 Intelligent contract engine system based on block chain and contract execution method thereof
CN110580624A (en) * 2018-06-07 2019-12-17 华为技术有限公司 Chaincode upgrade method and device
CN110580624B (en) * 2018-06-07 2022-02-18 华为技术有限公司 Chain code upgrading method and device
CN108960830A (en) * 2018-07-16 2018-12-07 百度在线网络技术(北京)有限公司 Dispositions method, device, equipment and the storage medium of intelligent contract
CN109146477A (en) * 2018-08-02 2019-01-04 夸克链科技(深圳)有限公司 A kind of method that specified address when intelligent contract is issued in ether mill
CN109146477B (en) * 2018-08-02 2022-02-18 夸克链科技(深圳)有限公司 Method for specifying address when Ethernet workshop issues intelligent contract
CN109189396B (en) * 2018-08-16 2022-04-12 北京京东尚科信息技术有限公司 Intelligent contract engine assembly, operation method and storage medium
CN109189396A (en) * 2018-08-16 2019-01-11 北京京东尚科信息技术有限公司 intelligent contract engine module, operation method and storage medium
CN108881312A (en) * 2018-08-24 2018-11-23 北京京东尚科信息技术有限公司 Intelligent contract upgrade method, system and relevant device and storage medium
CN109375915A (en) * 2018-10-26 2019-02-22 陕西医链区块链集团有限公司 A kind of block chain visual programming system and method
CN109766722A (en) * 2019-01-22 2019-05-17 苏州同济区块链研究院有限公司 The method and its system of intelligent contract are constructed in a kind of block chain
CN109766722B (en) * 2019-01-22 2020-11-10 苏州同济区块链研究院有限公司 Method for constructing intelligent contract in block chain
CN110297721A (en) * 2019-06-24 2019-10-01 杭州趣链科技有限公司 A kind of across contract call method of the intelligent contract based on JAVA
CN110532038A (en) * 2019-08-19 2019-12-03 杭州趣链科技有限公司 A Parallel Execution Method Based on Java Smart Contract
CN110535928B (en) * 2019-08-22 2022-04-01 杭州趣链科技有限公司 Event pushing method for JAVA intelligent contract of block chain
CN110535928A (en) * 2019-08-22 2019-12-03 杭州趣链科技有限公司 An event push method for a blockchain JAVA smart contract
CN111062060A (en) * 2019-11-28 2020-04-24 杭州趣链科技有限公司 Voting proposal life cycle management method based on intelligent contract
CN111062060B (en) * 2019-11-28 2022-04-26 杭州趣链科技有限公司 Voting proposal life cycle management method based on intelligent contract
CN111245910A (en) * 2019-12-31 2020-06-05 杭州趣链科技有限公司 Block chain light node multi-copy deployment method
CN111221568A (en) * 2020-01-10 2020-06-02 杭州趣链科技有限公司 Fabric chain code life cycle management system based on physical machine deployment
CN111221568B (en) * 2020-01-10 2023-05-26 杭州趣链科技有限公司 A fabric chain code life cycle management system based on physical machine deployment
CN111651169A (en) * 2020-05-19 2020-09-11 鼎链数字科技(深圳)有限公司 Block chain intelligent contract operation method and system based on web container
CN111651169B (en) * 2020-05-19 2023-07-04 鼎链数字科技(深圳)有限公司 Block chain intelligent contract operation method and system based on web container
CN112037055A (en) * 2020-08-17 2020-12-04 成都质数斯达克科技有限公司 Transaction processing method and device, electronic equipment and readable storage medium
CN112037055B (en) * 2020-08-17 2023-05-05 成都质数斯达克科技有限公司 Transaction processing method, device, electronic equipment and readable storage medium
CN115375469A (en) * 2021-05-20 2022-11-22 顺丰科技有限公司 Intelligent contract life cycle management method and device and computer equipment

Also Published As

Publication number Publication date
CN107562513B (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN107562513A (en) A kind of management method of the intelligent contract life cycle based on JAVA
US8099388B2 (en) Efficient handling of mostly read data in a computer server
US12105735B2 (en) Asynchronous accounting method and apparatus for blockchain, medium and electronic device
KR20140047580A (en) Method and system for synchronization mechanism on multi-server reservation system
CN111813868B (en) Data synchronization method and device
CN108572986A (en) A kind of method and node device of data update
CN112685499A (en) Method, device and equipment for synchronizing process data of work service flow
US11483158B2 (en) Distributed ledger device, distributed ledger system, and distributed ledger management method
CN113535335B (en) Virtual resource allocation method and device based on block chain and electronic equipment
CN115048188A (en) Network isolation control system and method for container, electronic device and storage medium
CN113590711B (en) A highly elastic and scalable multi-chain hierarchical shared storage system and method
CN120491987B (en) Resource packaging and deploying method, product, equipment and medium
US7877695B2 (en) Tailored object
CN115550382A (en) Configuration item synchronization method, device, system and equipment
CN107818122A (en) A kind of Agent components, search management method and search management system
US20250158888A1 (en) Address library construction method and apparatus applied to cdn, device, and medium
CN116302433A (en) Data processing method, device, computer equipment and storage medium
CN112347141B (en) Data access control method, system, device and medium
CN115694841A (en) Block chain and IPFS network-based metadata circulation method and device and storage medium
CN115220744A (en) Data processing method and device, storage medium and electronic device
CN119520511B (en) Image file downloading system and method, storage medium and electronic equipment
CN119249769B (en) A damage assessment system and method for multi-node services
Stamos et al. Caching techniques on CDN simulated frameworks
CN111639130A (en) Data access method and device based on materialized view and computer equipment
CN118819747A (en) Business execution method, device, equipment, medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310051 Zhejiang Province, Hangzhou City, Binjiang District, Xixing Street, Yue Ming Road 199, Building 2, Room 1701

Patentee after: Hangzhou Qulian Technology Co., Ltd.

Country or region after: China

Address before: 310012 Zhejiang Province, Hangzhou City, Xihu District, Wenzhu Road 199, Building 13, South Building, Room 501

Patentee before: HANGZHOU HYPERCHAIN TECHNOLOGIES Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address