当前位置: X-MOL 学术Wirel. Commun. Mob. Comput. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
To Delay Instantiation of a Smart Contract to Save Calculation Resources in IoT
Wireless Communications and Mobile Computing Pub Date : 2021-02-18 , DOI: 10.1155/2021/6666236
Hong Su 1 , Bing Guo 1 , Yan Shen 2 , Zhen Zhang 1 , Chaoxia Qin 1
Affiliation  

Smart contracts are required to be instantiated in the predeployed stage, which consumes computation resources from then on. It is a big waste in the blockchain whose nodes are composed of IoT devices, as those devices often have limited resources (such as limited power supplies or a limited number of processes to run). Meanwhile, IoT devices are heterogeneous and different smart contracts are required. If those smart contracts are instantiated previously, numerous meaningless addresses are required. In this paper, we propose to delay the instantiation of a smart contract when used and terminate it when not used, which is similar to the life cycle of a variable. Then, a new kind of variable (the wrapping variable) is used to hide details of the instantiation and the address. The smart contract is instantiated in the construction function of the wrapping variable, or even it is delayed to the time when there are requests for it. The smart contract terminates when the variable is out of its scope. Then, different instantiation methods are proposed. Finally, we perform the qualitative comparison between the proposed approach and the predeployment method, and it demonstrates that the proposed methods optimize the life cycle of the smart contract and save calculation resources.

中文翻译:

延迟智能合约的实例化以节省IoT中的计算资源

需要在预部署阶段实例化智能合约,此后便会消耗计算资源。在节点由物联网设备组成的区块链中,这是一个巨大的浪费,因为这些设备通常具有有限的资源(例如有限的电源或运行的进程数量有限)。同时,物联网设备是异构的,需要不同的智能合约。如果这些智能合约是事先实例化的,则需要大量无意义的地址。在本文中,我们建议延迟使用智能合约的实例化,并在不使用智能合约时将其终止,这类似于变量的生命周期。然后,使用一种新的变量(包装变量)隐藏实例化和地址的详细信息。智能合约在包装变量的构造函数中实例化,甚至延迟到有请求的时间。当变量超出其范围时,智能合约终止。然后,提出了不同的实例化方法。最后,我们对所提出的方法与预部署方法进行了定性比较,结果表明所提出的方法可以优化智能合约的生命周期并节省计算资源。
更新日期:2021-02-18
down
wechat
bug