CPC G06F 16/22 (2019.01) [G06F 16/27 (2019.01)] | 20 Claims |
1. A system for creating a reorganization-immune blockchain index using mono-increasing sequence records, the system comprising:
one or more processors; and
a non-transitory computer-readable medium having instructions recorded thereon that when executed by the one or more processors causes operations comprising:
receiving, at a blockchain-interface layer, on-chain data for a plurality of blocks, wherein the plurality of blocks comprises a first block comprising a first event of a plurality of blockchain events within the on-chain data;
transforming the on-chain data to a first format, wherein the first format comprises data types with field names identified by a respective integer;
storing the on-chain data, in a first dataset at the blockchain-interface layer, wherein the first dataset comprises hexadecimal encoded data, and wherein the first dataset uses the first format;
determining a first sequence number for the first event in the on-chain data;
determining a first chain height for the first block;
detecting a blockchain network reorganization;
in response to the blockchain network reorganization:
determining whether the first sequence number corresponds to a highest sequence number among respective sequence numbers for the plurality of blocks that have the first chain height; and
determining that the first block corresponds to a canonical chain for a blockchain network based on determining that the first sequence number corresponds to the highest sequence number among respective sequence numbers for the plurality of blocks that have the first chain height; and
updating a blockchain index to indicate that the first block corresponds to the canonical chain.
|