# US 2019/0379543 A1 · Efficient validation for blockchain

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0379543 A1
- Document ID: US20190379543A1
- Status: Published application
- Kind: A1
- Application number: 16/002,150
- Filed: 2018-06-07
- Published: 2019-12-12
- Earliest claimed: 2018-06-07
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Manish Sethi; David M. Enyeart
- Web page: https://patentgrep.com/patent/US20190379543A1

## CPC

- H04L 9/3236: {using cryptographic hash functions}
- G06F 16/2365: {Ensuring data consistency and integrity}
- H04L 9/50: {using hash chains, e.g. blockchains or hash trees}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An example operation may include one or more of creating, by a blockchain node, a validation database in a memory, simulating each of one or more transactions, determining that each transaction in a new block may be validated using the validation database, validating each transaction in the new block using the validation database, and committing the new block to the blockchain. The validation database includes data corresponding to a predetermined number of most recent blocks of a state database for a blockchain.

## Claims

### Claim 1

A method, comprising:
creating, by a blockchain node, a validation database in a memory, the validation database comprising data corresponding to a predetermined number of most recent blocks of a state database for a blockchain;
simulating each of one or more transactions;
determining that each transaction in a new block may be validated using the validation database;
validating each transaction in the new block using the validation database; and
committing the new block to the blockchain.

### Claim 2 (depends on 1)

The method of claim 1, wherein creating the validation database comprising:
determining the predetermined number of blocks to include in the validation database; and
migrating state information of the predetermined number of most recent blocks of the blockchain from the state database to a higher performing storage medium.

### Claim 3 (depends on 1)

The method of claim 1, wherein simulating each of the one or more transactions comprising one of:
determining a height of the blockchain for each simulated transaction, the height of the blockchain corresponding to the number of blocks in the blockchain at a simulation time; and one of:
setting a simulation height as the height of the blockchain; or
intercepting one or more queries to the state database for each simulated transaction;
obtaining one or more data versions, in response to the one or more queries; and
selecting a maximum data version of the one or more data versions as the simulation height.

### Claim 4 (depends on 3)

The method of claim 3, wherein the validation database comprises a minimum height, wherein the minimum height being a height of an oldest block having data available in the validation database, wherein determining that each transaction in the new block may be validated using the validation database comprising:
verifying the simulation height of each transaction is greater than or equal to the minimum height.

### Claim 5 (depends on 3)

The method of claim 3, wherein committing the new block to the blockchain comprising:
applying writes for valid transactions in the new block to the validation database and the state database;
deleting data corresponding to an oldest block of the validation database; and
adjusting the minimum height to reflect the blocks corresponding to the data maintained in the validation database.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
identifying phantom items in the state database for transactions being validated by performing validation against the validation database; and
recording transactions as invalid in response to identifying one or more phantom items for the transactions.

### Claim 7 (depends on 5)

The method of claim 5, wherein validating each transaction in the new block comprising:
recording an identification of a state database snapshot during a transaction simulation phase; and
detecting if there are differences in the state database between the transaction simulation phase and a later transaction validation phase.

### Claim 8

A system, comprising:
a blockchain network, which comprises:
one or more blockchain nodes that validate blockchain transactions, each comprises:
a processor; and
a memory device, coupled to the processor, which comprises:
a validation database, which comprises:
data that corresponds to a predetermined number of most recent blocks of a blockchain;
the processor configured to:
simulate each of one or more transactions;
determine that each transaction in a new block may be validated using the validation database;
validate each transaction in the new block using the validation database; and
commit the new block to the blockchain.

### Claim 9 (depends on 8)

The system of claim 8, wherein the validation database comprises a higher performance storage medium than a state database, wherein the state database stores data that corresponds to all blocks in the blockchain.

### Claim 10 (depends on 9)

The system of claim 9, wherein the processor simulates each of one or more transactions comprises the processor configured to one of:
determine a height of the blockchain for each simulated transaction, wherein the height of the blockchain corresponds to the number of blocks in the blockchain at a simulation time; and
set a simulation height as the height of the blockchain; or
intercept one or more queries to the state database for each simulated transaction;
obtain one or more data versions, in response to the one or more queries; and
select a maximum data version of the one or more data versions as the simulation height.

### Claim 11 (depends on 10)

The system of claim 10, wherein the validation database comprises a minimum height, wherein the minimum height corresponds to a height of an oldest block having data available in the validation database, wherein the one or more blockchain nodes determines that each transaction in the new block may be validated using the validation database comprises the one or more blockchain nodes configured to:
verify the simulation height of each transaction is greater than or equal to the minimum height.

### Claim 12 (depends on 10)

The system of claim 10, wherein the processor commits the new block to the blockchain comprises the processor configured to:
apply writes for valid transactions in the new block to the validation database and the state database;
delete data that corresponds to an oldest block of the validation database; and
adjust the minimum height to reflect the blocks that correspond to the data maintained in the validation database.

### Claim 13 (depends on 12)

The system of claim 12, wherein the processor is further configured to:
identify phantom items in the state database while transactions are validated against the validation database; and
record transactions as invalid in response to the processor identifies one or more phantom items for the transactions.

### Claim 14 (depends on 12)

The system of claim 12, wherein the processor validates each transaction in the new block comprises the processor configured to:
record an identification of a state database snapshot while one or more transactions are simulated; and
detect if there are differences in the state database between the transaction simulation phase and a later transaction validation phase.

### Claim 15

A non-transitory computer readable medium comprising instructions, that when read by a processor, cause the processor to perform:
creating, by a blockchain node, a validation database in a memory, the validation database comprising data corresponding to a predetermined number of most recent blocks of a state database for a blockchain;
simulating each of one or more transactions;
determining that each transaction in a new block may be validated using the validation database;
validating each transaction in the new block using the validation database; and
committing the new block to the blockchain.

### Claim 16 (depends on 15)

The non-transitory computer readable medium of claim 15, wherein creating the validation database comprising:
determining the predetermined number of blocks to include in the validation database; and
migrating state information of the predetermined number of most recent blocks of the blockchain from the state database to a higher performing storage medium.

### Claim 17 (depends on 15)

The non-transitory computer readable medium of claim 15, wherein simulating each of the one or more transactions comprising one of:
determining a height of the blockchain for each simulated transaction, the height of the blockchain corresponding to the number of blocks in the blockchain at a simulation time; and one of:
setting a simulation height as the height of the blockchain; or
intercepting one or more queries to the state database for each simulated transaction;
obtaining one or more data versions, in response to the one or more queries; and
selecting a maximum data version of the one or more data versions as the simulation height.

### Claim 18 (depends on 17)

The non-transitory computer readable medium of claim 17, wherein the validation database comprises a minimum height, wherein the minimum height being a height of an oldest block having data available in the validation database, wherein determining that each transaction in the new block may be validated using the validation database comprising:
verifying the simulation height of each transaction is greater than or equal to the minimum height.

### Claim 19 (depends on 18)

The non-transitory computer readable medium of claim 18, wherein committing the new block to the blockchain comprising:
applying writes for valid transactions in the new block to the validation database and the state database;
deleting data corresponding to an oldest block of the validation database; and
adjusting the minimum height to reflect the blocks corresponding to the data maintained in the validation database.

### Claim 20 (depends on 19)

The non-transitory computer readable medium of claim 19, wherein validating each transaction in the new block comprising:
recording an identification of a state database snapshot during a transaction simulation phase; and
detecting if there are differences in the state database between the transaction simulation phase and a later transaction validation phase.
