Confidential blockchain database

By executing database and distributed ledger code in a trusted execution environment, instantiating the distributed ledger and query and command system of the joint blockchain, the database consistency and availability problems in the blockchain system are solved, and an efficient and secure database system is achieved.

CN119547071APending Publication Date: 2025-02-28MICROSOFT TECHNOLOGY LICENSING LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380052421.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-07-29
Filing Date
2023-06-12
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In a blockchain system, how to build a database or query and command system with data consistency, availability and fault tolerance to avoid performance degradation, higher storage costs and large changes in application code caused by adding blockchain to the database.

Method used

Execute database and distributed ledger code in a trusted execution environment (TEE), instantiate distributed ledger and query and command system for joint blockchains, distributed query and command systems are distributed across multiple nodes, and ensure data consistency and integrity through transaction logs and consensus algorithms.

Benefits of technology

It realizes a blockchain-based database system, which is confidential, complete protection, tamper-proof and provides high availability and fault tolerance for online and offline audits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119547071A_ABST
    Figure CN119547071A_ABST
Patent Text Reader

Abstract

The disclosed technology generally relates to a distributed query and command system. In one example of the technique, in a trusted execution environment (TEE) of a first node, database code of the first node and distributed ledger code of the first node are executed such that execution of the distributed ledger code of the first node instantiates a first instance of a distributed ledger of a federated blockchain, and cause execution of the query and command code of the first node to instantiate a first instance of the query and command system. The federated blockchain is distributed among a plurality of nodes, and the query and command system is distributed among the plurality of nodes. A first transaction associated with a modification query and a command system is received. And executing the first transaction. A change associated with the first transaction to the distributed ledger is persisted.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] Blockchain systems have been proposed for various application scenarios, including applications in the financial industry, healthcare, IoT, etc. For example, the Bitcoin system was developed to allow electronic cash to be transferred directly from one party to another without going through a financial institution. Bitcoin (e.g., electronic coins) is represented by a chain of transactions that transfer ownership from one party to another. In order to transfer ownership of Bitcoin, a new transaction can be generated and added to the transaction stack in the block. The new transaction including the public key of the new owner can be digitally signed by the owner with the owner's private key to transfer ownership to the new owner, as represented by the new owner's public key.

[0002] When a block is full, the block can be "capped" with a block header, which is a hash digest of all the transaction identifiers within the block. The block header can be recorded as the first transaction in the next block in the chain, creating a mathematical hierarchy known as a "blockchain." To verify the current owner, the blockchain of transactions can be followed to verify each transaction from the first transaction to the last. The new owner only needs to have a private key that matches the public key of the transaction that transferred the bitcoins. The blockchain can create a mathematical proof of ownership in an entity represented by a secure identity (e.g., a public key), which is pseudo-anonymous in the case of the Bitcoin system.

[0003] Blockchain is a type of distributed ledger. A distributed ledger is a consensus record with a confidential audit trail that is typically maintained and verified by several individual nodes. Summary of the invention

[0004] This Summary is provided to introduce a series of concepts in a simplified form, which are further described in the Detailed Description below. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

[0005] In short, the disclosed technology generally relates to a distributed query and command system. In some examples, in a trusted execution environment (TEE) of a first node, a database code of the first node and a distributed ledger code of the first node are executed, so that the execution of the distributed ledger code of the first node instantiates a first instance of a distributed ledger of a joint blockchain, and the execution of the query and command code of the first node instantiates a first instance of a query and command system. The blockchain is distributed among a plurality of nodes, and the query and command system is distributed among the plurality of nodes. In some examples, a first transaction associated with modifying the query and command system is received. In some examples, the first transaction is executed. In some examples, changes associated with the first transaction to the distributed ledger are persisted.

[0006] Other aspects and applications of the disclosed technology will be understood upon reading and understanding the drawings and description. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Non-limiting and non-exclusive examples of the present disclosure are described with reference to the following drawings. In the drawings, like reference numerals refer to like parts in the various drawings unless otherwise specified. The drawings are not necessarily drawn to scale.

[0008] For a better understanding of the present disclosure, reference will be made to the following detailed description, which is to be read in conjunction with the accompanying drawings, in which:

[0009] Figure 1 is a block diagram illustrating one example of a suitable environment in which various aspects of the present technology may be employed;

[0010] Figure 2 is a block diagram illustrating one example of a suitable computing device in accordance with various aspects of the disclosed technology;

[0011] Figure 3 is a block diagram illustrating an example of a network connection system;

[0012] Figure 4 is a block diagram illustrating an example of a system for a distributed query and command system; and

[0013] Figure 5 is a flow chart illustrating an example process for a distributed query and command system in accordance with various aspects of the present disclosure. DETAILED DESCRIPTION

[0014] The following description provides specific details for a comprehensive understanding and implementation of the description of various examples of the present technology. It will be appreciated by one skilled in the art that the technology can be practiced without many of these details. In some instances, well-known structures and functions are not shown or described in detail to avoid unnecessarily obscuring the description of the examples of the technology. The present disclosure is intended to interpret the terms used in the present disclosure in its broadest and most reasonable manner, even if it is used in conjunction with the detailed description of certain examples of the present technology. Although certain terms may be emphasized below, any term intended to be interpreted in any limited manner will be so clearly and specifically defined in this detailed description section. Throughout the specification and claims, unless the context otherwise dictates, the following terms at least adopt the meanings explicitly associated herein. The meanings identified below do not necessarily limit the terms, but only provide illustrative examples for the terms. For example, each of the terms "based on" and "on the basis of..." is not exclusive and is equivalent to the term "based at least in part on", and includes options based on additional factors, some of which may not be described herein. As another example, the term "via" is not exclusive and is equivalent to the term "at least partially via", and includes the option of via additional factors, some of which may not be described herein. The meaning of "in" includes "in" and "on". The phrase "in one embodiment" or "in one example" as used herein does not necessarily refer to the same embodiment or example, although it may be the same embodiment or example. The use of a specific textual numerical indicator does not mean that there are numerical indicators with fewer numerical values. For example, the statement "a widget selected from a group consisting of a third foo and a fourth bar" does not itself mean that there are at least three foo elements, nor does it mean that there are at least four bar elements. Singular references are only for clarity of reading, and unless plural references are explicitly excluded, plural references are included. Unless otherwise explicitly indicated, the term "or" is an inclusive "or" operator. For example, the phrase "A or B" means "A, B, or A and B". As used herein, the terms "component" and "system" are intended to cover various combinations of hardware, software, or hardware and software. Thus, for example, a system or component can be a process, a process executing on a computing device, a computing device, or a portion thereof. The terms "cloud" or "cloud computing" refer to a shared pool of configurable computer system resources and advanced services over a wide area network, typically the Internet. "Edge" devices refer to devices that are not part of the cloud themselves, but rather serve as entry points into an enterprise or service provider's core network.

[0015] In short, the disclosed technology generally relates to a distributed query and command system. In some examples, in a trusted execution environment (TEE) of a first node, a database code of the first node and a distributed ledger code of the first node are executed, so that the execution of the executed distributed ledger code of the first node instantiates a first instance of a distributed ledger of a joint blockchain, and the execution of the query and command code of the first node instantiates a first instance of a query and command system. The blockchain system is distributed among a plurality of nodes, and the query and command system is distributed among the plurality of nodes. In some examples, a first transaction associated with modifying the query and command system is received. In some examples, the first transaction is executed. In some examples, changes to the distributed ledger associated with the first transaction are persisted.

[0016] Building a database or other query and command system with data consistency, availability, and fault tolerance while synchronizing with the blockchain network consensus is an unsolved technical challenge in the background technology field. If not built correctly, adding a blockchain to a database can result in performance degradation, higher storage costs, and a large number of application code changes that need to be built outside the database API. In some examples, the query and command system (such as a database or message broker) can be used in an unmodified manner in a federated blockchain network in a manner that is tamper-resistant and guarantees confidentiality, integrity, availability, and proof of whether tampering has occurred.

[0017] In some examples, the federated blockchain can be bootstrapped based on multiple nodes, each of which includes a trusted execution environment (TEE). The TEE in each node of the federated blockchain can include a database instance (or other query and command system instance) and a distributed ledger instance. After the federated blockchain is bootstrapped and begins normal operation, the distributed ledger instance on each node in the federated blockchain can operate as a distributed ledger. Similarly, after the federated blockchain is bootstrapped and begins normal operation, the database on each node in the federated blockchain can operate as a database (or other query and command system) distributed among the nodes of the federated database.

[0018] Clients can utilize the database in a standard manner. In some examples, based on the fact that the database is distributed on a federated blockchain, neither the database itself nor the behavior of the client needs to be changed. Conversely, if the database is not on a federated blockchain, the client can follow the same procedure as for the database.

[0019] Thus, the client can initiate a transaction with the database in a normal manner. When the client initiates a transaction, the transaction can be communicated to one of the nodes of the joint blockchain. Each TEE may include a log of the impact / modification on the database. In some examples, the log is a write-ahead log (WAL). In some examples, each entry in the log indicates the changes in the database resulting from the execution of the transaction. In some examples, the log contains a commit point. In some examples, the commit point indicates the point at which the log entries since the last commit point are committed to the database. In some examples, when the commit point is reached, the database is updated based on each log entry in the log entries since the last commit point.

[0020] Therefore, when a client initiates a transaction, the client can conduct the transaction in a standard manner, such as via a standard API used for a database. Information can be communicated back to the client as normal for a database. In some examples, each WAL entry typically generated for a transaction is saved to a distributed ledger, and updates to the distributed ledger are replicated in each node in the joint blockchain. The transaction can be executed normally as for a database, where the database is distributed among the nodes of the joint blockchain. In some examples, the database is updated normally at each submission point, and after a successful submission, modifications to the database are replicated in each node of the joint blockchain. In some examples, replication is performed in a confidential and integrity-protected manner. TEE can also be used to provide a universal verifiable solution for each transaction, and the solution can be provided to the client upon request. In various examples, the solution can be provided as part of a client database transaction query or as an out-of-band request, for example, to initiate a database query dedicated to retrieving (multiple) solutions. The universal verifiable solution can be used to encrypt the way in which the transaction actually occurred.

[0021] In some examples, the WAL log on the distributed ledger is authoritative for the state of the database. The database can be recovered from the WAL log on the distributed ledger. Because (1) the code for the distributed ledger and the database runs in the TEE, (2) the distributed ledger uses a distributed consensus and governance that is authenticated, verifiable, and auditable by the TEE, and (3) a universal verifiable scheme is used, a blockchain-based database system can be provided that is confidential, auditable online for integrity protection, auditable offline for integrity protection, and tamper-proof.

[0022] Exemplary Equipment / Operating Environment

[0023] Figure 1 1 is a schematic diagram of an environment 100 in which various aspects of the present technology may be practiced. As shown, environment 100 includes computing devices 110 and network nodes 120 connected via network 130. Although Figure 1 Specific components of environment 100 are shown in FIG. 1 , but in other examples, environment 100 may also include additional and / or different components. For example, in some examples, environment 100 may also include a network storage device, a maintenance manager, and / or other suitable components (not shown). Figure 1 The computing device 110 shown in FIG. 1 can be located in various locations, including a local computer, an on-premises deployment, a cloud, etc. For example, the computing device 110 can be on the client side, the server side, etc.

[0024] like Figure 1 As shown, the network 130 may include one or more network nodes 120, wherein the one or more network nodes 120 interconnect multiple computing devices 110 and connect the computing devices 110 to an external network 140, such as the Internet or an intranet. For example, the network node 120 may include a switch, a router, a hub, a network controller, or other network elements. In some examples, the computing devices 110 may be organized into racks, action zones, groups, sets, or other suitable partitions. For example, in the example shown, the computing devices 110 are grouped into three host sets, which are identified as first, second, and third host sets 112a to 112c, respectively. In the example shown, each host set in the host set 112a to 112c is operatively coupled to a corresponding network node 120a to 120c, respectively, which are generally referred to as "top of rack" or "TOR" network nodes. The TOR network nodes 120a to 120c can then be operatively coupled to additional network nodes 120 to form a computer network in a hierarchical, flat, mesh, or other suitable type of topology that allows communication between the computing device 110 and the external network 140. In other examples, multiple host sets 112a to 112c can share a single network node 120. The computing device 110 can be virtually any type of general-purpose or special-purpose computing device. For example, these computing devices can be user devices, such as desktop computers, notebook computers, tablet computers, display devices, cameras, printers, or smart phones. However, in a data center environment, these computing devices can be server devices, such as application server computers, virtual computing host computers, or file server computers. In addition, the computing devices 110 can be individually configured to provide computing, storage, and / or other suitable computing services.

[0025] In some examples, one or more of computing devices 110 are devices configured as at least part of a distributed query and command system.

[0026] Exemplary Computing Devices

[0027] Figure 22 is a schematic diagram illustrating one example of a computing device 200 in which various aspects of the present technology may be practiced. The computing device 200 may be virtually any type of general-purpose or special-purpose computing device. For example, the computing device 200 may be a user device, such as a desktop computer, a laptop computer, a tablet computer, a display device, a camera, a printer, or a smartphone. Likewise, the computing device 200 may also be a server device, such as an application server computer, a virtual computing host computer, or a file server computer. For example, the computing device 200 may be Figure 1 Likewise, as discussed in more detail below, computer device 200 may be an example of any device shown or referred to in any of the following figures, within any distributed system. Figure 2 As shown, computing device 200 may include processing circuit 210, operating memory 220, memory controller 230, bus 240, data storage memory 250, input interface 260, output interface 270, and network adapter 280. Each of these above-listed components of computing device 200 includes at least one hardware element.

[0028] The computing device 200 includes at least one processing circuit 210 configured to execute instructions, such as instructions for implementing the workloads, processes, and / or techniques described herein. The processing circuit 210 may include a microprocessor, a microcontroller, a graphics processor, a coprocessor, a field programmable gate array, a programmable logic device, a signal processor, and / or any other circuit suitable for processing data. The above instructions and other data (e.g., data sets, metadata, operating system instructions, etc.) can be stored in an operating memory 220 during the runtime of the computing device 200. The operating memory 220 may also include any of a variety of data storage devices / components, such as volatile memory, semi-volatile memory, random access memory, static memory, cache, buffer, and / or other media used to store runtime information. In one example, when the computing device 200 is powered off, the operating memory 220 does not retain information. Instead, the computing device 200 may be configured to transfer instructions from a non-volatile data storage component (e.g., data storage component 250) to the operating memory 220 as part of a boot or other loading process. In some examples, other forms of execution may be employed, such as executing directly from data storage component 250, eg, execute-in-place (XIP).

[0029] The operating memory 220 may include a fourth generation double data rate (DDR4) memory, a third generation double data rate (DDR3) memory, other dynamic random access memory (DRAM), a high bandwidth memory (HBM), a hybrid memory cube memory, a 3D stacked memory, a static random access memory (SRAM), a magnetoresistive random access memory (MRAM), a pseudo-static random access memory (PSRAM), and / or other memory, and such memory may include one or more memory circuits integrated on a DIMM, a SIMM, a SODIMM, a known good die (KGD), or other package. Such an operating memory module or device may be organized according to channels, rows, columns, and memory banks. For example, the operating memory device may be coupled to the processing circuit 210 via a memory controller 230 in a channel. An example of the computing device 200 may include one or two DIMMs per channel, and one or two rows and columns per channel. The operating memory within the rows and columns may be operated using a shared clock, a shared address, and a command bus. In addition, the operating memory device may be organized into several memory banks, where the memory banks may be viewed as arrays addressed by rows and columns. Based on this organization of the operating memory, a physical address within the operating memory can be referred to by a tuple of channel, row, bank, row, and column.

[0030] Notwithstanding the above discussion, the operational memory 220 specifically does not include or encompass communications media, any communications media, or any signals per se.

[0031] The memory controller 230 is configured to interface the processing circuit 210 to the operating memory 220. For example, the memory controller 230 may be configured to interface commands, addresses, and data between the operating memory 220 and the processing circuit 210. The memory controller 230 may also be configured to abstract or otherwise manage certain aspects of memory management from or for the processing circuit 210. Although the memory controller 230 is shown as a single memory controller separate from the processing circuit 210, in other examples, multiple memory controllers may be employed, the memory controller(s) may be integrated with the operating memory 220, etc. In addition, the memory controller(s) may be integrated into the processing circuit 210. These and other variations are possible.

[0032] In computing device 200, data storage memory 250, input interface 260, output interface 270, and network adapter 280 are interfaced to processing circuit 210 by bus 240. Figure 2The bus 240 is shown as a single passive bus, but other configurations, such as a collection of busses, a collection of point-to-point links, input / output controllers, bridges, other interface circuit devices, and / or any collection thereof, may also be appropriately used to interface the data storage memory 250, input interface 260, output interface 270, and / or network adapter 280 to the processing circuit 210.

[0033] In the computing device 200, the data storage memory 250 is used for long-term non-volatile data storage. The data storage memory 250 may include any of a variety of non-volatile data storage devices / components, such as non-volatile memory, disks, disk drives, hard disk drives, solid-state drives, and / or any other medium that can be used for non-volatile storage of information. However, the data storage memory 250 specifically does not include or cover communication media, any communication media, or any signal itself. Compared to the operating memory 220, the data storage memory 250 is used by the computing device 200 for non-volatile long-term data storage, rather than for runtime data storage.

[0034] In addition, the computing device 200 may include or be coupled to any type of processor-readable media, such as processor-readable storage media (e.g., operating memory 220 and data storage memory 250) and communication media (e.g., communication signals and radio waves). Although the term processor-readable storage medium includes operating memory 220 and data storage memory 250, regardless of whether it is used in the singular or plural form throughout the specification and claims, the term "processor-readable storage medium" is defined herein such that the term "processor-readable storage medium" specifically excludes and does not cover communication media, any communication media, or any signal itself. However, the term "processor-readable storage medium" does cover processor cache, random access memory (RAM), register memory, etc.

[0035] The computing device 200 also includes an input interface 260, which can be configured to enable the computing device 200 to receive input from a user or from other devices. In addition, the computing device 200 includes an output interface 270, which can be configured to provide output from the computing device 200. In one example, the output interface 270 includes a frame buffer, a graphics processor, a graphics processor or an accelerator, and is configured to render a display for presenting on a separate visual display device (such as a monitor, a projector, a virtual computing client computer, etc.). In another example, the output interface 270 includes a visual display device, and is configured to render and present a display for viewing. In yet another example, the input interface 260 and / or the output interface 270 may include a universal asynchronous receiver / transmitter (UART), a serial peripheral interface (SPI), an integrated circuit bus (I2C), a general purpose input / output (GPIO), etc. In addition, the input interface 260 and / or the output interface 270 may include any number or type of peripheral devices or be connected to its interface.

[0036] In the example shown, computing device 200 is configured to communicate with other computing devices or entities via network adapter 280. Network adapter 280 may include a wired network adapter, such as an Ethernet adapter, a token ring adapter, or a digital subscriber line (DSL) adapter. Network adapter 280 may also include a wireless network adapter, such as a Wi-Fi adapter, a Bluetooth adapter, a ZigBee adapter, a Long Term Evolution (LTE) adapter, SigFox, LoRa, a powerline, or a 5G adapter.

[0037] Although computing device 200 is shown with certain components configured in a particular arrangement, these components and arrangements are merely one example of a computing device in which the technology may be employed. In other examples, data storage memory 250, input interface 260, output interface 270, or network adapter 280 may be coupled directly to processing circuitry 210, or via an input / output controller, bridge, or other interface circuitry. Other variations of the technology are possible.

[0038] Some examples of computing device 200 include at least one memory (e.g., operating memory 220) having processor-executable code stored therein, and at least one processor (e.g., processing unit 210) adapted to execute the processor-executable code, wherein the processor-executable code includes processor-executable instructions that, in response to execution, enable computing device 200 to perform actions, wherein in some examples, as discussed in more detail below, the actions may include actions for one or more of the processes described herein, such as Figure 5 The process shown in .

[0039] Exemplary Systems

[0040] Figure 3 is a block diagram illustrating an example of a system ( 300 ). System 300 may include a network 330 , as well as client devices 341 and 342 and nodes 351 , 352 , and 353 , which in some examples are all connected to network 330 .

[0041] Each of the client devices 341 and 342 and the nodes 351, 352, and 353 may include Figure 2 An example of a computing device 200. Figure 3 and the instructions for Figure 3 The corresponding description shows an example system for illustrative purposes, which does not limit the scope of the present disclosure.

[0042] The nodes can operate together to provide a joint blockchain. Each of nodes 351 to 353 can include a TEE. In some examples, the TEE executes a distributed ledger instance and also executes an instance of a serialized query and command system using transaction semantics. Therefore, the node can provide a distributed ledger and serialized query and command services distributed among the nodes together. The client can utilize the serialized query and command services via a client device (such as client devices 341 and 342). In some examples, the client can communicate with the serialized query and command services in a normal manner that it will communicate with the serialized query and command services, without considering the fact that the serialized query and command services are serialized query and command services based on blockchain.

[0043] For example, in some examples, the serialized query and command service is a database service that uses a standard database (such as PostgreSQL) using a standard API for PostgreSQL. Communications to and from the database can be conducted in the same manner as normal for communicating with a database service, except that the client can also request and receive a generic verifiable scheme for transactions.

[0044] The network 330 may include one or more computer networks, including wired and / or wireless networks, each of which may be, for example, a wireless network, a local area network (LAN), a wide area network (WAN), and / or a global network such as the Internet. On an interconnected set of LANs, including those based on different architectures and protocols, a router acts as a link between LANs, enabling messages to be sent from one LAN to another. Financially, the communication links within a LAN typically include twisted pairs or coaxial cables, while the communication links between networks may utilize analog telephone lines, dedicated digital lines including all or part of T1, T2, T3, and T4, integrated services digital networks (ISDN), digital subscriber lines (DSL), wireless links including satellite links, and / or other communication links known to those skilled in the art. In addition, remote computers and other related electronic devices may be remotely connected to a LAN or WAN via a modem and a temporary telephone link. The network 330 may include various other networks, such as one or more networks using local network protocols such as 6LoWPAN, ZigBee, etc. In essence, network 330 may include any suitable network-based communication methods by which information can be propagated among client devices 341 and 342 and nodes 351, 352, and 353. Although each device is shown as being connected to network 330, this does not necessarily mean that each device communicates with each other device shown. In some examples, some of the devices shown communicate only with some of the other devices / services shown via one or more intermediate devices. In addition, although network 330 is shown as one network, in some examples, on the contrary, network 330 may include multiple networks that may or may not be connected to each other, wherein some of the devices shown communicate with each other through one of the multiple networks, while other devices in the devices shown communicate with each other using different networks in the multiple networks.

[0045] System 300 may include Figure 3 More or fewer devices may be shown, which are shown only by way of example.

[0046] Figure 4 is a block diagram showing an example of a system (400). The system 400 may be Figure 34. System 400 may include client device 441, client device 442, and joint blockchain 450. Joint blockchain 450 may include nodes 451, 452, and 453. Joint blockchain 450 may include more or less than three nodes, which are shown by way of example only. In some examples, each of the nodes in joint blockchain 450 (e.g., nodes 451 to 453) includes TEE 460. Each TEE 460 in each of nodes 451, 452, and 453 may include a distributed ledger instance 471, a database instance 472, and an agent 473.

[0047] A TEE is a portion of a processor that is secured in a manner that ensures that the code and data loaded within the TEE are protected with respect to confidentiality and integrity. An example of a TEE is Software Protection Extensions ( Software Guard Extensions).

[0048] The blockchain consortium 450 can provide a blockchain-based database to the client. The client can communicate with the database via a client device (such as client devices 441 and 442). The database can be tamper-proof, and the database can provide confidentiality, fully enforced database integrity protection, and decentralized trust. The database can also allow the programming of the database to not be modified by the fact that the database is used on the blockchain. Additionally, an existing database can be used by the federated blockchain 450 with a promotion and transfer deployment.

[0049] In some examples, the operation of the system 400 can be implemented by a first bootstrapped joint blockchain 450. In some examples, the joint blockchain 450 has a governance process that defines, among other things, the code to be run in the TEE of each node (e.g., nodes 451 to 453) of the nodes of the joint blockchain 450, including distributed ledger code and database code. As part of the bootstrapping process, in some examples, each of the nodes is verified by a TEE attestation to verify that each of the nodes complies with the governance process. In this way, in these examples, the code of each node in the joint blockchain 450 can be ensured to be fully compliant with the governance process by the TEE attestation. The TEE attestation of the code running in the TEE 460 can be executed remotely, including by other nodes and by the client, as a hardware-generated cryptographic attestation of all the code running in the TEE 460.

[0050] In various examples, blockchain alliance 450 may include different numbers of nodes. In some examples, blockchain alliance 450 may use a crash fault tolerance model. In other examples, blockchain alliance 450 may use a fault tolerance model other than a crash fault tolerance model. In some examples, blockchain alliance 450 may use a Byzantine fault-tolerant protocol. In some examples, blockchain alliance 450 uses a 2F+1 crash fault tolerance model or a 3F+1 Byzantine fault tolerance model, where F is the number of nodes that can fail simultaneously while the system is still correct and reliable. In other examples, other suitable models may be used.

[0051] In various examples, the nodes in blockchain consortium 450 can be located in various locations. For example, in some examples, each of the nodes in blockchain consortium 450 can each run in the same rack in a data center or other location. In other examples, the nodes in blockchain consortium 450 can be distributed among several different data centers and / or other locations around the world. In various examples, the nodes can be distributed in any suitable manner.

[0052] In some examples, the bootstrapping of the blockchain consortium 450 is completed once: sufficient nodes are run according to the adopted model (e.g., a fault tolerance model), the nodes each verify each other according to the governance model, and the nodes execute the consensus model indicated in the governance process among the nodes. When the bootstrapping of the joint blockchain 450 is successfully completed, in some examples, the joint blockchain 450 runs a distributed ledger based on a distributed ledger instance 471 running in the TEE 460 of each node of the joint blockchain 450, and runs a database distributed among the nodes of the joint blockchain 450 based on a database instance 472 running in the TEE 460 of each node of the joint blockchain 450. In some examples, each node in the joint blockchain 450 includes a TEE 460, which includes a distributed ledger code, a database code, and an agent code. In some examples, for the TEE 460 in each node of the federated blockchain 450, the distributed ledger code executed is the distributed ledger instance 471 of the node, the database code executed is the database instance 472 of the node, and the agent code executed is the agent 473 for the node. For example, more specifically, in some examples, for the TEE 460 in each node of the federated blockchain 450, the execution of the distributed ledger code instantiates the distributed ledger instance 471 of the node, the execution of the database code instantiates the database instance 472 of the node, and the execution of the agent code instantiates the agent 473 for the node.

[0053] The client can use a client device (e.g., client device 441 or client device 442) to initiate a transaction with the database in a normal manner. In other words, the client can initiate a transaction with the database in the same manner that is typically used for the database, without changing based on the fact that the database is on the blockchain. For example, in some examples, the database is PostgreSQL, and the client can use the PostgreSQL API to initiate a transaction with the database. In some examples, the database is a relational database. In other examples, the database is a suitable database, not a relational database.

[0054] When a client initiates a transaction with a database, the transaction may be communicated to one of the nodes of the federated blockchain 450. In some examples, the transaction may initially be received by an agent 473 running in the TEE 460 of the receiving node of the federated blockchain 450. The agent 473 may act as an intermediary for communications between the client and the database instance 472, including forwarding communications from the agent 473 to the database instance 472. The agent 473 may also perform other management functions. In some examples, the agent 473 is executed in a confidential container instance within the TEE 460.

[0055] In some examples, the client may communicate with an agent 473 in one of the nodes of the federated blockchain 450 via an encrypted and authenticated network channel. In some examples, the client may optionally choose to request a remote attestation report from the federated blockchain 450 to verify that the client is communicating with the correct database. When initiating communication, the client may send a database query command in a normal manner, where the database query command is communicated to the database being used, and the client receives results from the query command in a normal manner, which occurs for the database being used.

[0056] Each TEE 460 may include a modification log to the database. In some examples, the log is a write-ahead log (WAL). In some examples, each entry in the log indicates a change in the database caused by executing a transaction. In some examples, there is an entry in the log for each incremental change in the database. In some examples, the log contains a commit point. In some examples, the commit point indicates the point at which the log entry since the last commit point is committed to the database. In some examples, when the commit point is reached, the database is updated based on each log entry in the log entry since the last commit point. For example, in some examples, changes associated with a transaction are persisted to a distributed ledger, and persisting changes associated with a transaction to a distributed ledger includes updating the WAL in the distributed ledger so as to update the WAL to add a WAL entry corresponding to the change for each change made to the database based on the transaction. In some examples, the ledger includes a Merkle tree on the WAL entry.

[0057] As discussed above, in some examples, when a client initiates a transaction, the client initiates it in a standard manner, such as via a standard API used for a database. Information can be communicated back to the client as normal for a database. Each WAL entry that is typically generated for a transaction is saved to a distributed ledger, and updates to the distributed ledger are replicated among each of the nodes in the federated blockchain. In some examples, transactions are performed as normal for a database, where the database is distributed among the nodes of the federated blockchain 450.

[0058] In some examples, the database is updated normally at each commit point. In some examples, the submission of transactions to the ledger is gated by consensus voting within the joint blockchain 450. This "gating" means that, in some examples, unless a successful consensus vote is performed by the joint blockchain 450 to submit the transaction to the ledger, the transaction cannot be submitted to the ledger. As discussed in more detail above, in some examples, consensus is performed based on the consensus model indicated in the governance model of the joint blockchain 450. In some examples, gating is performed by agent 473. In some examples, after a successful submission, the changes to the database are replicated among each of the nodes of the joint blockchain 450. In some examples, the replication is completed in a confidential and integrity-protected manner. In some examples, before performing any replication, verification of the authenticity of the record is performed. In some examples, replication is also gated by consensus voting within the joint blockchain 450, which is also performed by agent 473.

[0059] The TEE may also be used to provide a universally verifiable solution for each transaction, and the solution may be provided to the client upon request by the client. In some examples, the universally verifiable solution cryptographically proves in a tamper-proof manner that the transaction occurred, how the transaction actually occurred, and the results of the transaction, regardless of whether any compromise occurred. In some examples, the universally verifiable solution may be independently audited.

[0060] In some examples, each universally verifiable solution is a cryptographic proof that is both offline-verifiable and online-verifiable and does not require any reference to a database or even that the ledger still exists. In some examples, each universally verifiable solution includes a Merkle tree proof that proves that the commit was included in the ledger. In some examples, in addition to the Merkle tree proof, the universally verifiable solution includes a root hash signed by the federated blockchain 450.

[0061] In some examples, if one of the nodes of federated blockchain 450 is tampered with, this will be discovered by the consensus algorithm used by federated blockchain 450. Upon discovering that a node in federated blockchain 450 has been tampered with, in some examples, the node may be automatically isolated for forensic review and may be replaced with another node.

[0062] In some examples, even if the database is destroyed, the database can be fully recovered and rebuilt from the WAL entries in the distributed ledger. In some examples, the recovered and rebuilt database can be used to create a new node. In some examples, since TEE is used as a trust root, each WAL entry can be copied relatively quickly, transaction latency is relatively low, and the joint blockchain 450 can process a relatively large number of transactions per second. In some examples, TEE is used as a method of establishing trust and / or as a consensus algorithm. In other examples, proof of work, proof of interest, or another suitable method of establishing trust and / or being used as a consensus algorithm can be used.

[0063] Example Process

[0064] Figure 5 is a schematic diagram showing an example data flow for a process (590) for operation of a CTS instance. In some examples, process 590 may be performed by Figure 3 An example of a node among nodes 351 to 353 of Figure 4 An example of a TEE in TEE 460 or by Figure 2 The example of device 200 and the like are used to perform the above.

[0065] In the example shown, step 591 occurs first. At step 591, in some examples, in the trusted execution environment (TEE) of the first node, the database code of the first node and the distributed ledger code of the first node are executed, so that the execution of the distributed ledger code of the first node instantiates a first instance of the distributed ledger of the federated blockchain, and the execution of the query and command code of the first node instantiates a first instance of the query and command system. The federated blockchain is distributed among multiple nodes, and the query and command system is distributed among multiple nodes.

[0066] As shown, in some examples, step 592 occurs next. At step 592, in some examples, a first transaction associated with modifying the query and command system is received. As shown, in some examples, step 593 occurs next. At step 593, in some examples, the first transaction is executed. As shown, in some examples, step 594 occurs next. At step 594, in some examples, changes to the distributed ledger associated with the first transaction are persisted. The process can then proceed to a return block where other processing is resumed.

[0067] in conclusion

[0068] Although the above specific embodiments describe certain examples of the technology and describe the expected best mode, no matter how detailed the above content is in the text, the technology can be practiced in a variety of ways. The details may vary in implementation, but are still covered by the technology described herein. As stated above, the specific terms used when describing certain features or aspects of the technology should not be considered to imply that the term is redefined in this article to be limited to any specific characteristics, features or aspects associated with the term. Generally, unless the specific embodiments clearly define these terms, the terms used in the attached claims should not be interpreted as limiting the technology to the specific examples disclosed herein. Therefore, the actual scope of the technology not only covers the disclosed examples, but also covers all equivalent ways of practicing or realizing the technology.

Claims

1. A device comprising: A device comprising at least one memory and at least one processor, the at least one memory having processor-executable code stored therein, the at least one processor being adapted to execute the processor-executable code, wherein the processor-executable code comprises processor-executable instructions which, in response to being executed, enable the device to perform actions comprising: executing database code and distributed ledger code in a trusted execution environment (TEE) of a first node, so that the distributed ledger code is distributed among a plurality of nodes of a federated blockchain including the first node to provide a distributed ledger, and so that execution of the database code by the first node instantiates a first instance of a database, wherein The database is distributed among the multiple nodes; receiving a first transaction associated with modifying the database; executing the first transaction; and Persisting changes to the distributed ledger associated with the first transaction.

2. The apparatus of claim 1, the actions further comprising executing proxy code in the TEE of the first node. The apparatus according to claim 1 , wherein the database is a relational database.

4. The apparatus of claim 1 , wherein persisting changes to the distributed ledger associated with the first transaction comprises: A log of effects in the distributed ledger is updated such that the log of effects is updated to add, for each change made to the database based on the first transaction, an entry corresponding to the change.

5. The apparatus of claim 1, wherein the actions further comprise providing a universally verifiable scheme for the first transaction, wherein the universally verifiable scheme comprises a Merkle tree proof and a signed root hash.

6. The apparatus of claim 1, wherein the actions further comprise restoring the database using the distributed ledger.

7. A method comprising: executing, in a trusted execution environment (TEE) of a first node, a database code of the first node and a distributed ledger code of the first node, such that execution of the distributed ledger code of the first node instantiates a first instance of a distributed ledger of a federated blockchain, and execution of the query and command code of the first node instantiates a first instance of a query and command system, wherein the federated blockchain is distributed among a plurality of nodes, and wherein the query and command system is distributed among the plurality of nodes; receiving a first transaction associated with modifying the query and command system; executing the first transaction; as well as Persisting changes to the distributed ledger associated with the first transaction.

8. The method of claim 7, wherein the query and command system is at least one of a database or a message broker.

9. The method according to claim 7, further comprising: The query and command system is restored using the distributed ledger.

10. A processor-readable storage medium having stored thereon processor-executable code, the processor-executable code enabling actions when executed by at least one processor, the actions comprising: executing, in a trusted execution environment (TEE) of a first node, a database code of the first node and a distributed ledger code of the first node, such that execution of the distributed ledger code of the first node instantiates a first instance of a distributed ledger, and execution of the query and command code of the first node instantiates a first instance of a query and command system, wherein the federated blockchain is distributed among a plurality of nodes, and wherein the query and command system is distributed among the plurality of nodes; updating the first instance of the distributed ledger based on a first transaction associated with the query and command system; as well as The first transaction is executed on the query and command system.

11. The processor-readable storage medium of claim 10, wherein the query and command system is at least one of a database or a message broker.

12. The processor-readable storage medium of claim 10, the actions further comprising: Execute proxy code in the TEE of the first node.

13. The processor-readable storage medium of claim 10, the actions further comprising: The query and command system is restored using the distributed ledger.

14. The method according to claim 7, further comprising: Execute proxy code in the TEE of the first node.

15. The method according to claim 7, further comprising: A generally verifiable scheme for the first transaction is provided, wherein the generally verifiable scheme includes a Merkle tree proof and a signature root hash.