Method and apparatus for implementing state certification and ledger identifiers in a distributed database - Patents.com
By calculating the identifier and address book of the distributed database, adding or removing computing devices, receiving status authentication and verifying digital signatures, the problem of data status verification in the distributed database is solved, and efficient and secure data status confirmation is achieved.
Patent Information
- Application Number
- JP2021555789
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-05-22
- Filing Date
- 2020-05-22
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2040-05-22
AI Technical Summary
In distributed database systems, it is difficult to effectively and efficiently determine data state, especially when multiple devices and participants store different instances of a distributed database, the difficulty of verifying data state.
By calculating the identifier of the distributed database, using the public key in the address book, adding or removing the computing device, defining the second address book, and receiving status authentication, verifying the digital signature of the second address book by a predetermined number of computing devices to ensure the accuracy of the data.
It realizes efficient state verification of distributed databases, ensures the accuracy and consistency of data at specific points in time, reduces the risk of single-point attacks, and improves system security and data transmission efficiency.
Smart Images

Figure 0007544733000007 
Figure 0007544733000002 
Figure 0007544733000001
Abstract
Description
[Technical field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[1001] This application claims priority to and the benefit of U.S. Provisional Patent Application No. 62 / 851,368, filed May 22, 2019, and entitled “Methods and Apparatus for Implementing State Proofs and Ledger Identifiers in a Distributed Database,” which is incorporated by reference in its entirety. [Background technology]
[0002] background
[1002] FIELD OF THE DISCLOSURE The embodiments described herein relate generally to database systems, and more particularly to methods and apparatus for implementing state proofs and ledger identifiers in a database system across multiple devices in a network. Some known distributed database systems attempt to achieve consensus regarding values in a distributed database (e.g., regarding the order in which transactions should be made or processed in such a distributed database). Consensus may be determined using various known consensus methods and / or processes. After an order is identified, transactions may be processed to define the state of the distributed database and / or the state of the data in the distributed database. Because multiple devices and / or participants in a distributed database may store separate instances of the distributed database, it may be difficult to verify the state of the data in the distributed database at any given time.
[0003]
[1003] Therefore, what is needed is a method and apparatus for effectively and efficiently determining the state of a distributed database at a point in time. Summary of the Invention
[0004] overview
[1004] In some embodiments, the method may include computing an identifier for the distributed database at a first time using a first address book for the distributed database. The first address book includes a public key associated with each computing device of a first set of computing devices implementing the distributed database at the first time. The method may further include receiving transactions for at least one of (1) adding a computing device to the first set of computing devices, (2) removing a computing device from the first set of computing devices, or (3) modifying a computing device of the first set of computing devices to define a second set of computing devices. The method may further include defining a second address book at a second time after the first time including a public key associated with each computing device of the second set of computing devices. The method may further include receiving a state proof associated with data of the distributed database after the second time from a computing device of the second set of computing devices. The method may further include verifying the data in the distributed database by verifying that a predetermined number of the first set of computing devices have digitally signed the second address book. [Brief description of the drawings]
[0005] BRIEF DESCRIPTION OF THE DRAWINGS [Figure 1]
[1005] A block diagram showing a distributed database system according to one embodiment. [Diagram 2]
[1006] A block diagram illustrating a computing device of a distributed database system according to one embodiment. [Diagram 3]
[1007] A block diagram showing a distributed database system according to one embodiment. [Figure 4]
[1008] An address book associated with a distributed database system is shown according to one embodiment. [Diagram 5]
[1009] An address book history associated with a distributed database system is shown according to one embodiment. [Figure 6]
[1010] A Merkle tree associated with a distributed database system according to one embodiment is shown. [Figure 7]
[1011] A flow diagram of a method for determining status certification, according to one embodiment. [Figure 8]
[1012] A flow diagram of a method for validating data in a distributed database, according to one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0006] Detailed Description
[1013] Various non-limiting examples of aspects and modifications of the embodiments are described herein and illustrated in the accompanying drawings.
[0007]
[1014] One or more embodiments described herein generally relate to methods, apparatus, and systems for implementing a distributed database by defining the state of the distributed database as a Merkle tree and further using state proofs and ledger identifiers to efficiently validate values in the distributed database. Methods, apparatus, and systems for implementing state proofs and ledger identifiers in a distributed database are disclosed.
[0008]
[1015] In some embodiments, the method may include computing an identifier for the distributed database at a first time using a first address book for the distributed database. The first address book includes a public key associated with each computing device of a first set of computing devices implementing the distributed database at the first time. The method may further include receiving transactions for at least one of (1) adding a computing device to the first set of computing devices, (2) removing a computing device from the first set of computing devices, or (3) modifying a computing device of the first set of computing devices to define a second set of computing devices. The method may further include defining a second address book at a second time after the first time including a public key associated with each computing device of the second set of computing devices. The method may further include receiving a state proof associated with data of the distributed database after the second time from a computing device of the second set of computing devices. The method may further include verifying the data in the distributed database by verifying that a predetermined number of the first set of computing devices have digitally signed the second address book.
[0009]
[1016] In some embodiments, an apparatus includes a memory and a processor operably coupled to the memory. The memory is of a computing device associated with a distributed database implemented by the set of computing devices via a network operably coupled to the set of computing devices. The processor is configured to receive a state proof from a computing device of the set of computing devices associated with a state of the distributed database. The state proof may include (1) data associated with the state, (2) a timestamp associated with the state, (3) a first identifier of the distributed database, and (4) a set of address books associated with the distributed database. Each address book in the set of address books is associated with a version of the distributed database during a time period different from a time period associated with a version of the distributed database associated with each remaining address book in the set of address books. The set of address books has a chronological order. The processor is further configured to determine validity of the data at a time associated with the timestamp by (1) verifying that the first identifier of the distributed database is correct based on the second identifier of the distributed database stored in the memory; (2) verifying that the data associated with the state is digitally signed by a predetermined number of the set of computing devices; and (3) verifying that each address book in the set of address books, other than the initial address book in the set of address books, is digitally signed by a predetermined number of the set of computing devices associated with the immediately preceding address book in chronological order in the set of address books.
[0010]
[1017] In some embodiments, a non-transitory processor-readable medium stores code representing instructions executed by a processor. The code includes code for causing the processor to receive, over a network, a state proof associated with a state of the distributed database from a computing device of a set of computing devices implementing the distributed database. The state proof may include (1) data stored as a set of leaf records of a Merkle tree of the state, (2) a Merkle path associated with the data, and (3) a set of address books associated with the distributed database. Each address book in the set of address books is associated with a version of the distributed database during a different time period than a time period associated with a version of the distributed database associated with each remaining address book in the set of address books. The set of address books has a chronological order. The code includes code for causing the processor to determine the validity of the data by (1) verifying as valid a Merkle path for a sequence from the root of the Merkle tree to the leaf records, and (2) verifying that each address book in the set of address books, other than an initial address book in the set of address books, is digitally signed by a predetermined number of computing devices in the set of computing devices associated with the immediately preceding address book in the chronological order of the set of address books.
[0011]
[1018] As used herein, a module may be any assembly and / or set of operably coupled electrical components related to performing a particular function, and may include, for example, memory, a processor, electrical traces, optical connectors, software (executed in hardware), etc.
[0012]
[1019] As used herein, the singular forms "a," "an," and "the" include plural references unless the context requires otherwise. Thus, for example, the term "module" is intended to mean a single module or a combination of modules. For example, a "network" is intended to mean a single network or a combination of networks.
[0013]
[1020] FIG. 1 is a high-level block diagram illustrating a distributed database system 100 according to one embodiment. Although FIG. 1 illustrates the distributed database 100 implemented across four computing devices (computing device 110, computing device 120, computing device 130, and computing device 140), it should be understood that the distributed database 100 can use any number of computing devices, including computing devices not shown in FIG. 1. The network 105 can be implemented as a wired and / or wireless network and can be any type of network (e.g., local area network (LAN), wide area network (WAN), virtual network, telecommunications network) used to operatively couple the computing devices 110, 120, 130, 140. As described in more detail herein, in some implementations, for example, the computing devices are personal computers connected to each other by an Internet Service Provider (ISP) and the Internet (e.g., network 105). In some implementations, a connection can be defined by the network 105 between any two computing devices 110, 120, 130, 140. As shown in FIG. 1, a connection may be defined, for example, between computing device 110 and any one of computing device 120, computing device 130, or computing device 140.
[0014]
[1021] In some implementations, computing devices 110, 120, 130, 140 may communicate with each other (e.g., send and receive data) and with networks via intermediate and / or alternative networks (not shown in FIG. 1 ), which may be the same type of network as network 105 and / or a different type of network.
[0015]
[1022] Each computing device 110, 120, 130, 140 may be any type of device configured to communicate over the network 105 (e.g., to send and receive data from one or more of the other computing devices), such as, for example, a computing entity (e.g., a personal computing device such as a desktop computer, a laptop computer, etc.), a mobile phone, a personal digital assistant (PDA), etc. An example of a computing device is shown in FIG. 1. Computing device 110 includes memory 112, a processor 111, and an output device 113. Memory 112 may be, for example, a random access memory (RAM), a memory buffer, a hard drive, a database, an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), a read-only memory (ROM), etc. In some implementations, memory 112 of computing device 110 includes data associated with an instance of a distributed database (e.g., distributed database instance 114). In some implementations, the memory 112 stores instructions for causing the processor to execute modules, processes, and / or functions related to implementing state proofs and / or ledger identifiers (e.g., signing messages, determining state proofs, determining Merkle trees, etc.), and / or sending and receiving records of synchronization events and / or records of past synchronization events with other computing devices, ordering of synchronization events, ordering of transactions within events, parameters related to identifying synchronization events and / or ordering of transactions, and / or values of parameters (e.g., database fields that quantify transactions, database fields that quantify the order in which events occur, and / or any other suitable fields for which values may be stored in a database) to and from another instance of a distributed database (e.g., distributed database instance 124 on computing device 120).
[0016]
[1023] The distributed database instance 114 may be configured to manipulate data, including, for example, storing, modifying, and / or deleting data. In some embodiments, the distributed database instance 114 may be a set of arrays, a set of data structures, a relational database, an object database, a post-relational database, and / or any other suitable type of database or storage. For example, the distributed database instance 114 may store data related to any particular function and / or industry. For example, the distributed database instance 114 may store financial transactions (e.g., of a user of the computing device 110) including values and / or vectors of values related to the ownership history of a particular financial instrument. In general, a vector may be any set of values for a parameter, and a parameter may be any data object and / or database field that can take on a variety of values. Thus, the distributed database instance 114 may have several parameters and / or fields, each of which is associated with a vector of values. The vector of values may be used to determine the actual values of the parameters and / or fields in that database instance 114. In some examples, the distributed database instance 114 stores records of synchronization events, records of past synchronization events with other computing devices, ordering of synchronization events, ordering of transactions within events, parameters and / or values related to identifying the ordering of synchronization events and / or transactions (e.g., for use in calculating the ordering using the consensus methods described herein), values of parameters (e.g., database fields that quantify transactions, database fields that quantify the order in which events occur, and / or any other suitable fields for which values may be stored in a database), etc.
[0017]
[1024] In some examples, distributed database instance 114 may also store database state variables and / or current state. The current state may be a state, balance, condition, etc. related to the outcome of a transaction. Stated similarly, the state may include data structures and / or variables modified by the transaction. In some examples, the current state may be stored in a separate database and / or portion of memory 112. In some examples, the current state may be stored in a memory of a computing device different from computing device 110. In some examples, at least a portion of the state may be stored as a Merkle tree and / or a hash tree, as described in more detail herein.
[0018]
[1025] In some examples, distributed database instance 114 may also be used to implement other data structures, such as a set of (key, value) pairs. A transaction recorded by distributed database instance 114 may be, for example, adding, deleting, or modifying a (key, value) pair within the set of (key, value) pairs.
[0019]
[1026] In some examples, the distributed database system 100 or any of the distributed database instances 114, 124, 134, 144 may be queried. For example, the query may consist of a key, and the result returned from the distributed database system 100 or the distributed database instances 114, 124, 134, 144 may be a value associated with the key. In some examples, the distributed database system 100 or any of the distributed database instances 114, 124, 134, 144 may be modified by a transaction. For example, a transaction that modifies a database may include a digital signature by a party authorizing and / or requesting the modification of the transaction.
[0020]
[1027] The distributed database system 100 can be used for many purposes, such as storing attributes associated with various users in a distributed identity system. For example, such a system can use the identity of a user as the "key" and a list of attributes associated with the user as the "values." In some cases, the identity can be a cryptographic public key with a corresponding private key known to the user. Each attribute can be digitally signed, for example, by an official authority that has the right to assert that attribute. Each attribute can also be encrypted, for example, with a public key associated with an individual or group of individuals that have the right to read the attribute. Some keys or values can also be accompanied by a list of public keys of parties that have the authority to modify or delete the key or value.
[0021]
[1028] In another example, the distributed database instance 114 may store data related to a massively multiplayer game (MMG), such as the current status and ownership of game play items. In some examples, the distributed database instance 114 may be implemented within the computing device 110 shown in Figure 1. In some examples, an instance of the distributed database is accessible by the computing device (e.g., over a network) but is not implemented within the computing device (not shown in Figure 1).
[0022]
[1029] The processor 111 of the computing device 110 may be any suitable processing device configured to run and / or execute the distributed database instance 114. For example, the processor 111 may be configured to update the distributed database instance 114 in response to receiving a signal from the computing device 120 and / or to cause a signal to be sent to the computing device 120. More specifically, the processor 111 may be configured to execute modules, functions, and / or processes for updating the distributed database instance 114 in response to receiving a synchronization event associated with a transaction from another computing device, receiving a record associated with a sequence of synchronization events, etc. In some implementations, the processor 111 may be configured to execute modules, functions, and / or processes for updating the distributed database instance 114 in response to receiving a value of a parameter stored in another instance of the distributed database (e.g., the distributed database instance 124 in the computing device 120) and / or to cause a value of a parameter stored in the distributed database instance 114 in the computing device 110 to be sent to the computing device 120. In some implementations, the processor 111 may be configured to execute the modules, functions, and / or processes described herein with respect to implementing state proofs and / or ledger identifiers (e.g., signing messages, determining state proofs, determining Merkle trees, etc.). In some implementations, the processor 111 may be a general-purpose processor, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a digital signal processor (DSP), etc.
[0023]
[1030] Display 113 may be any suitable display, such as, for example, a liquid crystal display (LCD), a cathode ray tube display (CRT), etc. In some implementations, any one of computing devices 110, 120, 130, 140 may include another output device as an alternative or in addition to display 113, 123, 133, 143. For example, any one of computing devices 110, 120, 130, 140 may include an audio output device (e.g., a speaker), a tactile output device, etc. In some implementations, any one of computing devices 110, 120, 130, 140 may include an input device as an alternative or in addition to display 113, 123, 133, 143. For example, any one of computing devices 110, 120, 130, 140 may include a keyboard, a mouse, etc.
[0024]
[1031] Although shown in FIG. 1 as being in a single computing device, in some examples a processor configured to execute modules, functions, and / or processes for updating a distributed database may be in a computing device separate from its associated distributed database. In such examples, for example, the processor may be operatively coupled to the distributed database instance over a network. For example, the processor may execute a consensus method to identify an order of events and / or transactions (e.g., as a result of synchronization with other distributed database instances) and may send a signal to the associated distributed database instance over the network that includes the order of events and / or transactions. The associated distributed database instance may store the order of events, the order of transactions, and / or state variables based on the order of transactions in the associated distributed database instance. Thus, functionality and storage associated with a distributed database may be distributed. Additionally, even if the database is implemented in a computing device separate from a computing device having a processor implementing modules, functions, and / or processes (e.g., consensus methods) associated with a distributed database system, the processor may still query its associated distributed database instance, store state variables and / or current state of the database, and / or perform other suitable operations described herein in its distributed database instance. In some examples, the functions and / or methods described herein may be performed across any number of computing devices (e.g., in a distributed computing environment and / or cluster), and results and / or values of such functions and / or methods may be stored in memory and / or storage in any suitable computing device.
[0025]
[1032] Computing device 120 has processor 121, memory 122, and display 123, which may be structurally and / or functionally similar to processor 111, memory 112, and display 113, respectively. Distributed database instance 124 may also be structurally and / or functionally similar to distributed database instance 114.
[0026]
[1033] Computing device 130 has processor 131, memory 132, and display 133, which may be structurally and / or functionally similar to processor 111, memory 112, and display 113, respectively. Distributed database instance 134 may also be structurally and / or functionally similar to distributed database instance 114.
[0027]
[1034] Computing device 140 has processor 141, memory 142, and display 143, which may be structurally and / or functionally similar to processor 111, memory 112, and display 113, respectively. Distributed database instance 144 may also be structurally and / or functionally similar to distributed database instance 114.
[0028]
[1035] Although computing devices 110, 120, 130, 140 are shown as being similar to one another, each computing device in distributed database system 100 may be different from the other computing devices. Each computing device 110, 120, 130, 140 in distributed database system 100 may be, for example, one of a number of computing entities (e.g., personal computing devices such as desktop computers, laptop computers, etc.), mobile phones, personal digital assistants (PDAs), etc. For example, computing device 110 may be a desktop computer, computing device 120 may be a smartphone, and computing device 130 may be a server.
[0029]
[1036] In some implementations, one or more portions of the computing devices 110, 120, 130, 140 may include hardware-based modules (e.g., digital signal processors (DSPs), field programmable gate arrays (FPGAs)) and / or software-based modules (e.g., modules of computer code stored in memory and / or executed in a processor). In some implementations, one or more of the functionality associated with the computing devices 110, 120, 130, 140 (e.g., functionality associated with the processors 111, 121, 131, 141) may be included in one or more modules (see, e.g., FIG. 2).
[0030]
[1037] The characteristics of distributed database system 100, including the characteristics of the computing devices (e.g., computing devices 110, 120, 130, 140), the number of computing devices, and network 105, may be selected in any number of ways. In some examples, the characteristics of distributed database system 100 may be selected by an administrator of distributed database system 100. In some examples, the characteristics of distributed database system 100 may be selected collectively by users of distributed database system 100.
[0031]
[1038] Because a distributed database system 100 is used, no leader is designated among the computing devices 110, 120, 130, and 140. In particular, none of the computing devices 110, 120, 130, or 140 is identified and / or selected as a leader to arbitrate disputes over values stored within the distributed database instances 111, 12, 131, 141 of the computing devices 110, 120, 130, 140. Instead, using the event synchronization processes, voting processes, and / or methods described herein, the computing devices 110, 120, 130, 140 can collectively converge on one value for the parameter.
[0032]
[1039] Not having a leader in a distributed database system increases the security of the distributed database system. In particular, if there is a leader, there is a single point of attack and / or a single point of failure. If malicious software infects a leader and / or the value of a parameter in the leader's distributed database instance is maliciously changed, the fault and / or incorrect value is propagated throughout the other distributed database instances. However, in a leaderless system, there is no single point of attack and / or a single point of failure. In particular, if a parameter in a distributed database instance of a leaderless system includes a value, that value changes after that distributed database instance exchanges values with other distributed database instances in the system, as described in more detail herein. In addition, the leaderless distributed database system described herein increases the convergence speed while reducing the amount of data transmitted between devices, as described in more detail herein.
[0033]
[1040] FIG. 2 illustrates a computing device 200 of a distributed database system (e.g., distributed database system 100) according to an embodiment. In some implementations, computing device 200 may be similar to computing devices 110, 120, 130, 140 illustrated and described with respect to FIG. 1. Computing device 200 includes a processor 210 and a memory 220. Processor 210 and memory 220 are operatively coupled to each other. In some implementations, processor 210 and memory 220 may be similar to processor 111 and memory 112, respectively, described in detail with respect to FIG. 1. As shown in FIG. 2, processor 210 includes a database convergence module 211 and a communication module 210, and memory 220 includes a distributed database instance 221. Communication module 212 enables computing device 200 to communicate (e.g., send and receive data) with other computing devices. In some implementations, communication module 212 (not shown in FIG. 1) enables computing device 110 to communicate with computing devices 120, 130, 140. Communications module 210 may include and / or correspond to, for example, a network interface controller (NIC), a wireless connection, a wired port, etc. As such, communications module 210 may be able to establish and / or maintain a communications session between computing device 200 and another device (e.g., over a network, such as network 105 of FIG. 1 or the Internet (not shown)). Similarly stated, communications module 210 may enable computing device 200 to send data to and receive data from another device.
[0034]
[1041] In some examples, the database convergence module 211 may exchange events and / or transactions with other computing devices, store the events and / or transactions it receives, and calculate the order of the events and / or transactions based on a partial order determined by the reference patterns between the events. Each event may be a record that includes other information such as a cryptographic hash of the two previous events (linking the event to the two previous events and their ancestor events and vice versa), payload data (e.g., the transaction to be recorded), the current time, and a timestamp (e.g., date and UTC time) that its creator asserts is the time when the event was first defined. Each of the communicating computing devices is called a "member" or "hash graph member." In some examples, an initial event defined by a member includes only the hash (or hash value) of a single event defined by another member. In such examples, the member does not yet have a previous self-hash (e.g., the hash of an event previously defined by the member). In some examples, an initial event in a distributed database does not include the hash of any previous event (because there are no previous events in the distributed database).
[0035]
[1042] In some implementations, the cryptographic hash of the two previous events may be a hash value that is determined based on a cryptographic hash function that uses the events as input. In particular, in such implementations, an event includes a particular sequence or string of bytes (representing information about the event). The hash of an event may be a value returned from a hash function that uses the sequence of bytes of the event as input. In some implementations, any other suitable data related to the event (e.g., an identifier, a serial number, bytes representing a particular portion of the event, etc.) may be used as input to the hash function to calculate the hash of the event. Any suitable hash function may be used to determine the hash. In some implementations, each member uses the same hash function such that the same hash is generated at each member for a given event. The event may then be digitally signed by the member that defines and / or creates the event.
[0036]
[1043] In some examples, a set of events and their interconnections can form a directed acyclic graph (DAG). In some examples, each event in the DAG references (e.g., contains references to) zero or more (e.g., two) previous events (linking the event to previous events and their ancestor events, and vice versa), and each reference is strictly to a previous event, so there are no loops. In some implementations, the DAG is based on cryptographic hashes, so the data structure can be referred to as a hash graph (also referred to herein as a "hash DAG"). A hash graph directly encodes a partial order, meaning that we know that event X comes before event Y if Y contains a hash of X, or Y contains a hash of an event that contains a hash of X, or for any such path of any length. But if there is no path from X to Y or from Y to X, then the partial order does not dictate which event comes first. Thus, the database convergence module can compute a total order from the partial order. This can be done by any suitable deterministic function used by the computing device, so that the computing device computes the same order. In some implementations, each member may recalculate this order after each synchronization, and eventually the orders may converge to produce a consensus.
[0037]
[1044] A consensus algorithm and / or method may be used to determine the order of events in the hash graph and / or the order of transactions stored within the events. In some implementations, the consensus algorithm and / or method shown and described in U.S. patent application Ser. No. 15 / 387,048, now U.S. Patent No. 9,646,029, filed Dec. 21, 2016, entitled “Methods and Apparatus for a Distributed Database within a Network,” may be used to determine the order of events and / or transactions.
[0038]
[1045] The order of transactions can in turn define a state of the database as a result of executing those transactions in the order. The defined state of the database can be stored as a database state variable. In some implementations, an instance of a distributed database (e.g., distributed database instance 114) stores a hash graph, and / or transactions, and / or orders of transactions, and / or events, and / or orders of events, and / or states resulting from execution of transactions.
[0039]
[1046] 2, the database convergence module 211 and the communication module 212 are shown in FIG 2 as being implemented within the processor 210. In other implementations, the database convergence module 211 and / or the communication module 212 can be implemented within the memory 220. In some implementations, the database convergence module 211 and / or the communication module 212 can be hardware based (e.g., ASIC, FPGA, etc.).
[0040]
[1047] Figure 3 is a block diagram illustrating a distributed database system 300 (similar to distributed database system 100 illustrated and described with respect to Figure 1) according to one embodiment. Distributed database system 300 may be implemented using a set of distributed database devices 310, 320, 330, 340 (structurally and / or functionally similar to computing devices 110, 120, 130, 140 illustrated and described with respect to Figure 1) connected via a network 305 (structurally and / or functionally similar to network 105 illustrated and described with respect to Figure 1). Each distributed database device in the set of distributed database devices 310, 320, 330, 340 may store an instance of a distributed database (as described with respect to computing devices 110, 120, 130, 140 of FIG. 1), execute consensus methods and / or protocols to identify ordering of events and / or transactions in the distributed database, exchange events with other distributed database devices in the set of distributed database devices 310, 320, 330, 340, and / or perform other actions related to implementing a distributed database. As such, the distributed database devices 310, 320, 330, 340 may be said to collectively implement a distributed database and / or to be devices or members of a distributed database. In some implementations, any number of distributed database devices may be used to implement a distributed database.
[0041]
[1048] Each distributed database device in the set of distributed database devices 310, 320, 330, 340 may be connected to and / or operably coupled to one or more user devices in the set of user devices 312, 314, 322, 332, 334, 342. More specifically, as shown in Figure 3, distributed database device 310 may be connected to and / or operably coupled to user devices 312 and 314, distributed database device 320 may be connected to and / or operably coupled to user device 322, distributed database device 330 may be connected to and / or operably coupled to user devices 332 and 334, and distributed database device 340 may be connected to and / or operably coupled to user device 342. Although shown in Figure 3 as being coupled to one or two user devices, each distributed database device may be connected to and / or operably coupled to any number of user devices.
[0042]
[1049] Each user device in the set of user devices 312, 314, 322, 332, 334, 342 may be any suitable computing device, such as a personal computer, a smartphone, a tablet, a server, etc. As such, the set of user devices 312, 314, 322, 332, 334, 342 may include a processor and a memory (not shown in FIG. 3). The processor may be any suitable processor, such as a general purpose processor, an FPGA, an ASIC, a DSP, etc. The memory may be any suitable memory that stores instructions executed by the processor. The processor and the memory may be operatively coupled to each other. The set of user devices 312, 314, 322, 332, 334, 342 may further include a communication module (not shown in FIG. 3) that may enable each user device to communicate (e.g., send and receive data) with its respective distributed database device 310, 320, 330, 340. More specifically, user devices 312 and 314 can send and receive data to and from distributed database device 310, user device 322 can send and receive data to and from distributed database device 320, user devices 332 and 334 can send and receive data to and from distributed database device 330, and user device 342 can send and receive data to and from distributed database device 340.
[0043]
[1050] User devices 312, 314, 322, 332, 334, 342 can access and / or interact with the distributed database via one or more of distributed database devices 310, 320, 330, 340. More specifically, user devices 312 and 314 can access and / or interact with the distributed database via distributed database device 310, user device 332 can access and / or interact with the distributed database via distributed database device 320, user devices 332 and 334 can access and / or interact with the distributed database via distributed database device 330, and user device 342 can access and / or interact with the distributed database via distributed database device 340. For example, user device 312 can make changes and / or add transactions to the distributed database via distributed database device 340. Similarly stated, user device 312 can send a transaction request to distributed database device 310 requesting that distributed database device 310 add a transaction to the distributed database. As another example, as described in more detail herein, the user device 312 can obtain state proofs from the distributed database device 310 to verify data in the distributed database. Because the user devices 312, 314, 322, 332, 334, 342 are not members of the distributed database, but access the distributed database via members, the user devices 312, 314, 322, 332, 334, 342 do not execute the consensus methodology or take into account the consensus of events and / or transactions in the distributed database.
[0044]
[1051] Just as a transaction may change the data and / or state in a distributed database (as described with respect to FIG. 1), a transaction may also modify the membership of a distributed database (e.g., a set of distributed database devices that implement the distributed database) by adding, removing, and / or modifying members of the distributed database. In some implementations, the members of a distributed database may change over time by adding and / or removing one or more distributed database devices from the set of distributed database devices 310, 320, 330, 340. Stated similarly, the set of distributed database devices 310, 320, 330, 340 that implements a distributed database may change over time as distributed database devices of the set of distributed database devices 310, 320, 330, 340 are removed from the set of distributed database devices 310, 320, 330, 340 and / or as other distributed database devices are added to the set of distributed database devices 310, 320, 330, 340. In some cases, the distributed database device that is removed may be reconnected to the distributed database system at a later point in time.
[0045]
[1052] An address book can be used to keep track of the members of a distributed database (i.e., the distributed database devices implementing the distributed database) at any given time. Figure 4 illustrates an address book 400 associated with a distributed database system according to one embodiment. The address book 400 includes an entry for each of the distributed database devices 310, 320, 330, 340 in the distributed database system 300 of Figure 3. In particular, the address book is defined to include a set of public keys (A, B, C, and D) of the set of distributed database devices (the distributed database devices 310, 320, 330, 340 shown and described with respect to Figure 3) that implement the distributed database. In implementations where stake is used to determine consensus (e.g., a device's stake indicates the degree of influence that device has on the consensus process), the address book 400 may also include the amount of stake associated with each distributed database device.
[0046]
[1053] When a transaction adds, removes, and / or modifies a distributed database device in the set of distributed database devices, the transaction may change and / or update the address book. For example, if a transaction to remove distributed database device 340 from the distributed database is entered into the distributed database and ordered (e.g., within the consensus order of the distributed database), the transaction may be executed and distributed database device 340 may be removed from the distributed database. In response to the transaction, a new address book may be defined that does not include an entry for distributed database device 340. In another example, if a transaction to add a new distributed database device to the distributed database is entered into the distributed database and ordered (e.g., within the consensus order of the distributed database), a new address book may be defined that has an entry (e.g., including a public key and an amount of stake) for the new distributed database device. In yet another example, if a transaction to change the amount of stake associated with one or more distributed database devices is entered into the distributed database and ordered, a new address book may be defined that reflects the change in stake. For example, if the stake reflects the amount of cryptocurrency coins held by each distributed database instance, then a transaction may reflect distributed database device 340 transferring 5 coins to distributed database device 330. After the transaction is ordered and executed, a new address book can be defined that reflects that distributed database device 340 now has 70 coins while distributed database device 330 has 35 coins.
[0047]
[1054] FIG. 5 illustrates an address book history 500 associated with a distributed database system, according to one embodiment. Address book history 500 may be a record of each address book associated with the distributed database. Notably, each time a new address book is defined (e.g., in accordance with the above), a hash of that address book (or a hash value calculated using the address book as input to a hash function) may be added (e.g., as a chain) to address book history 500. Thus, the address book history may have a chronological order, and each address book in the address book history may be applicable and / or accurate for versions of the distributed database spanning successive time periods. For example, address book 502 may relate to a version of the distributed database during a first time period, address book 504 may relate to a version of the distributed database during a second time period after the first time period, address book 506 may relate to a version of the distributed database during a third time period after the second time period, and address book 508 may relate to a version of the distributed database during a fourth time period after the third time period. Thus, in chronological order, address book 502 may be ordered first, address book 504 may be ordered second, address book 506 may be ordered third, and address book 508 may be ordered fourth.
[0048]
[1055] Additionally, the hash (or hash value) of the address book may be digitally signed (e.g., using a private key) by a predefined threshold number of distributed database devices of the previous address book. Such signatures may prove the validity of the new address book. In some examples, each distributed database device may individually sign the hash of the address book. In some examples, signatures from multiple distributed database devices may be aggregated to define an aggregate signature. Other devices (e.g., other distributed database devices or user devices) may verify the signature using the public key of the distributed database device that signs the hash of the address book.
[0049]
[1056] The predetermined threshold may be based on the total number of distributed database devices in the immediately preceding address book, or may be based on the amount of stake held by each distributed database device in the immediately preceding address book. Furthermore, the predetermined threshold may be any suitable threshold. For example, the predetermined threshold may relate to two-thirds of the total stake in the distributed database. In some examples, the predetermined threshold may be any other suitable percentage of distributed database devices and / or stakes (e.g., 67%, 70%, 80%, 90%, 99%, two-thirds, three-quarters, etc.). With reference to FIG. 4, in one example, the predetermined threshold is two-thirds of the total stake in the distributed database, and if both distributed database devices 310 and 340 with public keys A and D and stakes of 100 and 75, respectively, sign (e.g., separately and / or by aggregate signature) the new address book, the address book is considered valid. Notably, in such an example, a combined stake of 175 exceeds two-thirds of the total stake of the distributed database of 255. In another example, if the predefined threshold (rather than the stake) is two-thirds of all members of the distributed database, then any three of the four distributed database devices must sign a new address book for it to be valid.
[0050]
[1057] Returning to FIG. 5, the initial or origin address book 502 may be hashed to yield a ledger identifier for the distributed database. Stated similarly, the initial or origin address book 502 may be used as input to a hash function to generate a hash (or hash value) that may be a ledger identifier. As described herein, this ledger identifier may later be used as a unique identifier for the distributed database. If a transaction modifies the address book 502 (e.g., adds a member, removes a member, or modifies a member's stake), a hash of the new address book 504 may be signed by a predefined number of distributed database devices (based on the total number or amount of stake) of the address book 502. Similarly, if a transaction modifies the address book 504, a hash of the new address book 506 may be signed by a predefined number of distributed database devices (based on the total number or amount of stake) of the address book 504, and if a transaction modifies the address book 506, a hash of the new address book 508 may be signed by a predefined number of distributed database devices (based on the total number or amount of stake) of the address book 506. Thus, the address book history 500 can be used to easily trace the validity of each address book back to the initial and / or origin address book.
[0051]
[1058] As indicated above, each distributed database device in the set of distributed database devices 310, 320, 330, 340 may include a distributed database instance (similar to distributed database instances 114, 124, 134, 144 illustrated and described with respect to FIG. 1 ) that stores data such as, for example, a consensus order of transactions and / or events, and / or the state of the distributed database after transactions have been executed in the consensus order. The order of transactions and / or events may define a state of the distributed database that is stored as database state variables. In some implementations, the state of the distributed database may be partitioned into fragments, each of which may be stored as a leaf record in a Merkle tree.
[0052]
[1059] A Merkle tree is a binary tree of hashes. Figure 6 shows a Merkle tree 600 with data (i.e., data W, data X, data Y, and data Z) stored at each leaf node of the Merkle tree 600. Other nodes in the Merkle tree 600 contain hashes (or hash values) of the concatenated contents of the child nodes of that node. For example, node H W is the data W(H W contains the hash of the only child of node H X contains the hash of data X, and node H Y contains the hash of data Y, and node H Z contains the hash of data Z. Furthermore, node H WX is a concatenated H W and H X contains the hash of node H YZ is a concatenated H Y and H Z , and the root node H WXYZ is a concatenated H WX and H YZ Contains a hash of.
[0053]
[1060] Using the data, the data's Merkle path, and the root node, the data can be verified as contained within a leaf node of the Merkle tree 600. The Merkle path of the data includes each of the sibling nodes of the node in order from the data to the root node of the Merkle tree. For example, the Merkle path of the data W is H X and H YZ (Node H W and H WX Each sibling node, H W and H WX is the data W to the root node H WXYZ In particular, the nodes in the Merkle path of data W (i.e., node H X and H YZ ) and the root node H WXYZBased on this, the user can verify that the data W is in the Merkle tree 600. For example, W can be calculated based on the hash of data W, and H WX is (previously calculated) H W and H (provided as part of the Merkle path) X can be calculated based on the hash of H WXYZ is (previously calculated) H WX and H (provided as part of the Merkle path) YZ It can be calculated based on the hash of H WXYZ Once calculated, it can be compared to the previously stored and / or provided value of the root node. If the calculated root node matches the previously stored and / or provided value of the root node, the data X is associated with the root node H. WXYZ It is verified that the vectors are contained within a Merkle tree with
[0054]
[1061] Returning to FIG. 3, as discussed above, the state of the distributed database may be stored as a Merkle tree. In particular, data related to the state of the distributed database may be stored as leaf nodes in the Merkle tree. Periodically and / or sporadically, a set of distributed database devices 310, 320, 330, 340 (or a subset thereof) implementing the distributed database may digitally sign the root node of the current Merkle tree (i.e., the Merkle tree containing the current state of the distributed database) along with a consensus timestamp for when the data is valid. Each distributed database device 310, 320, 330, 340 that signs the root node of the Merkle tree forms a set of distributed database devices implementing the distributed database that may transmit their signatures to the remaining distributed database devices. If a threshold number of distributed database devices 310, 320, 330, 340 (based on total number or amount of stake) sign the root node of the Merkle tree, then the set of signatures is deemed sufficient to prove that the hash of the root of the Merkle tree for the state of the distributed database is valid as of a given timestamp. In some examples, each distributed database device may individually sign the root node of the Merkle tree. In some examples, the signatures of multiple distributed database devices may be aggregated to define an aggregate signature. Other devices (e.g., other distributed database devices or user devices) may verify the signature using the public key of the distributed database device that signs the root node of the Merkle tree.
[0055]
[1062] In some implementations, the Merkle tree (e.g., the state of the distributed database at a given time) may be stored and / or implemented within a set of distributed database devices 310, 320, 330, 340 that implement the distributed database. In such implementations, the Merkle tree or the state of the distributed database is not stored within the set of user devices 312, 314, 322, 332, 334, 342. Instead, the Merkle tree and / or the state of the distributed database may be accessed by the set of user devices 312, 314, 322, 332, 334, 342 by sending requests to the connected distributed database devices 310, 320, 330, 340. Further, distributed database devices in the set of distributed database devices 310, 320, 330, 340 and / or user devices in the set of user devices 312, 314, 322, 332, 334, 342 can use the state proofs to determine the validity of the data in the leaf nodes of the Merkle tree.
[0056]
[1063] State proofs can be used to verify that data is contained within the state of a distributed database at a point in time. In some implementations, state ... - Data from a distributed database (e.g. the contents of the leaf nodes of a Merkle tree), - the Merkle path of that leaf node, - the timestamp when the Merkle tree is valid, - a set of digital signatures (separate or compound aggregate signatures) (e.g., satisfying a predefined threshold) of a distributed database device implementing the distributed database on the root node of the Merkle tree; - Current address book of distributed databases, - the address book history from the current address book to the initial and / or origin address books of the distributed database, and / or - Ledger identifier (i.e. a hash of the initial and / or origin address book) It may be a file containing:
[0057]
[1064] In some implementations, any portion of the data in the state proof and / or a hash (or a hash value) of any portion of the data in the state proof may be signed. For example, in some implementations, data from the distributed database (e.g., the contents of a leaf node of a Merkle tree) or a hash value of the data may be signed by a predetermined number of distributed database devices implementing the distributed database (separate or compound aggregate signatures). Further, in some implementations, a timestamp, a current address book, an address book history, a ledger identifier, and / or any other portion of the state proof (or a hash value of any portion of the state proof) may be signed by a predetermined number of distributed database devices implementing the distributed database (separate or compound aggregate signatures). Such a signature may be used to verify that the state proof is valid (e.g., using the public key of the signing distributed database device).
[0058]
[1065] In some implementations, state proofs may be requested by user devices (e.g., user devices 312, 314, 322, 332, 334, 342) to verify that a distributed database contains particular data. In particular, a user device may request a distributed database device to which it is connected (e.g., distributed database device 310, 320, 330, 340) to provide a state proof for a given piece of data. The user device (e.g., a processor of the user device) may then verify that the state proof is correct and that the distributed database indeed contains the data in the leaf node of the Merkle tree as of a given timestamp. In particular, in some examples, the user device (e.g., a processor of the user device) may: - verifying that the ledger identifier in the state proof matches a known ledger identifier for the distributed database (e.g. stored in a memory of the user device); - verifying that the ledger identifier matches a hash of the initial and / or origin address book in the address book history of the state proof; - verifying that each address book in the address book history of the proof of state (other than the initial and / or origin address books) is signed by a threshold number of distributed database devices (based on the total number or amount of stake) in the immediately preceding address book in the address book history of the proof of state; - verifying that the root of the Merkle tree, the proof of state, the data in the proof of state, and / or the timestamp of the proof of state are signed by a threshold number of distributed database devices (based on the total number or amount of stake) in the distributed database's current address book; and / or - verifying that a Merkle path of a leaf node of a Merkle tree that stores data is valid for a sequence from the root of the Merkle tree to the leaf record; The state proof can be verified by
[0059]
[1066] After such verification, the user device (e.g., a processor of the user device) can verify that the data in the leaves of the Merkle tree and that are part of the state proof are valid as of the timestamp and are in the distributed database. If such verification is successful, the user device (e.g., a processor of the user device) can process the data as valid (e.g., perform any other applicable actions on the data). For example, the user device can store the data in a local database, use the data in future computations, etc. If such verification fails, the user device (e.g., a processor of the user device) can discard and / or flag the data as invalid. If the data is identified as invalid, the user device can flag the device that is the source of the data as untrusted, the user device can provide a notification to the associated distributed database device that the source of the data is untrusted, the user device can decide not to store the data, the user device can decide not to use the data in future computations, automatically provide a warning to the user of the user device about the data being invalid, etc.
[0060]
[1067] If a majority (e.g., two-thirds) of a set of distributed database devices are fair at any time (e.g., do not clone, fork, and / or split the original distributed database), then there can be only one distributed database for a given ledger identifier. If a user attempts to create, fork, and / or split a copy of the original distributed database in violation of what a fair distributed database device allows, the copy of the original distributed database cannot have unique changes associated with the copy of the original distributed database and still creates a state proof that matches the ledger identifier of the original database. Thus, the ledger identifier serves as a unique name and / or identifier of the original distributed database that does not change as the contents of the original distributed database change. The ledger identifier uniquely identifies one and only one such original distributed database. If a third party and / or user device is given a state proof of a piece of information and / or data, it can verify the piece of information and / or data, even if the state proof was constructed by an untrusted or malicious distributed database device.
[0061]
[1068] In some implementations, a distributed database device may disconnect and then reconnect as part of a distributed database. In such implementations, the distributed database device (e.g., a processor of the distributed database device) may use the state proof as part of a reconnect event to update its distributed database instance and / or verify the data in its distributed database instance. In some implementations, the state proof used by the distributed database device does not include the Merkle path of the leaf node that has the data, but may otherwise be the same as the state proof used by the user device to verify the data. Notably, when a distributed database device reconnects to the network after being disconnected for a period of time, the distributed database device may receive a state proof from another distributed database device. A reconnecting distributed database device (e.g., a processor of the reconnecting distributed database device) may: - verifying that the ledger identifier in the state proof matches a known ledger identifier for the distributed database (e.g., stored in the memory of the reconnecting distributed database device); - verifying that the ledger identifier matches a hash of the initial and / or origin address book in the address book history of the state proof; - verifying that each address book in the address book history of the proof of state (other than the initial and / or origin address books) is signed by a threshold number of distributed database devices (based on the total number or amount of stake) in the immediately preceding address book in the address book history of the proof of state; and / or - verifying that the root of the Merkle tree, the proof of state, the data in the proof of state, and / or the timestamp of the proof of state are signed by a threshold number of distributed database devices (based on the total number or amount of stake) in the distributed database's current address book; However, the reconnecting distributed database device may not verify the Merkle path. Thus, the state proof used by the distributed database device may not include the Merkle path of the leaf nodes that have data. Verifying the root node of the Merkle tree may be done to ensure that the state of the reconnecting distributed database device is correct and matches the state of the Merkle tree in the state proof. Once verified, the reconnecting distributed database device verifies that it has stored the correct state of the distributed database.
[0062]
[1069] 7 is a flow diagram illustrating a method 700 for determining state proofs as described above. The method may be code stored in a memory (e.g., memory 220 of FIG. 2) and executed by a processor (e.g., processor 210 of FIG. 2) of a computing device (e.g., computing device 200) associated with and / or implementing the distributed database. The method 700 includes, at 702, determining a state of the distributed database as a Merkle tree. The state may be based on transactions and / or events exchanged between the computing devices implementing the distributed database and / or the distributed database devices and executed in a consensus order. Additionally, the state may be the result of a consensus algorithm and / or protocol implemented by the distributed database.
[0063]
[1070] At 704, a hash of the root of the Merkle tree may be signed. In particular, a computing device may digitally sign a hash of the root node of the Merkle tree using the private key of the computing device. In some implementations, each distributed database device implementing a distributed database may send its signature to other distributed database devices implementing the distributed database. In some implementations, if a distributed database device receives signatures from a majority of the other distributed database devices (and / or a number of distributed database devices above a threshold), the set of signatures is deemed sufficient to prove that the hash of the root of the Merkle tree is valid as of a given timestamp. In implementations that use stake rather than a total number of distributed database devices, if a distributed database device receives signatures from distributed database devices that collectively have a majority of the total stake in the distributed database (and / or an amount of stake above a threshold), the set of signatures is deemed sufficient to prove that the hash of the root of the Merkle tree is valid as of a given timestamp. The signatures may be verified using the public key of the signing computing device.
[0064]
[1071] At 706, a state proof may be defined using the Merkle tree and the address book history. In some implementations, the state proof may be defined to include additional information as described above. At 708, the state proof may be stored such that the state proof may be used to verify data. More specifically, a third party may use the state proof to verify information contained within the distributed database and / or the state of the distributed database.
[0065]
[1072] 8 is a flow diagram of a method 800 for validating data in a distributed database, according to one embodiment. The method 800 may be performed using code stored in a memory (e.g., memory 220 of FIG. 2) and may be executed by a processor (e.g., processor 210 of FIG. 2) of a computing device (e.g., computing device 200) associated with and / or implementing the distributed database. The method 800 includes, at 802, calculating an identifier for the distributed database using a first address book for the distributed database implemented at a first time and by a first set of computing devices. As discussed above, in some implementations this may be a ledger identifier for the distributed database. Such a ledger identifier may be a hash of the initial and / or origin address book for the distributed database. Furthermore, in some implementations such an identifier may be used as a unique identifier for the distributed database.
[0066]
[1073] At 804, transactions are received for at least one of (1) adding a computing device to the first set of computing devices, (2) removing a computing device from the first set of computing devices, or (3) modifying a computing device of the first set of computing devices to define a second set of computing devices. Such transactions may be provided as part of events of the distributed database. The events may be provided to other computing devices and / or members of the distributed database so that a consensus order can be established for the events and / or transactions. The second set of computing devices may be the set of computing devices and / or members of the distributed database after the transactions have been executed in the consensus order.
[0067]
[1074] At 806, a second address book is defined at a second time point after the first time point, the second address book including a public key associated with each computing device in the second set of computing devices. In some implementations, the second address book is defined based on transactions that update computing devices and / or members of the distributed database.
[0068]
[1075] At 808, state proofs associated with the data in the distributed database after the second point in time are received from computing devices of the second set of computing devices. As discussed above, such state proofs may be defined such that the computing devices can use the state proofs to verify the data as part of the state of the distributed database.
[0069]
[1076] At 810, the data in the distributed database is verified by verifying that a predetermined number of the first set of computing devices have digitally signed the second address book. The predetermined number of computing devices may be a majority of the computing devices in the first set of computing devices. Additionally, in some implementations, additional information as described above with respect to the state proof may be used to verify the data in the distributed database.
[0070]
[1077] In some examples, a user and / or a user device (e.g., a processor of the user device) may use a verification method to verify data in the distributed database. The verification method may include verifying that the ledger identifier matches a known ledger identifier. The verification method may further include verifying that the ledger identifier is equal to a hash of the origin address book. The verification method may further include verifying that each address book in the address book history of the state proof is signed by a predetermined number (e.g., based on total number or total stake) of the set of computing devices in the immediately preceding address book, excluding the origin address book. The verification method may further include verifying that the root node of a Merkle tree used to store the data is signed by a majority and / or a predetermined number of the second set of computing devices. The verification method may further include verifying that a Merkle path is valid for a series of nodes from the root node of the Merkle tree to a leaf node of the Merkle tree that stores the data being verified.
[0071]
[1078] Although hashgraphs are described above as being used to store and communicate transactions in events, in other examples any other suitable distributed database and / or distributed ledger technology can be used to implement the above methods and facilitate state proofs. For example, in other examples such methods can be implemented using technologies such as blockchain, PAXOS, RAFT, Bitcoin, Ethereum, etc.
[0072]
[1079] While described above as an event containing hashes of two past events (one self hash and one external hash), in other embodiments, a member may synchronize with two other members to create and / or define an event containing hashes of three past events (one self hash and two external hashes). In still other embodiments, any number of event hashes of past events from any number of members may be included in the event. In some embodiments, different events may contain different numbers of hashes of past events. For example, a first event may contain two event hashes and a second event may contain three event hashes.
[0073]
[1080] Although events are described above as including hashes (or cryptographic hash values) of past events, in other embodiments, events may be created and / or defined to include pointers, identifiers, and / or any other suitable references to past events. For example, events may be created and / or defined to include a serial number that identifies past events and is therefore associated with and used for linking events. In some embodiments, such a serial number may include, for example, an identifier (e.g., a Media Access Control (MAC) address, Internet Protocol (IP) address, assigned address, etc.) associated with the member who created and / or defined the event, and the order of the event defined by that member. For example, a member with an identifier of 10 and an event that is the 15th event created and / or defined by that member may assign the event an identifier of 1015. In other embodiments, identifiers may be assigned to events using any other suitable format.
[0074]
[1081] While various embodiments have been described above, it should be understood that they are presented by way of example only and not limitation. Where the methods above show certain events occurring in a certain order, the order of the certain events can be modified. In addition, certain of the events can be performed simultaneously in parallel processing, where possible, but can also be performed sequentially as described above.
[0075]
[1082] Some embodiments described herein relate to computer storage products with non-transitory computer-readable media (which may also be referred to as non-transitory processor-readable media) having instructions or computer code for performing various computer-implemented operations. The computer-readable media (or processor-readable media) is non-transitory in the sense that it does not itself include a transitory propagating signal (e.g., a propagating electromagnetic wave that carries information over a transmission medium such as space or a cable). The media and computer code (which may also be referred to as code) may be designed and constructed for a specific purpose. Examples of non-transitory computer-readable media include, but are not limited to, magnetic storage media such as hard disks, floppy disks, and magnetic tapes, optical storage media such as compact disks / digital video disks (CD / DVDs), compact disk read-only memory (CD-ROM), and holographic devices, magneto-optical storage media such as optical disks, carrier wave signal processing modules, and hardware devices that are specifically configured to store and execute program code, such as application specific integrated circuits (ASICs), programmable logic devices (PLDs), read-only memory (ROM), and random access memory (RAM) devices. Other embodiments described herein relate to computer program products that may include, for example, instructions and / or computer code discussed herein.
[0076]
[1083] Examples of computer code include, but are not limited to, microcode or microinstructions, machine instructions such as produced by a compiler, code used to create a web service, and files containing high-level instructions executed by a computer using an interpreter. For example, embodiments may be implemented using an imperative programming language (e.g., C, Fortran, etc.), a functional programming language (Haskell, Erlang, etc.), a logic programming language (e.g., Prolog), an object-oriented programming language (e.g., Java, C++, etc.), or other suitable programming language and / or development tools. Further examples of computer code include, but are not limited to, control signals, encryption code, and compression code.
[0077]
[1084] While various embodiments have been described above, it should be understood that they have been presented by way of example only and not limitation, and that various changes in form and detail may be made. Any portion of the apparatus and / or methods described herein may be combined in any combination, except in mutually exclusive combinations. The embodiments described herein may include various combinations and / or subcombinations of the functions, components, and / or features of the various embodiments described.
Claims
1. a memory of a computing device associated with a distributed database implemented by the computing devices via a network operatively coupled to the computing devices; a processor operatively coupled to the memory, receiving a state proof associated with a state of the distributed database from a computing device of the plurality of computing devices, the state proof comprising: data relating to said condition; a timestamp associated with said state; a first identifier for the distributed database; and a set of address books associated with the distributed database, each address book in the set being associated with a version of the distributed database during a time period different from a time period associated with a version of the distributed database associated with each remaining address book in the set, the set of address books having a chronological order. Including, receiving, determining the validity of the data at a time associated with the timestamp, verifying that the first identifier of the distributed database is correct based on a second identifier of the distributed database stored in the memory; verifying that the data associated with the state has been digitally signed by a predetermined number of the plurality of computing devices; and verifying that each address book in the set of address books, other than an initial address book in the set of address books, is digitally signed by a predetermined number of computing devices in a set of computing devices associated with a chronologically immediately preceding address book in the set of address books. To be determined by a processor configured to: Including, equipment.
2. The apparatus of claim 1 , wherein the processor is configured to receive the state proof as part of the computing device reconnecting with the distributed database.
3. The device of claim 1 , wherein the processor is configured to discard the data in response to determining that the data is invalid.
4. The device of claim 1 , wherein the processor is configured to process the data as valid in response to determining that the data is valid.
5. the state is associated with a Merkle tree, the data is stored as leaf records of the Merkle tree, and the processor: Verifying that a Merkle path is valid for a sequence from the root of the Merkle tree to said leaf record. The apparatus of claim 1 , configured to determine the validity of the data at the time point by:
6. The device of claim 1 , wherein the second identifier of the distributed database is a hash value calculated using the initial address book.
7. The apparatus of claim 1 , wherein the data related to the state is part of data stored in the distributed database.
8. The apparatus of claim 1 , wherein the digital signature associated with the data is an aggregate signature associated with each computing device of the plurality of computing devices that digitally signed the data.
9. the computing device of the plurality of computing devices is a first computing device of the plurality of computing devices; 2. The apparatus of claim 1, wherein a second computing device of the plurality of computing devices is configured to digitally sign the data using a private key associated with the second computing device, and the processor is configured to verify that the second computing device has digitally signed the data using a public key associated with the second computing device.
10. each address book in the set of address books is a set of public keys, each key in the set of public keys associated with an amount of stake; for each address book in the set of address books, each public key in the set of public keys associated with the address book is associated with a computing device in a plurality of computing devices that implements the version of the distributed database during the period associated with the address book; 10. The device of claim 1.
11. The processor, a transaction for adding a computing device to the plurality of computing devices; a transaction to remove a computing device from the plurality of computing devices; or A transaction for updating an amount of stake associated with a computing device of the plurality of computing devices. The device of claim 1 , configured to define a new address book in response to receiving an event including at least one of:
12. The apparatus of claim 1 , wherein the predetermined number of computing devices of the plurality of computing devices is based on a total number of computing devices in the plurality of computing devices.
13. The apparatus of claim 1 , wherein the predetermined number of computing devices of the plurality of computing devices is based on a stake associated with each computing device of the plurality of computing devices.
14. 2. The apparatus of claim 1, wherein verifying that the data associated with the state has been digitally signed comprises verifying that a hash value of the data associated with the state has been digitally signed by the predetermined number of the plurality of computing devices.
15. the computing device of the plurality of computing devices is a first computing device of the plurality of computing devices; the computing device associated with the distributed database is a second computing device of the plurality of computing devices implementing the distributed database; 10. The device of claim 1.
16. 2. The apparatus of claim 1, wherein the computing device associated with the distributed database (1) is associated with a user of the distributed database, (2) is not from the plurality of computing devices implementing the distributed database, and (3) is operably coupled to the computing device of the plurality of computing devices implementing the distributed database.
17. A non-transitory processor-readable medium storing code representing instructions for execution by a processor, the code comprising: receiving a state certificate relating to a state of the distributed database from a computing device of a plurality of computing devices implementing the distributed database via a network operatively coupled to the plurality of computing devices, the state certificate comprising: data relating to said condition; a timestamp associated with said state; a first identifier of the distributed database; and a set of address books associated with the distributed database, each address book in the set being associated with a version of the distributed database during a time period different from a time period associated with a version of the distributed database associated with each remaining address book in the set, the set of address books having a chronological order. Including, receiving, determining the validity of the data at a time associated with the timestamp, verifying that the first identifier of the distributed database is correct based on a second identifier of the distributed database stored in a memory operatively coupled to the processor; verifying that the data associated with the state has been digitally signed by a predetermined number of the plurality of computing devices; and verifying that each address book in the set of address books, other than an initial address book in the set of address books, is digitally signed by a predetermined number of computing devices in a set of computing devices associated with a chronologically immediately preceding address book in the set of address books. determining the validity of said data by 23. A non-transitory processor-readable medium comprising code for causing the processor to:
18. 20. The non-transitory processor-readable medium of claim 17, wherein the code for causing the processor to receive comprises code for causing the processor to receive the state proof in response to a request to verify the data transmitted to the computing device.
19. ignoring the data in response to determining that the data is invalid.
20. The non-transitory processor-readable medium of claim 17, further comprising code for causing the processor to:
20. The code for causing the processor to determine the validity of the data comprises: verifying that a hash value of the data has been digitally signed by the predetermined number of computing devices of the plurality of computing devices.
20. The non-transitory processor-readable medium of claim 17, comprising code for causing the processor to:
21. 20. The non-transitory processor-readable medium of claim 17, wherein the predetermined number of computing devices of the set of computing devices is based on a stake associated with each computing device of the set of computing devices.
Citation Information
Patent Citations
Method and apparatus for distributed database in network
JP2018528555A
Methods and apparatus for efficiently implementing a distributed database within a network
US20190020629A1
