CPC H04L 9/50 (2022.05) [G06F 21/6218 (2013.01)] | 11 Claims |
1. A method for executing an instance of a smart contract by a blockchain shared between a plurality of nodes, comprising
a first step of serialization in the blockchain of the smart contract and generation of a pointer to the smart contract,
a second step of generating the instance of the smart contract and a first execution of at least one method of the instance,
and comprising the following steps in a cyclic succession:
a third step of serialization in the blockchain of a plurality of status files, wherein each of the plurality of status files contains a state that defines the instance only by at least one internal variable of the instance that is altered by a most recent execution of the at least one method of the instance at an end of a respective plurality of executions of the at least one method of the instance, each of the plurality of the status files omitting a value of any internal variables of the instance that are unaltered, wherein the plurality of status files are temporally ordered according to the respective plurality of executions of the instance,
a fourth step of deserialization in a RAM of a last state of the instance deserializing at least one last status file from the blockchain,
a fifth step of deserialization of the instance valuing a state of the instance according to a last deserialized state, and
a sixth step comprising a further execution of the at least one method of the instance,
wherein in the each of the plurality of status files only internal variables affected by a change in the respective plurality of executions of the instance are saved, and wherein, if a call to a new instance is marked as invalid, creation of the new instance is automatically aborted,
wherein the internal variables of the deserialization are valued on a request, only when necessary to perform one or more methods of executing the instance to obtain an executed instance,
the method further comprising a step of deserializing the plurality of status files recursively from a last to an oldest up to deserialize the internal variables necessary for an execution of the one or more methods of the executed instance,
wherein a plurality of requests for executing the instance of the smart contract are grouped together and executed serially in a predetermined order and an arbitrary execution order indicated as a Delta-group, and wherein a node executing the Delta-group presents results of execution in a single bundle of the results and serializes the single bundle of the results in a single blockchain transaction.
|