# US 11,308,073 B2 · Database node functional testing

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

- Number: US 11,308,073 B2
- Document ID: US11308073B2
- Status: Granted
- Kind: B2
- Application number: 16/058,148
- Filed: 2018-08-08
- Published: 2020-02-13
- Granted: 2022-04-19
- Earliest claimed: 2018-08-08
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Murali Krishna Surampalli; Anoop G. M. Ramachandra
- Web page: https://patentgrep.com/patent/US11308073B2

## CPC

- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F 16/9024: {Graphs; Linked lists (G06F16/9027 takes precedence)}
- G06F 11/3668: Testing of software
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 11/3688: {for test execution, e.g. scheduling of test suites}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An example operation may include one or more of receiving a database storage request at a decentralized database, executing an operation of the database storage request at a database node based on chaincode to generate a simulated result without committing the database storage request to the decentralized database, determining whether the chaincode of the database node is valid via a functional testing that is performed based on an output of the execution of the database storage request, and, in response to determining the chaincode is valid, endorsing the database storage request for storage at the decentralized database and transmitting the endorsement to one or more database nodes of the decentralized database.

## Claims

### Claim 1

A computing system comprising:
a network interface configured to receive a database storage request at a database node of a decentralized database; and
a processor configured to execute an operation of the database storage request at the database node based on chaincode to generate a simulated result including a read set and a write set, and determine whether the chaincode of the database node is valid via a functional test that is performed during an endorsement phase based on one or more of the read set and the write set included in the generated simulated result of the database storage request,
wherein, in response to a determination that the operation executed successfully but the chaincode is invalid, the processor is further configured to reject to endorse the database storage request for storage at the decentralized database and control the network interface to transmit notice of the rejection to one or more other database nodes of the decentralized database.

### Claim 2 (depends on 1)

The computing system of claim 1, wherein the read set comprises a list of keys that the operation reads during simulation and the write set comprises a list of keys that the operation writes during the simulation.

### Claim 3 (depends on 2)

The computing system of claim 2, wherein the processor is configured to perform the functional test on both of the read set and the write set to determine whether the chaincode is valid.

### Claim 4 (depends on 1)

The computing system of claim 1, wherein the functional test identifies whether the chaincode output satisfies one or more business constraints indicated by a developer of the chaincode.

### Claim 5 (depends on 1)

The computing system of claim 1, wherein the chaincode is provided from an untrusted entity with respect to the database storage node.

### Claim 6 (depends on 1)

The computing system of claim 1, wherein the processor is further configured to determine whether to endorse the database storage request based on whether the simulation of the operation of the database storage request is successful.

### Claim 7 (depends on 6)

The computing system of claim 6, wherein, in response to a determination that the operation of the database storage request is successful and a determination that the chaincode is valid, the processor is further configured to endorse the storage request for storage at the decentralized database.

### Claim 8

A method comprising:
receiving a database storage request at a decentralized database;
executing an operation of the database storage request at a database node based on chaincode to generate a simulated result including a read set and a write set;
determining whether the chaincode of the database node is valid via a functional testing that is performed during an endorsement phase based on one or more of the read set and the write set included in the generated simulated result of the database storage request; and
in response to determining the operation executed successfully but the chaincode is invalid, reject endorsing the database storage request for storage at the decentralized database and transmitting a notice of the rejection to one or more other database nodes of the decentralized database.

### Claim 9 (depends on 8)

The method of claim 8, wherein the read set comprises a list of keys that the operation reads during the executing and the write set comprises a list of keys that the operations writes during the executing.

### Claim 10 (depends on 9)

The method of claim 9, wherein the determining comprises performing the functional testing on both of the read set and the write set to determine whether the chaincode is valid.

### Claim 11 (depends on 8)

The method of claim 8, wherein the functional testing identifies whether the chaincode output satisfies one or more business constraints indicated by a developer of the chaincode.

### Claim 12 (depends on 8)

The method of claim 8, wherein the chaincode is provided from an untrusted entity with respect to the database storage node.

### Claim 13 (depends on 8)

The method of claim 8, wherein the determining further comprises determining whether to endorse the database storage request based on whether the simulation of the operation of the database storage request is successful.

### Claim 14 (depends on 13)

The method of claim 13, wherein the method further comprises endorsing a second database storage request for storage at the decentralized database in response to determining that an operation of the second database storage request is successful and determining that chaincode of the second database storage request is valid.

### Claim 15

A non-transitory computer readable medium comprising instructions, that when read by a processor, cause the processor to perform:
receiving a database storage request at a decentralized database;
executing an operation of the database storage request at a database node based on chaincode to generate a simulated result including a read set and a write set;
determining whether the chaincode of the database node is valid via a functional testing that is performed during an endorsement phase based on one or more of the read set and the write set included in the generated simulated result of the database storage request; and
in response to determining the operation executed successfully but the chaincode is invalid, reject endorsing the database storage request for storage at the decentralized database and transmitting a notice of the rejection to one or more other database nodes of the decentralized database.

### Claim 16 (depends on 15)

The non-transitory computer readable medium of claim 15, wherein the read set comprises a list of keys that the operation reads during the executing and the write set comprises a list of keys that the operations writes during the executing.

### Claim 17 (depends on 16)

The non-transitory computer readable medium of claim 16, wherein the determining comprises performing the functional testing on both of the read set and the write set to determine whether the chaincode is valid.

### Claim 18 (depends on 15)

The non-transitory computer readable medium of claim 15, wherein the functional testing identifies whether the chaincode output satisfies one or more business constraints indicated by a developer of the chaincode.
