# US 2024/0004869 A1 · Methods and apparatus for a distributed database within a network

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

- Number: US 2024/0004869 A1
- Document ID: US20240004869A1
- Status: Published application
- Kind: A1
- Application number: 18/330,581
- Filed: 2023-06-07
- Published: 2024-01-04
- Earliest claimed: 2015-08-28
- Assignees: Hedera Hashgraph, LLC
- Applicants: Hedera Hashgraph, LLC
- Inventors: Leemon C. BAIRD, III
- Web page: https://patentgrep.com/patent/US20240004869A1

## CPC

- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 11/0709: {in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems}
- G06F 16/1837: {Management specially adapted to peer-to-peer storage networks (topology management mechanisms of peer-to-peer networks H04L67/1042)}
- G06F 16/28: Databases characterised by their database models, e.g. relational or object models
- G06F 16/9014: {hash tables}
- G06F 16/9024: {Graphs; Linked lists (G06F16/9027 takes precedence)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In some embodiments, an apparatus includes an instance of a distributed database at a first compute device configured to be included within a set of compute devices that implement the distributed database. The apparatus also includes a processor configured to define a first event linked to a first set of events. The processor is configured to receive, from a second compute device from the set of compute devices, a signal representing a second event (1) defined by the second compute device and (2) linked to a second set of events. The processor is configured to identify an order associated with a third set of events based at least one a result of a protocol. The processor is configured to store in the instance of the distributed database the order associated with the third set of events.

## Claims

### Claim at position 1

1-20. (canceled)

### Claim 21

A non-transitory processor-readable medium storing code representing instructions to be executed by a processor, the code comprising code to cause the processor to:
receive, at a first compute device from a plurality of compute devices that implements a distributed database and based on a synchronization process with a second compute device from the plurality of compute devices, an event;
update, based on the event, a directed acyclic graph (DAG) at the first compute device and including a representation of a plurality of events;
identify, based on the DAG at the first compute device, a set of events not yet received by the second compute device;
send the set of events to the second compute device as part of the synchronization process such that the second compute device (1) updates a DAG at the second compute device based on the set of events and (2) computes a state of an instance of the distributed database associated with the second compute device based on a consensus protocol and the DAG at the second compute device; and
receive, from the second compute device, the state of the instance of the distributed database associated with the second compute device.

### Claim 22 (depends on 21)

The non-transitory processor-readable medium of claim 21, further comprising code to cause the processor to:
compute a state of an instance of the distributed database associated with the first compute device based on the consensus protocol and the DAG at the first compute device; and
digitally sign the state of the instance of the distributed database associated with the second compute device when the state of the instance of the distributed database associated with the second compute device corresponds with the state of the instance of the distributed database associated with the first compute device.

### Claim 23 (depends on 21)

The non-transitory processor-readable medium of claim 21, further comprising code to cause the processor to:
store in a memory the state of the instance of the distributed database associated with the second compute device.

### Claim 24 (depends on 21)

The non-transitory processor-readable medium of claim 21, wherein the event is a first event, the code further comprising code to cause the processor to:
compute a state of an instance of the distributed database associated with the first compute device based on the consensus protocol and the DAG at the first compute device; and
define a second event including the state of the instance of the distributed database associated with the first compute device to notify compute devices from the plurality of compute devices of the state of the instance of the distributed database associated with the first compute device.

### Claim 25 (depends on 21)

The non-transitory processor-readable medium of claim 21, wherein the event is a first event, the code further comprising code to cause the processor to:
compute a state of an instance of the distributed database associated with the first compute device based on the consensus protocol and the DAG at the first compute device;
define a second event including the state of the instance of the distributed database associated with the first compute device to notify compute devices from the plurality of compute devices of the state of the instance of the distributed database associated with the first compute device;
digitally signing the state of the instance of the distributed database associated with the first compute device; and
confirm the state based on a threshold number of compute devices from the plurality of compute devices digitally signing the state of the instance of the distributed database associated with the first compute device.

### Claim 26 (depends on 21)

The non-transitory processor-readable medium of claim 21, the code further comprising code to cause the processor to:
compute a state of an instance of the distributed database associated with the first compute device based on the consensus protocol and the DAG at the first compute device;
receive an indication that a set of compute devices from the plurality of compute devices has agreed to the state; and
delete, from the instance of the distributed database associated with the first compute device, events used to calculate the state based on the indication.

### Claim 27 (depends on 21)

The non-transitory processor-readable medium of claim 21, wherein the DAG encodes a partial order of the plurality of events.

### Claim 28

A method, comprising:
receiving an event defined by a compute device from a plurality of compute devices implementing a distributed database;
updating, based on the event and at a first time, a directed acyclic graph (DAG) including a representation of a plurality of events to define a partial order of the event with respect to a set of events from the plurality of events based on a position of the event in the DAG;
identifying, at a second time after the first time, a consensus order of the event with respect to the plurality of events based on the partial order and a consensus protocol;
calculating a state value associated with the distributed database based on the consensus order;
receiving an indication that a set of compute devices from the plurality of compute devices has agreed to the state value; and
deleting, from an instance of the distributed database, events used to calculate the state value based on the indication.

### Claim 29 (depends on 28)

The method of claim 28, further comprising:
storing in a memory the consensus order of the event with respect to the plurality of events.

### Claim 30 (depends on 28)

The method of claim 28, wherein the event is a first event, the method further comprising:
defining a second event including the state value to notify compute devices from the plurality of compute devices of the state value.

### Claim 31 (depends on 28)

The method of claim 28, wherein the event is a first event, the method further comprising:
defining a second event including the state value to notify compute devices from the plurality of compute devices of the state value;
digitally signing the state value; and
confirming the state value based on the indication, the indication indicating that a threshold number of compute devices from the plurality of compute devices has digitally signed the state value.

### Claim 32

An apparatus, comprising:
a memory; and
a processor operatively coupled to the memory, the processor configured to define, based on a plurality of events received from a plurality of compute devices implementing a distributed database, a directed acyclic graph (DAG) defining a partial order of the plurality of events,
the processor configured to calculate, based on the DAG and a consensus protocol, a consensus order of the plurality of events,
the processor configured to calculate a state value associated with the distributed database based on the consensus order of the plurality of events,
the processor configured to define an event including the state value to notify compute devices from the plurality of compute devices of the order,
the processor configured to digitally sign the state value,
the processor configured to confirm the state value based on a threshold number of compute devices from the plurality of compute devices digitally signing the state value.
