| CPC G06Q 20/389 (2013.01) [G06Q 2220/00 (2013.01)] | 17 Claims |

|
1. A computer-implemented method performed by at least one computer processor, comprising:
identifying a group of transactions to be rolled back in a blockchain ledger;
determining whether the transactions in the group are eligible to be rolled back together;
responsive to determining that the transactions in the group are not eligible, recommending other transactions to be added to the group and adding the other transactions to the group to be rolled back with the transactions in the group; and
adding a rollback transaction to the blockchain ledger that rolls back effect of the group of transactions,
wherein the rollback transaction has zero or more inputs and zero or more output, the rollback transaction having at least one selected from at least one input and at least one output,
wherein an unspent output of a transaction in the group is provided as an input of the rollback transaction,
wherein input of a transaction in the group, that is not an output of another transaction in the group, is provided as an output of the rollback transaction,
the rollback transaction rolling back the group of transactions that were active at the time of computer failure, and restoring a state of the blockchain ledger to an earlier state consistent with a rollback in a computer database system with which the blockchain ledger is interacting;
wherein recommending other transactions to be added to the group includes:
initializing a to-be-added transaction set to empty;
constructing a directed acyclic graph of the transactions in the group and in the to-be-added transaction set, wherein a transaction forms a node of the directed acyclic graph, and wherein the transaction's output spent by another transaction forms an edge between the transaction and said another transaction;
responsive to determining that the transaction represented in the node of the directed acyclic graph has output spent by a transaction not represented in the acyclic graph, adding the transaction not represented in the acyclic graph to the to-be-added transaction set and repeating the constructing the directed acyclic graph until there are no more transactions in the directed acyclic graph whose output is spent by a transaction not represented in the acyclic graph, wherein transactions added to the to-be-added transaction set are recommended.
|