WO2024261447A1 - Performing tasks in distributed computer systems - Google Patents
Performing tasks in distributed computer systems Download PDFInfo
- Publication number
- WO2024261447A1 WO2024261447A1 PCT/GB2024/050806 GB2024050806W WO2024261447A1 WO 2024261447 A1 WO2024261447 A1 WO 2024261447A1 GB 2024050806 W GB2024050806 W GB 2024050806W WO 2024261447 A1 WO2024261447 A1 WO 2024261447A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- task
- output
- computing devices
- final result
- decision
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Definitions
- This invention relates to systems and methods for performing tasks in distributed computer systems.
- a distributed computer system such as a blockchain
- computing devices of the system can interact concurrently by communicating over a network, such as the Internet, to perform tasks.
- a network such as the Internet
- a set of one or more computing devices may be delegated to perform a particular task for the system.
- the set of computing devices may be defined such that the set is guaranteed or nearly guaranteed never to output a “wrong” decision.
- a problem can arise if the set of devices is unable to complete the task in a timely manner. This may be especially problematic in a decentralized system, where there is no central server that might otherwise step in under such circumstances.
- a subset of the blockchain nodes may be delegated the task of deciding whether a candidate block should be added to the blockchain, and may be defined such that it is infeasible for the subset to dishonestly agree to add a malicious block; however, if these nodes cannot reach a timely decision at all, this may compromise the proper functioning of the blockchain.
- Embodiments of the present invention seek to address this challenge.
- the invention provides a distributed computer system for performing a task, wherein the distributed computer system comprises a plurality of networked computing devices, and wherein: a first set of the computing devices is configured to start performing a task, and to output a final result of the task after the task is completed; a second set of the computing devices, different from the first set, is configured to determine whether the first set has output a final result of the task within a timeout period, and, if the first set has not output a final result of the task within the timeout period, to start performing the task; and the second set of computing devices is configured, after starting performing the task and before outputting a final result of the task, to determine whether the first set has output a partial or final result since the second set started performing the task, and, if so, to output a final result that is consistent with the partial or final result output by the first set, and, if not, to output a final result of the task determined by the second set.
- the invention provides a method for performing a task in a distributed computer system comprising a plurality of networked computing devices, the method comprising: a first set of the computing devices starting to perform the task; a second set of the computing devices, different from the first set, determining whether the first set has output a final result within a timeout period, and, in response to determining that the first set has not output a result within the timeout period, starting to perform the task; and the second set of computing devices, after starting performing the task and before outputting a final result of the task, determining whether the first set has output a partial or final result since the second set started performing the task, and, in response to determining that the first set has output a result since the second set started performing the task, outputting a final result that is consistent with the partial or final result output by the first set, or in response to determining that the first set has not output a result since the second set started performing the task, outputting a final result of the task determined by the second set.
- the invention provides a computing device for use in a distributed computer system that comprises a plurality of networked computing devices, configured for performing a task, including a first set of the computing devices and a different, second set of the computing devices, wherein the computing device is configured for membership of the second set of computing devices, and is configured: to determine whether the first set of computing devices has output a final result of the task within a timeout period, and, if the first set has not output a final result within the timeout period, to start performing the task; and after starting performing the task and before outputting a result of the task, to determine whether the first set has output a partial or final result since the computing device started performing the task, and, if so, to output a result that is consistent with the partial or final result output by the first set, and, if not, to output a result of the task determined by the computing device.
- the invention provides computer software comprising instructions for execution by a computing device for use in a distributed computer system that comprises a plurality of networked computing devices, configured for performing a task, including a first set of the computing devices and a different, second set of the computing devices including said computer device, wherein the instructions, which executed by said computing device, cause the computing device: to determine whether the first set of computing devices has output a final result of the task within a timeout period, and, if the first set has not output a final result within the timeout period, to start performing the task; and after starting performing the task and before outputting a result of the task, to determine whether the first set has output a partial or final result since the computing device started performing the task, and, if so, to output a result that is consistent with the partial or final result output by the first set, and, if not, to output a result of the task determined by the computing device.
- the first set of computing devices fails to complete the task in a timely manner (e.g. because it is being blocked from doing so by a malicious actor), a second set of devices will take over and perform the task.
- a second set of devices will take over and perform the task.
- such systems are resilient against faults that might otherwise prevent the system from generating a result at all.
- the first set of devices does, belatedly, output a partial or final result before the second set of devices has completed the task
- the second set then aligns its result with the result output by the first set—this reduces the risk of contradictory (i.e. inconsistent) final results being output by the two sets of computing devices.
- the distributed computer system may be a decentralized computer system.
- the computer devices may be connected by a local area network or by a wide area network. They may be connected by the Internet.
- the task may be any processing task. In some embodiments, the task is a decision task and the or each final result is a decision.
- the first set of computing devices may perform the task as a first distributed process
- the second set of computing devices may perform the task as a second distributed process.
- the first and second processes may differ in the input data that each has access to and/or in the processing operations that each performs.
- the first and second processes may be distributed across the respective sets of computing devices in any appropriate way. For each of the first and second sets, the computing devices of a set may process the same or different data from each other (e.g.
- each device may have access to a respective portion of a larger set of input data), and may perform the same or different processing operations from each other.
- the first set of computing devices is configured, after starting performing the task but before outputting a final result (e.g. a committed decision), to determine whether the second set of computing devices has started performing the task and, if so, to output no result or to output a final result that is the same as a final result output by the second set of computing devices. This may further help avoid a situation in which conflicting results are published, which might otherwise arise, e.g. as a result of asynchrony and communication delays in the system.
- the second set of the computing devices may be configured, upon determining that the first set has output a final result within a timeout period, not to start performing the task. It may output no result for the task. Alternatively, in this situation, the first set may output the final result output by the first set (i.e. echoing the same result). If the first set has output no result or only a partial result within the timeout period, the second set will start performing the task.
- the first and second sets of computing devices may be configured such that, if the first set of devices outputs a final result, it does so faster than the second set of devices outputs a final result, under some or all conditions. This may be true on average over all input conditions.
- the first and second sets of computing devices may be configured such that the second set of devices is more likely to output a final result (i.e. to complete the task) than the first set of devices.
- the second set may be configured to be more robust than the first set against a respective (malicious) computing device of the set attempting to block the output of a final result by the respective set.
- the second set of device may be larger than the first set of devices. This may make it harder for a malicious actor to prevent the second set of devices from completing the task.
- the second set of devices may be arranged so as to always output a result (albeit potentially more slowly than the first set, when the first set does complete the task).
- the first set of computing devices may be configured such that, under some conditions, the first set of devices will never output a result. Because the second set of computing devices can act as a fall-back when the first set fails to output a timely result, embodiments of the system may always, or almost always, output a result even if the first set fails to do so (e.g. because it reaches a deadlock and is unable to confirm any particular decision value).
- the distributed computer system is a blockchain system storing a blockchain, and the computing devices are respective blockchain nodes.
- the blockchain may be configured to store cryptocurrency.
- the blockchain may be configured to store smart contracts.
- the system may be configured to distribute a candidate block of transaction data to each of the first set of devices.
- the transaction data may relate to cryptocurrency transactions or smart contract transactions or both.
- the candidate block may be created from a pool of unverified transaction data.
- the task may comprise determining whether to add a candidate block to the blockchain.
- the candidate block may be generated by one of the first or second set of computing devices, or it may be generated by a different blockchain node.
- Each set of computing devices may be a plurality of blockchain nodes that is configured to decide collectively whether to add the same candidate block to the blockchain.
- the first and second sets of computing devices may implement respective consensus mechanisms for making the decision. These consensus mechanisms may be the same or different for the first and second sets.
- the first set may require at least a first threshold number of the first set of computing devices to agree before the first set outputs a final result (e.g.
- the second set may require at least a second threshold number of the second set of computing devices to agree before the second set outputs a final result (e.g. at least half).
- the second number may be greater than the first number. This may result in the second set issuing a decision more slowly on average, but make the second set more robust against faults or attacks that might otherwise prevent it from outputting a result. If the first set outputs a final result, the second set may output a consistent result by outputting the same final result. If the first set outputs a final result before the second set starts performing the task (i.e. within the timeout period), then the second set may be configured to output the same final result (i.e. to echo the decision of the first set), or may be configured to output no result.
- the first set of computing devices may be configured to output final results for tasks and never to output partial results. However, in other embodiments, the first set may be configured to output a partial result before outputting any final result. It may, in some situations, output a partial result and then fail to output any final result (e.g. if it reaches a deadlock between outputting the partial result and the final result).
- the partial result may be a decision made by one or more (e.g. by a threshold number of) computing devices of the first set that has not (yet) been approved by the first set (i.e. is awaiting approval) according to a first consensus mechanism implemented by the first set.
- the decision task may be associated with a set of decision values (e.g. two, three or more possible decision values). For example, a first decision value of the set may be to approve an identified candidate block for inclusion in a blockchain, and a second decision value of the set may be to reject the identified candidate block for inclusion in the blockchain.
- the computing devices of the first set may be configured such that a partial result output by the first set identifies a decision value selected from the set of decision values for the task.
- the computing devices may be configured such that any individual computing device of the set can propose a decision (e.g. by outputting a signed certificate asserting what the decision should be).
- the set may then be considered to have output a partial or final result once a threshold number of the computing devices of the set has indicated agreement with the proposed decision.
- the result may be a partial result (i.e. a pre-decision) of the set at least until sufficient of the computing devices (i.e. at least a further threshold number) have received the partial result, whereupon the set confirms the partial result as a final result.
- the devices of the first set may be configured such that any final result output by the first set must confirm the decision value identified by the partial result.
- this pre-decision commits the first set to either confirming this pre-decision as the final result or to not outputting any final result at all (e.g. if consensus cannot be reached within the first set of devices, perhaps due to the actions of a malicious device within the first set preventing the first set from transitioning from outputting a partial result to outputting a final result).
- the second set of devices are preferably configured such that, if a partial result is output by the first set and the partial result identifies a decision value, the final result output by the second set must confirm the decision value identified by the partial result output by the first set. In this way, the final result of the second set may be consistent with any partial or final result output by the first set.
- the first set and second set may contain at least one computing device in common.
- the first and second sets may intersect, or one of the sets may be a subset of the other set.
- Each of the first and second sets of computing devices may comprise one or more “decider” computing devices configured to output a final result for the respective set of devices.
- a decider for the first set may implement a first consensus mechanism for the first set, and a decider for the second set may implement a second consensus mechanism for the second set.
- Each decider may be configured to collect partial results output by the computing devices of the set and to determine when it has collected a threshold number of consistent partial results (e.g. partial results that indicate agreement with a same decision value).
- the timeout period may be determined based on a time at which a final decision of an earlier task was output. For example, it may start at a time that a block (e.g. a most recent block) was added to a blockchain.
- Each computing device of the second set may be configured to determine when the timeout period elapses. In a first set of embodiments, the computer devices of the second set may do this by each computing device of the second set directly measuring the time period (e.g. using a clock or timer of the device).
- each computing device of the second set may be configured to receive a signal indicating that the timeout period has elapsed (e.g. from one or more computing devices of the first set).
- Each computing device of the first set may be configured to determine when the timeout period elapses (e.g. using a clock or timer of the respective device).
- One or more, or each, of the computing devices of the first set may be configured, after determining that the timeout period has elapsed, to issue a timeout signal indicating that the timeout period has elapsed. These timeout signals may be issued for receipt by computing devices of the second set.
- the computing devices of the second set determining when the timeout period elapses may comprise each computing device of the second set detecting a timeout signal issued by one or more of the computing devices of the first set indicating that the timeout period has elapsed.
- each of the second set of computing devices is configured to determine that the timeout period has elapsed only after detecting a timeout signal from more than a predetermined proportion (e.g. half) of the computing devices of the first set of computing devices.
- the computing devices (of the first set or of the second set) may, in some embodiments, use respective clocks that are not all mutually synchronised. The timeout period may therefore be determined slightly differently by each respective computing device.
- the system may comprise one or more further sets of the computing devices configured to start performing the task when respective predetermined conditions (e.g. timeout conditions) are met. Each may be configured to start performing the task in response to determining that a set of devices (e.g. the first or second set) has not output a result of the task within a respective timeout period. Outputting a result may comprise publishing the result such that the result is available to a majority or all of the plurality of networked computer devices. It may comprise issuing a certificate, which may be cryptographically signed. Some or all of the computing devices may be configured to output a partial result as a respective partial certificate. A decider for a set of computing devices may be configured to output a final result for the set as a final certificate.
- predetermined conditions e.g. timeout conditions
- Each computing device may be a workstation, server, laptop, mobile telephone or any other computing device. It may comprise memory and one or more processors for executing software stored in the memory. Computer software as disclosed herein may be stored on a non-transitory computer-readable medium such as a magnetic or solid- state memory. Features of any aspect or embodiment described herein may, wherever appropriate, be applied to any other aspect or embodiment described herein. Where reference is made to different embodiments or sets of embodiments, it should be understood that these are not necessarily distinct but may overlap.
- Figure 1 is a schematic diagram of a blockchain computing system embodying the invention
- Figure 2 is a flow chart of a method, embodying the invention, for performing a task by a distributed system under a first set of conditions
- Figure 3 is a flow chart of the method for performing the task under a second set of conditions
- Figure 4 is a flow chart of the method for performing the task under a third set of conditions.
- DETAILED DESCRIPTION Figure 1 shows a schematic representation a blockchain network 100 comprising a plurality of nodes 102 that can communicate with each other over the Internet to maintain a distributed blockchain.
- Each node 102 is a respective computing device, such as a workstation or a server, that contains memory and one or more processors executing software for performing operations to maintain the blockchain.
- Each node 102 stores a local version of the blockchain in its memory.
- these various copies of the blockchain should be very similar or identical. However, due to communication and processing delays, they may at times differ slightly, e.g. with regard to one or more of the most recently-added block or blocks.
- Figure 1 shows only nine exemplary nodes 102, it will be appreciated that the blockchain network 100 may include any number of nodes, which may be much great than nine. Nodes may join or leave the blockchain network 100 over time.
- At least some of the nodes 102 are block-creating nodes and are arranged to receive transactions (e.g. currency transactions) and to store these in a local pool of unconfirmed transactions. These block-creating nodes are programmed to generate candidate blocks for inclusion in the blockchain based on transactions selected from the pool of unconfirmed transactions. There may be other nodes 102 that do not undertake block-creating activities, but nevertheless maintain local copies of the blockchain.
- the blockchain network 100 implements a consensus mechanism for deciding which blocks to include in the blockchain. This mechanism requires a set of the nodes 102 to act as verifier nodes and to check any candidate blocks to verify that it meets predefined requirements for inclusion in the blockchain.
- the set of verifier nodes may implement a voting policy to decide whether a candidate block should be included.
- the result of decision may be published across the network 100 by the set of nodes—e.g. by way of a certificate issued by one or more of the nodes of the set.
- the nature of the voting policy, and a required size of the set of verifier nodes may be parameters of the network 100, which may change under different conditions. In some situations, a set of verifier nodes may collectively fail to reach a decision.
- Such a failure might, in some situations, be caused by a malicious actor causing a proportion of these nodes to behave badly—e.g. to try to vote in a candidate block that contains a malformed transaction, such as double-spending cryptocurrency.
- the nodes may enter a deadlock condition where no decision is published.
- a first set of the nodes such as the first set 104 of three nodes 102b, 102c shown in Figure 1
- the task may be handed over to a larger set of nodes, such as the second set 106 of five nodes 102a, 102c shown in Figure 1, which may use a second process (which may be the same as the first process or different).
- the second set may be determined by the system 100 so as be larger than the first set. This may make it much less likely, or even practicably impossible depending on the size of the second set, that a badly behaving actor could control a sufficient proportion of the nodes 102 so as to be able to cause the second set to fail to reach a decision— i.e. to deadlock.
- the second set 106 may include one or more nodes 102c that are also in the first set 104.
- the second set may include all the nodes of the first set—i.e. it may be a superset of the first set. It could include every available (i.e. online) node 102 of the network 100 that is capable of acting as a verifier node.
- the second set of nodes may be determined and controlled by the blockchain network 100 to such that a decision will always be reached.
- a set of nodes may be referred to herein as “complete” if it is stochastically impossible for the set to fail to generate an answer. Whether a set of nodes is complete may depend on factors including how the set is chosen (e.g. its size); an underlying trust model; an upper bound on the probability p of any node of the set being bad or corruptible; and the type of decision required (e.g. a majority vote, or some other decision process). However, it may be the case that the second set, although complete, will, on average, take significantly longer to reach a decision than the first set, when the first set does not deadlock (which should not occur often in normal usage).
- Figures 2-4 show how a processing task can be carried out, by a distributed computer system embodying the invention, under three different sets of conditions.
- the system could be a blockchain system, such as the system 100 of Figure 1, with the task being to decide whether to accept or reject a candidate block.
- it could be any system for performing a task, especially one where it is important that an unambiguous result is always reached.
- This particular example uses a single-stage decision-making process, in which a set of devices moves straight to outputting a final result once a consensus decision is reached.
- a set of devices first outputs a pre-decision (i.e. a partial result) which may then be configured as a final decision (i.e. a final result), assuming consensus can be reached.
- the system includes two sets of processing devices or nodes, Set A and Set B. These sets could be disjoint, overlapping or nested. They could be the first set 104 and second set 106 of nodes 102 of Figure 1, or any other sets of processing devices in a distributed (e.g. decentralized) system.
- the task is carried out cooperatively, in a distributed fashion, by respective software executing on the nodes, in accordance with a defined protocol (e.g. a blockchain protocol).
- a defined protocol e.g. a blockchain protocol
- Figure 2 shows what happens when Set A publishes a timely decision.
- Figure 3 shows what happens when Set A publishes a late decision.
- Figure 4 shows what happens when Set A deadlocks and fails to publish any decision, and how Set B ensures that a decision is nevertheless published eventually.
- the nodes of Set A start performing 200 the task in a first distributed process. This start is signalled to one or more of the nodes of Set B, which start measuring a timeout period T.
- Set A completes 202 the task and publishes 204 a result, Result A, within the timeout period T.
- Set B checks and detects 206 that a result has been published by Set A. Consequently Set B takes no further action.
- Set B may optionally republish Result A.
- the timeout period T is measured by the nodes of Set A, rather than by the nodes of Set B.
- the nodes of Set A start measuring the timeout period T at the same time as they start performing 200 the task. In such embodiments, it is not necessary for the start of the timeout period T to be signalled to Set B (although it may still be).
- Each node of Set A is configured to issue a timeout signal for detection by Set B upon determining that the timeout period T has elapsed.
- Set A completes 202 the task and publishes 204 the result before expiry of the timeout period T, so Set A may not be required to signal the end of the timeout period T to Set B.
- the nodes of Set A start performing 300 the task in a first distributed process. This start is signalled to one or more of the nodes of Set B, which start measuring a timeout period T.
- Set A completes 302 the task and publishes 304 a result, Result A, but only after the end of the timeout period T.
- Set B checks and determines 306 that no result has yet been published by Set A. Consequently Set B starts performing 308 the task in a second distributed process.
- the parameters of the second process may differ from those of the first process—e.g. in the size of the sets and/or in how the nodes seek to reach consensus.
- each node of Set A issues a timeout signal upon determining that the timeout period T has elapsed. After detecting a timeout signal from Set A (e.g.
- Set B determines 306 that no result has yet been published by Set A and consequently starts performing 308 the task. After a time from starting the task (which may be longer than the timeout period T that Set A was expected to take), Set B completes 310 the task. However, before publishing a result from the second process, the Set B nodes check again whether a result has been published by Set A (i.e. a late result, after the timeout period T), and, in this example, they detect 312 that a result, Result A, has been published. Consequently, Set B disregards whatever result was determined by the second process and instead publishes Result A. This ensures that two contradictory results cannot be published for the same task.
- the nodes of Set A start performing 400 the task in a first distributed process. This start is signalled to one or more of the nodes of Set B, which start measuring a timeout period T.
- Set A may start measuring the timeout period T at the same time as starting performing 400 the task, as described above.
- Set A fails to complete the task (e.g. is unable to reach a decision) and enters a deadlock situation.
- the first process may eventually be aborted, but no result is ever published.
- Set B checks and determines 406 that no result has yet been published by Set A. Consequently Set B starts performing 408 the task in a second distributed process.
- the parameters of the second process may differ from those of the first process—e.g. in the size of the sets and/or in how the nodes seek to reach consensus.
- Set B After a time from starting the task (which may be longer than the timeout period T that Set A was expected to take), Set B completes 410 the task.
- the Set B nodes check again whether a result has been published by Set A (i.e. a late result, after the timeout period T), and, in this example, they determine 412 that still no result has been published. Consequently, Set B publishes the result, Result B, that it determined by the second process.
- Set A may optionally detect the result published by Set B and republish Result B.
- the second process performed by Set B may be such that Set B will always reach a decision—i.e. Set B may be complete.
- This approach should always result in a decision being reached, while also avoiding the possibility of inconsistent results being published.
- the approach described here may be applied to many types of distributed computing system that are configured to perform distributed processing tasks so as to attempt to find consensus about a decision or series of decisions, and not only to blockchain systems. Such decisions might be delegated to a subset of computing devices (i.e. nodes) of the system, or might be taken by the whole, or a fixed subset, of the community. In cases where a decision is not made by a subset of nodes, it can be advantageous to try another subset or the entire community.
- Some of the methods disclosed herein address the challenging of doing this cleanly, given that when decisions are made in decentralized systems (i.e. the timing of decisions) is not always apparent or obvious. It is important to note that decisions in the context of decentralized systems can be hard to arrive at definitively. There may be a point in time where the decision is made, becoming inevitable, but, because of communication delays and the asynchronous nature of decentralized systems, it may be that only one or a few of the nodes becomes aware of this at this particular point in time, and perhaps none at all. Individual nodes may become aware at different times, e.g. through either creating or seeing a certificate. It can be desirable that, in any circumstances where a decision is possible, a result (e.g.
- Any system running on a decentralized system that may have some misbehaving bad agents is bound to have complications when trying to understand it.
- Consensus machines are a mechanism for making such systems clear. Collections of agents can be created from which the desired program becomes emergent behaviour, tolerating the presence of bad agents.
- the formulation below is based on process algebra for understanding bodies of agents that run concurrently and interact by forms of synchronisation. In it, all the agents know the system description and the good agents do exactly what that requires of them.
- the synchronisations of this machine are certificates generated by the groups of nodes that are legitimately running, noting that we will ensure it impossible for any other to be started.
- a consensus machine represents the operating system and flow control of a decentralized systems.
- the program running on a consensus machine has a number of layers. At the top layer is a sequential program that proceeds in steps, which take the form of certificates of agreement to perform the step. These steps are significant to the whole community, for example the choice of the next block in a blockchain.
- Those delegated such a job might gather and agree a set of information, developing the data structures of the system.
- the group delegated this decision might proceed in small steps which are local to individual groups of delegates as discussed below. These still require certificates of agreement.
- This program can emerge from the synchronisations of the lower levels leading to eventual agreement on the big steps.
- the strategy for getting agreement on the next big step in this is the strategy for getting agreement on the next big step in this.
- a step starts a set of nodes will be operational — either inherited from the previous step, by initial conditions if this is the first step, or by construction of that step.
- the transition might come because the first group has the evidence that it will not be able to decide, and passes the token across itself.
- CSP communicating sequential processes
- a group of agents decides to hand over, there will be sufficient agreement to do so, excluding any other action.
- Handing over to a second group means that the first group has not made the big step decision and furthermore no member of the group can legitimately decide it has as that would be inconsistent with the decision that it cannot make one.
- asynchrony means that a second group of nodes which is more independent can grow impatient with a first and decide to take over from it independently from some node in the first making a decision which allows it to generate a certificate for a big step decision.
- Embodiments may here insist that if any group takes over — directly or otherwise — from one that is capable of taking a decision, then it comes to the same answer.
- At least some embodiments described here address this need for a way of H preventing G from further progress and for a way in which sufficient progress from G can prevent H from taking over, but while accepting a degree of a asynchrony. They do so by seeking to minimise the possibility of two decisions coming from G and H respectively, and to ensure that if this does happen then they represent the same decision. It may be impossible to avoid the following: G generates a certificate for a decision after H starts and so eventually reaches a decision itself. In this case, embodiments may ensure that the same decision is reached by both. H can take the form of a time-out. If an agent in H has not observed a decision by G by some time T then it will start its H program. The first action of H is to agree that it has started.
- Each action of G is augmented by the condition that H has not started. Whenever the original G takes a final decision, the augmented one does not, rather it moves to a pre-final state which can agree to take that decision subject to H not having started. Thus G cannot take this decision until a decisive majority have reached the pre-final state.
- H starts up its nodes seek to hear from G if they have reached the pre-final state, and treats this as input. If they have made a pre-decision D, H makes that decision. Note that in this state some node of G might also have created a certificate for D, so H following D avoids ambiguity. Similarly when H starts up it communicates this to G, which tests for the negation of this before progress is allowed.
- each agent writes to a slot that it maintains, unique to it.
- an agent looks at all these slots (i.e. across the whole of the group), returning a valid certificate value for the context if it finds one and null otherwise.
- a group of agents (who may or may not be ones involved in other ways) is selected. These are written to and read from. What is important is a single good one is both written to successfully and read from.
- CSP representations implement a two-stage decision-making in which a pre-decision (i.e. a partial result) is generated first. This commits the system to deciding on a particular decision value. If consensus is reached for this decision value, the system will then confirm it as the decision for the system (i.e. a final result).
- FDR Failures/Divergence Refinement
- the first CSP abstraction models two consensus machines: G (assumed safe but cannot relied on to terminate) and a back-up H, connected only by decentralized stores where writing introduces a nondeterministic phase.
- the second CSP abstraction represents a more-detailed distributed model that demonstrates how the emergent behaviour of G and H arises due to the actions of individual nodes within each group.
- verifier nodes are referred to as “pickets”.
- a unitary consensus machine One of the main problems in designing a blockchain is devising how to select a unique successor for a given block; the initial (often termed genesis) block is pre-agreed between agents and assumed to exist, however there may be more than one plausible candidate for any subsequent block.
- This problem is often solved by a protocol that determines whether a block is final in blockchain terminology.
- the finality of a block is determined by a universally known, though potentially randomly selected, committee of agents, which we call pickets, that engage in a protocol by which they reach a consensus on the successor of a given block.
- pickets that engage in a protocol by which they reach a consensus on the successor of a given block.
- We call such a system composed of interacting pickets that solves the problem of determining the finality of a block a consensus machine.
- blockchains are systems intended to cope with adversarial behaviour (coming from untrusted parties), these machines are designed to tolerate a certain proportion of malign agents. That is, the expected overall behaviour emerges from the interaction of pickets in spite of possible misbehaviour by malign agents amongst them.
- the notions described here can also be applied to the problem of reaching consensus for more general distributed systems. We first illustrate how a unitary consensus machine works, i.e., how a single set of pickets can interact to reach consensus. Later, we build on this illustration to propose our hierarchical consensus machine. The informal description that we provide here illustrates the mechanism used by the hierarchical protocol we propose later.
- P be a set of pickets
- D be a set of possible decision values that the pickets are trying to reach consensus on
- M the decision sets such that agreement by any set m ⁇ M commits the system to the agreed decision, where M is superset closed and contains P and P(S) gives the power set of S.
- the unitary consensus machine works as follows. For a given run of this machine P, M, and D are fixed and well-known. Each picket p ⁇ P locally decides on a single value vp ⁇ D and broadcasts this chosen value. We assume that pickets have well-known public keys as part of agreed cryptographic signature schemes so they can create unforgeable digitally signed messages.
- the set ⁇ ⁇ , ⁇ denotes the set of pickets that have chosen value v according to the messages received by observer o. If ⁇ ⁇ , ⁇ ⁇ M, observer o knows that the machine has decided on value v.
- observer o knows that the machine has decided on value v.
- the evidence for a decision will be an agreed and signed decision by sufficient agents for some m ⁇ M, no-one can dispute a properly formed one.
- the safety property forbids the machine from deciding on two distinct values (on the same run), whereas the liveness property ensures that the machine eventually decides on a value.
- the liveness property implicitly accounts for enough pickets agreeing on a given value but also for their decision being conveyed in a timely manner.
- malign agents can deviate from the expected picket behaviour arbitrarily. For instance, they could send as their chosen ⁇ ⁇ to observer ⁇ ⁇ while sending a distinct value ⁇ ⁇ to observer ⁇ ⁇ — this double choice is a common byzantine behaviour expected of such malign agents.
- the safety property depends on M considering the benign and malign agents in P.
- Non-participation Failing to make contributions that are expected of a good agent and thereby denying some correct action the majority it needs.
- the main issues with this is that it is harder to penalise because a good agent may encounter communication failures, a phenomenon that can also mean confusion about how an apparently non-participating agent should be interpreted.
- Gossiping assumptions may be made about communications in blockchains to resolve such confusion.
- the sorts of incentive structures implemented by blockchains are another important factor that guided the design of our hierarchical consensus machine. In particular, non- participation failures may cause the need to transfer control from one unitary consensus machine to another, in order to achieve overall liveness. Stochastic decisions
- the security analysis of blockchains is usually predicated upon some assumed distribution of malign agents.
- pickets are drawn from an agent population U where the probability that a randomly chosen agent is benign is p, and that they are selected independently and randomly from U so that the number of benign and malign pickets that make any decision set is governed by a binomial distribution, that is, ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ ⁇ (1 ⁇ ⁇ ) gives the probability of having k benign agents when selecting n agents from U.
- any sub-multiset m ⁇ P such that (1)
- k k/2 + 1 in (1), we have that
- ) ⁇ ⁇ , for some values of n (number of selected agents) and p (benignity probability) and where is fixed ⁇ 10 ⁇ 18 .
- the p values were chosen with the consensus bounds of > 2/3 in mind. This calculation is analogous to the one presented. Entries in the top left (denoted by ‘//’) are where even seeing all agents agreeing does not prove this, as it is deemed possible that all the agents are malign, namely, for these values of p, n, and ⁇ , there is no k such that F(p, k, n) ⁇ ⁇ .
- the main motivation for the hierarchical consensus machine idea introduced next is providing the required fallback mechanism. It allows us to initiate a decision on the assumption that (most of) the malign agents participate normally in the knowledge that the carefully-picked (safe) decision sets will prevent a bad decision from being made; the (live) fallback allows a decision to be forced even when malign agents do not participate.
- Formalising hierarchical consensus machines in CSP We have already described how a consensus machine proceeds when it consists of a single set of pickets synchronising in a rather abstract sense. We have also described how to pick decision sets so that one can achieve safety and liveness using a type of stochastic reasoning.
- > Q runs like P until it throws an exception in the set A, which causes it to run like Q.
- the interrupt operator P / ⁇ Q has P run, but if Q performs any visible action it takes over.
- the abstract model represents the behaviour of each machine G and H as a single CSP process. It abstractly depicts what is the expected emergent behaviour from their respective implementation each of which as an interactive distributed set of pickets.
- the main step of this abstraction is that the component consensus machines G and H are deemed to take an action only once there is agreement (in the sense we have already discussed) on the action.
- the distributed model demonstrates precisely how the emergent behaviour of each machine can be realised in terms of such a set of pickets.
- the abstract model describes how we expect the protocol to work in every implementation, but the way in which the sequential processes it contains are implemented by decentralised collections implemented by G and H are not laid down.
- the distributed model illustrates one way of realising this.
- the protocol we present here has much in common with mutual exclusion. We want to prevent something akin to a race condition. An obvious question is whether we could use a simple mutex between G and H and only allow one to make the decision. The answer is no: it is part of the make-up of G that it can deadlock at any time.
- H If at any point it detects that H has started, it stops by choice. After a timeout has elapsed, H starts. It initially checks whether G has come to a decision already. If so, it reaffirms that decision. Otherwise, it signals it has started its decision making process by writing a started signal value on its first storage location. If no value has been committed to by G at that point, H proceeds to make its own decision. Otherwise, again, it just echoes G’s decision.
- Machines G and H rely on storage locations to communicate and convey (pre-) decisions. The datatype values denotes the possible values stored in these locations: D1 and D2 are (pre-)decisions whereas quiet, start and null denote machine statuses. Locations are identified by elements in location.
- Locations 1 and 3 are controlled (i.e. written) by machine G whereas 2 and 4 are controlled by machine H.
- Channels read, write1 and write2 are used to manage locations whereas stepG, stepH, and timeoutstep denote internal actions of these machines.
- channel decision is used to communicate (pre-)decisions made by them.
- datatype values quiet
- null locations ⁇ 1..4 ⁇
- the storage locations are defined by the following two processes. Writing to and reading from these locations are not atomic events.
- the machine G’s behaviour is defined by the following CSP processes, with initial state given by G.
- G0 it reads the status of machine H via location 2. If H has started already, it stops. Otherwise, if H is quiet, as process G1, it signals a pre- decision on value D1 by writing it to Location 1. If H is still quiet at that point, it consolidates this pre-decision with event write2.1.
- process G2 it reads the status of H for the last time, before issuing a final decision on D1 as process G3. Note that the parallel combination of G0 and CHAOS in G captures G’s incompleteness by allowing it to deadlock at any point.
- G0 (read.2.quiet -> stepG -> G1 [] read.2.started -> STOP)
- G1 write1.1.D1 -> (read.2.quiet -> write2.1 -> stepG -> G2 [] read.2.started -> STOP)
- G2 read.2.started -> STOP [] read.2.quiet -> stepG -> G3
- G3 decision.1.D1 -> write1.3.D1 -> write2.3 -> STOP
- G G0 [
- the machine H’s behaviour is defined by the following CSP processes, with initial state given by H. As H, it reads whether machine G has come to a decision by reading Location 3.
- H1 If it detect a decision, it re-asserts this decision by writing D1 to Location 4. Otherwise, it interprets that a timeout has occurred and it moves on to make its own decision.
- H1 it signals that it has started its decision making process by writing started to Location 2.
- H2 it checks whether machine G has started at all. If it has, H re-asserts the pre-decision made by G — i.e., by writing D1 to Location 4. Otherwise, it proceed by making its own decision by writing D2 instead. Both of these decisions are captured by process H3.
- the hierarchical consensus machine behaviour is given by System. Note how machines H and G are interleaved in Machine and they rely on storage locations in Locations to interact as we discussed.
- Second CSP Model – A Distributed Model The abstract model is useful from an analysis perspective: one can examine the handover protocol itself while not needing to examine implementation of each machine as a collection of interactive agents and issues arising from such an implementation. Instead, issues with the handover protocol itself can be identified and fixed. We can then argue either that a given approach to building the individual machines G and H will meet this model by construction, or test it by building a more detailed, distributed model in CSP for FDR.
- each machine is a distributed system implementing a protocol that attempts to reach consensus in the presence of Byzantine agents.
- our hierarchical machine works as follows.
- Machine G starts and tries to come to a decision on a unified value. After some appropriate amount of time — enough to allow G to come to a decision if agents can agree on a value — machine H starts. It checks whether machine G has committed to a value, i.e., it has pre-decided on it but might not have gathered enough evidence to properly decide on it. If so, machine H decides on that value. Otherwise, the agents in H are free to choose a value of their own. Like the abstract model, these machines communicate local decisions via storage locations.
- VALUES gives the universe of decision values
- NODES are the agent identifiers.
- N(m) gives its number of agents
- MNODES(m) are its agent identifiers
- THRESHOLD(m) gives the level of agreement (i.e. how many agents) that is required for reaching consensus
- G(m) gives the number of good agents, with GOOD(m) and BAD(m) identifying the good and malign agents in the machines, respectively.
- this agent is proposing this value as a proposed decision for the whole machine), while the event prewrite.m.n.mm.nn.v is used to communicate to agent nn in machine mm that agent n in machine m has pre- decided on (i.e. is proposing) value v.
- the event setup_write.m.n.v is used to signal that agent n in machine m has decided on value v, while the event write.m.n.mm.nn.v is used to communicate to agent nn in machine mm that agent n in machine m has decided on value v.
- the event decision.m.v is used to signal that machine m has decided on value v, whereas decide.m.n.v conveys that agent n in machine m has (locally) decided on value v.
- the event timeout.m.n.mm.nn denotes that agent nn in machine mm timed out when trying to read the decision from agent n in machine m.
- the event end_round is a modelling device used to signal that machine G has had enough time to come to a decision and that machine H is now taking over.
- EmptyPreWriteLocation(n,m) setup_prewrite.m.n?v -> FullPreWriteLocation(n,m,v)
- FullPreWriteLocation(n,m,v) prewrite.m.n?mm?a:MNODES(mm)!v -> FullPreWriteLocation(n,m,v)
- the process EmptyPreWriteLocation(n,m) is a storage location that stores the pre- decision of agent n in machine m; each agent has such a location that it controls. It is a single-write multiple-reads one-place buffer.
- the process EmptyWriteLocation is also a storage location that behaves similarly to the previous one. It stores decisions instead of pre-decisions.
- the control behaviour of agent n in machine G is given by process GNode(n).
- GGoodNode(n) (GNode(n) [
- GGoodNode A benign agent in machine G is a parallel process — given by process GGoodNode — that combines its storage locations and its control behaviour.
- GoodAlpha(n,m) Union( ⁇
- the initial end_round event and the requirements that we impose on the way in which agents synchronise on this event means that the agents of machine H only start after the agents of machine G have finished with their decision making interactions.
- This behaviour captures the assumption that agents have a reasonably synchronised clock and that they can come to a decision within a bounded time frame.
- the agent s control behaviour in machine H is given by Reader. This process reads the local decisions made by agents in G. If one of them has decided on a given value — which means that machine G has committed to that value — we require that the agent in H decide on the same value. This behaviour ensures that if both machines come to a decision, they must agree on their decided value.
- HGoodNode(n) (HNode(n) [
- HGoodNode(n) Similar to benign agents in G, a benign agent in H is a parallel combination of its control behaviour and storage locations as per process HGoodNode.
- BadNode(n,m,c0,c1,c2) timeout.m.n?mm?a:GOOD(mm) -> BadNode(n,m,c0,c1,c2) [] (STOP
- BadAlpha(n,m) ⁇
- the alphabet of malign agent n in machine m is given by BadAlpha(n,m).
- AlphaBadNodes(m) Union( ⁇ BadAlpha(i,m)
- BadNodes(m)
- AlphaGoodNodes(m) Union( ⁇ GoodAlpha(i,m)
- GGoodNodes
- GNodes GGoodNodes [ AlphaGoodNodes(g)
- BadNodes(g) HGoodNodes
- i : GOOD(h) @ [GoodAlpha(i,h)] HGoodNode(i) HNodes HGoodNodes [ AlphaGoodNodes(h)
- the Decider process is in charge of those. This centralised process collects local decisions made by the agents of a machine, offering a machine-level decision as soon as enough local decisions are gathered. This process is an abstraction that is useful for conciseness in specifying the behaviour of the machines but also for the sake of tractability. In a practical implementation of this protocol, each agent would implement the behaviour of the Decider process.
- Process System runs machines G and H with their respective Decider processes.
- System Nodes [
- Safety may be ensured by setting a threshold that requires the participation of more than half of the benign nodes, namely, for machine m, THRESHOLD(m) ⁇ GOOD(m)/2 + BAD(m) + 1, where GOOD(m)/2 is truncated integer division — we require the number of agents in each machine to be at least 2. If this threshold is set, the machine cannot decide on two different values on the same run of the protocol. Assume that agents in G supported two values, say 0 and 1, then there must be THRESHOLD(g) many agents supporting either. That implies the existence of a benign agent that has supported two values, a possibility that our protocol does not allow; a contradiction. The same reasoning holds for H’s independent decision.
- H must decide on G’s committed values, if one exists, ensures that if they both come to a decision, their value must match.
- G can only commit to one value, by the same counting argument as before, H must decide on the same value as G.
- Another assumption is required to ensure liveness. We expect H to come up with a decision if G fails to do so, but the agents in H may disagree on a decision value in the case they are left to independently select it.
- agents may be configured to iterate if they fail to agree on a value within G or H until they eventually converge to a sufficiently agreed choice. They may achieve this in any of various way, e.g. involving coordinating input data and computing deterministically.
- N 3f+1 where N is the number of agents amongst whom f are malign.
- AlphaConvergence ⁇
- CSystem System [
- Process DSystem captures a projection of CSystem’s behaviour onto decision events.
- FDR FDR
- machine G only needs to be safe, it can rely on there being as few as a single benign agent, whereas machine H, which should be safe and live, is required to have > 2/3 benign agents.
- machine H which should be safe and live, is required to have > 2/3 benign agents.
- the number of agents that need to be selected to get a sample including at least one benign agent should be, in general, much smaller than the number needed for a sample including > 2/3 benign agents. Therefore, the number of agents required to implement G should be, in general, much smaller than the agents required to implement H. This fact supports our claim that G should be faster at coming to a decision when compared to H, given the smaller number of agents that are required to interact.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Hardware Redundancy (AREA)
Abstract
Description
Claims
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP24716453.6A EP4732141A1 (en) | 2023-06-23 | 2024-03-26 | Performing tasks in distributed computer systems |
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| GB2309516.9 | 2023-06-23 | ||
| GBGB2309516.9A GB202309516D0 (en) | 2023-06-23 | 2023-06-23 | Performing tasks in distributed computer systems |
| GB2403572.7A GB2625227B (en) | 2023-06-23 | 2024-03-12 | Performing tasks in distributed computer systems |
| GB2403572.7 | 2024-03-12 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024261447A1 true WO2024261447A1 (en) | 2024-12-26 |
Family
ID=90718469
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/GB2024/050806 Ceased WO2024261447A1 (en) | 2023-06-23 | 2024-03-26 | Performing tasks in distributed computer systems |
Country Status (2)
| Country | Link |
|---|---|
| EP (1) | EP4732141A1 (en) |
| WO (1) | WO2024261447A1 (en) |
-
2024
- 2024-03-26 WO PCT/GB2024/050806 patent/WO2024261447A1/en not_active Ceased
- 2024-03-26 EP EP24716453.6A patent/EP4732141A1/en active Pending
Non-Patent Citations (3)
| Title |
|---|
| ANONYMOUS: "2023 Conference Agenda - The Blockhouse Technology Ltd Conference", 28 March 2023 (2023-03-28), pages 1 - 4, XP093160678, Retrieved from the Internet <URL:https://conference.tbtl.com/2023-agenda/> [retrieved on 20240508] * |
| WILLIAM ANDREW ROSCOE: "TBTL Blockchain Implementation and Verification TBTL Blockchain Team", 30 March 2023 (2023-03-30), pages 1 - 21, XP093160682, Retrieved from the Internet <URL:https://conference.tbtl.com/wp-content/uploads/2024/01/Jonathan-and-Pedro-Presentation-Update.pdf> [retrieved on 20240508] * |
| WILLIAM ET AL: "Reinventing the blockchain", 1 June 2023 (2023-06-01), pages 1 - 22, XP093160395, Retrieved from the Internet <URL:https://tbtl.com/wp-content/uploads/2023/06/Bill-Roscoe-Reinventing-the-Blockchain.pdf> [retrieved on 20240508] * |
Also Published As
| Publication number | Publication date |
|---|---|
| EP4732141A1 (en) | 2026-04-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Baudet et al. | State machine replication in the libra blockchain | |
| Carrara et al. | Consistency, availability, and partition tolerance in blockchain: a survey on the consensus mechanism over peer-to-peer networking | |
| Saito et al. | What’s so different about blockchain?—blockchain is a probabilistic state machine | |
| Abraham et al. | Asymptotically optimal validated asynchronous byzantine agreement | |
| Mazieres | The stellar consensus protocol: A federated model for internet-level consensus | |
| De Prisco et al. | Revisiting the Paxos algorithm | |
| CN113568972B (en) | A hybrid consensus implementation device and implementation method for graph-based blockchain | |
| Bano et al. | State machine replication in the Libra Blockchain | |
| Li et al. | Quorum subsumption for heterogeneous quorum systems | |
| Vander Vos et al. | BlueBottle: Fast and robust blockchains through subsystem specialization | |
| EP4732141A1 (en) | Performing tasks in distributed computer systems | |
| GB2625227A (en) | Performing tasks in distributed computer systems | |
| Sun et al. | Mosaic-a blockchain consensus algorithm based on random number generation | |
| Roscoe et al. | Abstracting and verifying decentralised systems in CSP | |
| Roscoe et al. | The consensus machine: formalising consensus in the presence of malign agents | |
| Koutanov | Spire: A cooperative, phase-symmetric solution to distributed consensus | |
| KR20250162559A (en) | Improving Liveness in Consensus Protocols | |
| Adhikari et al. | Transaction processing in blockchain sharding: Current trends and future research directions | |
| Arun et al. | Taming the contention in consensus-based distributed systems | |
| Tanwar | Distributed Consensus for Permissioned Blockchain | |
| Guerraoui et al. | Blockchain protocols: the adversary is in the details | |
| Conchon et al. | Formally documenting tenderbake | |
| Storm | Fault tolerance in distributed computing | |
| Yandamuri et al. | Low-Latency Dynamically Available Total Order Broadcast | |
| Vos et al. | BlueBottle: Fast and Robust Blockchains through Subsystem Specialization |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24716453 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2024716453 Country of ref document: EP |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2024716453 Country of ref document: EP Effective date: 20260123 |
|
| ENP | Entry into the national phase |
Ref document number: 2024716453 Country of ref document: EP Effective date: 20260123 |
|
| ENP | Entry into the national phase |
Ref document number: 2024716453 Country of ref document: EP Effective date: 20260123 |
|
| WWP | Wipo information: published in national office |
Ref document number: 2024716453 Country of ref document: EP |
