Computer implemented method and system
The present disclosure relates to a computer implemented method for verifying a blockchain stored representation of a dataset. The method comprises the steps of obtaining a dataset reference to an on-chain dataset, the on-chain dataset being stored on the blockchain and comprising data carrying transactions, wherein each data carrying transaction comprises data indicative of an event stored in an off-chain dataset. The method includes traversing the on-chain dataset and for each data carrying transaction in the on-chain dataset: determining that the data indicative of an event in the off-chain data set is associated with an event in the off-chain dataset, and verifying that the on-chain dataset and the off-chain dataset correspond to each other.
1 . A computer implemented method for verifying a blockchain stored representation of a dataset, comprising the steps of:
obtaining a dataset reference to an on-chain dataset, the on-chain dataset being stored on the blockchain and comprising data carrying transactions, wherein the dataset reference is a reference to a first transaction or a last transaction in a chain of transactions comprised by the on-chain dataset, wherein each data carrying transaction comprises data indicative of an event stored in an off-chain dataset, wherein the off-chain dataset comprises a plurality of data items, each data item comprising a preimage and a digest of the preimage, wherein each data item of the off-chain dataset is associated with one of the events stored in the off-chain dataset, and wherein the data indicative of the event stored in the off-chain dataset comprises a digest of one of the preimages in the off-chain dataset;
verifying that the on-chain dataset and the off-chain dataset correspond to each other by traversing the on-chain dataset and for each data carrying transaction in the on-chain dataset:
determining that the data indicative of the event stored in the off-chain dataset is associated with an event in the off-chain dataset, wherein the determining comprises locating a data item in the off-chain dataset with the same digest of the preimage as the digest comprised by the data indicative of the event stored in the off-chain dataset.
2 . The computer implemented method of claim 1 , wherein the data indicative of the data item of the off-chain dataset additionally comprises a preimage of a data item of the off-chain dataset, and optionally wherein the step of determining that the data indicative of the data item in the off-chain dataset is associated with a data item in the off-chain dataset comprises locating a data item in the off-chain dataset with the same preimage as the on-chain data item.
3 . The computer implemented method of claim 1 , wherein the data indicative of the data item of the off-chain dataset further comprises a hash of an event.
4 . The computer implemented method of claim 3 , wherein the step of determining that the data indicative of the data item in the off-chain dataset is associated with a data item in the off-chain dataset comprises:
locating a data item in the off-chain dataset which has the same hash of an event.
5 . The computer implemented method of claim 3 , wherein the step of determining that the data indicative of the data item in the off-chain dataset is associated with a data item in the off-chain dataset comprises:
locating a data item in the off-chain dataset which has the same event and/or subsection of the event.
6 . The computer implemented method of claim 1 , wherein the data indicative of the data item of the off-chain dataset further comprises the event and/or a subsection of the event.
7 . The computer implemented method of claim 1 , wherein the preimage comprises a digest of the preimage of the preceding data item in the off-chain dataset.
8 . The computer implemented method of claim 1 , wherein each transaction in the on-chain dataset comprises a transaction reference to a further transaction such that a chain of transactions is formed.
9 . The computer implemented method of claim 8 , wherein traversing the on-chain dataset comprises:
obtaining a given transaction in the on-chain dataset, and
obtaining a further transaction based on a first transaction reference in the given transaction or based on a second transaction reference in the further transaction.
10 . The computer implemented method of claim 8 , wherein:
the dataset reference to the on-chain dataset comprises a transaction id of the first or the last transaction in the chain of transactions; and/or
the dataset reference to the on-chain dataset comprises a block id of the first transaction.
11 . The computer implemented method of claim 1 , further comprising the step of obtaining data items in the off-chain dataset and/or wherein each data item of the off-chain dataset is obtained by accessing a database and/or by accessing a data storage that substantially mirrors the database.
12 . A device, comprising:
a processor; and
memory, the memory including executable instructions that, as a result of execution by the processor, causes the device to perform a computer implemented method for verifying a blockchain stored representation of a dataset, comprising the steps of:
obtaining a dataset reference to an on-chain dataset, the on-chain dataset being stored on the blockchain and comprising data carrying transactions, wherein the dataset reference is a reference to a first transaction or a last transaction in a chain of transactions comprised by the on-chain dataset, wherein each data carrying transaction comprises data indicative of an event stored in an off-chain dataset, wherein the off-chain dataset comprises a plurality of data items, each data item comprising a preimage and a digest of the preimage, wherein each data item of the off-chain dataset is associated with one of the events stored in the off-chain dataset, and wherein the data indicative of the event stored in the off-chain dataset comprises a digest of one of the preimages in the off-chain dataset;
verifying that the on-chain dataset and the off-chain dataset correspond to each other by traversing the on-chain dataset and for each data carrying transaction in the on-chain dataset:
determining that the data indicative of the event stored in the off-chain dataset is associated with an event in the off-chain dataset, wherein the determining comprises locating a data item in the off-chain dataset with the same digest of the preimage as the digest comprised by the data indicative of the event stored in the off-chain dataset.
13 . A system, comprising:
a device, comprising:
a processor; and
memory, the memory including executable instructions that, as a result of execution by the processor, causes the device to perform a computer implemented method for verifying a blockchain stored representation of a dataset, comprising the steps of:
obtaining a dataset reference to an on-chain dataset, the on-chain dataset being stored on the blockchain and comprising data carrying transactions, wherein the dataset reference is a reference to a first transaction or a last transaction in a chain of transactions comprised by the on-chain dataset, wherein each data carrying transaction comprises data indicative of an event stored in an off-chain dataset, wherein the off-chain dataset comprises a plurality of data items, each data item comprising a preimage and a digest of the preimage, wherein each data item of the off-chain dataset is associated with one of the events stored in the off-chain dataset, and wherein the data indicative of the event stored in the off-chain dataset comprises a digest of one of the preimages in the off-chain dataset;
verifying that the on-chain dataset and the off-chain dataset correspond to each other by traversing the on-chain dataset and for each data carrying transaction in the on-chain dataset:
determining that the data indicative of the event stored the off-chain dataset is associated with an event in the off-chain dataset, wherein the determining comprises locating a data item in the off-chain dataset with the same digest of the preimage as the digest comprised by the data indicative of the event stored in the off-chain dataset,
and
a third-party device configured to receive an outcome of the computer implemented method for verifying the blockchain stored representation of the dataset-audit.