-
1.
公开(公告)号:EP3944174A1
公开(公告)日:2022-01-26
申请号:EP21181715.0
申请日:2021-06-25
发明人: GUO, Xuepeng , ZHAO, Kuan , GUO, Ren , GAO, Haiyuan , REN, Qibin , HUANG, Zucheng , ZHANG, Lei , PAN, Guozhen , WEI, Changzheng , CHEN, Zhijian , YAN, Ying
摘要: Embodiments of the present specification provide methods and processors for performing resource deduction for execution of a smart contract. The method is performed by a processor, the processor includes a special purpose register, and the special purpose register stores a first resource balance for executing the smart contract. The method includes: reading a first extended instruction, where the first extended instruction includes a resource deduction quota corresponding to a predetermined code set, and performing the following operations based on the first extended instruction: reading the first resource balance from the special purpose register; comparing the first resource balance with the resource deduction quota; if the comparison result is that the first resource balance is greater than or equal to the resource deduction quota, subtracting the resource deduction quota from the first resource balance to obtain a second resource balance; and storing the second resource balance in the special purpose register.