Sharded permission type distributed ledger
A sharded, permissioned distributed ledger system addresses scalability and throughput limitations by dividing the ledger into shards, enabling parallel processing and using advanced consensus mechanisms, enhancing trust and fraud resistance.
Patent Information
- Application Number
- JP2024123347
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2017-05-25
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2038-05-16
AI Technical Summary
Traditional distributed ledgers, including blockchains, face scalability issues due to the need for all participants to propagate, process, and store all transactions, leading to limited throughput and inefficiencies, especially in permissionless systems, and existing consensus algorithms like PoW and PBFT do not scale well with the number of nodes.
Implementing a sharded, permissioned distributed ledger system that divides the ledger into multiple shards, each managed by a subset of resources, allowing parallel transaction processing and using consensus mechanisms like Raft and PBFT to ensure legitimacy and scalability, with dynamic resource allocation and entanglement techniques to prevent corruption.
The sharded approach increases throughput and scalability by reducing communication and workload on individual participants, while ensuring trust and accountability through permissioned access and entanglement, making the system more resistant to fraud and manipulation.
Smart Images

Figure 2024161407000001_ABST
Abstract
Description
[Technical field]
[0001] background Field of Disclosure The present disclosure relates generally to distributed ledgers, and more specifically to sharded, permissioned distributed ledgers. [Background technology]
[0002] 2. Description of Related Art Traditionally, distributed ledgers (including blockchains) typically do not scale, and throughput is fundamentally limited by the need for all participants to communicate, process, and store every transaction. As a result, additional resources often do not improve throughput. A "ledger" can be thought of as an append-only data structure that records a sequence of transactions. A "distributed ledger" is a continuous A distributed ledger may be a ledger managed by a collection of nodes that follow a common protocol agreed upon for transactions to be made. A "client" may submit a transaction to one or more of the nodes. Some distributed ledgers can collect transactions into blocks called a blockchain. Each transaction, or block of transactions, can include a hash (e.g., a cryptographic hash) of the previous transaction in the ledger, thereby minimizing the risk of the ledger being tampered with. In other words, no one (or any node) can fraudulently add, delete, or change a transaction, because doing so would also change all subsequent hashes. Bitcoin® is one well-known example of a distributed ledger.
[0003] Traditionally, many blockchain and distributed ledger systems do not scale well. In this specification, the term "blockchain" is used broadly to mean a distributed ledger, even if it is not effectively represented as a chain of blocks. Its throughput can be limited by the requirement that a large proportion of participants (i.e., possibly weighted by resources) must receive, validate, and store all transactions. As a result, additional resources often do not translate into improved throughput.
[0004] Permissionless blockchains are typically intentionally inefficient, such as by ensuring that participants do not have to expend energy to contribute to the maintenance of the ledger. Permissionless ledgers, such as Bitcoin, typically allow any node that wishes to follow a protocol to participate. Anyone can propose transactions, and anyone can participate in the protocol that determines which transactions are posted to the ledger. In contrast, in permissioned implementations, only certain nodes are allowed to participate. For example, an authority may control which nodes can participate in a permissioned ledger. This authority may take various forms, such as an organization, a consortium, etc. Permissioned ledgers can be viewed as facilitating administration, such as by providing organized procedures for updating the ledger protocol or following financial "know your customer" rules.
[0005] Honest nodes can be considered as nodes that faithfully follow the system's protocols, while dishonest nodes, i.e. nodes under the control of an adversary, may deviate from the protocols in search of some advantage.
[0006] Authorization often allows the behavior of rogue nodes to be mapped to the identity that owns or is responsible for them, thus opening the possibility of keeping them accountable. This may be achieved by technical and / or non-technical means. For example, if a node clearly misbehaves, the protocol may allow penalties to be applied automatically, such as by confiscating security deposits deposited with third parties or not allowing the rogue node to further participate. Alternatively or additionally, evidence of misconduct may be informed to legal, regulatory or business processes, allowing convictions and penalties to be determined outside the system.
[0007] Of course, multiple completely independent blockchains can be used. In the case of permissionless blockchains, this approach may be problematic because most blockchains, except for a few of the most popular, have only a small number of resources dedicated to their management, in which case it would be easy to overwhelm them with modest resources and undermine their integrity.
[0008] Two ways to relieve pressure on the blockchain are the Lightning Network and sidechains. In both cases, participants interact "off-chain" and only occasionally execute transactions on the blockchain. While these measures may help ease the strain on the blockchain, they do not change the fact that the primary chain does not scale.
[0009] Both permissionless and permissioned distributed ledgers may be subject to manipulation by participants who favor some transactions over others. At the heart of most ledger protocols will be a consensus algorithm used to establish a widely and publicly agreed upon set of transactions. Many distributed ledgers do not actually solve traditional consensus problems, but are still commonly referred to as implementing a consensus algorithm. Some previous consensus algorithms are based on the proof-of-work (PoW) system, which In PoW, participants expend resources to solve a cryptographic puzzle. However, PoW has two well-known drawbacks. Traditionally, PoW is deliberately designed to be wasteful and slow, consuming a non-negligible amount of energy, and limiting the rate at which transactions can be appended to the ledger. This measure aims to limit the influence of unknown entities, a cost that can be avoided in permissioned ledgers. PoW consensus only provides probabilistic compensation. In general, a ledger in a PoW consensus protocol can fork when two or more participants simultaneously append different transactions to the chain. Eventually, most of these incompatible chains may be abandoned, but there may be a period of uncertainty about which will survive. As a result, a transaction can only be considered trustworthy after a sufficient number of subsequent transactions have been appended to it (e.g., to ensure that the ledger has not forked or that this transaction has survived the fork and was not abandoned).
[0010] The risks and delays associated with PoW consensus can be avoided in permissioned ledgers because participants are explicitly authenticated and there is no need to restrict participation by unknown entities. This opens up the possibility of a variety of consensus mechanisms that are not applicable in permissionless ledgers.
[0011] For example, one consensus mechanism for a permissioned distributed ledger is Practical Byzantine Fault Tolerance (PBF), where participants propose and vote on transactions (or blocks thereof) to append to the ledger. T). PBFT requires that a certain percentage of participants (e.g., more than 2 / 3) be legitimate. If n is the number of nodes that can reach a consensus, then participants can be guaranteed to agree on valid additions to the ledger. In other words, PBFT can guarantee correctness if less than a certain percentage of participants (i.e., 1 / 3) are Byzantine, i.e., dishonest participants who act arbitrarily outside the protocol. However, PBFT generally requires O(n 2 ) messages, which can be seen as an obstacle to scalability to large numbers of nodes, even if transactions are batched into blocks.
[0012] Another consensus algorithm involves a leader appending transactions to its ledger and broadcasting them to other participants, which add them to their ledgers and send confirmations to the ledger. An example of such a consensus algorithm is Raft. Once the leader receives confirmation from the majority of participants, the transaction is considered committed. If the leader becomes unresponsive, other participants can initiate an election to choose a new leader. In the general case, Raft requires only O(n) messages to reach consensus, making it more scalable to large numbers of nodes than PBFT. However, Raft is not tolerant to Byzantine failures. For example, it allows participants to impersonate each other, a corrupt leader to deceive others, etc. Thus, it may not be suitable out of the box for use in distributed ledger implementations. Summary of the Invention [Means for solving the problem]
[0013] overview Methods, techniques, apparatus and systems are described for implementing a sharded, permissioned distributed ledger. The sharded, permissioned distributed ledger described herein can potentially avoid scalability bottlenecks that may be inherent in previous distributed ledger implementations by reducing the amount of work and communication required by each participant, and potentially enable the use of additional resources leading to increased throughput. The methods, techniques and / or mechanisms described herein can be used to implement a sharded, permissioned distributed ledger that can be managed across multiple "shards." (a) A ledger of shards (a set of shards that are not part of a single ledger) may be implemented as a distributed ledger. Each of the shards may itself be considered and implemented as a distributed ledger. In some embodiments, multiple shards may operate in parallel.
[0014] Participation in a sharded, permissioned distributed ledger may, in some embodiments, be granted only by authorization from an authority, such as a consortium. Authorization by an authority may permit leveraging the trust implied by such authorization decisions, without fully trusting anyone or anything. Also, according to various embodiments, such authorization may be used to potentially ensure that misbehaving participants are detected and held accountable, through a variety of both technical and non-technical mechanisms.
[0015] Methods, techniques and / or mechanisms described herein may provide an opportunity for a system implementing a sharded, permissioned distributed ledger to dictate desired behavior (e.g., determine which participants are actively managing a given shard at any given time) and / or maintain accountability for those that do not (e.g., do not adhere to the ledger protocol and / or consensus algorithm). In accordance with some embodiments, the sharded, permissioned distributed ledgers described herein utilize (and / or include) a scalable infrastructure that virtualizes the delivery of services by decoupling shards from the participants that manage them, potentially allowing for capacity and workload independence from one another. It can be increased by [Brief description of the drawings]
[0016] [Figure 1] FIG. 1 is a logical block diagram illustrating a system for implementing a sharded, permissioned distributed ledger according to one embodiment. [Diagram 2] FIG. 1 is a logical block diagram illustrating verifiers on several nodes responsible for managing a sharded, permissioned distributed ledger according to one embodiment. [Diagram 3] 1 is a flow chart illustrating one embodiment of a method for adding a transaction to a shard in a permissioned, sharded distributed ledger. [Figure 4] 1 is a flow chart illustrating one embodiment of a method for dispatching received messages. [Diagram 5] 1 is a flow chart illustrating an embodiment of a method for utilizing shard snapshots when a verifier becomes active, according to an embodiment. [Figure 6] FIG. 2 is a logical diagram illustrating a membership service with coordination shards according to one embodiment. [Figure 7] FIG. 1 is a block diagram of a computing device configured to implement a sharded, permissioned distributed ledger system according to some embodiments. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0017] Although the present disclosure is described herein for illustrative purposes with respect to several embodiments and drawings for illustration, those skilled in the art will understand that the present disclosure is not limited to the described embodiments or drawings. It should be understood that the drawings and detailed description herein are not intended to limit the present disclosure to the particular form disclosed, but rather, the present disclosure is intended to cover all modifications, equivalents, and alternative forms within the spirit and scope defined by the following claims. Any headings used herein are for organizational purposes only and are not intended to limit the scope of the description or claims herein. The word "may" used herein does not have an obligatory meaning (i.e., it means must). "include", "including", and "includes" are used in a permissive sense (i.e., meaning possible) rather than a permissive sense. Similarly, the words "include", "including", and "includes" mean including but not limited to.
[0018] Detailed Description of the Embodiments Methods, techniques, devices, and systems for implementing a sharded, permissioned distributed ledger system are described. In some embodiments, a sharded, permissioned distributed ledger can potentially avoid scalability bottlenecks inherent in previous distributed ledger implementations by reducing the amount of work and communication required by each participant, and potentially increase throughput by enabling the use of additional resources.
[0019] In a monolithic ledger (one example is Bitcoin), transactions in the ledger are arranged in a linear sequence. As a result, monolithic ledgers are generally sequential in nature, and every node that proposes to add a new transaction to the ledger must compete with every other such node by participating in a common consensus protocol, and overall system throughput and latency tend to deteriorate as the number of participants increases.
[0020] In contrast, a sharded ledger allows a ledger to be divided into a collection of shards, each of which may itself be a linear ledger. Related transactions can be appended to the same shard, while unrelated transactions can be appended to different shards. The ability to append unrelated transactions in parallel allows sharded ledgers to be considered inherently more scalable. Furthermore, each shard can be managed by a subset of the available resources. Since the consensus mechanisms used to manage a ledger (or individual shards in the case of a sharded ledger) often scale poorly with the number of participants, dividing resources across shards in this way can also increase the throughput of each individual shard. The combination of the benefits of appending transactions in parallel to multiple shards and increasing the throughput of each individual shard can result in substantially improved throughput compared to a monolithic ledger managed by the same set of resources.
[0021] Simply creating a set of completely independent ledgers and managing each one by allocating resources has several shortcomings that the sharded, permissioned distributed ledgers described herein do not share. For example, a fixed mapping between ledgers and the resources managing a set of completely independent ledgers is inflexible and generally precludes automatic load balancing between ledgers. Furthermore, if the set of resources managing each independent ledger were to remain static, it might be possible for a sufficient number of federations between these resources to form that could corrupt the ledger, for example by agreeing to change the ledger's history.
[0022] In some embodiments, a sharded, permissioned distributed ledger may dynamically change the mapping between shards and the resources that manage those shards. This may enable general policies in some embodiments, for example to enforce load balancing, and may also allow the system to periodically reallocate resources, potentially disrupting the effort to form federations between the resources that manage a given shard. Additionally, information about the state of one shard may be included in the ledger of one or more other shards. Including information about the state of one shard in the ledger of another shard may be considered an example of an "entanglement" technique that potentially makes it more difficult to corrupt a given shard, as described in more detail below. It is possible.
[0023] In some embodiments, a sharded, permissioned distributed ledger may also provide the opportunity to support cross-shard transactions (i.e., transactions that affect or depend on the state of multiple shards).
[0024] Additionally, according to various embodiments, the methods, techniques and / or mechanisms described herein may be applicable to a variety of blockchain and distributed ledger systems.
[0025] Enabling a sharded, permissioned distributed ledger As previously mentioned, according to some embodiments, the methods, techniques and / or mechanisms described herein manage a single ledger by splitting the ledger into multiple shards and placing each shard on a subset of the nodes, rather than having all nodes communicate with each other to manage a single ledger. Figure 1 is a logical block diagram illustrating a system configured to implement a sharded, permissioned distributed ledger according to one embodiment.
[0026] In some embodiments, a sharded, permissioned distributed ledger may include multiple shards that may collectively represent the complete sharded, permissioned distributed ledger. In addition, a shard may be a ledger in its own right. In other words, a shard functions and interacts in the same way as the complete ledger, although a subset of the information is contained in the entire ledger. It is possible.
[0027] A system configured to implement a sharded, permissioned distributed ledger, such as system 100, may include multiple nodes, such as nodes 120A-N, which may be considered participants in the overall ledger system. According to various embodiments, nodes 120A-N may be configured to participate in the ledger system via one or more applications, modules, processes, threads, etc., such as via dispatchers 130A-N, membership representatives 140A-N, and verifiers 150A-N. Additionally, in some embodiments, nodes 120A-N may be configured to manage a sharded, permissioned distributed ledger as a whole, which may be split into multiple shards.
[0028] Clients, such as clients 180A-M, can communicate over network 110 to interact with the sharded, permissioned distributed ledger system, e.g., submit transactions to be added to the ledger. According to various embodiments, network 110 may represent virtually any type of wired or wireless network operating according to virtually any communication protocol over virtually any type of communication medium. Additionally, in some embodiments, each node 120 may have one or more special “dispatcher” processes, such as dispatchers 130A-N, that may be responsible for directing messages from clients to verifiers. Although only one dispatcher 130 is shown per node, in some embodiments, each node may include multiple dispatchers.
[0029] The system may include a membership and configuration service 170, in some embodiments, configured to determine and / or distribute information regarding various decisions utilized during the execution of the ledger system, such as which nodes on which shards are active at any given time, how many copies of each shard's data the storage service should store, how much advance notice a participant (e.g., node) should provide before becoming active on a shard, and so on, as described in more detail below. Though shown as a single entity, the membership service 170, in some embodiments, may represent multiple services, such as for membership, for node allocation (e.g., to shards), for system configuration, etc.
[0030] In some embodiments, the system may also include a storage service 190 configured to manage a portion of all the data (e.g., transactions) in (and / or associated with) the ledger. Rather than having nodes 120 solely responsible for the data of the shards, a separate storage device 190 may be utilized, as described in more detail below. In some embodiments, the shards may be stored on nodes 120A-N, while in other embodiments, the shards (and thus the ledger) of the system may be stored separately from nodes 120A-N, on a different storage device than nodes 120A-N, e.g., storage device 190. In other embodiments, the data of the shards may be stored both on nodes 120A-N and on a separate storage device, e.g., storage device 190.
[0031] Multiple clients, e.g., clients 180A-M, can interact with a sharded, permissioned distributed ledger system, e.g., to submit transactions to be added to the ledger. When a client 180 submits a transaction to the ledger system, the client can specify a shard (i.e., one of the shards that make up the ledger) to which the transaction should be directed. A client 180 can indicate a target shard (i.e., a shard to which the transaction should be directed) in any of a variety of ways. For example, in one embodiment In the example, a communication protocol mediating communication between a client 180 and ledger system 100 may provide a mechanism (e.g., message type, field, etc.) through which a client 180 indicates a target shard. Additionally, transactions may be assigned to shards in any of a variety of ways, including, but not limited to, an assignment that balances the load on servers, an assignment that prioritizes geographically nearby servers, and / or an assignment that aggregates related transactions into one shard. In general, the particular manner and / or mechanism used to assign transactions to shards may vary depending on the embodiment.
[0032] System organization and trust model As mentioned above, each shard may be organized as a ledger that may be managed similarly to a single ledger system. For example, in one embodiment, any node 120 may be assigned to manage any shard. However, in other embodiments, only a subset of nodes 120A-N may be allowed to manage any given shard at any given time (e.g., for scalability, etc.). Described herein are various techniques for determining which nodes participate in managing which shards at any given time within a system that implements a sharded, permissioned distributed ledger.
[0033] A sharded, permissioned distributed ledger can be protected from adversaries who try to disrupt or corrupt the ledger. For ease of explanation, we can consider each node to be under the control of one entity. We can further assume that an adversary can corrupt at the granularity of an individual node. For example, if one process on a node becomes corrupt, all processes on that node will behave dishonestly. Conversely, we can consider multiple processes on one node to trust each other, but processes on different separate nodes to not trust each other.
[0034] Although described herein in terms of a system in which each node has one verifier process per shard, in some embodiments, a sharded, permissioned distributed ledger system may be implemented such that each node may have a thread per shard. In yet other embodiments, the processes and / or threads may manage different shards at different times. Thus, in some embodiments, a sharded, permissioned distributed ledger system may include multiple nodes, such as nodes 120A-N. Each node may include a process, such as verifiers 150A-N, for each shard. Additionally, each verifier 150 may participate in managing only the shard for which it is active.
[0035] FIG. 2 is a logical diagram illustrating a verifier participating in managing shards of a sharded, permissioned distributed ledger according to one embodiment. Shown in FIG. 2 are nodes 210, 220, and 230, which in some embodiments are identical to (or represent) individual ones of nodes 120A-N. Note that while only three nodes are shown for ease of explanation, in some embodiments, multiple nodes may be included and participate in the sharded, permissioned distributed ledger systems described herein. Additionally, although not shown, nodes 210, 220, and 230 may include other applications, modules, processes, and / or threads, such as dispatchers, membership representatives, etc.
[0036] At any given time, a node may be active or inactive for a given shard. If a node is active for a given shard, then that node's verifier process for that shard will add new transactions to the ledger for that shard, as indicated by the dotted line from the verifier to the shard. Each node may participate in a pending consensus. For example, verifier 215A of node 210 may be active for shard 265A, as shown by the dotted line from verifier 215A to shard 265A. Similarly, verifier 215N may be active for shard 265S, as shown by the dotted line from verifier 215N to shard 265S. Additionally, various verifiers among verifiers 225A-N of node 220 and verifiers 235A-N of node 230 may be active for corresponding shards among shards 265A-S, as shown by the dotted lines from the verifiers to the shards. It should be noted that the illustrated logical arrangement of verifiers and shards is for ease of explanation and does not represent the actual physical arrangement of nodes, verifiers and / or shards.
[0037] When managing a shard, the active verifiers for that given shard may follow any of a variety of policies and / or consensus protocols. For example, in one embodiment, the verifiers of nodes 210, 220, and 230 (and / or nodes 120A-N) may follow a consensus algorithm based on a version of Raft (sometimes referred to herein as BFT Raft) that can be "hardened" to be resistant to Byzantine behavior. Thus, in some embodiments, the verifiers may follow a consensus protocol (or algorithm) that includes a variety of policies, such as one or more of the following: · It requires that all messages are signed by the sender, allowing for authentication · It contains incremental hashes of a series of transactions, allowing nodes to ensure that they agree on the entire transaction sequence, making it virtually impossible to revise the ledger history in a way that is not obvious to others · Broadcast confirmation to all participants, not just the leader.
[0038] These strategies result in O(n2 ), such consensus protocols can scale to larger numbers of nodes and achieve higher transaction throughput (e.g., by allowing different nodes to proceed at different rates).
[0039] Additionally, in some embodiments, a sharded, permissioned distributed ledger system may include leader verifiers, such as leader 240. Leader 240 can propose new transactions to be appended to the ledger.
[0040] FIG. 3 is a flow diagram illustrating one embodiment of a method for adding a transaction to a sharded, permissioned distributed ledger. As shown in block 300, a leader 240 may determine to add a proposed transaction to a shard of the ledger. According to various embodiments, the leader 240 may determine the proposed transaction in any of a variety of ways, for example, by receiving a transaction submitted by a client. As in block 310, the leader 240 may propose a new transaction to be appended to the ledger by sending the proposed transaction and supporting information (e.g., the leader's authority and / or authenticity) to other active verifiers. For example, in some embodiments, the leader may utilize supporting information including information indicating (or representing) a vote of validity as a leader, a ledger index before where to append the new transaction, etc. As in block 320, verifiers receiving the proposed transaction may verify that the transaction and supporting information are valid. If the supporting information (and / or other aspects of the proposed transaction) are valid, as indicated by a positive output of decision block 330, the verifier may issue a confirmation of this fact, as indicated in block 340 (e.g., Each verifier (active on the target shard for the transaction and / or receiving the proposed transaction) may independently verify the proposed transaction and / or supporting information from leader 240 and issue a confirmation. In some embodiments, leader 240 may also publish a confirmation (e.g., consistent with other verifiers), while in other embodiments submission of the proposed transaction may represent a confirmation by leader 240.
[0041] In some embodiments, a node may consider a proposed transaction committed once it receives confirmation from a certain number of active verifiers, as indicated by the positive output of decision block 350 and block 360. Thus, once a node receives confirmation for a transaction at a given index in the ledger from a quorum of active verifiers, the node may consider transactions up to that index committed. Additionally, in some embodiments, all transactions at lower indexes may also be considered committed.
[0042] According to some embodiments, the quorum can be considered to be a majority of the active nodes on a shard. Although FIG. 2 shows only two active verifiers per shard (i.e., for ease of illustration and description), other embodiments may use an odd number of verifiers per shard to reach a clear majority. Thus, once a quorum of active nodes confirm a proposed transaction as the next transaction in the ledger, it may be impossible for another quorum to confirm a different transaction in the index (unless at least one active verifier signs a conflicting confirmation that provides a conclusive proof that it is fraudulent).
[0043] In some embodiments, if the current leader misbehaves or becomes unresponsive, a quorum of active verifiers can resign the leader and elect a new leader, whereupon resignation by a quorum of verifiers marks the end of the original leader's term and the beginning of a new, different leader's term.
[0044] The complexity of the messages associated with adding a transaction to a shard can be thought of as scaling not with the total number of nodes in the system, but with the number of active nodes for that shard. According to some embodiments, this allows multiple shards to operate in parallel, and further allows each shard to achieve a higher throughput than the throughput of a single shard managed by all nodes.
[0045] dispatcher As mentioned above, each node may have one or more dispatcher processes, such as dispatcher 130A-N, that may be responsible for directing messages from clients to active verifiers. FIG. 4 is a flow diagram illustrating one embodiment of a method for dispatching incoming messages. As per block 400, dispatcher 130 may receive a message from a client indicating a target shard. In some embodiments, dispatcher 130A-N may receive a transaction request from client 180A-M. The request from the client may specify a target shard and a command and / or transaction (e.g., a proposed transaction to add / apply to the target shard). The dispatcher may be responsible for forwarding the received request to a process, such as verifier 150, that is active for the target shard. As indicated by the positive output of decision block 410, a verifier on the same node as the dispatcher (e.g., the node on which the dispatcher is running) may be active for the target shard (e.g., the target shard). If the dispatcher is responsible for managing the target shard, then the dispatcher may forward the request to a process (e.g., a verifier) on the dispatcher's own node, as in block 340.
[0046] If there is no verifier active for the target shard on the same node as the dispatcher, as indicated by a negative output of decision block 410, the dispatcher can send the request to a process (e.g., a verifier) on another node (i.e., away from the dispatcher's own node) that is active for the target shard, as in block 430. In some embodiments, it may not be necessary for the dispatcher to be perfectly accurate in forwarding all requests to active verifiers. Nonetheless, unnecessary forwarding can be avoided by doing so as often as possible.
[0047] In some embodiments, the dispatcher may manage state information to support the identification of processes active for a target shard. In some embodiments, this state information managed by the dispatcher may include at least the set of processes, such as verifiers, that manage a given shard, the subset of processes that are currently active for that shard, and / or the identities of processes on the dispatcher's own node that manage the shard. According to various embodiments, a system configured to implement a sharded, permissioned distributed ledger may identify processes, verifiers, and / or shards in any of a variety of ways. For example, in one embodiment, a unique identifier may be associated with each process, verifier, shard, etc., and these identifiers (such as names, numeric IDs, alphanumeric IDs, etc.) may be utilized in the state information. In other embodiments, pointers (e.g., programmatic memory pointers) may be used to identify, locate, and / or communicate with processes, verifiers, shards, etc.
[0048] The dispatcher can use the state information to forward the request locally if there is a local process active for the target shard. If there is no local process active for the target shard, the dispatcher can use the state information to identify a remote process active for the target shard. In some embodiments, the state information can be managed locally on the dispatcher's own node, while in other embodiments the dispatcher can rely on state information stored (but accessible) at a remote location. According to various embodiments, state information regarding active verifiers and shards can be updated in response to directives from a membership service.
[0049] Shard Allocation In some embodiments, the active processes for each shard may be determined at initialization time and may remain static for the life of the system. However, in some embodiments, the use of static process assignments may have several disadvantages, such as: -Do not allow additional shards. -Does not allow node additions. Do not allow the replacement of active participants on a shard (for example if they become incompetent or are observed misbehaving). The same set of nodes remains active for a given shard at any one time, allowing the possibility of cooperation between rogue nodes managing a given shard.
[0050] In other embodiments, the nodes (and / or verifiers) may be moved to the shards. can be allocated objectively.
[0051] In various embodiments, various mechanisms can be used to determine when a process becomes active for a shard. For example, in some embodiments, a process such as a verifier may follow a fixed schedule of activation for a shard. For example, a verifier that is active for a given shard may become inactive for that shard if / when the ledger for that shard reaches a certain length. However, in some embodiments, an inactive process / verifier may not be able to become active immediately when conditions do not require it (such as the ledger reaching a certain length) since it may not be aware of these conditions. Instead, in some embodiments, a process / verifier may be "woke up" and informed that it is currently active for a given shard. In some embodiments, the waking process may be performed by another active process, such as a process that will soon become inactive for the shard. In other embodiments, the dispatcher may be notified of relevant events (such as a shard reaching a threshold length) that can cause the process to update its state information and wake up the process and / or inform the process that it is currently active. A newly active process may also be awakened by receiving a message from another process active on the shard that knows that the shard has reached a threshold length (e.g., the threshold that triggers the process to become active). In yet other embodiments, a process may be informed that it has become active on a shard by a participant of the membership service 170.
[0052] Instead of activating the process / verifier on a fixed schedule (e.g., when the ledger reaches a certain number of transactions), in some embodiments the process / verifier may be configured to detect and respond to the following information: Information about the load on the shards, Information about the availability and responsiveness of processes active on that shard; Information about (suspected) misconduct of processes active on that shard; and Information about policy inputs such as service level requirements, constraints, etc. They may be activated / deactivated based on periodic reassignment, which may be influenced by a combination of various information including any or all of the following:
[0053] In some embodiments, it may be important that participants (e.g., nodes, processes, verifiers, etc.) have no control over shard allocation. Otherwise, a group of nodes could collude to achieve sufficient active participation in a shard (enough to outvote all other active participants in that shard) and effectively gain the ability to control that shard (e.g., for selfish and / or illicit purposes). For this reason, in some embodiments, shard allocation decisions may be driven by a policy that is implemented as a deterministic function of a random (e.g., pseudorandom) sequence over which participants have no control, possibly with additional information.
[0054] The use of random information for shard allocation decisions can prevent an adversary (e.g., a misbehaving node) from consistently making choices that could enable it to gain control of one or more shards, and can also provide accountability. For example, attempts to deviate from choices dictated by a deterministic policy and randomness source can be detected (i.e., immediately or after the fact), and misbehaving nodes can be held accountable.
[0055] In general, a randomness source, such as a cryptographic randomness source, can be utilized in any of a variety of ways relative to a deterministic shard allocation policy. According to various embodiments, some examples include the following: A policy that periodically randomly selects a shard, selects one process that is active on that shard, makes it inactive, and then randomly selects a shard on the same node for which a process is inactive and makes it active; A policy that repeatedly selects two shards randomly, then selects pairs of nodes that are active on different shards and swaps their roles, and / or A policy that periodically generates new system-wide allocations that conform to whatever policy is desired (e.g. ensuring that each shard has enough active processes and that the load is evenly balanced across nodes).
[0056] The first example of the policy above allows some shift (or "churn") in the active shard allocation while keeping the number of shards for which a given node is active constant. However, in some embodiments ,This may not guarantee that each shard will always have enough active nodes to make progress and withstand a certain number of Byzantine nodes for each shard.,A second example of the above policy can conserve the load on each node and the number of active processes per shard.
[0057] In general, according to various embodiments, there may be tradeoffs, challenges, and / or constraints that may affect the selection of the policy that is most effective for a particular purpose. For example, if reallocation is not frequent enough, nodes participating in a given shard may have the opportunity to form coalitions and attempt to gain control of the shard. On the other hand, in some embodiments, the reallocation process for a shard may involve various overheads. For example, in some embodiments, if a process is inactive on a shard, it will not have up-to-date information about recent transactions and may need to communicate to obtain this information before it can participate in appending new transactions. Thus, it may be undesirable to reallocate processes too frequently.
[0058] Parameters such as the number and frequency of shard reallocations may vary depending on the embodiment. For example, in one embodiment, such parameters may be determined by an initialization time parameter, while in other embodiments, such parameters may vary based on various inputs, such as the observed load on a shard (e.g., number of transactions) and / or accountability information, e.g., when a threshold number of active participants on a shard report that another active participant is unresponsive or has acted fraudulently.
[0059] Preparing for soon-to-be-active processes In order to participate in consensus to add more transactions to a shard, an active process on a node would have to have up-to-date information about previous transactions for that shard. This would be necessary so that the node could verify the validity of a transaction in the context of all previous transactions. Additionally, in some embodiments, an active process would have to be up-to-date so that it can use cryptographic hashes of the latest transactions when composing new transactions (e.g., to help ensure the tamper resistance of the ledger). If a process was inactive in the past, it may be missing some or all transactions for the shard for which it is currently active.
[0060] In various embodiments, participants (e.g., verifiers) can become up-to-date according to any of several strategies. For example, in some embodiments, a consensus algorithm (such as the BFT Raft consensus algorithm) may have provisions for participants that are further back to "catch up" with other participants that are further ahead. However, significant delays can occur while participants obtain all the transactions they need (while trying to catch up), especially if a node has been inactive on a shard for an extended period of time.
[0061] Alternatively, in other embodiments, a verifiable shard "snapshot" summarizes the state of the shard at various points, potentially allowing a newly active verifier to adopt the snapshot without having to replay all transactions for the shard since it was the last active one on the shard (or all transactions for the shard if the verifier has never been active for this shard before). In one embodiment, participants validate and sign the snapshot, and if a sufficient number of participants validate and sign the snapshot, it can be guaranteed that at least one of them is legitimate.
[0062] FIG. 5 is a flow diagram illustrating one embodiment of a method for utilizing a shard snapshot when a verifier becomes active. When a verifier becomes active for a given shard, as in block 500, if the verifier is not up-to-date for the shard (as would typically be the case) as indicated by the negative output of block 510, the verifier can determine whether a snapshot is available for the given shard. For example, there may not be a snapshot available because the verifier became active before a snapshot was generated for the given shard. If a snapshot is not available for the shard as indicated by the negative output of block 520, the verifier can replay the previous transaction against the shard ledger, as in block 560. According to various embodiments, when replaying a transaction against the shard ledger, the verifier can obtain the transaction in any of a variety of ways, for example, by requesting additional transaction data from a recently active verifier or storage service 190 that it requires. In other embodiments, transaction or snapshot data may be sent in advance in response to other verifiers and / or participants (such as participants of a storage service) observing that the verifier has become (or will become) active.
[0063] Alternatively, if there is a snapshot available, as indicated by a positive output of decision block 520, the verifier may obtain and authenticate this snapshot for the shard, as in block 530. According to various embodiments, the verifier may obtain or access the snapshot in any of a variety of ways. In one embodiment, the snapshot (or a copy of the snapshot) may be stored on the verifier's own node. In other embodiments, the verifier may be configured to request and / or access the snapshot from a remote node or from storage device 190.
[0064] Additionally, according to some embodiments, the verifier can authenticate the snapshot, for example, by checking that at least a certain number of other participants have validated the snapshot and signed it. In some embodiments, "evidence" is stored along with the transaction or snapshot data. The verifier may then verify the transaction's accuracy by providing evidence to the verifier that the transaction or snapshot was valid. Such evidence may include the signature of the verifier who voted on the transaction or snapshot, a cryptographic hash and / or a Merkle proof that allows the receiving verifier to check that the transaction or snapshot is valid. The verifier can then apply the transaction from the snapshot, as in block 540.
[0065] If there are other (additional) transactions to the shard not included in the snapshot, as indicated by a positive output of decision block 550, the verifier can replay these transactions from the shard, as in block 560. For example, the additional transactions may have been committed to the shard while the verifier was taking and using the snapshot.
[0066] As mentioned above, the snapshot approach may reduce the time required to catch up, but it does not eliminate it entirely, since taking and validating a snapshot can take time, and there may be transactions to apply after the snapshot before a verifier has caught up enough to start participating in adding new transactions. Thus, in some embodiments, a system configured to implement a sharded, permissioned distributed ledger can be configured to give a process / verifier advance warning that it will be active on a shard in the near future. Thus, in some embodiments, a process could begin to catch up before it is required to be active on a given shard. For example, a verifier could request the necessary additional transaction data from a recently active verifier or from the storage device 190. In some embodiments, if a prospective participant is known in advance to be too far away, an opportunity for malicious coalitions to form may arise. On the other hand, if insufficient notice is given, delays may occur while a newly active node / verifier acquires the data necessary to begin participating (e.g., while catching up). In general, the amount of notice given may vary from embodiment to embodiment. According to various embodiments, for example, the amount of notice given may be dynamically adapted / adjusted based on an initialization time parameter and / or based on observations (e.g., how long it takes a node to catch up before starting active participation, etc.).
[0067] Storage In a traditional monolithic blockchain system, all participants can receive, validate, and store all transactions and associated metadata (e.g., blocks, block headers, snapshots, etc.). In some embodiments, in a sharded, permissioned distributed ledger system, inactive verifiers may not have an up-to-date record of transactions, and as such, when they become active again, there may be a delay while they catch up, as discussed above. In other embodiments, inactive nodes and / or verifiers can stay up-to-date by having active nodes broadcast transactions after consensus is complete (e.g., when the transaction is committed to a shard). In such embodiments, active nodes can store signed (e.g., authenticated) messages received from other active participants as part of the consensus process.
[0068] In addition, according to some embodiments, transactions broadcast to inactive verifiers are sent by consensus among participants that were active at the time. The verifiers may be accompanied by a proof that a consensus was obtained. Thus, in some embodiments, all nodes may have (at least relatively) up-to-date information for all shards, while limiting consensus-related communication to a group of active participants, which may include fewer than all participants. However, pre-broadcasting to inactive verifiers would result in additional storage and processing overhead, e.g., every node would store and perform at least some processing on all transactions for all shards.
[0069] To reduce the amount of additional overhead incurred by broadcasting to inactive verifiers, the set of shards for which a given node may be active may be limited. For example, a node may never participate in shards outside of a particular set of shards and thus never need to store and process those transactions (e.g., transactions for shards not included in the particular set). In some embodiments, limiting nodes to specific shards may be desirable in large networks with many nodes and many shards. There are then enough nodes available to participate in a given shard, allowing for regular reallocation to defeat collusion attempts.
[0070] Additionally, in some embodiments, rather than having individual nodes solely responsible for storing shard data and responding to requests (e.g., for snapshots to facilitate nodes catching up with shards), a separate storage service may be used, such as storage device 190. As with the nodes that manage the shards, participants in the storage service may be allowed and held accountable for being able to provide the data that they have been asked to use and / or store.
[0071] In some embodiments, a deactivated shard verifier may first be required to ensure that data (e.g., transactions, consensus, and / or other data) for the shard is made sufficiently available in the storage service 109. For example, the verifier may be configured to send this data to one or more storage nodes of the storage service 190. Additionally, in some embodiments, the verifier may also be configured to receive (and / or authenticate) a signed confirmation that this data has been stored. In some embodiments, separating storage from processing (e.g., using a separate storage service 190) may increase the likelihood that data will be available by replicating it a sufficient number of times, while potentially avoiding excessive demands (e.g., having all participants store all data).
[0072] According to various embodiments, parameters such as the number of copies of data that a storage service should store, as well as other configurable aspects of a sharded, permissioned distributed ledger system, may be determined by initialization time parameters, or may be dynamic parameters driven by deterministic policies informed by input from participants and / or from authorized administrators. One way to collect and use these and other inputs may be via special "coordination shards," described below.
[0073] Membership and Configuration Services As previously mentioned, according to various embodiments, a sharded, permissioned distributed ledger system can be configured to make various configuration and / or operational decisions, such as which nodes are active for which shards at a given time, which nodes are active for which shards, and which nodes are not active for which shards at a given time. Such decisions may include decisions regarding the number of copies and / or the amount of advance notice that a participant should receive before being required to become active on a shard. Many other possible types of decisions may be relevant in various scenarios and embodiments. In some embodiments, the sharded, permissioned distributed ledger system may include a membership service 170 configured to make such decisions. In some embodiments, the membership service 170 may be decomposed into multiple services, such as a membership service, a service for allocating active nodes to shards, and / or a configuration service. Thus, according to different embodiments, the membership service 170, although described herein as a single service, may include and / or represent multiple distinct (but possibly interrelated) services.
[0074] Nodes may interface with membership service 170 in a variety of ways. For example, in one embodiment, each node may include a special "membership representative" process 140 that is configured to participate in membership service 170 and may communicate with other processes at that node, such as a dispatcher and / or a verifier. In some embodiments, membership service 170 may not represent a separate module (e.g., separate from the node); instead, membership service 170 may represent a service collectively provided by multiple membership representatives 140 of multiple nodes.
[0075] In accordance with various embodiments, any of a variety of mechanisms may generally be utilized to implement, communicate with, and / or participate in a membership service. For example, while shown and described herein as separate modules, in one embodiment the roles of dispatcher and membership representing a node may be combined into one process.
[0076] According to various embodiments, membership service 170 can be configured to make various decisions regarding membership, assignments regarding which nodes are active on which shards, and / or other system configuration changes. Membership representatives can communicate directives to other participants, such as dispatchers and / or verifiers, based on these decisions. For example, in some embodiments, membership representative 140 can be configured to communicate directives to a dispatcher, which can be configured to forward the relevant directives to the verifier.
[0077] In some embodiments, a key requirement of the membership service may be that all legitimate participants observe the same decision sequence (and therefore resulting directives). For example, in one embodiment, a deterministic schedule (e.g., fixed at initialization time) may be followed. However, such a fixed deterministic schedule may not be able to react to certain events, such as a node misbehaving or becoming unresponsive. In another embodiment, a deterministic policy may be used that makes decisions based on inputs and events, such as reports of unresponsiveness, misbehavior, configuration changes, etc.
[0078] In some embodiments, the membership service 170 may include a coordination shard, which may be implemented using techniques similar to those for other shards in the system. FIG. 6 is a logical diagram illustrating a membership service with a coordination shard according to one embodiment. For example, the membership service 170 may include a coordination shard 610, which records relevant inputs and events, such as membership / shard information 630 (e.g., so that all legitimate participants have the same view of inputs and events). This may be configured such that participants in the coordination shard 610 may propagate membership directives 620, possibly based on deterministic policies that take these inputs and events as inputs.
[0079] As an example, consider a simple mechanism for determining which nodes are active for which shards by replacing one active participant for each shard with each completion of T transactions for that shard. To do so, the coordination shard 610 can be informed when a shard s, such as shard 265, has completed a T transaction. This may be done via a transaction 640 submitted to the coordination shard 610 by a participant, such as verifier 150, that is active for shard s. Alternatively, the verifier 150 may inform its local (and therefore trusted) dispatcher 130 of the progress of shard 265, which may communicate relevant events to the membership service 170 (which can then submit the events to the coordination shard). Additionally, in some embodiments, dispatcher 130 may submit transaction 640 to a communication shard 610, while in other embodiments dispatcher 130 may communicate with a local membership representative, which may then communicate membership / shard information 630 to membership service 170 and / or coordination shard 610. In some embodiments, transaction 640 may include an indication that shard 265 has committed T or more transactions, and may also include an indication that one or more votes of the node are currently active as evidence that the transaction was committed.
[0080] In some embodiments, additional information may be submitted to the coordination shard 610, for example via a transaction. Such additional information includes, but is not limited to, the following: Observations regarding the behavior of other nodes, including non-responsiveness, acting in ways that clearly violate the protocol, and / or acting in notable ways that do not directly demonstrate fraud. Observations about the load of a shard (e.g., how long the last T transactions took). Summaries of state information (e.g., possibly concise and unforgeable summaries), such as the net effect of transactions up to a particular index on a shard, or streams of instructions received from a membership service or other services. These can be considered examples of "entanglement", which is described in more detail below. A directive from a specially authorized party to adjust a parameter, such as a transaction signed by three of the five members of the consortium's governing committee indicating that transactions on that shard must be replicated at least three times by the storage service. · Directives from specially authorized parties to add or remove participants from the system. A directive from a specially authorized party (perhaps based in part on observations previously contained in the coordination shard) to penalize participants believed to be cheating.
[0081] In some embodiments, the current configuration of the system at a given time, including information such as which participants are active for which shards and for what intervals (e.g., a participant may be active for a shard from transaction N to transaction N+T for that shard), is stored in the coordination shard ledger. It may be a deterministic function of or based on the information in , so that if / when a certain number of honest nodes agree on the state of the coordination shard's ledger, they can be considered to have a common view of the configuration of the system.
[0082] The processes and / or number of processes that may participate in the coordination shard 610 may vary from embodiment to embodiment. In one embodiment, all verifiers and dispatchers may participate, for example if configuration changes are sufficiently infrequent. In other embodiments, the dispatcher of each node may participate, and in other embodiments, only an active subset of dispatchers may participate. According to some embodiments, the active assignment, or which processes may be active for the coordination shard, may be determined similarly to how it is accomplished for normal shards. In general, the manner in which processes are assigned for participation in the coordination shard (processes become active) may vary from embodiment to embodiment and may depend on various factors such as the frequency of changes, the degree of responsiveness required, the level of threat, etc.
[0083] In some embodiments, transactions committed to the coordination shard 610 will have to be broadcast to all membership representatives (and / or dispatchers). For example, it may be necessary to ensure that all available legitimate nodes have up-to-date membership and configuration information, which may be maintained, for example, in the coordination shard. Additionally, in some embodiments, given the potential importance of the coordination shard in controlling various aspects of the overall system, it may be desirable to have a larger number of active participants in the coordination shard 610 than in the regular shards (e.g., shard 265). As with other configuration parameters, tradeoffs including the number of active participants in the coordination shard and / or the frequency of transactions submitted to the coordination shard may vary depending on the embodiment. For example, configuration parameters related to the coordination shard may be fixed at initialization or may be dynamically adapted / tuned (e.g., via deterministic policies acting on inputs and events recorded in the coordination shard).
[0084] Additionally, in some embodiments, the role of coordination shard may be fulfilled by multiple special shards. For example, one special shard may determine which entities are authorized to participate in the system, another special shard may determine which nodes are active for which shards, another special shard manages configuration parameters such as the number of transactions that must be committed to a shard before a change in active membership occurs, etc. In general, coordination shards may be fulfilled in any of a variety of ways according to various embodiments.
[0085] Entanglement Entanglement, as described herein, can be considered a technique for making sharded, permissioned distributed ledger systems less corruptible. For example, entanglement can include the inclusion of a concise, unforgeable summary of information from one place in another. For example, a cryptographic hash that is included in a transaction (or block of transactions) when it is recorded in the ledger can be considered one basic form of entanglement. A cryptographic hash makes it impossible to change the contents of one block or transaction on the ledger without also changing all subsequent blocks or transactions (e.g., because each transaction can be based on a cryptographic hash of the previous transaction).
[0086] According to various embodiments, entanglement can be used in a variety of other ways beyond this basic form. For example, in one embodiment, a transaction submitted to a shard may contain a cryptographic hash of another shard's current or recent state (e.g., state information), potentially ensuring that even if a coalition attempts to control a second shard sufficiently to allow it to revise the history of the second shard, this is detectable (and / or provable), such as by establishing that the second shard is no longer accurately summarized by the hash contained in the first shard. To cover its tracks, a coalition attempting to revise a shard would also need to control and revise one or more other shards that recorded summaries of the data to be revised. By ensuring regular entanglement with multiple other shards, it is extremely difficult for a coalition to revise the contents of a shard without being detected, even if the coalition succeeds in controlling the shard.
[0087] Thus, in some embodiments, a verifier may be configured to calculate, determine, or obtain a cryptographic hash of the current state of a shard, and may be further configured to include that cryptographic hash when submitting a transaction to another shard.
[0088] In another example, in one embodiment, a transaction submitted to a coordination shard (e.g., a shard used to implement a membership service) may contain additional information, such as a cryptographic hash or a Merkle root of a representation of the state of another shard. Such entanglement may occur when multiple regular shards are involved in a transaction. In this case, the coordination shard may be considered to have similar benefits as entanglement between shards, and / or additional benefits (e.g., if the coordination shard has a larger constant size, scrutiny, etc. due to its important role in the system).
[0089] In yet another example, the stream of instructions that the membership service 170 sends to other participants (such as the dispatcher 130 and / or the verifier 150) may include a cumulative hash (e.g., a hash of all the information in the stream of instructions), which may possibly be similar to the hash included with each transaction to a normal shard. These hashes may then be reported to the membership service 170 and recorded (e.g., in the coordination shard 610) as possibly evidence that the stream of instructions was received without being corrupted. In some embodiments, any mismatch in the reported hashes may immediately raise issues and may identify participants who may be misbehaving. Conversely, according to some embodiments, matching hashes received from some, most, or all of the participants may increase confidence that there is no inconsistency or ambiguity in the instructions issued by the membership service 170.
[0090] In some embodiments, entanglement may be required periodically, and the exact nature of the entanglement that is achieved may be driven by policies implemented by the coordination shard 610. As previously mentioned, failure of a participant to comply with entanglement requirements may result in flagging, triggering an investigation, and / or preventing further participation by the suspect participant, etc. Additionally, according to some embodiments, summarization of membership service directives may involve multiple parties. For example, in one embodiment, directives may be sent to the dispatcher 130, and relevant directives may be forwarded from the dispatcher 130 to local verifiers 150, who may then submit transactions (directly or indirectly) to the coordination shard 610 to determine whether the directives have been corrupted. In some embodiments, per-shard summaries are computed by the membership service 170 and verifier 150 to allow validation of the state of the verifier even though the verifier 150 may only receive instructions for its own shard.
[0091] Accountability and Trust As mentioned above, participation in a sharded, permissioned distributed ledger may be permission-only. Thus, permissioning can create an opportunity for participant accountability in case participants misbehave. For example, in some embodiments, if a rogue node that is not activated on that shard attempts to vote for the consensus of the shard anyway, this may be detected by other nodes that may be able to prove the misbehavior (e.g., by showing a signed vote for the consensus round, along with a proof that the sender was not activated on the shard for that round). As a result, penalties such as legal penalties, lawsuits, etc. may be automatically imposed by the system and / or by existing mechanisms. Thus, nodes may have a strong incentive to follow the protocol (e.g., the consensus protocol that the system implements) or at least avoid any misbehavior that can be detected, especially if it can be proven.
[0092] In some embodiments, active and legitimate shard participants must be able to tell which other shard participants are active, for example so that they can ignore messages from corrupted inactive participants pretending to be active. For example, in some embodiments, an active verifier of a legitimate node will know at least the subset of nodes that are active at a given transaction index. Otherwise, a corrupted set of nodes could take over a shard by sending enough votes to form a quorum in the consensus protocol of the shard without being allowed to participate. As previously mentioned, the membership service 170 can be implemented in a variety of ways according to various embodiments, including but not limited to a special coordination shard 610, a deterministic schedule, or other mechanisms. Furthermore, in some embodiments, the membership service 170 can be configured to ensure that all legitimate membership representatives communicate the same command sequence to their corresponding dispatchers 130 and / or verifiers 150.
[0093] For example, if verifier v1 receives a vote from verifier v2 for a transaction at index 1,500, verifier v1 may count the vote of verifier v2 at index 1,500 after determining that the membership service has issued instructions indicating that verifier v2 is active at that index. According to some embodiments, if verifier v1 does not have access to such instructions, verifier v1 may be configured to postpone counting its votes until it receives confirmation that verifier v2 is active at that index.
[0094] In some embodiments, verifier v2 may be required to provide "evidence" supporting its request to be active. For example, a membership service command may include an "instruction sequence number," and verifier v2 may include, along with its vote, the sequence number of the command that activates it for the interval that includes 1,500. When verifier v1 subsequently receives a membership service command with that sequence number, verifier v1 may determine that this command is in fact verifier v2's is active for the interval that includes index 1,500, and if not, verifier v1 can issue a warning that verifier v2 has cheated by providing invalid evidence with its vote. In some embodiments, including the command sequence number with each vote can ensure that it is only a matter of time before invalid evidence is so identified, thus thwarting such cheating.
[0095] More sophisticated mechanisms according to other embodiments may include more evidence that may enable verifier v1 to validate the request without waiting for specific instructions. For example, in one embodiment, this evidence may include a Merkle proof that indicates that the state implied by the sequence of decisions made by membership service 170 reflects that verifier v2 is active for that shard in transaction index 1,500. This allows verifier v1 to check the proof and validate verifier v2's request without waiting for further instructions from the membership service.
[0096] However, such an approach may be unnecessary in many cases. As mentioned above, it is desirable for participants to have at least some advance notice before becoming active. In that case, the above situation, i.e., verifier v1 is not yet aware of the decision of verifier v2 to become active until the time when verifier v2 votes, may be relatively rare. The worst case is when verifier v1 (at that time) is unable to count the vote of verifier v2. According to some embodiments, depending on the number of dishonest nodes and / or the number of delayed instructions, this could potentially prevent a node from confirming enough votes to accept the transaction until it receives more instructions.
[0097] In some embodiments, for example, verifier v1 may literally accept a request for verifier v2 to be active, knowing that if verifier v2 is lying, it will be discovered in the future and possibly penalized and / or otherwise held accountable. In some embodiments, a configuration parameter may determine how many such "speculative" votes may be counted. However, in some embodiments, even counting one speculative vote may result in a transaction being confirmed by a fraudulent vote without the votes of a quorum of legitimately active nodes. In some embodiments, this may be entirely unacceptable, and thus nodes may be configured to not count votes before verifying that their senders are legitimately active.
[0098] According to various embodiments, such verification may be accomplished in ways other than simply waiting for a delayed command to arrive. For example, in one embodiment, evidence may be stored (e.g., by storage service 190 and / or by participants in membership service 170) such that, in some cases, the evidence may be requested on demand. Thus, in some embodiments, following the above example, verifier v2 may include, along with its signed vote, an identifier (e.g., a hash) of the evidence proving that it is active, and verifier v1 may be configured to request this evidence to verify v2's request.
[0099] Other details and / or optimizations In some embodiments, queries for data (such as instructions a dispatcher receives from its membership representatives) may be made to software that is verified and / or trusted. Participants may be configured to use any of a variety of techniques to optimize MakeActive commands after they are received from a source. For example, in one embodiment, a dispatcher may receive a stream of MakeActive commands, each specifying a node, a shard, and an interval (e.g., start, end). Once each command is verified (e.g., by at least verifying / authenticating the signature of the trusted local membership representative who sent it), it may be stored in a local data structure. Storing such commands locally may improve the speed of common operations. In some embodiments, the verifier may be configured to similarly update appropriate data structures upon receiving a command (e.g., from a local dispatcher or membership representative), e.g., to facilitate that common operation.
[0100] In some embodiments, an active verifier may be configured to determine which other verifiers are active at the current transaction index for that shard and may be configured to broadcast consensus-related messages to them. Additionally, upon receiving a consensus-related message (such as a vote for a transaction) from another verifier, the active verifier may be configured to verify that the sender is active for the transaction index that the vote identifies, which may not be the same as the recipient's current index.
[0101] In some embodiments, queries related to determining which verifiers are active for the current transaction and related to confirming that a sender is active for a particular transaction index can be supported by updating an "interval map" for each instruction received. In some embodiments, the interval map can support a key-value map where the keys are intervals, and queries can determine what values are associated with intervals that contain a specified point that overlaps with a specified interval, etc. In some embodiments, the interval map can be implemented using an interval tree.
[0102] Continuing with the above example, verifier v1 may be configured to maintain an interval map and may be further configured to insert pairs into that interval map that map the interval [1000,2000] to a record identifying verifier v2. When inserting data into the interval map, verifier v1 may also include other information it is likely to need, such as verifier v2's public key (such information may be available elsewhere, but storing it in the interval map may speed up access to frequently accessed information). According to some embodiments, maintaining an interval map allows verifier v1 to query the interval map at the index for which it has received votes, potentially identifying the set of verifiers that are active at that index.
[0103] Other optimizations will be apparent to those skilled in the art. For example, in some embodiments, a verifier may be configured to query the interval map for its current transaction index only once and cache the result for repeated use when processing consensus-related messages for that index, invalidating or updating the cached result in case a new directive affects this result. In other embodiments, such optimizations may come "for free," for example, as implemented in functional languages that store function results.
[0104] According to some embodiments, the dispatcher may also maintain data structures to speed up its common operations. For example, the dispatcher may maintain A verifier 150 may be configured to maintain an interval map per shard, similar to the interval map described above. However, as noted above, the primary role of the dispatcher may be to receive transactions from clients and send them to the appropriate verifier. In some embodiments, the dispatcher does not need to have (or obtain) precise information about which verifiers are active for each shard. For example, if dispatcher 130 sends a message to verifier 150 that it is not currently active (e.g., a client transaction), verifier 150 may be configured to forward the message to a local dispatcher 139.
[0105] However, in some embodiments, for performance reasons, it may be desirable for the dispatcher to identify active verifiers for a shard. Furthermore, if the dispatcher repeatedly sends messages to inactive verifiers, these verifiers may send such messages back to the dispatcher, and overall progress on the ledger may slow down. Thus, in some embodiments, a verifier may be configured to inform the dispatcher (e.g., periodically) of the highest transaction index it has seen on that shard, potentially allowing the dispatcher to query its interval map and potentially determine (e.g., with reasonable accuracy) which verifiers are currently active.
[0106] Randomness As mentioned above, according to some embodiments, policies and / or decisions for determining which participants are active for which shards at any given time, and for determining the current values of various configuration parameters, may be based at least in part on random selection. Thus, in some embodiments, a shared source of randomness may be necessary to ensure that such policies are deterministic and can be computed independently by any participant. To avoid manipulation of the policy outcomes, no one (e.g., any node or any other participant) should be able to control the randomness source. Furthermore, any random data used should not be known long before it is needed, to negate an adversary's opportunity to plan ahead. Thus, in some embodiments, it may not be sufficient to choose a random seed at initialization and use it forever. Instead, in some embodiments, a sharded permissioned distributed ledger system may be configured to periodically exchange sharded randomness sources.
[0107] In some embodiments, the randomness source may be used for a leader's term for a coordination shard and may be replaced with a new randomness source for the next leader's term. For example, according to one embodiment, a new seed for a deterministic pseudo-random number generator may be generated for each leader's term. In general, however, any of a variety of mechanisms for providing randomness may be utilized when implementing a sharded, permissioned distributed ledger, as described herein according to various embodiments. Additionally, according to various embodiments, the randomness source may be updated more frequently (providing greater security) or less frequently (requiring less work), and may be driven by events other than leadership changes (e.g., in systems that do not use leader-based consensus).
[0108] For example, as mentioned above, in some embodiments, randomness can be generated by generating a "good" seed for a deterministic pseudorandom number generator. Obviously, the choice of seed should not be controllable by any participant. Additionally, in some embodiments, the seed need not be predictable far in advance. If an adversary can tell in advance which of the verifiers will be activated in the distant future, the adversary can begin work to corrupt those verifiers.
[0109] In one embodiment, when a leader's term ends, the leader may be configured to take a cryptographic hash of the last committed transaction, which may not be predicted in advance. However, this hash may be manipulated by the leader. For example, a dishonest leader may select and order transactions such that the generated hash has desired properties, such as assigning "friendly" participants to shards that they intend to corrupt. Thus, in some embodiments, the current randomness source deterministically assigns buddy nodes to each leader. At the end of its term, the leader can send this peer node an incremental hash of the last committed transaction, and the peer node may be configured to sign the hash with its private key and return the signed hash to the leader, who then XORs the result with its own signature, resulting in a seed that is not controlled by any party.
[0110] Additionally, in some embodiments, a leader may be assigned multiple peer nodes (e.g., at least as many as the system can tolerate corrupt nodes). Assuming that only the assigned number of nodes will be corrupt, this can ensure that at least one (the leader or one of the peers) is legitimate and therefore will not participate in a "trial-and-error" collusion. According to some embodiments, if the random seed is chosen by a function of all signatures (e.g., an XOR of all of them), ensuring that one participant is legitimate would exclude anyone who controls the randomness source.
[0111] In some embodiments, if the leader or any of its peers do not participate in this protocol, the leader may eventually be deposed and a new leader elected. The new leader can then collaborate with its peers (depending on the function of the previous randomness source) to generate a new random seed by participating in a similar protocol. In some embodiments, eventually a leader will likely be found whose peers all respond and at least one peer is legitimate, which means that a new trusted randomness source has been generated and the protocol can proceed normally.
[0112] The above technique allows the leader to pretend to fail in case he does not like the resulting randomness, but this will have no effect on the randomness chosen by the next leader and his peers. Moreover, because this failure is visible to others, it can contribute evidence that can be assessed in case the failure is suspected to be an attempt to deliberately manipulate the results.
[0113] An example of a computing system Various components of embodiments of the techniques and methods for providing a sharded, permissioned distributed ledger system described herein may execute on one or more computer systems or computing devices that may interact with various other devices. One such computer system or computing device is illustrated in FIG. 7. In the illustrated embodiment, computer system 1000 includes one or more processors 1010 coupled to system memory 1020 via an input / output (I / O) interface 1030. Computer system 1000 further includes a network interface 1040 coupled to I / O interface 1030 and a , one or more input / output devices 1050, such as a cursor control device 1060, a keyboard 1070, an audio device 1090, and a display 1080. While some embodiments are intended to implement the embodiments using a single instance of computer system 1000, in other embodiments, multiple such systems or multiple nodes that make up computer system 1000 may be configured to host different portions, components, or instances of the embodiments. For example, in one embodiment, some elements may be implemented via one or more nodes of computer system 1000 that are different from the nodes that implement other elements.
[0114] In various embodiments, computer system 1000 may be a uniprocessor system including one processor 1010, or may be a multiprocessor system including several processors 1010 (e.g., 2, 4, 8, or another suitable number). Processor 1010 may be any suitable processor capable of executing instructions. For example, in various embodiments, processor 1010 may be a general-purpose or embedded processor implementing any of a variety of instruction set architectures (ISAs), such as the x86, PowerPC, SPARC, or MIPS ISA, or any other suitable ISA. In a multiprocessor system, processors 1010 may each typically, but not necessarily, implement the same ISA.
[0115] In some embodiments, at least one processor 1010 may be a graphics processing unit. A graphics processing unit or GPU may be considered a dedicated graphics rendering device for a personal computer, workstation, game console, or other computer system. Modern GPUs can be very efficient at manipulating and displaying computer graphics, and their highly parallel structure makes them more effective than a typical CPU in a range of graphical algorithms. For example, a graphics processor can implement multiple graphics primitives to execute them much faster than drawing directly to a screen with a host central processing unit (CPU). A GPU may implement one or more application programmer interfaces (APIs) that allow a programmer to invoke the GPU's functions. Suitable GPUs may be commercially available from vendors such as NVIDIA Corporation, ATI Technologies, and others.
[0116] The system memory 1020 may be configured to store program instructions and / or data accessible to the processor 1010. In various embodiments, the system memory 1020 may be implemented using any suitable memory technology, such as static random access memory (SRAM), synchronous dynamic RAM (SDRAM), non-volatile / flash type memory, or any other type of memory. In the illustrated embodiment, program instructions and data implementing desired functionality, such as those previously described for various embodiments of methods for increasing accountability and trust in distributed ledgers, including but not limited to methods for processing distributed ledger messages as a sending node and / or a receiving node as shown in Figures 2-6, are shown as stored in the system memory 1020 as program instructions 1025 and data storage 1035, respectively. In other embodiments, the program instructions and / or data may be received, transmitted, or stored in a different type of computer-accessible medium or in a similar medium separate from the system memory 1020 or the computer system 1000. In general, for example, computer-accessible media may include storage or memory media, such as magnetic or optical media, be it disks or CD / DVD-ROMs, coupled to computer system 1000 via I / O interface 1030. Program instructions and data stored via computer-accessible media may be realized, for example, via network interface 1040. , may be transmitted by a transmission medium or signal, such as an electrical, electromagnetic, or digital signal, which may be transferred over a communication medium, such as a network and / or a wireless link.
[0117] In one embodiment, the I / O interface 1030 may be configured to coordinate I / O traffic between any peripheral devices in the device, including the network interface 1040 or other peripheral interfaces such as the input / output devices 1040, the system memory 1020, and the processor 1010. In some embodiments, the I / O interface 1030 may perform any necessary protocol, timing, or other data conversions to convert data signals from one component (e.g., the system memory 1020) into a format suitable for use by another component (e.g., the processor 1010). In some embodiments, the I / O interface 1030 may include support for devices attached through various peripheral buses, such as, for example, variations on the Peripheral Component Interconnect (PCI) bus standard or the Universal Serial Bus (USB) standard. In some embodiments, the functionality of the I / O interface 1030 may be split into two or more separate components, such as, for example, a northbridge and a southbridge. Additionally, in some embodiments, some or all of the functionality of the I / O interface 1030, such as the interface to the system memory 1020, may be incorporated directly into the processor 1010.
[0118] Network interface 1040 may be configured to enable data to be exchanged between computer system 1000 and other devices attached to a network, such as other computer systems, or between nodes of computer system 1000. In various embodiments, network interface 1040 may support communications over a wireless or wired general-purpose data network, such as, for example, any suitable type of Ethernet network, over a telecommunications / telephone network, such as an analog voice network or a digital fiber communications network, over a storage area network, such as a Fibre Channel SAN, or over any other suitable type of network and / or protocol.
[0119] The input / output devices 1050, in some embodiments, may include one or more display terminals, keyboards, keypads, touchpads, scanning devices, voice or light recognition devices, or any other devices suitable for inputting or retrieving information by one or more computer systems 100. Multiple input / output devices 1050 may be present within computer system 1000 or distributed across various nodes of computer system 1000. In some embodiments, similar input / output devices may be separate from computer system 1000 and may communicate with one or more nodes of computer system 1000 via wired or wireless connections, for example, via network interface 1040.
[0120] As shown in Figure 7, memory 1020 may include program instructions 1025 configured to implement an embodiment of a method for increasing accountability and trust in distributed ledgers, and data storage 1035 including various data accessible to program instructions 1025. In one embodiment, program instructions 1025 may include the software elements of an embodiment of a method for increasing accountability and trust in distributed ledgers shown in the figures above. Data storage 1035 may include data that may be used in the embodiment. In other embodiments, other or different software elements and data may be included.
[0121] The computer system 1000 is illustrative only and is not intended to limit the scope of the methods for increasing accountability and trust in distributed ledgers described herein. Those skilled in the art will appreciate that the functions depicted in the drawings may be implemented in a variety of ways. In particular, computer systems and devices may include any combination of hardware or software capable of performing the functions depicted, including computers, network devices, Internet appliances, PDAs, wireless telephones, pagers, and the like. Computer system 1000 may be connected to other devices not shown, or may alternatively operate as a stand-alone system. Additionally, the functionality provided by the depicted components may in some embodiments be combined into fewer components or distributed among other components. Similarly, in some embodiments, the functionality of some of the depicted components may not be provided and / or other additional functionality may be made available.
[0122] Also, while various items are shown as being stored in memory or storage during use, those skilled in the art will appreciate that these items, or portions thereof, may be transferred between memory and other storage devices for memory management and data integrity. Alternatively, in other embodiments, some or all of the software components may be executed in memory or on another device and communicate with the illustrated computer system via computer-to-computer communications. Some or all of the system components or data structures may also be stored (e.g., as instructions or structure data) on a computer-accessible medium or on a portable article read by an appropriate drive, various examples of which are discussed above. In some embodiments, instructions stored on a computer-accessible medium separate from computer system 1000 may be transmitted to computer system 1000 via a signal or transmission medium, such as an electrical, electromagnetic, or digital signal conveyed over a communications medium, such as a network and / or a wireless link. Various embodiments may further include receiving, transmitting, or storing on a computer-accessible medium instructions and / or data implemented in accordance with the above description. Thus, the present invention may be practiced with other computer system configurations.
[0123] The various methods illustrated in the drawings and described herein represent example embodiments of the methods. These methods may be implemented in software, hardware, or a combination thereof. The order of the methods may be changed, and various elements may be added, rearranged, combined, deleted, modified, etc.
[0124] Various modifications and alterations may become apparent to those skilled in the art having the benefit of this disclosure, and it is intended that the invention encompass all such modifications and alterations, and therefore the above description is to be regarded as illustrative rather than restrictive.
Claims
1. 1. A sharded, permissioned distributed ledger system, comprising: a plurality of computing devices configured to participate as a plurality of nodes in the distributed ledger system, the plurality of nodes configured to manage a distributed ledger including a plurality of ledger shards configured to store information regarding one or more transactions; Each node is one or more verifier services configured to participate in accordance with a consensus protocol to append information about individual transactions to individual ledger shards of the plurality of ledger shards; Dispatcher services, the dispatcher service is configured to receive a transaction request from a client, the transaction request including information indicating a particular transaction and a target shard among the plurality of ledger shards; and wherein the dispatcher service is configured to forward the received transaction request to one of the verifier services associated with the target shard.
2. 2. The sharded, permissioned distributed ledger system of claim 1, wherein the verifier service is configured to append information about the transaction specified by the forwarded request to the target shard.
3. The dispatcher service is further configured to forward the received transaction request to a leader verifier associated with the target shard; 2. The sharded, permissioned distributed ledger system of claim 1, wherein the leader verifier is configured to propose the particular transaction to the verifier service associated with the target shard according to the consensus protocol.
4. 2. The sharded, permissioned distributed ledger system of claim 1, further comprising a configuration service configured to determine, for each corresponding node, a subset of the verifier services on the corresponding node that will be active for a respective ledger shard of the plurality of ledger shards, wherein a verifier service that is active for a given ledger shard participates in consensus to append new transactions to the ledger shard.
5. 5. The sharded, permissioned distributed ledger system of claim 4, wherein the configuration service is further configured to determine the subset of verifier services based at least in part on a sharded source of randomness providing random data over which the plurality of nodes have no control.
6. a count of transactions that are appended to each ledger shard of the plurality of ledger shards; A cryptographic hash of state information for one or more of the ledger shards; and information about a verifier service associated with each of the ledger shards; 13. The sharded, permissioned distributed ledger system of claim 1, further comprising a distributed configuration ledger configured to record one or more of:
7. 7. The sharded, permissioned distributed ledger system of claim 6, further comprising a configuration service configured to broadcast commands regarding the plurality of ledger shards to one or more of the nodes.
8. 1. A computer-implemented method comprising: managing a distributed ledger on a plurality of computing devices configured to participate as a plurality of nodes in the distributed ledger system, the distributed ledger including a plurality of ledger shards that store information regarding one or more transactions; a dispatcher process on one of the nodes receiving a transaction request from a client, the transaction request including information indicating a particular transaction and a target shard among the plurality of ledger shards; 11. A computer-implemented method comprising: the dispatcher process forwarding the received transaction request to a verifier process associated with the target shard, the verifier process being one of a plurality of verifier processes, each of the plurality of verifier processes configured to participate with one or more other verifier processes according to a consensus protocol to append information regarding individual transactions to respective ledger shards of the plurality of ledger shards.
9. 10. The computer-implemented method of claim 8, further comprising the verifier process appending information about the transaction specified by the forwarded request to the target shard.
10. determining a leader verifier from among the set of verifier processes that are active for the target shard; the forwarding step includes a step of the dispatcher service forwarding the received transaction request to the leader verifier; 9. The computer-implemented method of claim 8, further comprising the leader verifier proposing the particular transaction to the set of verifier processes that are active for the target shard according to the consensus protocol.
11. 10. The computer-implemented method of claim 8, further comprising: a configuration service determining, for each corresponding node, a subset of the verifier processes on the corresponding node that will be active for a respective ledger shard of the plurality of ledger shards.
12. 12. The computer-implemented method of claim 11, wherein determining the subset of verifier processes is based at least in part on a sharded source of randomness, the sharded source of randomness providing random data over which the plurality of nodes have no control.
13. a count of transactions that are appended to each ledger shard of the plurality of ledger shards; A cryptographic hash of state information for one or more of the ledger shards; and information about a verifier process associated with each of the ledger shards; in a distributed configuration ledger. How to do it.
14. 14. The computer-implemented method of claim 13, further comprising a configuration service broadcasting instructions regarding the plurality of ledger shards to one or more of the nodes.
15. A non-transitory computer readable storage medium storing program instructions that, when executed on one or more computers, cause the one or more computers to perform the steps of: managing a distributed ledger on a plurality of computing devices configured to participate as a plurality of nodes in the distributed ledger system, the distributed ledger including a plurality of ledger shards that store information regarding one or more transactions; a dispatcher process on one of the nodes receiving a transaction request from a client, the transaction request including information indicating a particular transaction and a target shard among the plurality of ledger shards; 11. A non-transitory computer-readable storage medium, comprising: the dispatcher process forwarding the received transaction request to a verifier process associated with the target shard, the verifier process being one of a plurality of verifier processes, each of the plurality of verifier processes configured to participate with one or more other verifier processes according to a consensus protocol to append information regarding individual transactions to respective ledger shards of the plurality of ledger shards.
16. 20. The non-transitory computer-readable storage medium of claim 15, further comprising the verifier process appending information about the transaction specified by the forwarded request to the target shard.
17. determining a leader verifier from among the set of verifier processes associated with the ledger shard; The forwarding step includes a step in which the dispatcher process forwards the received transaction request to a leader verifier associated with the target shard; 16. The non-transitory computer-readable storage medium of claim 15, further comprising the leader verifier proposing the particular transaction to the verifier process associated with the target shard according to the consensus protocol.
18. 16. The non-transitory computer-readable storage medium of claim 15, further comprising a configuration service determining, for each node of the plurality of nodes, a subset of the verifier processes on the corresponding node that will be active for each ledger shard of the plurality of ledger shards.
19. 20. The non-transitory computer-readable storage medium of claim 18, wherein determining the subset of verifier processes is based at least in part on a sharded source of randomness, the sharded source of randomness providing random data over which the plurality of nodes have no control.
20. a count of transactions that are appended to each ledger shard of the plurality of ledger shards; A cryptographic hash of state information for one or more of the ledger shards; and information about a verifier process associated with each of the ledger shards; 20. The non-transitory computer-readable storage medium of claim 15, further comprising recording one or more of:
