Patent ID: 11915023
Assignee: HIRO SYSTEMS PBC
Field: Computer technology (Electrical engineering)
Classification: CPC G  H | IPC G  H

Claim 11:
12. A computing device of a decentralized network comprising:
a network interface configured to couple the computing device to the decentralized network and receive smart contracts therefrom, each of the received smart contracts comprising a set of functions;
a hardware processor;
a non-transitory computer readable storage medium storing program instructions for execution by the hardware processor in order to cause the computing device to:
receive, by the computing device, a smart contract from the decentralized network, the smart contract comprising a set of functions and defining a data map, wherein the data map comprises a map name, a key, and a value, wherein the map name is associated with a user-defined function of the set of functions of the smart contract, the key is associated with the value and is defined by a first known data type, and the value is associated with a static maximum size related to the size of the user-defined function and is defined by a second known data type;
parse language of the smart contract to form a parse tree comprising tree nodes, wherein each tree node corresponds to a respective function in the set of functions and a parameter of the respective function;
access a first tree node of the tree nodes;
determine that the user-defined function is associated with the first tree node;
determine a runtime and a size of the user-defined function based on the first known data type and the second known data type associated with the data map;
compute an execution value of the smart contract based on the runtime and the size;
output the execution value for use by a virtual machine in determining whether the smart contract can be executed;
in response to a call to the user-defined function of the smart contract, storing, by the virtual machine, a state associated with the smart contract in the data map; and
in response to a second call to the user-defined function of the smart contract,
fetching, by the virtual machine, the state from the data map,
executing, by the virtual machine, at least a portion of the smart contract, and
storing an updated state of execution of the smart contract in the data map based on the execution of the portion of the smart contract.