Smart contracts, blockchains (distributed ledgers), and rights management broadly construed are the themes of today's Spotlight Patents. Both of today's patents address aspects of smart contracts and both are assigned to Alipay (CN). The first patent addresses techniques for executing smart contract, blockchain node, and storage medium. The second patent addresses techniques and processors for performing resource deduction for execution of smart contract.
11,327,732, "Method for executing smart contract, blockchain node, and storage medium," assigned to Alipay (Hangzhou) Information Technology Co., Ltd. (CN)
The present specification provides a method for executing a smart contract, a blockchain node, and a storage medium. An implementation of a method for executing a smart contract includes: receiving, by a blockchain node, a request for creating a smart contract, the request including a bytecode of the smart contract; starting, by the blockchain node after completing deployment of the smart contract, to compile the bytecode of the smart contract into a machine code by using ahead of time (AoT) compilation and storing the machine code; and during execution of a smart contract that has been deployed, interpreting and executing, by the blockchain node, a bytecode of the smart contract in response to that a machine code of the smart contract is not locally stored.
11,327,756, "Methods and processors for performing resource deduction for execution of smart contract," assigned to Alipay (Hangzhou) Information Technology Co., Ltd. (CN).
A first logic circuit included in a processor receives a first digital signal, where the first logic circuit includes a special purpose register, a comparator, and an adder, where the special purpose register stores a first resource balance for executing a smart contract, where the first digital signal includes a resource deduction quota corresponding to a code set in the smart contract. The first logic circuit reads the first resource balance from the special purpose register. The first logic circuit compares, using the comparator, the first resource balance with the resource deduction quota. In response to the first resource balance being greater than or equal to the resource deduction quota, the first logic circuit subtracts, using the adder, the resource deduction quota from the first resource balance to obtain a second resource balance. The first logic circuit stores the second resource balance in the special purpose register.