Method and apparatus for verifying block data in a blockchain
AssigneeAlibaba Group Holding Limited
InventorHonglin Qiu
Life of this patent
Estimating the term…
Abstract
The present solution discloses example methods and systems for verifying block data. One example method includes identifying newly added data to be stored in a blockchain, and selecting a data node in a block to store the newly added data. A string is generated based on the newly added data, and then a verification value for the newly added data is developed from the string using a predetermined algorithm. A new verification value for the block is calculated based on the verification value of the newly added data and the original verification values of the unchanged data nodes in the block. The new verification value for the block can then be used to verify the data stored in the block is consistent with data stored in the rest of the blockchain.
Claims20
A computer-implemented method for verifying block data, the computer-implemented method comprising:
- selecting, from a block comprising a plurality of data nodes, a data node configured to store newly added data;
- determining a first verification value of the newly added data;
- determining, prior to storing the newly added data in the selected data node, an original second verification value of the selected data node;
- calculating an updated second verification value of the selected data node based on the first verification value of the newly added data and the original second verification value of the selected data node;
- and
- determining a third verification value of the block based on the updated second verification value of the selected data node and respective original second verification values of other data nodes of the block, wherein the third verification value of the block is used to verify whether data stored in the block is consistent with data stored in other blocks in a blockchain.
A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising:
- selecting, from a block comprising a plurality of data nodes, a data node configured to store newly added data;
- determining a first verification value of the newly added data;
- determining, prior to storing the newly added data in the selected data node, an original second verification value of the selected data node;
- calculating an updated second verification value of the selected data node based on the first verification value of the newly added data and the original second verification value of the selected data node;
- and
- determining a third verification value of the block based on the updated second verification value of the selected data node and respective original second verification values of other data nodes of the block, wherein the third verification value of the block is used to verify whether data stored in the block is consistent with data stored in other blocks in a blockchain.
A computer-implemented system, comprising:
- one or more computers;
- and
- one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform one or more operations comprising:
- selecting, from a block comprising a plurality of data nodes, a data node configured to store newly added data;
- determining a first verification value of the newly added data;
- determining, prior to storing the newly added data in the selected data node, an original second verification value of the selected data node;
- calculating an updated second verification value of the selected data node based on the first verification value of the newly added data and the original second verification value of the selected data node;
- and
- determining a third verification value of the block based on the updated second verification value of the selected data node and respective original second verification values of other data nodes of the block, wherein the third verification value of the block is used to verify whether data stored in the block is consistent with data stored in other blocks in a blockchain.
Dependencies are inferred from the claim text.