Manuscript Offprint
arXiv:2609.05580Sharpedo: Dual-Mode Uncertified DAG-Based Consensus Protocol
UCL
Information Security MSc
Philipp Jovanovic
Alberto Sonnino
Submission date: 15 September 2025
Disclaimer: This report is submitted as part requirement for the Information Security MSc at UCL. It is substantially the result of my own work except where explicitly indicated in the text. The report may be freely copied and distributed provided the source is explicitly acknowledged
Acknowledgements
I would like to acknowledge both Philipp Jovanovic and Alberto Sonnino for their continued support throughout the making of this scientific report. I am particularly grateful for their help in guiding me to research such an interesting topic. Lastly, I would like to thank my peers for helping me throughout the academic year.
Abstract
The increasing adoption of decentralized systems, in particular blockchain technology, has spurred research efforts in such distributed architecture field. Notably, consensus protocols have become a focal point of study for researches, with the goal of creating a protocol that would be both secure and performant. Consensus protocols have undergone a number of changes in recent years, going from classical linear-based consensus protocols to the most recent, highly performant, Directed Acyclic Graph based consensus protocols. In particular, the Mysticeti and Mahi-Mahi protocols both represent leading approaches to consensus protocols, leveraging a novel uncertified Directed Acyclic Graph data structure to achieve substantial performance benefits compared to prior work[36, 38]. Mysticeti and Mahi-Mahi differ in their underlying network assumptions, where the former makes assumptions about timing bounds for communication while the latter does not. Mysticeti trades robustness for lower levels of latency in ideal conditions, whereas Mahi-Mahi favours increased latency in order to ensure stronger progress guarantees in asynchronous settings. Although dual-mode protocols exist (i.e., protocols that can adapt do different network assumptions), none have been implemented to take full advantage of the novel data structure seen in the aforementioned protocols. Thus, our research project aims to trace the progression of consensus protocols, analyse how they address network assumptions constraints, and explore dual-mode protocols. Then, we present Sharpedo, the first dual-mode uncertified Directed Acyclic Graph consensus protocols which aims to achieve the best of both worlds: the high-performance of partially-synchronous protocols, while providing guarantees of progress even in asynchronous settings. Furthermore, Sharpedo integrates a novel dynamic scheduling mechanism resulting in improved system efficiency and performance optimization. We conclude by providing formal proofs of safety and liveness for Sharpedo, ensuring the correctness of the protocol.
Contents
1 Introduction 2
1.1 Research Objectives 3
1.2 Contribution 4
1.3 General Overview 4
2 Literature Review 5
2.1 Consensus Protocols 5
2.1.1 Problem Specification 6
2.2 Network Models 6
2.3 Threat Models 9
2.4 Linear-chain Consensus Protocols 10
2.4.1 Hotstuff 11
2.4.2 Validated Asynchronous Byzantine Agreement (VABA) 11
2.4.3 Ditto 12
2.5 DAG-Based Consensus Protocols 13
2.5.1 DAG-Rider & Tusk 14
2.5.2 BullShark 15
2.6 Uncertified DAG-Based Consensus Protocol 16
2.6.1 Cordial Miners 17
2.6.2 Mysticeti 17
2.6.3 Mahi-Mahi 18
3 The Sharpedo Protocol 19
3.1 System Design and Core Assumptions 19
3.2 Structure of the Dual-Mode Protocol DAG 20
3.2.1 Block Creation 20
3.2.2 Round and Wave 21
3.2.3 DAG Patterns 22
3.2.4 Liveness 23
3.2.5 Equivocation Tolerance 23
3.3 The Sharpedo Consensus Protocol 24
3.3.1 Proposer Slot and Leader Selection 24
3.3.2 Decision Rules ..... 25
3.3.3 Sequence ..... 27
3.4 Dual-Mode ..... 27
3.4.1 Dynamic Scheduling ..... 29
3.4.2 Sequence (Extended) ..... 30
4 Implementation ..... 31
4.1 Decision Rule ..... 31
4.1.1 Universal Committer ..... 32
4.1.2 Base Committer ..... 32
4.2 Dual-Mode Scheduler ..... 33
4.2.1 Collect Subdag Function ..... 34
4.2.2 Count Direct Commits Function ..... 35
4.3 Sequence Cutoff ..... 35
4.4 Tests ..... 36
4.4.1 Decision Rule ..... 37
4.4.2 Dual-Mode Scheduler ..... 37
4.5 Simulations ..... 38
5 Dual-Mode Protocol Security ..... 41
5.1 Total Order and Integrity Proofs ..... 42
5.2 Validity and Agreement Proofs ..... 47
6 Conclusion ..... 50
6.1 Further Work ..... 50
A Code Structure ..... 57
A.1 Implementation ..... 57
A.1.1 Decision Rule ..... 57
A.1.2 Dual-Mode Scheduler ..... 59
A.2 Tests ..... 70
A.2.1 Decision Rule ..... 70
A.2.2 Dual-Mode Scheduler ..... 73
A.3 Simulations ..... 74
B Consensus Protocol Structures ..... 76
C Sharpedo Additional Figures ..... 79
D Algorithms ..... 83
E Research Assistance Methods ..... 90
Chapter 1
Introduction
The increase in popularity with blockchains and decentralised systems has lead researchers to increasingly dedicate their resources to address the technological challenges and limitations inherent in these systems, working to enhance scalability, security, and efficiency. Specifically, consensus protocols (i.e., protocols that allow a network of computers to come to an agreement on a common value) have become the centre of many research efforts. Consensus protocols, often, represent the bottleneck of blockchains, and distributed systems in general. There are two main metrics which determine the capabilities of a distributed system's latency and throughput. In the context of blockchains, we may have a user A that decides to create transaction to the system, which states that they are passing ownership of some value to another user B. The latency between submission of till its finalisation (i.e., until consensus has been reached on ), is dictated, in part, by the system's underlying consensus protocol. Moreover, the amount of transactions that a system can handle, typically measured in tx/s, is also bottle-capped by the consensus protocol. Underlying blockchains of famous distributed systems, such as Bitcoin and Ethereum, utilise a linear blockchain [19, 26], where a block holds a number of transactions. Meaning that a block is connected to the previously added block, creating a sequential list of blocks (i.e., a block chain). This structure, however, creates an inverse relationship between the two metrics discussed. For instance, decreasing the amount of transactions a block can hold decreases its latency, but, in turn, it also decreases the tx/s (throughput). Furthermore, increasing participants of a consensus protocols does not improve either throughput or latency, as the blockchain remains linear, thus, only one block can be added per consensus. Recent blockchains have begun to adopt Directed Acyclic Graph (DAG) consensus protocols, which have been a breakthrough in terms of amount of transactions processed per second (throughput) and safety against faults [32]. Instead of creating a sequence of blocks, DAG-based consensus protocols create a graph of blocks, which, after consensus, can be linearised. Throughput increases naturally, as each participant of consensus can propose their own block. However, these protocols retained a relatively high time-delay from the submission of a transaction to the finalisation of that same transaction, as each block requires a number of communication-delays between participants before it can be inserted into the DAG [32, 31, 25]. This fact motivated the design of uncertified DAG-based consensus protocols: protocols that achieved higher-throughput of "certified" DAG-based consensus protocols, while reaching lower levels of latency [36, 38]. These types of protocols take full advantage of the DAG structure to reach consensus, discarding the need of any additional communication between participants. Due to their novelty, uncertified DAG-based consensus protocols present numerous research opportunities. Specifically, since consensus protocols are not only classified by their underlying data structure, but also by the different assumptions they make about their working environment, there is currently a lack of uncertified DAG-based consensus protocols that take advantage of more flexible assumptions.
1.1 Research Objectives
The design of consensus protocols requires assumptions to be made on the type of environment they should be made to operate. Beyond a threat model (i.e., what a malicious actor can do to disrupt the system), consensus protocols must also determine which network condition they can work in. These assumptions often force protocols to make sacrifices either in performance (such as latency) to provide more robust security, or in security to increase performance. However, there exist protocols that aim to combine network assumptions to achieve the best of both worlds, called dual-mode consensus protocols. Given the rapid evolution of this field, the uncertified data structure employed in current state-of-the-art protocols that achieve optimal performance today lacks dual-mode equivalents. Therefore, the objective of this research is to build a consensus protocol that can adapt to different network settings, by combining the two state-of-the-art uncertified DAG-based consensus protocols, Mysticeti and Mahi-Mahi, to create the first dual-mode uncertified DAG-based consensus protocol [36, 38].
1.2 Contribution
This research project aims to fill the gap in current literature by providing the following contributions:
• We present Sharpedo, the first dual-mode uncertified DAG-based consensus protocol, providing the best of both worlds: the low latency of partially-synchronous consensus protocols, combined with the added resilience intrinsic to asynchronous consensus protocols.
• We incorporate a dynamically changing scheduling system for Sharpedo's dual-mode component, which will improve latency in periods of synchrony and asynchrony, accordingly.
• We provide detailed algorithms and implementations, alongside extensive testing proving the functionality of Sharpedo.
• We provide formal proofs that demonstrate the safety and liveness under byzantine assumptions for Sharpedo and our dynamic dual-mode schedule.
1.3 General Overview
• Chapter 2: We present an overview of consensus protocols, how they handle different restrictions, and how newer types of consensus protocols present clear opportunities for advancement.
• Chapter 3: This chapter introduces Sharpedo, the solution to our problem statement.
• Chapter 4: This chapter further extends Sharpedo, giving an overview of the practical implementations, alongside results obtained from the simulations.
• Chapter 5: We finish our presentation of Sharpedo by providing formal proofs for the protocol, ensuring its correctness.
• Chapter 6: Lastly, we provide a conclusion to our project, alongside how the project can be advanced further.
Chapter 2
Literature Review
2.1 Consensus Protocols
Distributed systems are a collection of computers, commonly mentioned as nodes, who communicate with each other over a network, acting as one system to achieve a goal. The consensus problem is defined as the requirement for all nodes in a system to agree on a value [2, 15]. A consensus protocol aims to solve the consensus problem which is required to achieve State Machine Replication (SMR) [10]. This means that a machine that begins in the same state as another machine, given the same set of inputs in the same order, will give the same output. To achieve SMR, all the computers in the system must agree (i.e. reach consensus) on what inputs and in what order they should be processed. Consensus protocols are the core which resides in distributed networks allowing for SMR to happen [5]. They represent the protocols that are utilised to make sure that all participants of a network are able to achieve consensus on decisions, thus enabling the progress of the system. Consensus protocols aim to solve the fundamental issue of agreement in distributed systems. To be more specific, consensus protocols must satisfy the following properties:
-
Safety: Safety means that "bad things will never happen". It is important to note that safety can never be violated, or else the entire system may enter an undesirable state (e.g., two different computers in a distributed system could have a different view of the system).
-
Liveness: Liveness means that "good things will, eventually, happen". Similarly to safety, an important factor of liveness is that progress will eventually be achieved. It is possible that during asynchronous periods, messages may take longer to reach other computers part of the distributed system, but, eventually (i.e., when the messages reach the other computers), progress will be achieved.
2.1.1 Problem Specification
Reliable broadcast is a distributed systems primitive that guarantees the following: once an honest process broadcasts a message, all other honest processes will eventually receive the message [8]. However, the reliable broadcast abstraction is not enough for distributed systems, as, given by their communicative nature, the ordering of messages is just as important. Atomic broadcast, is an abstraction that extends reliable broadcast by also guaranteeing messages will be received by other participants in the same order [11]. Atomic broadcast is equivalent to the consensus problem, as participants of a system that solve atomic broadcast must agree on the order of messages, thus, consensus can be reduced to atomic broadcast [20]. If a protocol solves atomic broadcast, they solve consensus, thus, sequentially, SMR can be achieved [10]. Assuming that each process has the capability to broadcast messages to all other processes and to deliver messages that have been broadcast by any process in the system, a protocol that implements atomic broadcast guarantees the following properties [18]:
• Integrity: For any message m, every process will, at most, deliver m once, and only if m has been broadcast by a process.
• Validity: If process broadcasts a message m, then every process will eventually deliver m.
• Agreement: If a process delivers m, then all other processes eventually deliver m.
• Total Order: If a process delivers a message before another message , then no other process delivers before .
Thus, the common aim of consensus protocols is to solve atomic broadcast [31, 32, 36, 38]. This means consensus protocols must achieve the aforementioned properties to solve atomic broadcast. Together, when a protocol satisfies atomic broadcast, it also achieves the safety and liveness properties. While atomic broadcast is easy to achieve in ideal settings, the challenge lies in solving the problem under various network and threat models.
2.2 Network Models
Given the nature of distributed systems, communication uncertainty is modelled after the amount of power an adversary may have on delaying messages [7]. Therefore, consensus protocols are built with three network models in mind.
Synchronous Model The synchronous model makes the assumption that there exists an upper bound, usually defined as , on the delivery of messages. The bound can be set to any value, but once chosen, the system must adhere to this assumption throughout its operation [7]. There are advantages and disadvantages to such approach. If the synchronous assumptions hold, then they become easier to reason with. However, synchronous assumptions require precise timing assumptions because if is set too high, then timeouts can potentially slow down the system, and if is set too low, then, depending on network conditions, it will be hard to achieve progress. Lastly, there is also the possibility of a scenario where a validator sends a message to two distinct validators, and one may receive the message within and another may receive the message after . This can break the safety aspect of the model.
Asynchronous Model Compared to the synchronous model, the asynchronous network model does not make any assumptions on the timing of messages. Instead, we assume that, eventually, messages sent out by honest participants are guaranteed to be received by other honest participants. A clear advantage of such approach is that we completely discard the need of calculating an upper bound assumption. Furthermore, in periods of asynchrony, the system is guaranteed to make progress. However, as defined by the impossibility result of Fischer, Lynch, and Paterson (FLP) [6], it is impossible for a deterministic consensus protocol to reach consensus in the presence of even one faulty validator. If a node in a system is faulty, or is Byzantine, and it stops communicating with the remainder of the participants, then we are at risk of breaking either safety or liveness properties. Due to the asynchronous assumptions, we cannot utilise timeouts to "skip/ignore" malicious/faulty nodes. Imagine a scenario where a node is experiencing high levels of asynchrony, and it takes a long time for them to receive and send a message. We have made the assumption that the message sent, if the node is honest, will eventually be received, thus, skipping such node would break such assumptions. So, in an asynchronous consensus protocol, if a node is non-responsive, skipping the node could risk violating the safety properties of the protocol, but if we wait for a response, we risk never making progress again, breaking the liveness properties.
Therefore, all protocols built upon asynchronous assumptions utilise some form of randomness in their consensus processes, as it has been proven that randomness can circumvent the results reached by FLP [6, 9, 4]. This results from the fact that asynchronous consensus protocols, rather than guaranteeing termination, achieve termination with probability of 1. A popular method utilised in asynchronous consensus protocols requires the selection of leaders to be randomised (further defined in Section 3.3.1). Each round of consensus selects a leader randomly from all participants, and there is a probability of electing an honest leader. In such protocols, the choice of leader is often done retroactively: once enough participants propose a message at the end of the round (usually ), a random leader is elected amongst all proposers. If the selected leader's proposal satisfies the protocol conditions, consensus is achieved. However, if the selected leader's proposal is invalid, incomplete, or if the leader fails to propose entirely, the protocol moves to the next round without progress. After enough rounds, the probability of making progress approaches 1, ensuring liveness.
Partially-Synchronous Model Similarly to the synchronous model, partially-synchronous models make the assumptions that messages will be delivered within time bound , however, they differ in that they require certain assumptions to be satisfied. This assumption is called the Global Stabilisation Time (GST), and it is a theoretical concept that represents a point in time where network conditions are ideal. Intuitively, this means that after GST has been reached (i.e., after the network conditions have stabilised), then messages will be received within the time bound . Similarly to synchronous network assumptions, these assumptions are easier to reason with, and allow for the utilisation of timeouts (often described as ) to guarantee liveness to the system. The work by Dwork, Lynch and Stockmeyer (DLS) has been seminal for the creation of these "in-between" assumptions [7]. As proven by DLS, while liveness is guaranteed only after GST has been reached, safety is always guaranteed in both periods of synchrony and asynchrony.
Consensus protocols are built with these assumptions in mind, thus each protocol will specify which assumption the protocol is built to endure. However, there also exist dual-mode protocols, which, as the name suggest, are protocols that can run under multiple network assumptions. These protocols, usually, utilise some mechanism to determine the condition of the network to dynamically switch mode [37, 32]. Under ideal conditions, the protocol may run under synchronous assumptions, allowing for faster consensus (thus lower latency). However, if network conditions deteriorate, the protocol may decide to change to an asynchronous consensus protocol capable of making progress, albeit slower, under asynchronous conditions. As stated by many researches, these protocols, although providing the best of both worlds; are usually more complex, as they need to handle multiple distinct consensus protocols [38, 36]. However, as we will see in Section 3, we address these complexities by providing a simplified approach to dual-mode mechanisms.
2.3 Threat Models
Threat models represent a structured way to model possible threats that may target some systems. Given the unpracticality of protecting a system against all threats that one may think of, models have been created to simplify the process of protection against malicious entities.
Crash Fault Tolerance A system deemed to be crash fault tolerant (CFT) is a system that is capable of handling a fixed amount of crash/faulty nodes in its system, where a faulty node stops communicating with the system [2]. CFT protocols have a bound of nodes in the system, where f represents the number of faulty nodes in the system. If all f nodes are faulty, then there still exists (a majority of nodes, > 50%, in the protocol that are able to reach consensus). Centralised protocols, such as Paxos [12] and Raft [22], run under CFT assumptions. Since these protocols are centralised, the main cause of concern is of nodes to crash during consensus, thus, CFT assumptions are enough to secure the system. However, decentralised systems introduce the risk of possible malicious participants during consensus, thus, such protocols must operate under stricter assumptions.
Byzantine Fault Tolerance Similarly to CFT assumptions, Byzantine fault tolerant (BFT) protocols are capable of running under the presence of both faulty and malicious (also known as Byzantine) participants. More specifically, BFT protocols aim to solve the Byzantine agreement problem, a problem closely related to the consensus problem; however, it differs by the fact that processes must agree on a value in the presence of Byzantine processes [15]. Compared to CFT assumptions, BFT systems have a bound of total participants, where f represents the number of faulty/Byzantine nodes [3]. The bound of required participants increases due to the fact that Byzantine nodes, besides not communicating with the rest of the system, can also lie (sending false messages to participants) and equivocate (sending conflicting messages to different participants). Thus, a BFT system with nodes ensures that even if f participants are malicious, the remaining honest participants can still outvote them. Furthermore, quorums are required to be of size , ensuring that any two different quorums will overlap with at least participants, and, since at most f participants are faulty, both quorums will reach the same conclusion given the one honest participant. This is also known as quorum intersection, and is going to be relevant in the protocols that we will be analysing throughout this research paper. When dealing with Byzantine threats, we also have to strengthen our definition of atomic broadcast. As such, all BFT consensus protocols try to solve Byzantine Atomic Broadcast (BAB), which, compared to atomic broadcast, makes stronger assumptions that require all participants to be honest [11]. Both network models and threat models are assumptions critical to the development of consensus protocols. However, beyond these assumptions, the construction of the underlying blockchain data-structure itself is equally important.
2.4 Linear-chain Consensus Protocols
In this section, we will show a brief overview of traditional linear-chain consensus protocols. The linear-chain aspect of consensus protocols refers to the underlying data structure that a distributed ledger can be based on. Each chain begins with a genesis block, and future blocks get added onto each other (each block referencing a previous block), thus creating a "chain" of blocks. But how do blocks get proposed and added to the chain? We have popular chains, such as Bitcoin's, where blocks can be added by any individuals who are part of the network, and via the longest chain rule, the chain is created [19]. The longest chain rule dictates that honest nodes will always work on the longest chain they have available. However, such protocols only offer probabilistic finality, since a new longest chain could potentially exclude transactions that were accepted in a previous chain. Therefore, many other blockchains decided to utilise a form of blockchain that instead utilizes a committee to decide on the next block, ensuring the existence of a singular chain. Leader-based consensus protocols are consensus protocols that leverage the idea of a quorum. In such protocols, in every view (i.e., a point in time where a specific process is responsible for progressing the chain) a leader is elected (e.g., for example, via the amount of stakes that the participants have staked), and said leader proposes a block. Then, the remainder of the participants will vote on said blocks to determine whether it will be used to extend the block chain, as exemplified in Figure 2.1.

Figure 2.1: Illustration of a linear-chain blockchain, where each block B is proposed by a leader L. A blockchain always begins with a hardcoded genesis block, denoted as G.
These protocols require what is known as a quorum, which represents the minimum amount (i.e., ) of participants that "accept" a block to add it safely to the block chain. Practical Byzantine Fault Tolerant (PBFT) is a seminal protocol which demonstrates that it is possible to achieve consensus in a decentralised system [13]. PBFT works as follows: once process p receives message m from a client, the protocol begins with a request to other processes (pre-prepare). Then, the processes verify the request content and form a quorum certificate (prepare). Finally, they commit to executing the operation, which they will then reply to the client [13]. PBFT represents the first instance of a practical implementation of a BFT consensus protocol, however, its implementation requires a message complexity of , as all processes must communicate with one another to achieve consensus. Figure B.1, provided in Appendix B, presents a visualization of the PBFT protocol.
2.4.1 Hotstuff
Hotstuff, a linear-chain consensus protocol designed by Yin et al. [25], is a protocol that addresses the shortcomings of PBFT [13]. Hotstuff improves on the original PBFT protocol by utilising a leader-centric communication pattern, achieving a linear message complexity (as shown by Figure B.2, presented in Appendix B). Furthermore, the protocol itself runs under partially-synchronous assumptions, thus it can leverage timeouts to ensure liveness. If a leader fails to create a quorum certificate before time is reached, a view-change process is called. All participants of the system communicate with one another to move onto the next view, and change the elected leader. This ensures that a malicious leader cannot stall the system forever (which would cause the protocol to lose liveness). However, liveness is lost during periods of asynchrony as messages can be consistently delayed for longer than . Therefore, the system will be unable to reach consensus, and the view-change process will be called continuously.
2.4.2 Validated Asynchronous Byzantine Agreement (VABA)
As we have mentioned, asynchronous protocols cannot utilise timeouts due to the different assumptions made, thus, to circumvent the FLP impossibility result, such protocols must rely on a form of randomness to achieve liveness. Abraham et al. [27] propose a solution to VABA by creating a Multi-world VABA approach [29]. This Multi-world VABA approach combines two primitives to circumvent the FLP impossibility result [6]:
• A randomness beacon, often called a common coin or a global perfect coin [38].
Each process holds a beacon share that, when combined with enough other beacon shares (usually ), reveals the beacon value.
• Multi-World Instances: Running n instances of a view-based validated Byzantine consensus protocol (for instance, both mentioned Hotstuff and PBFT would qualify as such) [25, 13].
Multi-world VABA works as follows: n instances of the view-based validated Byzantine consensus protocols are run, where for each instance i, the proposer is party i. Each instance is run until proposer i acquires a commit certificate, proof that the proposer has reached consensus for the current view. Proposer i will broadcast the certificate, and once n - f proposers (i.e., ) have also broadcast their own certificate, all participants of the consensus protocol will stop. The randomness beacon is then utilised to randomly select one instance, which will also act as a view-change trigger. Then, the protocol will act like Hotstuff, or any other view-based validated Byzantine consensus protocol, where the selected process i will be used as the main proposer for view v. Thus, multi-world VABA circumvents the FLP impossibility result by revealing only after the fact whose instance will be selected. A malicious participant, thanks to the properties of the randomness beacon, cannot know in advance who the proposer of view v is going to be, thus, they cannot slow down the system. Intuitively, all n - 1 instances act as decoys for the one instance that will be chosen after the n - f finished processes; however, this also means that the n - 1 instances are discarded after a view-change. Hence, Multi-world VABA achieves liveness at the cost of requiring a message-complexity of as all parties will run their own version of Hotstuff, subsequently increasing latency [29, 25]. This naturally leads to the question of how can we create a protocol that can take advantage of the low-latency given by partially-synchronous protocols, while maintaining the resilience of asynchronous protocols.
2.4.3 Ditto
Ditto is a dual-mode consensus protocol, providing liveness in both synchronous and asynchronous network environments [37]. Unlike Hotstuff, Ditto replaces the view-synchronization with an asynchronous fallback [25]. While on its happy-path, Ditto runs an improved 2-chain version of Hotstuff, named Jolteon, thus running under the ideal linear communication complexity . However, contrary to how Hotstuff works, when the network deteriorates, the Multi-Valued Validated Byzantine agreement (MVBA) protocol is run [37, 16, 25]. Furthermore, Ditto introduces the problem of fragmentation, where some processes might switch to the asynchronous fallback while others remain in the happy-path. To circumvent this, a process in Ditto requires to have at least timeout messages before switching to the asynchronous fallback, acting as a synchronisation phase.
There are clear benefits by utilising partially-synchronous protocols such as Hotstuff [25]. First and foremost, these protocols run under linear communication complexity , decreasing latency and increasing throughput. Asynchronous protocols, such as the Multi-World VABA we have seen, instead, require a quadratic communication cost , since each instance n runs an instance of a linear communication complexity protocol [27, 29]. Ditto, instead, runs with a linear communication cost during its happy-path, and, during periods of asynchrony, resorts to an asynchronous protocol, running under quadratic communication cost [37]. Clearly, Ditto provides the best of both worlds, however, we have also seen that Ditto introduces a number of complexities that require a careful planning to ensure that safety is preserved. We shall now examine the next evolutionary step in consensus protocols, which, beyond achieving reduced latency and increased throughput, provides simplified requirements for dual-mode protocols.
2.5 DAG-Based Consensus Protocols
Till now, we have seen consensus protocols that work by ordering blocks proposed by participants of the system, creating a linear blockchain. As stated, this approach can lead to severe limits on throughput and latency as there can only be one block accepted per view. Instead, newly researched blockchain protocols allow each participant to propose blocks that reference multiple blocks from a previous round [28, 31, 32]. When connected, these blocks form what is known as a Directed Acyclic Graph (DAG). A DAG, as the name suggests, is a graph that flows only in one direction, and thus, does not form cycles. This means that, when traversing a DAG, you can never end up where you started [21, 23]. DAG-based consensus protocols utilise this property to organize DAGs into rounds and waves. Rounds (denoted as r) represent logical sequences, while waves (denoted as w) represent logical groupings of consecutive rounds (i.e., a wave is analogous to a view).
In the context of blockchains, each vertex in a DAG represents a block in a blockchain, and, as we will see, each block references a number of blocks of a previous round (i.e., a reference is an edge to a previous vertex). Creating a blockchain that forms a DAG can greatly increase throughput and reduce latency compared to linear blockchains. Looking at Figure 2.2, we can see that during each round a validator can propose a block. When compared to linear blockchains, as seen in Figure 2.1, in a DAG-based blockchain each validator proposes blocks concurrently, creating interconnected parallel chains. Furthermore, when a leader proposal is committed in DAG-based consensus protocols, not only is the related block committed, but also its entire causal history. This means that all blocks that the leader proposal reference directly and indirectly are also committed, thus increasing throughput dramatically, since each round can include as many as n blocks, where n is the number of participants in the consensus protocol. This removes the linear bottleneck of linear-chain consensus protocols. Intuitively, while linear-chain consensus protocols allow only one leader per view to propose a block, in DAG-based consensus protocols each validator proposes a block; however, not every validator block is considered a leader block. We will see how safety and liveness are preserved in DAG-based consensus protocols.

Figure 2.2: Illustration of a DAG structure, where w represents a wave, and r is the round.
2.5.1 DAG-Rider & Tusk
Keidar et al. [28] propose DAG-Rider, the first practical DAG-based asynchronous consensus protocol. DAG-Rider's objective is to commit one proposed block per wave. Once a block is committed, itself and all of its causal history (until the last previously committed block) are considered to be committed. DAG-Rider is structured to be an asynchronous consensus protocol, thus, just like we have seen in VABA and Ditto, this protocol introduces some elements of randomness to circumvent the FLP impossibility result [27, 37, 6]. Each block in DAG-Rider includes a share of the common coin, and, once we reach the last round of a wave, shares are combined to reveal the leader of the first round of the wave, retroactively. Due to how the protocol is constructed, compared to the multi-world VABA approach, which uses n - 1 processes as decoys, blocks proposed by non-leader validators will still be included.
in the final sequence of blocks. This is due to the fact that the causal history of a committed block is also committed, reducing computational waste while increasing throughput.
Tusk, a protocol created by Danezis et al. [31], represents the first practical implementation of a DAG-based consensus protocol, and improves upon the design of DAG-Rider (see Figure B.3). Furthermore, Danezis et al. [31] propose Narwhal, a mempool layer protocol that separates the concerns of ordering data (consensus layer) from the dissemination and gathering of transactions (mempool layer). Thus, Narwhal gathers and constructs certificates of availability (batches of transactions), and Tusk constructs the DAG out of the metadata obtained from Narwhal. Most importantly, this separation of concerns allows Tusk to reach consensus with a zero-message overhead beyond constructing the DAG itself. However, it is important to note that for a certificate of availability to be created, Narwhal requires a block to be signed by a quorum signatures), which results in a 3-message delay between certifications and addition to the DAG.
2.5.2 BullShark
Spiegelman et al. [33] present Bullshark, a consensus protocol that presents the first dual-mode solution for DAG-based consensus protocols. Given its dual-mode capabilities, Bullshark has been presented in two versions: a partially-synchronous version and a dual-mode version.
Spiegelman et al. [33] present the first version of a DAG-based consensus protocol that runs under partially-synchronous assumptions (as defined in Section 2.2). The protocol works as follows: odd rounds represent proposal rounds, while even rounds represent voting round. Thus, a wave is composed of simply two rounds, and, since there is no requirement for any sort of randomness beacon, a block can be committed within a 6-message delay. Just like Tusk, Bullshark runs with Narwhal in the background; thus, each proposed block has to be certified before being broadcast (propose-certify-announce), creating the 3-message delay per round we see. Figure B.4 visualizes this version of Bullshark, found in Appendix B. The complete version of Bullshark does not have the problems associated with partially-synchronous models, as it constructs the DAG to both enjoy fast commitments and maintain liveness in periods of asynchrony. A wave in Bullshark is composed of four rounds, where every odd round a steady-state leader proposes a block, which can be committed just like its partially-synchronous counterpart. However, if the system enters periods of asynchrony, Bullshark resorts to a fallback leader that is elected retro-actively in the last round of a wave, which is why Bullshark waves are four rounds long. In short, the protocol will utilise the fallback leader if the second steady-state leader of the wave failed to be committed, or if the fallback leader also failed to be committed. A fallback leader, elected via a common coin released in the last round of a wave, must be referenced times in the round right after to be committed. When a fallback leader is committed, the next wave will go back to utilise the steady-state leaders. Bullshark achieves this dual-mode functionality by introducing voting types to the DAG edges. A validator can only vote for one type of leader per wave, and the voting type of a validator for a wave is dependent on what has happened the previous wave. Figure B.5, found in Appendix B, visualizes the dual-mode component of Bullshark. This approach, however, increases complexity, as each validator must also keep track of what mode must be used for each wave.
Bullshark is, at the time of writing, the only dual-mode DAG-based consensus protocol, thus also the protocol from such class to be evaluated using a geo-distributed cloud infrastructure. Of importance, Bullshark achieves transactions per second independently on the size of the committee. Albeit less than Tusk, Bullshark achieves a stable latency of 2s compared to the 3s from Tusk [31, 32]. This result is very important, as it shows that dual-mode protocols can achieve lower latency compared to fully asynchronous protocols, while guaranteeing eventual liveness in asynchronous settings. Furthermore, compared to Ditto, Bullshark maintains an optimal amortized communication complexity through either steady-state waves and fallback waves.
2.6 Uncertified DAG-Based Consensus Protocol
Research in DAG-based consensus protocols has led to the utilisation of a new data structure, uncertified DAGs. Structure wise, uncertified DAGs are similar to certified DAGs, as seen in Figure 2.2; however, they differ in how a block is broadcast. In certified DAGs, before a block is added to the DAG, it has to be broadcast to each validator to collect enough signatures to certify it, and then, once certified, the block is broadcast again to all validators. This certification process increases latency, as broadcasting a certified block requires a 3 message exchange. First, validator v broadcast an uncertified block to all validators in the system. Then, each validator signs the block and sends v their respective signature. Finally, with enough unique signatures , v can broadcast the certified block to be added to the DAG. Thus, while Bullshark can commit a block in 2 rounds, the actual commitment process requires 6-message delays [36, 32]. Uncertified DAGs remove this requirement to certify a block before broadcast, as the DAG itself provides validation. [34, 36, 38].
2.6.1 Cordial Miners
Keidar et al. [34] present the first uncertified DAG-based consensus protocol, called Cordial Miners. As aforementioned, an uncertified DAG-based consensus protocol does not require a block to be certified before being added to the DAG. Instead, they prove how, simply by interpreting the DAG in a specific way, certificates can be formed explicitly. The protocol works as follows: A block B, for round r, must contain references to unique valid blocks of the previous round r - 1. Then, for block B to be committed, it requires a supermajority of approval ( unique references to block B in round ), and a further blocks in round that observes, in its causal history, this pattern. This process, intuitively, is similar to how Narwhal requires a quorum to certify a block, however it is completely done in the DAG itself, removing the need to certify blocks. Keidar et al. [34] present both an asynchronous and a partially-synchronous version of the protocol, proving that both settings work under an uncertified DAG data structure. Interestingly, Keidar et al. [34] suggest that Cordial Miners, and uncertified DAG-based consensus protocol in the same vein, can be extended, similarly to Bullshark, to achieve dual-mode functionality. However, Keidar et al. [34] suggest to utilise two leaders, like Bullshark, one deterministic (partially-synchronous mode) and one random (asynchronous mode) if the deterministic leader fails to commit [32]. Such approach, however, can be rather complicated, and hard to implement.
2.6.2 Mysticeti
Babel et al. [36] introduce Mysticeti, a family of DAG-based consensus protocols. We focus specifically on Mysticeti-C, which represents the first implementation of an uncertified DAG-based consensus protocol (referred to simply as Mysticeti throughout this paper). This protocol runs under partially-synchronous assumptions, thus does not require any form of randomness beacon to circumvent the FLP impossibility result. Instead, just like the partially-synchronous version of Bullshark, leverages timeouts to guarantee liveness after GST has been reached [6, 32]. Mysticeti runs on what is known as a threshold logical clock (TLC) [24]. Essentially, rounds advancement in Mysticeti are dependent on some sort of rules imposed by the system. Thus, Mysticeti can guarantee that at least one block (usually known as a primary block) can be committed per wave by leveraging timeouts. Compared to the partially-synchronous version of Bullshark, Mysticeti runs waves consisting of 3-rounds (propose-vote-certify); however, Mysticeti's blocks do not need to be certified before being proposed. This means that proposing a block is simply a 1-message delay, and to commit a block, it only requires 3-messages delay (compared to the 6-message delay found in the partially-synchronous version of Bullshark). Furthermore, Mysticeti introduces two additional enhancements that allow for lower latency and higher throughput. Mysticeti allows up to n (where n is the total amount of validators in the systems) validators to be considered leaders in a round. This approach was inspired by Multi-Paxos [17]. Then, Mysticeti allows for pipe-lining. This means that every round can mark the start of a wave, allowing for a proposed leader block to be committed every round. Both of these enhancements are visualized in Figure B.6, detailed in Appendix B. We will see in Section 3.2 how Mysticeti, and other uncertified DAG-based consensus protocols, leverage the DAG structure to make safe commit decision. Not only is Mysticeti, at the time of writing, the protocol with the highest throughput and lowest latency, but the Sui blockchain has also adopted Mysticeti as its consensus protocol [43].
2.6.3 Mahi-Mahi
Mahi-Mahi is an asynchronous uncertified DAG-based consensus protocol proposed by Jovanovic et al. [38]. Just like Mysticeti, Mahi-Mahi introduces Multi-Leader and Pipelining to increase throughput and latency. However, unlike Mysticeti, waves consist of either 4 or 5 rounds, depending on network assumptions (we will go further in-depth in Section 3.2). The extra rounds are required to increase propagation of a proposed leader block, since, without timeouts, we cannot guarantee that enough validators will see the proposed block before advancing to the next round. By increasing the propagation of a block, we can then, with high-probability, elect a leader in retrospect by utilising a random global coin, as seen with other similar protocols [31, 32]. That said, unlike Bullshark, during the use of its fallback leader, Mahi-Mahi can commit with either a 4/5-message delay, a significant decrease from the 12-message delay given by Bullshark's fallback mode [32].
We have seen incremental improvements in the evolution from linear-chain consensus protocols to DAG-based ones. Ditto represents a functional example of a dual-mode linear-chain consensus protocol, which achieves results comparable to similar state-of-the-art linear-chain consensus protocols [37]. Bullshark, likewise, shows that the same dual-mode functionality can be applied to DAG-based consensus protocols, while inheriting all the benefits inherent to DAG-based consensus protocols [32]. Uncertified DAG-based consensus protocols currently lack a dual-mode counterpart capable of utilising the inherent advantages of the uncertified DAG data structure. Our work aims to address this by presenting the first dual-mode uncertified DAG-based consensus protocol based on Mysticeti and Mahi-Mahi [36, 38].
Chapter 3
The Sharpedo Protocol
As we have talked about in Section 2.6, while both Mysticeti and Mahi-Mahi are the first uncertified DAG-based consensus protocols that leverage the DAG structure itself to form certificates, both have clear strengths and weaknesses given their initial assumptions. Thus, we introduce Sharpedo, the first dual-mode uncertified DAG-based consensus protocol that combines Mysticeti and Mahi-Mahi to achieve liveness in both asynchronous and partially synchronous environments, while maintaining low latency comparable to Mysticeti. Sharpedo differs from other dual-mode protocols by having a simplified approach to running its fallback mode (i.e., the asynchronous mode). As we have seen, whenever a block is committed in a DAG-based consensus protocol, its entire causal history is also committed. Thus, we simply need to run the asynchronous mode periodically at fixed, or changing, intervals, to achieve liveness in asynchronous settings.
3.1 System Design and Core Assumptions
We consider a communication network where validators process transactions using the Sharpedo protocol. An adversary can corrupt up to a set of f validators, which we will call Byzantine. These malicious validators can act arbitrarily (i.e. can deviate from the protocol). Honest validators, instead, are the remaining non-corrupted validators who will follow the protocol. The protocol makes the assumption that the links between validators are reliable and authenticated. This means that messages sent by honest validators will, eventually, reach all other honest parties, and that the identity of the sender can be easily verified by the receiver. Furthermore, the adversary is computationally bounded. Thus, the standard cryptographic properties utilised in the protocol (i.e. hash functions, digital signatures etc...) will hold. Under these assumptions we can say that Sharpedo is safe (this is proven in Chapter 5) because no two honest validators will ever commit contradictory transactions. The dual-mode protocol runs under an adaptive network setting, meaning that it can make progress ( liveness) in both an asynchronous setting, and a partially-synchronous setting. Before GST is reached, messages may be delayed arbitrary, but will be delivered eventually with probability 1. Thus, Sharpedo achieves liveness during periods before GSTS is reached. Furthermore, after GST, Sharpedo achieves liveness as transactions are guaranteed to commit within . Both these statements are proven in Section 5.
3.2 Structure of the Dual-Mode Protocol DAG
As with Mysticeti and Mahi-Mahi, Sharpedo works on a series of logical rounds [36, 38]. During every round, a validator proposes a unique, signed block (i.e. a single block per round) which contains a number of transactions; however, malicious validators can equivocate, meaning that they propose more than one block per round. Throughout a round, validators receive transactions from users and blocks from other validators. Together, a validator creates a block that consists of fresh transactions (i.e. transactions that have not been included in previous blocks), alongside hash references to previous blocks. The newly created block is broadcast when the honest validator includes at least hash references to blocks from the previous round, after which the validator signs the block. There can be scenarios where the inclusion of a transaction, sent by a user to a validator, fails (e.g. a malicious validator does not want to include this specific transaction into the block). In this case, the user, after a fixed amount of time, will send the transaction to a different validator.
3.2.1 Block Creation
A block proposed by an honest validator is structured as follows:
| Block Structure | |
|---|---|
| Author | : Validator ID and signature on block contents |
| Round | : Round number |
| Transactions | : List of transactions |
| References | : Minimum 2f + 1 distinct hashes from round r - 1 |
| Coin Share | : Share of the global perfect coin |
A block is considered to be valid if: the signature of validator v is valid, and v is part of the validator set; all references point to different valid blocks from round , and the first referenced block points to v's block from round ; lastly, the share of the global coin is valid, and as long as the global coin is implemented via a threshold signature scheme, the shares of a global coin can be verified.
3.2.2 Round and Wave
Sharpedo defines two types of wave structures, where the wave length is denoted as w, a partially-synchronous one and an asynchronous one, where rounds are given specific roles respective of the wave structure.
The partially-synchronous wave consists of 3 rounds, which, just like Mysticeti, allows for the lowest bound, of a 3-message delay, for a block to be committed [13]. A leader of a wave first proposes a block (propose round), then all other validators vote on the block (vote round), and lastly, they collect certificates (certify round).
The asynchronous wave, instead, consists of either 4 or 5 rounds. As explained by Jovanovic et al. [38], a wave length of 5 maximises resilience against an active asynchronous adversary, meaning that it is more likely to commit a block if a wave is composed of five rounds. However, under more realistic asynchronous scenarios, a wave length of 4 allows for lower latency while maintaining sufficient commit probability. Due to asynchronous assumptions, we cannot rely on timeouts to guarantee that a leader proposal will reach all honest validators in round . Boost rounds act as propagation rounds for the proposal before the voting round, where longer wavelengths create more boost round. Since Sharpedo's asynchronous mode closely follows Mahi-Mahi's, it inherits analysis under both asynchronous and random network models. The asynchronous network model makes the worst-case assumption (i.e. f nodes are always faulty), while the random network model makes average-case assumptions. This means that when a validator proposes a block b at round r, b will include references from round uniformly-chosen at random. The proofs of liveness, provided by Jovanovic et al. [38], demonstrate how liveness is achieved both when w=4 and w=5. Specifically, when w=4, there are weaker liveness guarantees, especially under the asynchronous network model; however, under the random network model, the protocol has a high-probability of committing each wave.
3.2.3 DAG Patterns
With the structure of waves described in the earlier section, a validator can identify DAG patterns to decide the outcome of proposed blocks:
-
Certificate Pattern: A certificate pattern is identified when there are at least blocks in round that support a block proposed in round . This means that blocks in round have a reference to block B. Visualized in Figure 3.1.
-
Skip Pattern: A skip pattern is identified when there are at least blocks in round (Voting round) that do not support a block proposed in round . This means that blocks in round do not have a reference to block B. Visualized in Figure 3.2.
While Bullshark only allows certified blocks to be proposed every round, in the case of Sharpedo analysing the DAG by identifying the aforementioned patterns allows us to determine certificates implicitly. As mentioned, this is one of the major innovations that has led protocols such as Mysticeti and Mahi-Mahi to achieve such low levels of latency [36, 38]. Essentially by moving the certification process of Narwhal into the DAG itself, removing the 3-message delay that was required to certify blocks, and instead, certifying blocks directly by analysing the DAG [31].

Figure 3.1: Certificate Pattern: is marked as to-commit because validator , and voted for the proposed block in round , and constrain in their history this pattern in round .

Figure 3.2: Skip Pattern: Leader block is marked as to-skip because validator , and did not vote for (i.e. has blames) in round , thus creating a skip pattern.
3.2.4 Liveness
Due to Sharpedo’s properties, liveness can be achieved in two different scenarios: before GST has been reached, and after. Chapter 5 provides formal proofs for both scenarios, but, intuitively, liveness is achieved as follows:
• Case 1 (before GST): In Sharpedo’s asynchronous mode we make no timing assumptions, but instead we leverage a perfect global coin to thwart possible malicious participants from manipulating the formation of certificates. As stated earlier, the FLP impossibility result states that deterministic protocols cannot ensure liveness and safety in the presence of even one faulty validator [6]. By using the perfect global coin, no validator will know whether they are the leader of a specific round until enough rounds have passed to form a certificate for said round. Thus, probabilistically there is a non zero chance of committing a leader block, ensuring liveness, eventually [38].
• Case 1 (after GST): In the partially-synchronous mode we rely on timeouts to maintain liveness. We know that all honest validators will receive messages sent by other honest participants within , where t represents the time a message has been sent by an honest validator. Every round a proposer is deterministically selected to be considered the primary block of the round. For example, assume a primary block B has been proposed in round r. Other honest validators will either need to include this block's reference or wait a timeout (i.e. ) before being allowed to propose a block in round . Furthermore, if an honest validator includes a reference to the primary block in the block proposed in , they have to wait an additional timeout before being allowed to propose a block for . This ensures that there will always exist a certificate for the primary block, after GST has been reached [36].
3.2.5 Equivocation Tolerance
Equivocation is handled by construction. When a validator equivocates by proposing multiple blocks for the same round, honest validators may receive all equivocating blocks. However, each honest validator can only support at most one block per slot s when constructing their own block proposals. Due to the votes required for certification and quorum intersection, at most one of the equivocating blocks can gather sufficient support to be certified and marked as to-commit. This is exemplified in Figure 3.3. Although the figure demonstrates the partially-synchronous mode, the asynchronous mode handles equivocation in the same manner.

Figure 3.3: Example of equivocation tolerance found in Sharpedo. Validator is the equivocating validators (Blocks and are proposed during the same round ). However, since the remaining honest validators will only support one block per validator per round, only block receives enough votes to be eventually committed.
3.3 The Sharpedo Consensus Protocol
3.3.1 Proposer Slot and Leader Selection
Proposer Slot Just like Mysticeti and Mahi-Mahi, Sharpedo utilises proposer slots. Proposers slots can either be empty, or include the block proposed by a validator for a specific round (forming a tuple (validator, round)). Each proposer slot can have the following states: to-commit, to-skip and undecided. We have seen how a proposer slot can be given the state of the former two, by identification of DAG Patterns. However, the undecided state is what differentiates Sharpedo (including Mysticeti and Mahi-Mahi) from previous works, such as Bullshark [36, 38, 32]. This state forces all following slots to wait for this one to be marked, ensuring a deterministic sequence of proposers for all validators. Furthermore, each round can have up to proposer slots, allowing each block to be directly committed, decreasing latency in ideal settings. However, as we will see in the decision rules, having too many proposer slots can also increase latency when proposers are either slow (e.g., during periods of asynchrony) or act maliciously (e.g. they equivocate) [36].
Leader selection Leader selection acts differently depending on the mode being run. During the partially-synchronous mode, where we have the ability to use timeouts, leaders are selected in a deterministic fashion (i.e. via a round-robin algorithm). However, during Sharpedo's asynchronous mode, we cannot have a deterministic approach in leader selection, or and adversary may be able to exploit the lack of timeouts to halt the system. Thus, as we have said in Section 2.2, we utilise shares of the global perfect coin to decide the leader after the fact. In Sharpedo's asynchronous mode, assume that r is the propose round, the global perfect coin is reconstructed in either or depending on Sharpedo's wave length configuration. It is important to note that the global perfect coin can elect multiple leaders, up to leaders, and can also select slots whose validator has not proposed any blocks.
3.3.2 Decision Rules
We will now go over the Sharpedo's decision rules. Sharpedo follows closely the decision rules found in both Mysticeti and Mahi-Mahi, aiming to try and classify every proposer slot as either to-commit or to-skip, where all proposer slots start in an undecided state.
Direct Rule
Sharpedo begins by applying the direct rule on a DAG, starting from the latest proposer slot. The direct rule tries to mark a slot as either to-commit or to-skip by either observing commit patterns or a skip pattern for that slot. For example, as seen in Figure 3.1, is initially marked as undecided, but, via the direct rule, can be marked as to-commit because of the certificates present. In Figure 3.2, instead, is marked as to-skip, via the direct rule, as a result of a skip pattern. The direct rule works comparably during Sharpedo's asynchronous mode. If Sharpedo observes neither commit patterns nor a skip pattern, then the slot is left as undecided, and the protocol will require the indirect rule to mark the slot accordingly. Examples of Sharpedo's direct rule for its asynchronous mode can be found in Appendix C.
Indirect Rule
We now move onto the cases where the direct rule fails, thus Sharpedo has to rely on the indirect rule to mark a proposer slot. The indirect rule works by looking at future slots to determine whether the undecided slot can be marked as to-commit or to-skip. Assume a slot s, in round r, has been marked as undecided via the direct rule. The indirect rule first needs to locate an anchor, meaning a slot where its round is greater than the decision round of slot (i.e. ). If the anchor is marked as undecided then slot is also marked as such. If the anchor is marked as to-commit, then the rule checks that the anchor contains at least 1 certificate for slot . If the certificate link exists, then slot is marked as to-commit, if it does not, then the slot is marked as to-skip. If an encountered anchor has been marked as to-skip, the rule moves onto the next available anchor.

Figure 3.4: Example of the indirect rule marking as to-commit in the asynchronous mode (with wave length ). While does have the required votes from blocks in round , it is missing the necessary certificates that are formed when observing the votes. Since the anchor does observe a certificate link between and , can be marked as to-commit.

Figure 3.5: Example of the indirect rule marking as to-skip in the asynchronous mode ( ). While does not have the required votes from blocks in round , it also does not have blames required to directly skip the block. Since the anchor does not observe a certificate link between and , is skipped.
Figure 3.4 and Figure 3.5 are examples of both outcomes of the indirect rules during Sharpedo's asynchronous mode (while examples of the indirect rules during Sharpedo's partially-synchronous mode can be found in Appendix C). This is where the number of proposer slots can cause slow-downs during periods of asynchrony (or when Byzantine validators equivocate). Since it increases the probability of the direct rule failing, undecided slots may accumulate. This will cause the protocol to utilise the indirect rule more often, subsequently delaying the commitment of proposed blocks. For example, in Figure 3.4, assume a scenario where has yet to be marked as to-commit via the indirect rule, all subsequent slots must wait for to become decided before they can also become either skipped or committed. Thus, all leader slots from upward remain undecided, which stalls the commit sequence and impacts performance [36].
3.3.3 Sequence
Once all the slots in the DAG have been processed, all validators will extract, deterministically, the sequence of the proposers blocks. This newly extracted sequence is ordered (e.g., while the decision rules begins with the latest slot, the derived sequence begins with the oldest slot). The validators then iterate over this sequence, committing slots marked as to-commit and ignoring slots marked as to-skip. Such process will continue until the first undecided slots is encountered. To illustrate this, imagine a sequence of decided leaders (obtained after running the decision rule on a DAG), where green, red, and grey represent leader slots marked as to-commit, to-skip, and undecided, respectively. The leader slots marked as to-skip are removed (thus we have the following sequence: ). However, since is marked as undecided, Sharpedo's final sequence is . Once the sequence is finalised, the validator will linearize the subDAG of each committed block, by carrying out a depth-first search, and ignore already included blocks. Since the validator processes leader blocks deterministically and subDAGs sequentially, the final commit sequence maintains a deterministic ordering (proven in Chapter 5).
3.4 Dual-Mode
We now introduce the dual-mode component of Sharpedo. As shown in Chapter 2, dual-mode protocols often introduce complexities to achieve dual-mode functionality, by either having to maintain two differing protocols or by increasing the complexity of the DAG construction [37, 32]. With Sharpedo, we introduce the following solution: instead of introducing complex mechanisms that change the structure of the DAG, the protocol will, instead, switch to its asynchronous mode every K rounds, for a single wave. Intuitively, this means that in periods of asynchrony, eventually, a leader of one of these K-th rounds will be committed, committing its causal history alongside it. Sharpedo can, therefore, achieve latency levels closer to those of partially-synchronous protocols, while inheriting the liveness robustness of asynchronous ones [36, 38].
Similarly to the Mysticeti and Mahi-Mahi protocols, Sharpedo can be configured to run with a pipeline in mind, and to allow for multiple proposers per round. This means that each round will act as the start of a new wave, and that each round can have multiple leaders l, where . Figure 3.6 shows how the asynchronous mode and partially synchronous mode intertwine together. Of note, we can see that, irregardless of whether the pipeline mode is active, some decision rounds will overlap (e.g. given Figure 3.6, round is the decision round for both propose rounds and ). Furthermore, some partially-asynchronous rounds may reach the decision round before a decision round for the previous asynchronous round has been reached (e.g. given Figure 3.6, round is the decision round for round , while round still has not reached its designated decision round ). Intuitively, safety is preserved due to how leaders are sequenced. A leader sequence will return upon reaching the first undecided leader, thus, a leader block proposed in round will have to wait for leader blocks in round to be decided first.

Figure 3.6: Wave patterns of Sharpedo's dual-mode protocol (2 leaders per round, pipelining enabled). Round represents the asynchronous mode of Sharpedo with a wave length w set to 5. The remainder of the rounds are run through the partially-synchronous mode. Furthermore, we can see that, since does not have enough votes to be directly committed, the anchor used to determine the status of the slot must come from the first round after wave has finished, thus .
3.4.1 Dynamic Scheduling
As we have seen, periodically switching to Mahi-mahi will grant us the liveness property even under asynchronous settings; however, such approach can be further improved. For example, imagine a scenario where GST is perennially achieved, meaning that Sharpedo's network connectivity is working as intended. In such scenario, it would be ideal to run the asynchronous round less often, while in the opposite scenario, one where connectivity is causing the direct-rule to reach an undecided conclusion often, we would want to run the asynchronous run more often. Thus, how do we allow each validator to make a deterministic decision to change the interval rate of Sharpedo's asynchronous mode?
Hammerhead is a consensus protocol, built over the partially-synchronous version of Bullshark, which presents a suitable approach to what we are trying to achieve [32, 35]. In the case of Hammerhead, Tsimos et. al [35] present a reputation-based leader-election mechanism for DAG-based consensus protocols. There are cases where leaders might crash, thus, if a validator is selected as leader for a round, in such round no progress can be achieved. By creating a reputation-based leader-election mechanism, leaders who are consistently voted for will be selected more often, decreasing the possibility of electing a faulty leader. They utilise the DAG itself to determine how many times a leader is voted for because the causal history of a committed leader will be identical for everyone. As we have also said, once a leader block is committed by a validator, all other honest validators will reach the same conclusion. This allows each validator to make deterministic choices by observing the subDAG (i.e the causal history of a block) of a committed leader block.
We can follow a similar approach to create a dynamic-frequency mechanism to optimise the performance of Sharpedo. While Hammerhead utilises the subDAGs of each committed leader to determine the reputation of all leaders, we simply require the subDAG of a singular leader block to determine how we should update the schedule. The dynamic schedule works as follows:
• Assume that every Kth leader has to be decided through the asynchronous rules.
- Once leader K is marked as to-commit, we analyse its subDAG up to but not including the previous Kth leader (i.e. we analyse the subDAG until the round after the last asynchronous committed leader).
• Within this same subDAG, we determine how many of the leaders in Sharpedo’s committed leader sequence were direct commits, that is, leader proposals that have been committed via the direct rule (with the rules specified in Section 3.3.2). Given the ratio of observed direct commits versus the amount of expected commits, we can change the scheduling accordingly. The expected commits include both leader slots marked as to-commit and to-skip, as skipped leaders are also a sign of asynchrony.

Figure 3.7: Example of subDAG analysis of a committed anchor. Assume that is the Kth leader that will trigger a schedule update. Leaders from round , and will not be considered for the analysis, as the subDAG does not give enough information to determine whether these proposals have been directly committed or not. However, we can see how leader , while having enough votes to be directly committed, was not marked as to-commit directly by , as causal history does not include the additional necessary vote provided by .
3.4.2 Sequence (Extended)
There is one specific scenario that can endanger the safety property of Sharpedo. Specifically, imagine a scenario where we have a validator who is experiencing high-levels of network turbulence between the other validators. In such scenario, is unable to reach either to-skip or to-commit decisions for leader blocks, and is left with a large number of undecided slots. Assume that we have enough undecided slots to encompass two asynchronous waves (L and L2). Once regains an appropriate level of connectivity, they will begin working through all their undecided slots. Since decision rules are made top to bottom, will decide L2 before L1. However, L2's schedule may change once L1 is processed, and if this happens, then will have a different schedule amongst all other validators. To stop this from happening, we need to make sure that can retroactively change the schedule, and reanalyse the remaining leaders under the new schedule. Thus, the flow is such that, once a validator runs the decision rule and obtains a list of leader slots marked as to-commit, we also cut-off the sequence up to, and including, the first asynchronous leader slot marked as to-commit. Lastly, the algorithms for Sharpedo can be found in Appendix D.
Chapter 4
Implementation
Sharpedo was developed as a network, multi-core dual-mode protocol validator that has been implemented in Rust [39]. The protocol builds upon a forked codebase of the Mysticeti protocol, which comprises of approximately 14,000 lines of code. Sharpedo has both been open-sourced , and provided alongside the submission of this project. Sharpedo leverages tokio, which allows for asynchronous networking operations, and communications are established through raw TCP sockets [41]. The protocol utilizes the following cryptographic components for security: ed25519-consensus for asymmetric cryptographic operations (enabling validators to uniquely sign blocks and allowing other validators to verify these signatures), and blake2 for cryptographic hashing functions (used to create reference hashes of blocks) [42, 40]. The architecture follows a hybrid threading model where network communications operate asynchronously while the core dual-mode consensus logic executes synchronously within a dedicated thread. This design choice enhances testing reliability, reduces race condition risks, and enables precise profiling of the critical consensus pathway.
In this section, we present a detailed examination of the core implementation components that directly correspond to the theoretical algorithms presented in the referenced work. Sharpedo's implementation demonstrates the practical realization of the dual-mode protocol's key mechanisms, providing concrete evidence of the feasibility and performance characteristics of the proposed approach. We structure this analysis by focusing on two fundamental aspects of Sharpedo that represent the most significant contributions of our work: the decision rule and the dual-mode scheduler.
4.1 Decision Rule
The implementation of Sharpedo works as follows: whenever a validator receives a block, they run an idempotent function (handled by the core module) that tries to commit as
https://github.com/zenodea/dualmode_mysticeti many blocks that have not been committed yet (i.e, marked as undecided). We have a universal committer (representing Algorithm 1) that controls a number of base_committers. The universal committer also handles the pipeline, and the multiple leaders per round aspect (where each extra leader represents a base_committer instance). We will now examine the main changes made to these structures to accommodate for Sharpedo's dual-mode property.
4.1.1 Universal Committer
The UniversalCommitter module manages multiple BaseCommitters with different leader_offset and round_offset configurations to support multi-leader consensus and pipelining. The UniversalCommitter, similarly to Mysticeti and Mahi-Mahi, calls the try_commit function (represented by the TRYDECIDE process in Algorithm 1). The try_commit function takes the highest leader proposal round and highest committed leader proposal round, and tries to decide as many as possible within this range. However, now we also pass an AsyncState structure, explained more in-depth in Section 4.2, that determines whether the round in question should be interpreted via the partially-synchronous or asynchronous mode, just like the TRYDECIDE process in Algorithm 1. The complete changes made to the module can be observed in Appendix A.1.1.
4.1.2 Base Committer
The base committer contains the core commit logic for the consensus protocol, providing methods like try_directdecide and try_indirectdecide that can be called to determine whether a leader block can be committed or should be skipped (representing the entirety of Algorithm 2). The base committer also handles the pipeline and multi-proposer settings of Sharpedo. The primary change made to the BaseCommitter module is the calculations done when interpreting the DAG. Specifically, the voting and decision rounds change depending on the current mode. As the decision round is used to calculate the voting round, changing the round wave length consequently places the voting round correctly. The calculation of the decision round is now , where w is chosen based on the current AsyncState (either w = 3 or w = 4/w = 5). The second major change resides in the indirect rule, specifically, we require the anchor's round to take into consideration which mode of operation the leader proposal, which requires the anchor, utilised. Similarly as before, the anchor round is now calculated as , where w is chosen based on the current AsyncState. Further changes can be seen in Appendix A.1.1.
Figure 4.1 represents the modified workflow of Sharpedo's decider instance. Specifically of note is the extra argument beyond the anchor v. A represents the current asynchronous state, storing information which allows the decider to decide whether anchor v should be decided via Sharpedo's partially-synchronous or asynchronous mode. The try_commit function of Sharpedo's decider will run for all undecided anchors from the highest committed slot, thus, the process seen in Figure 4.1 is repeated as many times as undecided slots there are.

Figure 4.1: Flowchart decision rule followed by Sharpedo. v represents the anchor that is being decided on, while A represents the current asynchronous state of the system. We run the try Decide(v, A) function for each available undecided leader slot, from the highest proposer slot, to the lowest, undecided, proposer slot.
4.2 Dual-Mode Scheduler
The DualModeScheduler structure handles all the logic required to update the asynchronous mode frequency accordingly. The structure incorporates the following key components:
• AsyncState: The AsyncState is a structure that holds the information necessary for the committer to interpret the DAG correctly. It holds the previously committed asynchronous mode round, alongside the current frequency that the asynchronous mode is run at. This structure is given to the UniversalCommitter to run the correct decision rules depending on the round. The implementation of this structure can be viewed in Appendix A.1.2.
• DualModeConfig: The DualModeConfig structure defines configuration parameters for the dual-mode consensus scheduler, including: wave length, leader count, and adap-tive interval bounds that control the balance between synchronous and asynchronous consensus modes. The modularity of this structure also simplifies testing matters, as we can easily create new configurations for specific scenarios. The implementation of this structure can be viewed in Appendix A.1.2.
- Furthermore, Sharpedo's DualModeScheduler holds the sequence of leaders marked as to-commit and a sequence_length which holds the total amount of decided leaders. When we run the try_commit function we also store the total amount of decided leaders (both leader slots marked as either to-commit or to-skip). Then we send both values to the DualModeScheduler to be utilised whenever we trigger a schedule update (i.e., once we mark an asynchronous leader as to-commit).
With these structures, Sharpedo's DualModeScheduler can handle all the logic required to perform safe schedule updates. Once we commit an asynchronous leader, we call the update_dualmode_schedule which pops the first leader from the sequence of decided leaders stored in the scheduler (which will always be an asynchronous leader when the function is called). Appendix A.1.2 has an in-depth explanation of each of the functions used by the DualModeScheduler structure, however, two functions merit particular focus as the most challenging to implement and the most significant for the research contributions presented herein: the subDAG collection and the direct commits counter. Both of these functions are run once Sharpedo protocol triggers a schedule update.
4.2.1 Collect Subdag Function
Once a schedule update is triggered, Sharpedo begins by collecting the subDAG of the newest leader block, via the collect_subdag() (see Listing A.7 in Appendix A.1.2). The function follows similarly to how the linearizer collects the blocks from the subDAG of newly committed leaders. However, unlike the linearizer, we utilise the anchor's causal history to collect all the blocks included until we reach the oldest committed leader in the sequence of leaders stored in the dual-mode scheduler. By doing so, we ensure that the collected subDAGs will be identical across all validators, guaranteeing they reach the same consensus decision. It is important to note that even if some blocks are directly committed by a majority of validators, if the selected validator only indirectly committed those blocks, this still counts as a "bad network signal."
4.2.2 Count Direct Commits Function
Once we obtain the subDAG, we count the direct commits within said subDAG (see Listing A.10 and Listing A.11 in Appendix A.1.2). While very similar to how Sharpedo's base committer handles the direct rule, compared to them we utilise a vector of blocks obtained via the collect_subdag() function. This is a crucial difference because it means we exclusively use the causal history of the anchor used for the schedule update. As stated earlier, this means that, while some other honest validators may have marked a proposed block as to-commit via the direct rule, we only care to see how the anchor in question ruled the specific leader block.
Once the number of direct commits has been collected, we utilise this number and compare it to the expected number of direct commits (i.e., all proposers slots should be directly committed), and modify the asynchronous interval via a deterministic function it (seen in Appendix A.1.2). Lastly, just like we have seen in Figure 3.7, we make sure that the number of expected commits includes only the amount of commits that can be selected given a subDAG. For example, imagine a sequence , where they have all been marked as to-commit and is a leader that has been committed under the asynchronous mode. Furthermore, assume that pipeline mode is turned on. Given the subDAG of , proposals slots cannot be determined with the given information, thus, the number of expected commits from would be 1, that is . This is equivalent to the grayed out blocks as displayed in Figure 3.7, where and are not included in the expected commits due as the DAG does not provide enough information to make a decision.
4.3 Sequence Cutoff
Once we finish running the decision rule, as explained in Section 3.3.3 and Section 3.4.2, Sharpedo iterates through the ordered sequence of leaders, and tries to commit as many as possible. However, given the protocol's unique dynamic schedule, extra security measures are put in place to ensure its safety. Once the try_commit() function is run, we iterate through the leader sequence, committing as many blocks as possible. However, the iteration will halt in two scenarios: first if an undecided leader is encountered, and then if leaders who's both been marked as to-commit, and that has been committed with Sharpedo's asynchronous mode. If both are true, the sequence is truncated up to and including that said leader, ensuring schedule changes are made consistently throughout all validators. The implementation of the sequence cutoff mechanism is further presented in Appendix A.1.2.
Figure 4.2 depicts the complete flow of Sharpedo. Whenever a validator receives a block, the idempotent try_commit() function is run trying to decide as many leaders as possible with the current AsyncState. The protocol, then, loops through the ordered sequence of leaders, returned by try_commit(), and tries to commit as many as possible. At the same time, if either the leader is undecided or the most recent committed leader has been committed through the asynchronous mode, then we stop iterating through the leader sequence, and discard subsequent leaders, including the one that made the iteration stop. In the latter case, however, we also update the asynchronous interval before running try_commit again.

Figure 4.2: Flowchart of the Sharpedo protocol. The function try_commit represents the function found in Figure 4.1. The remainder of the flowchart visualizes how Sharpedo handles the processing of the returned sequence of leaders. Of note, if the LeaderSequence is prematurely cut short via the is_async function, the unprocessed leaders remaining in the LeaderSequence are discarded.
4.4 Tests
To confirm the correctness of Sharpedo's implementation, rigorous testing has been performed on all components that relate to either the decision rule or the dual-mode scheduler. This section will give a brief overview of how tests were conducted, however, additional information is presented in Appendix A.2.1.
4.4.1 Decision Rule
First and foremost, Sharpedo's implementation of the decision rule has been tested under a large number of scenarios:
• Partially-Synchronous Mode: Sharpedo has been tested to work correctly under the partially-synchronous mode. This simply means that Sharpedo's tests where run in such a way that the asynchronous mode was never reached. Replicating the results obtained from the Mysticeti protocol [36].
• Asynchronous Mode: Sharpedo has been tested to work correctly under the asynchronous mode. Just like in the previous scenario, the tests here make sure that the protocol works when the asynchronous_wave is set to either 4 or 5.
• Dual-Mode: Sharpedo has been tested to work correctly when switching between modes. This means making sure that the protocol correctly switches between partially-synchronous mode and asynchronous mode all in one run. As in the previous scenario, all the tests pass whether asynchronous_wave is set to either 4 or 5
As Sharpedo supports a number of configurations, it has been tested under a combination of scenarios (e.g., pipeline = true and number of leaders = 1, etc...). This combination of configurations allows us to make sure that Sharpedo works correctly under all settings. Due to the substantial amount of similar code across tests, we present only the implementation details for the dual-mode scenario, found in Appendix A.2.1. In particular, we present our contributed tests, which verify that Sharpedo's asynchronous mode operates correctly, and that it is capable of transitioning between modes correctly.
4.4.2 Dual-Mode Scheduler
Once the implementation for the consensus protocol has been properly tested, further tests have been created for the dual-mode scheduler. These tests mainly aimed at making sure that the deterministic algorithms (e.g. updating the rate for the asynchronous mode) worked as intended. We focused Sharpedo's dual-mode scheduler testing on the more complex functions; specifically, the functions that allowed the dynamic portion of the scheduler to work as intended. This meant making sure that Sharpedo's is_directly_committed() and collectSubdag() functions worked as intended under different scenarios.
-
collectSubdag(): These tests made sure that a subDAG was collected appropriately. This meant making sure that, in scenarios where a subDAG of an anchor was disconnected from many blocks (i.e., in case of asynchrony), then, the collected subDAG only included blocks that could be accessed through the anchor's causal history.
-
is_directly_committed(): Just like the tests conducted on the consensus protocol, this function was tested to work correctly under both multi-leader and pipeline modes, as well as correctly ignoring leader slots marked as to-commit through the indirect rules.
Additionally, the correctness of the leader sequence truncation has been confirmed through tests performed in the core consensus module (core.rs). This test verifies that the system properly identifies asynchronous rounds within committed sequences and truncates at the appropriate boundary, ensuring the correct re-calculation of the asynchronous schedule.
4.5 Simulations
The implementation of the dual-mode protocol has been rigorously tested via a simulation layer, originally introduced by Babel et al. [36] for the Mysticeti protocol.. The provided simulation layer allowed us to replicate the functionality of tokio runtime and TCP networking. This simulation layer not only allowed us to simulate real-life WAN latencies, but to also mimic the passage of time. In this way, we were able to test the dual-mode functionality of Sharpedo in numerous scenarios, allowing us to verify that Sharpedo's dual-mode scheduler was working as intended. Like stated in Section 4.2, Sharpedo's simulation tests utilise a different DualModeConfig then the default preset, to allow the simulation test to hit the asynchronous mode more often then in a normal use case. The discrete event simulator tests confirmed that Sharpedo's dual-mode scheduler correctly increases and decreases depending on network conditions, which was achieved by creating the following scenarios for the simulations (further detail can be seen in Appendix A.3):
• Ideal Case: Latency range for all validators is within the timeouts set by the protocol; thus, all leaders proposal are successfully committed. Since the amount of direct commits is 100%, the scheduler does not detect any issues, thus it decides to run the asynchronous mode less frequently, decreasing the intervals frequency.
• Worst Case: f validators are given a higher latency range then the remaining validators. This will cause them to miss their leader slots in rounds where they are elected leaders, consequently making their proposal marked as to-skip. The test shows that frequency of Sharpedo's asynchronous mode increases, as there are not enough commits to reach the required ratio. Interestingly, we cannot set more than f validators to have higher latency due to the construction of Sharpedo. When there are more than f slow validators, the scheduler actually does not detect any problems with the system and subsequently decreases the rate of the asynchronous mode. Since validators need references to propose a block, if validators are slow, the other validators must wait for at least one slow validator to complete the references required. Thus, they all slow down to the same high-latency as the slow validators, thus allowing slow validators to directly commit their blocks.
Lastly, as stated by Babel et al. [36], the simulation layer appears to provide similar results when compared to geo-distributed cloud infrastructure tests. Specifically, we can obtain simulated latencies for the time it takes for a transaction to be committed. To understand the benefits of Sharpedo's dual-mode functionality, it is beneficial to test the protocol under a number of different settings:
• Partially-Synchronous mode only: This setting will reflect the latency of commitments under partially-synchronous assumptions (i.e., emulating how Mysticeti performs). We run Sharpedo exclusively under its partially-synchronous mode, thus we will call this the p-sync mode.
• Asynchronous mode only: This setting emulates the latency of commitments under asynchronous assumptions (i.e., it emulates how Mahi-Mahi performs). We run Sharpedo exclusively under its asynchronous mode, thus we will call this the async mode.
• Dual-Mode: This setting will reflect how Sharpedo performs when the dual-mode scheduler is turned on (with an initial asynchronous interval K for every 30 rounds). We will call this the dual mode. Of note, K has been chosen so that, in our simulated setting, the protocol can reach multiple asynchronous-rounds.
Both the async and dual mode tests will be run utilising both configurable wavelengths and . While the simulation layer provides a number of metrics, we will only be focusing on the following, due to its relevance to the project: tx commit(ms). The tx commit(ms) metric measures the transaction commit latency, defined as the time from when a transaction is received by a validator until it is committed in Sharpedo.
| Operation Mode | Latency (ms) | vs. Baseline |
|---|---|---|
| -sync mode | 350.8 | baseline |
| dual mode () | 355.2 | +1.3% |
| dual mode () | 362.2 | +3.3% |
| async mode () | 439.5 | +25.3% |
| async mode () | 530.9 | +51.3% |
Table 4.1: Results for average latencies (in milliseconds). These results are visualized in Figure C.1, found in Appendix C
Table 4.1 present the results of our simulation tests on Sharpedo. As expected, when Sharpedo is run exclusively under its partially-synchronous mode, it performs best compared to both of the two other modes. Furthermore, we can see that, if Sharpedo were to be run solely under its asynchronous mode, the latency would increase substantially. Thus, here we reach the true benefit of Sharpedo's dual-mode functionality. We can clearly see that Sharpedo, when run under its intended mode (that is with its dual-mode functionality), exhibits a minimal increase in latency when compared to the -sync mode. In compensation, however, Sharpedo gains the "ability" to achieve liveness in asynchronous settings, achieving greater flexibility for a marginal increment in latency. Furthermore, Sharpedo's latency increase between and is minimal compared to the increase we see in the async mode. This means we can sacrifice a minimal amount of latency to gain stronger guarantees of liveness in periods of asynchrony. That said, it is important to note that these simulation results cannot replace tests performed via geo-distributed cloud infrastructures, as done by prior works [32, 31, 36, 38]. Such tests would also help us determine what interval value would be the most optimal for Sharpedo. Nonetheless, Section 6.1 presents the possible next steps that can be taken beyond the scope of this project.
We have not only presented Sharpedo, the first dual-mode uncertified DAG-based protocol, but also demonstrated its functionality. Following this, we conclude this project by presenting the formal proofs of Sharpedo's correctness.
Chapter 5
Dual-Mode Protocol Security
We shall now prove that Sharpedo never violates the safety property, and that, eventually, achieves liveness both before and after GST is reached. We will do so by proving that Sharpedo solves BAB, which allows validators to reach consensus on a sequence of messages, achieving State Machine Replication (SMR) [14, 10]. While similar to the atomic broadcast protocol described in Section 2.1.1, BAB imposes stricter requirements that are formally defined as follows [14]:
• Integrity: For an honest validator , and every round number , an honest validator will output at most once, independent of .
• Total Order: If an honest validator outputs before , then all honest validators output before .
• Validity: If an honest validator calls , then, every other honest validator will eventually output .
• Agreement: If an honest validator outputs , then every other honest validator will eventually output .
By proving that Sharpedo meets the aforementioned properties, we also prove indirectly that it also achieves the safety and liveness properties. As we will see, due to the similarity between the protocols, the proofs revolving around safety are reproduced from those presented in the work of Jovanovic et al. [38] for the Mahi-Mahi protocol, with slight modifications to fit Sharpedo's distinct dual-mode mechanism. The proofs of liveness, instead, are identical to the proofs as seen in both Mysticeti and Mahi-Mahi, depending on whether GST has been reached or not [36, 38]. The primary contributions are the proofs that Sharpedo's dynamic schedule does not interfere with the aforementioned proofs, but instead, maintains both safety and liveness. These proofs have been adapted from the works of Tsimos et al. [35], modified to take advantage of Sharpedo's stronger liveness guarantees.
5.1 Total Order and Integrity Proofs
We will begin by proving that Sharpedo satisfies the total order and integrity properties of BAB [14]. The initial proofs of total order and integrity, as stated, are reproduced from the work by Jovanovic et al. [38]. These are included both for completeness and because they are required to prove the security of the dynamic scheduler.
Lemma 1. If in round , blocks from distinct validators certify a block , then all blocks at future rounds will have a path to a certificate for from round .
Proof. We prove the lemma by induction on . For the base case . Let be a block at round . Since points to blocks at round , by quorum intersection, must point to at least one of the certificates for . For the induction case, assume the lemma holds up to round and consider the case of round . Let be a block at round . By the induction hypothesis, blocks at round have paths to round- certificates for . Since points to blocks from round , by quorum intersection, must point to at least one block that has a path to a round- certificate for [38].
Observation 1. A block cannot vote for more than one block proposal from a given validator, in a given round.
Proof. This is by construction. Honest validators interpret support in the DAG through deterministic depth-first traversal. So even if a block in the vote round has paths to multiple leader round blocks from the same validator (i.e., equivocating blocks), all honest validators will interpret to vote for only one of 's blocks (the first block to appear in the depth-first traversal starting from ) [38].
Lemma 2. At most a single block per round from the same validator can be certified.
Proof. Assume by contradiction that in a given round , there exist two distinct blocks and from the same validator such that both and are certified. This means that there exist round- blocks and that certify and , respectively. and must point to votes for and , respectively. By quorum intersection, there exists an honest validator that has voted for both and in the vote round. Since honest validators only produce a single block per round, this implies that there exists a block that votes for both and , contradicting Observation 1 [38].
Observation 2. If an honest validator v directly or indirectly commits a block b, then v's local DAG contains a certificate for b.
Proof. Follows immediately from Sharpedo's direct and indirect commit rules
Given that Sharpedo's leader slots are decided differently, depending on the current mode of operation, we adapt the following observation to better suite the protocol.
Observation 3. Honest validators agree on the sequence of leader slots.
Proof. This is true for both Sharpedo's operation modes. With its asynchronous mode, it follows immediately from the properties of the common coin. While for its partially-synchronous mode, it follows immediately from the use of Sharpedo's deterministic leader election algorithm.
Lemma 3. If an honest validator v commits some block b in a slot s, then no other honest validator decides to directly skip the slot s
Proof. Assume by contradiction that some honest validator decides to directly skip s. Then it must be the case that in the local DAG of , at least validators did not vote for b. However, since v commits b at s, by Observation 2, there must exist a certificate for b at s. So in v's local DAG there must be validators that vote for b. By quorum intersection, at least one honest validator both voted for b and did not vote for b. Since honest validators produce a single block in the vote round, this is a contradiction [38].
Lemma 4. If an honest validator directly commits some block in a slot s, then no other honest validator decides to skip the slot s.
Proof. Assume by contradiction that an honest validator v directly commits block b in slot s while another honest validator decides to skip s. By Lemma 3, cannot directly skip s; it must be the case therefore that skips s using the indirect decision rule. Let r be the round of s. Since v directly commits b, there exist certificates for b at s. Therefore, by Lemma 1, all blocks at rounds , including the anchor of s, have a path to a certificate for b at s. Thus, cannot decide to skip s using the indirect decision rule. We have reached a contradiction [38].
Lemma 5. If a slot s is marked as to-commit by two honest validators, then slot s contains the same block for both honest validators
Proof. Let v and u be two honest validators and assume that v commits block b at slot s. We will show that if u commits slot s, then s contains b at s. Let w be the validator that produced block b. By Observation 2, for b to be committed at slot s at v, there must exist at least one certificate for b. By Observation 3, v and u agree that s must contain a block by w. By Lemma 2, at most a single block per round from w can be certified. So u cannot have a certificate for any other block than b at slot s [38].
Lemma 6. If a slot s is decided at two honest validators v and , then either both validators commit s, or both validators skip s.
Proof. Assume by contradiction that there exists a slot s such that v and decide differently at s. We consider a finite execution prefix and assume wlog that s is the highest slot at which v and decide differently (). Further assume wlog that v commits s and skips s. By Lemma 4 and Lemma 3, neither v nor could have used the direct decision rule for s; they must both have used the indirect rule. Consider now the anchor of s: v and must agree on which slot is the anchor of s, since by our assumption () above, they make the same decisions for all slots higher than s, including the anchor of s. Let be the anchor of s; must be committed at both v and . Thus, by Lemma 5, v and commit the same block at . But then v and cannot reach different decisions about slot s using the indirect decision rule. We have reached a contradiction [38].
With Lemma 6, we prove that there is consistency amongst honest validators' commit sequences. If an honest validator commits a leader block, then all other honest validators will also commit that same block. The same is true in the case if a honest validator decides to skip a leader block. However, we now need to prove that, beyond leader blocks, also non-leader blocks are delivered in the same order by honest validators.
Causal history & delivery conditions. Consider an honest validator v. We call the causal history of a block b in v's DAG, the transitive closure of all blocks referenced by b in v's DAG, including b itself. In Sharpedo, a block b is delivered by an honest validator v if (1) there exists a committed leader block l in v's DAG such that b is in l's causal history (2) all slots up to l are decided in v's DAG and (3) b has not been delivered as part of a lower slot's causal history. In this case we say b is delivered at slot s, or delivered with block l [38].
Lemma 7. If a block b is delivered by two honest validators v and , then b is delivered at the same slot s, and b is delivered with the same leader block l, at both v and .
Proof. Let be the slot at which is delivered at validator , and the corresponding leader block in , also at validator . Consider now the slot at which is delivered at validator , and the corresponding leader block. Assume by contradiction that . If , then would have also delivered at slot , since by Lemma 5 must commit the same leader blocks in the same slots, so could not have delivered again at slot ; a contradiction. Similarly, if , then would have already delivered at slot , since by Lemma 5 and must have committed the same block in slot ; contradiction. Thus it must be that , and by Lemma 5, [38].
Having established that both leader and non-leader blocks are delivered in consistent order by honest validators, we now turn to proving that Sharpedo's dynamic scheduling mechanism maintains safety across schedule transitions. As previously noted, we prove the safety of the dynamic scheduling mechanism by adapting proofs from Tsimos et al. [35], developed for the Hammerhead protocol. We first show that blocks broadcast by honest validators will, eventually, by added to the local DAG of honest validators.
Lemma 8. If a block b produced by an honest validator v references some block , then will eventually be included in the local DAG of every honest validator.
Proof. This is ensured by the synchronizer sub-component in each validator: if some validator w receives b from v, but does not have yet, w will request from v; since v is honest and the network links are reliable, v will eventually receive w's request, send to w, and w will eventually receive . The same is recursively true for any blocks from the causal history of , so w will eventually receive all blocks from the causal history of and thus include in its local DAG [38].
Observation 4. If an honest validator v broadcasts a block b at round r, then every honest validator will eventually include b in their local DAG.
Proof. This holds by construction. Since network links are reliable, all honest validators eventually receive b from v.
Observation 5. If an honest validator commits a block b at slot s, then every honest validator that commits slot s will commit the same block b, and when they do commit, they will have the same causal history for b in their DAG.
Proof. By Observation 4, if an honest validator commits block b, then every honest validator will eventually include b in their local DAG. By Lemma 5, if two honest validators both commit slot s, they commit the same block b at that slot. When an honest validator commits b, by Lemma 8, they must have the complete causal history of b in their local DAG, which is deterministic and identical across all validators [38].
Lemma 9 (Schedule Agreement). If an honest validator switches to schedule S, then eventually every honest validator will switch to schedule S.
Proof. We prove by induction that all honest validators will eventually converge to the same schedule:
- Base case: Consider the initial schedule , where the asynchronous mode runs every rounds, and . Let be the first honest validator to switch to schedule . Given Algorithm 1 (process TRYCOMMIT), must have committed some anchor for round where to trigger the schedule update. Consider another honest validator who has committed every leader proposal up to round where . If , then by Algorithm 1 (process TRYCOMMIT), would have already switched to by round (given Observation 5). Thus will eventually commit some anchor where . By quorum intersection, since validator committed anchor in round , there must exist a path from to . Therefore, by Lemma 7 and the protocol's linearizer component, validator will order anchor . Consequently, will trigger a schedule switch and, by Observation 5, will go from schedule to schedule .
• Inductive step: Assume the statement holds for all schedules . We prove it also holds for . Let be the first honest validator switching from to . By Algorithm 1 (process TRYCOMMIT), must have committed some anchor for round . For any other honest validator currently in some schedule where , by the induction hypothesis, will eventually switch to . Consider having committed up to round . Eventually, will switch to and subsequently commit some anchor for round . By quorum intersection, since committed in round , there exists a path from to . Therefore, by Lemma 7 and the protocol's linearizer component, validator will order anchor . Consequently, will trigger a schedule switch and, by Observation 5, will go from schedule to schedule .
Lemma 10. Let represent the highest schedule achieved by any honest party. Eventually, every honest party can reach schedule .
Proof. Let be the honest party that advanced to schedule . By Observation 5, all anchor blocks that committed to reach will eventually be added to every honest party's DAG. Since the schedule switching rule is deterministic and all honest parties process the same committed anchors, they will all compute the same schedule transitions and eventually reach .
Theorem 1 (Total Order). Sharpedo satisfies the total order property of Byzantine Atomic Broadcast.
Proof. By construction, due to the deterministic algorithm to order the causal history of a block b, and via Lemma 7, Sharpedo attains the BAB total order property. Furthermore, Lemma 9 and 10 demonstrate that Sharpedo's dynamic scheduling mechanism preserves the total order property by ensuring all honest validators eventually converge to the same schedule.
Theorem 2 (Integrity). Sharpedo satisfies the integrity property of Byzantine Atomic Broadcast.
Proof. This is by construction. The deterministic linearizer algorithm present in the protocol removes blocks with duplicate sequence numbers before creating the final sequence of blocks. Since a block b is delivered via the causal history of some leader block l only if b has not been delivered already, thus honest validators cannot propose block b multiple times [38].
5.2 Validity and Agreement Proofs
Due to Sharpedo encapsulating both partially-synchronous and asynchronous assumptions, we can prove, separately, that the protocol satisfies both the validity and agreement BAB properties, under both network assumptions. Furthermore, we show that, regardless of network conditions, Sharpedo's schedule achieves liveness.
Lemma 11. Under asynchronous network conditions (before GST), the protocol will eventually make progress.
Proof. Assume a period of time where GST is not reached for a long time, as Sharpedo's asynchronous mode allows , we have two cases where we have to prove liveness:
• Case w = 4 : By Theorem 3 and Theorem 4 of Mahi-Mahi [38].
• Case w = 5 : By Theorem 5 and Theorem 6 of Mahi-Mahi [38].
Thus, in either case, an honest validator proposal will eventually be committed and delivered consistently across all validators, ensuring liveness despite the absence of timing guarantees.
Lemma 12. After GST has been reached, the protocol will eventually make progress within a bounded number of rounds.
Proof. Assume the asynchronous rounds are scheduled sufficiently far apart to allow network synchronization. By the validity and agreement properties of Mysticeti [36], honest validator proposals will be committed within a bounded number of rounds due to the timing guarantees after GST.
Lemma 13. The protocol will eventually make progress.
Proof. This follows directly from Lemma 11 and Lemma 12.
Lemma 14. All honest validators agree on whether to use the partially-synchronous (Mysticeti) or asynchronous (Mahi-Mahi) mode for each round.
Proof. From Lemma 9, we know that all honest validators eventually converge to the same schedule. Since the choice of consensus mode is determined by the current schedule using a deterministic function, all honest validators operating under the same schedule will make identical consensus mode decisions for each round.
We now prove that the dynamic schedule achieves liveness, irrespective of whether GST has been reached or not. As before, portions of the following proofs have been adapted from the work of Tsimos et al. [35]. In this case, specifically, the liveness Lemma for Hammerhead, have been translated to take advantage of Sharpedo stronger liveness guarantees
Lemma 15. Let S be a schedule. If all honest validators are in schedule S, then eventually all honest validators will switch to the next schedule.
Proof. From Lemma 13, the protocol will eventually make progress. This means that eventually we will reach the necessary round to trigger a schedule switch. When this round is reached, the protocol will commit the corresponding anchor block. Since all honest validators are operating under the same schedule S and agree on the consensus mode (Lemma 14), they will all observe the same committed blocks and apply the same deterministic schedule update rule.
Lemma 16. Let be the latest schedule any honest party has advanced to. Eventually some honest party will enter .
Proof. From Lemma 10, every honest party will eventually be at . Once all honest parties are at schedule , we have two cases:
• Case 1 (Partially synchronous conditions): If GST is reached, by Lemma 12, the dual-mode protocol will eventually commit an anchor block. By Lemma 15, this triggers advancement to .
• Case 2 (Asynchronous conditions): If GST is not reached, by Lemma 11, the dual-mode protocol will eventually commit an anchor block. By Lemma 15, this triggers advancement to .
In both cases, eventual progress to is guaranteed.
Theorem 3 (Validity). Sharpedo satisfies the validity property of Byzantine Atomic Broadcast.
Proof. Let v be an honest validator and b a block broadcast by v. By Observation 4, b is eventually delivered by every honest validator. From Lemma 13, the protocol will eventually make progress and commit some leader blocks. From Lemma 16, the system will continue to advance through schedules, ensuring that some leader containing b in its causal history will eventually be committed. Therefore, all honest validators will eventually deliver b.
Theorem 4 (Agreement). Sharpedo satisfies the agreement property of Byzantine Atomic Broadcast.
Proof. Suppose an honest validator v delivers a block b. Then b was delivered as part of some committed leader's causal history. From Lemma 16, all honest validators will eventually converge to the same schedule sequence and therefore observe the same committed leaders. From Lemma 13, all validators will continue to make progress and process these committed leaders. Therefore, all honest validators will eventually deliver b.
Chapter 6
Conclusion
Dual-mode consensus protocols remain the ideal protocols for decentralised distributed ledgers. By providing liveness in both synchronous and asynchronous network setting, these protocols can better reflect real-life scenarios where we cannot guarantee networks to remain stable. While partially-synchronous assumptions are easier to reason with, and faster then their asynchronous counterparts, liveness is lost in periods of asynchrony [1]. On the other hand, asynchronous systems sacrifice latency to increase robustness in periods of asynchrony. We have seen with both Ditto and Bullshark's evaluations that dual-mode consensus protocols can achieve results that rival similar state-of-the-art protocols [37, 32]. Thus, with this research project, we have presented the next step in dual-mode consensus algorithms. Sharpedo, the first dual-mode consensus algorithm built on an uncertified data structure, achieves the 3-message-delay lower bound for the greater part of its duration, while providing liveness even during periods of asynchrony. Empirical evaluation was beyond the scope of this work; however, based on theoretical analysis, Sharpedo should achieve similar results (both throughput and latency) as Mysticeti, while maintaining lower latency compared to Mahi-Mahi [36, 38]. Furthermore, beyond providing detailed specifications and implementation, in Chapter 3 and Chapter 4 we also demonstrate that safety and liveness are maintained with Sharpedo. Hence, these results establish well defined future research objectives.
6.1 Further Work
Given the result of our project, the protocol that has been constructed is guaranteed to achieve both safety and liveness in both synchronous and asynchronous settings. Thus, the next step of the project would be to evaluate the protocol by running experiments on a geo-distributed cloud infrastructure. These experiments would follow a similar structure to the experiments performed on Mysticeti and Mahi-Mahi (as seen in Figure C.6 and Figure C.7 respectively), allowing us to improve and evaluate the protocol.
We do not know which value K for the interval found in Sharpedo's dynamic schedule would be optimal. Therefore, by running experiments, we could determine the most effective min_async_interval and max_async_interval bounds for the interval, alongside other improvements such as the optimal adjustment_factor after a schedule update (a description of all these variables can be found in Appendix A.1.2). Furthermore, the evaluations would allow us to see how Sharpedo performs against other consensus protocols (such as the frequently discussed Mysticeti and Mahi-Mahi protocols) [36, 38].
Specifically, by following similar evaluation procedures as related protocols, through these experiments we would able to demonstrate the following claims:
-
C1: Sharpedo has similar throughput and lower latency compare to the Mahi-Mahi consensus protocol when operating under ideal conditions [38].
-
C2: Sharpedo has similar throughput and marginally higher latency compared to the Mysticeti consensus protocol when operating under ideal conditions [36].
-
C3: Sharpedo, parametrised with a wave length of 4 for its asynchronous mode, has similar throughput and lower latency as when configured with a wave length of 5.
Similarly to prior work, to determine the validity of the aforementioned claims, Sharpedo should be tested under a number of different scenarios. Specifically, Sharpedo should be tested with both a small and large committee size (i.e., committee of size 10 and 50). Furthermore, Sharpedo requires evaluation under both ideal-conditions (i.e., all committee members are working as intended), alongside performance under crash-faults (i.e., some committee members are fault). It is important to note that the evaluation of BFT consensus protocols under the presence of Byzantine faults is an open research question, thus Sharpedo relies on formal proofs to guarantee safety and liveness (provided in Chapter 5) [30]. Furthermore, as mentioned by related research, while it is important that Sharpedo handles Byzantine faults correctly, the presence of such faults in real-life proof-of-stake blockchains are rare, and crash-faults are much more common occurrences [38, 36].
Bibliography
[1] L. Lamport. “Proving the Correctness of Multiprocess Programs”. In: IEEE Transactions on Software Engineering SE-3.2 (1977), pp. 125–143. DOI: 10.1109/TSE.1977.229904.
[2] M. Pease, R. Shostak, and L. Lamport. "Reaching Agreement in the Presence of Faults". In: J. ACM 27.2 (Apr. 1980), pp. 228–234. ISSN: 0004-5411. DOI: 10.1145/322186.322188. URL: https://doi.org/10.1145/322186.322188.
[3] Leslie Lamport, Robert Shostak, and Marshall Pease. "The Byzantine Generals Problem". In: ACM Trans. Program. Lang. Syst. 4.3 (July 1982), pp. 382–401. ISSN: 0164-0925. DOI: 10.1145/357172.357176. URL: https://doi.org/10.1145/357172.357176.
[4] Michael O. Rabin. “Randomized byzantine generals”. In: Proceedings of the 24th Annual Symposium on Foundations of Computer Science. SFCS '83. USA: IEEE Computer Society, 1983, pp. 403–409. ISBN: 0818605081. DOI: 10.1109/SFCS.1983.48. URL: https://doi.org/10.1109/SFCS.1983.48.
[5] Leslie Lamport. “Using Time Instead of Timeout for Fault-Tolerant Distributed Systems.” In: ACM Trans. Program. Lang. Syst. 6.2 (Apr. 1984), pp. 254–280. ISSN: 0164-0925. DOI: 10.1145/2993.2994. URL: https://doi.org/10.1145/2993.2994.
[6] Michael J. Fischer, Nancy A. Lynch, and Michael S. Paterson. "Impossibility of distributed consensus with one faulty process". In: J. ACM 32.2 (Apr. 1985), pp. 374–382. ISSN: 0004-5411. DOI: 10.1145/3149.214121. URL: https://doi.org/10.1145/3149.214121.
[7] Cynthia Dwork, Nancy Lynch, and Larry Stockmeyer. "Consensus in the presence of partial synchrony". In: J. ACM 35.2 (Apr. 1988), pp. 288–323. ISSN: 0004-5411. DOI: 10.1145/42282.42283. URL: https://doi.org/10.1145/42282.42283.
[8] Ajei Gopal and Sam Toueg. “Reliable broadcast in synchronous and asynchronous environments (preliminary version)”. In: Distributed Algorithms. Ed. by Jean-Claude Bermond and Michel Raynal. Berlin, Heidelberg: Springer Berlin Heidelberg, 1989, pp. 110–123. ISBN: 978-3-540-46750-2.
[9] S. Ben-David et al. “On the power of randomization in online algorithms”. In: Proceedings of the Twenty-Second Annual ACM Symposium on Theory of Computing. STOC '90. Baltimore, Maryland, USA: Association for Computing Machinery, 1990, pp. 379–386. ISBN: 0897913612. DOI: 10.1145/100216.100268. URL: https://doi.org/10.1145/100216.100268.
[10] Fred B. Schneider. “Implementing fault-tolerant services using the state machine approach: a tutorial”. In: ACM Comput. Surv. 22.4 (Dec. 1990), pp. 299–319. ISSN: 0360-0300. DOI: 10.1145/98163.98167. URL: https://doi.org/10.1145/98163.98167.
[11] Tushar Deepak Chandra and Sam Toueg. “Unreliable failure detectors for reliable distributed systems”. In: J. ACM 43.2 (Mar. 1996), pp. 225–267. ISSN: 0004-5411. DOI: 10.1145/226643.226647. URL: https://doi.org/10.1145/226643.226647.
[12] Leslie Lamport. “The part-time parliament”. In: ACM Trans. Comput. Syst. 16.2 (May 1998), pp. 133–169. ISSN: 0734-2071. DOI: 10.1145/279227.279229. URL: https://doi.org/10.1145/279227.279229.
[13] Miguel Castro and Barbara Liskov. “Practical Byzantine fault tolerance”. In: Proceedings of the Third Symposium on Operating Systems Design and Implementation. OSDI '99. New Orleans, Louisiana, USA: USENIX Association, 1999, pp. 173–186. ISBN: 1880446391.
[14] Assia Doudou, Benoît Garbinato, and Rachid Guerraoui. “Atomic Broadcast In A Byzantine Model”. In: Communication-Based Systems: Proceeding of the 3rd International Workshop held at the TU Berlin, Germany, 31 March – 1 April 2000. Ed. by Günter Hommel. Dordrecht: Springer Netherlands, 2000, pp. 179–195. ISBN: 978-94-015-9608-4. DOI: 10.1007/978-94-015-9608-4_14. URL: https://doi.org/10.1007/978-94-015-9608-4_14.
[15] Christian Cachin et al. “Secure and Efficient Asynchronous Broadcast Protocols”. In: Advances in Cryptology — CRYPTO 2001. Ed. by Joe Kilian. Berlin, Heidelberg: Springer Berlin Heidelberg, 2001, pp. 524–541. ISBN: 978-3-540-44647-7.
[16] Christian Cachin et al. Secure and Efficient Asynchronous Broadcast Protocols. Cryptology ePrint Archive, Paper 2001/006. 2001. URL: https://eprint.iacr.org/2001/006.
[17] Leslie Lamport. "Paxos Made Simple". In: ACM SIGACT News (Distributed Computing Column) 32, 4 (Whole Number 121, December 2001) (Dec. 2001), pp. 51–58. URL: https://www.microsoft.com/en-us/research/publication/paxos-made-simple/.
[18] Miguel Correia, Nuno Ferreira Neves, and Paulo Veríssimo. "From Consensus to Atomic Broadcast: Time-Free Byzantine-Resistant Protocols without Signatures". In: The Computer Journal 49.1 (Nov. 2005), pp. 82–96. ISSN: 0010-4620. DOI: 10.1093/comjnl/bxh145. eprint: https://academic.oup.com/comjnl/article-pdf/49/1/82/1161928/bxh145.pdf. URL: https://doi.org/10.1093/comjnl/bxh145.
[19] Satoshi Nakamoto. "Bitcoin: A Peer-to-Peer Electronic Cash System". In: (May 2009). URL: http://www.bitcoin.org/bitcoin.pdf.
[20] Zarko Milosevic, Martin Hutle, and Andre Schiper. "On the Reduction of Atomic Broadcast to Consensus with Byzantine Faults". In: 2011 IEEE 30th International Symposium on Reliable Distributed Systems. 2011, pp. 235–244. DOI: 10.1109/SRDS.2011.36.
[21] Marcelo Fiore and Marco Devesas Campos. The Algebra of Directed Acyclic Graphs. 2013. arXiv: 1303.0376 [math.CT]. URL: https://arxiv.org/abs/1303.0376.
[22] Diego Ongaro and John Ousterhout. “In search of an understandable consensus algorithm”. In: Proceedings of the 2014 USENIX Conference on USENIX Annual Technical Conference. USENIX ATC'14. Philadelphia, PA: USENIX Association, 2014, pp. 305–320. ISBN: 9781931971102.
[23] Maura B. Paterson and Douglas R. Stinson. Optimal constructions for ID-based one-way-function key predistribution schemes realizing specified communication graphs. 2014. arXiv: 1403.1468 [cs.CR]. URL: https://arxiv.org/abs/1403.1468.
[24] Bryan Ford. Threshold Logical Clocks for Asynchronous Distributed Coordination and Consensus. 2019. arXiv: 1907.07010 [cs.DC]. URL: https://arxiv.org/abs/1907.07010.
[25] Maofan Yin et al. HotStuff: BFT Consensus in the Lens of Blockchain. 2019. arXiv:1803.05069 [cs.DC]. URL: https://arxiv.org/abs/1803.05069.
[26] Vitalik Buterin et al. Combining GHOST and Casper. 2020. arXiv: 2003.03052 [cs.CR]. URL: https://arxiv.org/abs/2003.03052.
[27] Ittai Abraham et al. Reaching Consensus for Asynchronous Distributed Key Generation. 2021. arXiv: 2102.09041 [cs.DC]. URL: https://arxiv.org/abs/2102.09041.
[28] Idit Keidar et al. All You Need is DAG. 2021. arXiv: 2102.08325 [cs.DC]. URL: https://arxiv.org/abs/2102.08325.
[29] Sravya Yandamuri et al. Communication-Efficient BFT Protocols Using Small Trusted Hardware to Tolerate Minority Corruption. Cryptology ePrint Archive, Paper 2021/184. 2021. URL: https://eprint.iacr.org/2021/184.
[30] Shehar Bano et al. “Twins: BFT Systems Made Robust”. In: 25th International Conference on Principles of Distributed Systems (OPODIS 2021). Ed. by Quentin Bramas, Vincent Gramoli, and Alessia Milani. Vol. 217. Leibniz International Proceedings in Informatics (LIPIcs). Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022, 7:1–7:29. ISBN: 978-3-95977-219-8. DOI: 10.4230/LIPIcs.OPODIS.2021.7. URL: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.OPODIS.2021.7.
[31] George Danezis et al. Narwhal and Tusk: A DAG-based Mempool and Efficient BFT Consensus. 2022. arXiv: 2105.11827 [cs.CR]. URL: https://arxiv.org/abs/2105.11827.
[32] Alexander Spiegelman et al. Bullshark: DAG BFT Protocols Made Practical. 2022. arXiv: 2201.05677 [cs.CR]. URL: https://arxiv.org/abs/2201.05677.
[33] Alexander Spiegelman et al. Bullshark: The Partially Synchronous Version. 2022. arXiv: 2209.05633 [cs.DC]. URL: https://arxiv.org/abs/2209.05633.
[34] Idit Keidar et al. “Cordial Miners: Fast and Efficient Consensus for Every Eventuality”. en. In: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. DOI: 10.4230/LIPICS.DISC.2023.26. URL: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.DISC.2023.26.
[35] Giorgos Tsimos et al. HammerHead: Leader Reputation for Dynamic Scheduling. 2023. arXiv: 2309.12713 [cs.CR]. URL: https://arxiv.org/abs/2309.12713.
[36] Kushal Babel et al. Mysticeti: Reaching the Limits of Latency with Uncertified DAGs. 2024. arXiv: 2310.14821 [cs.DC]. URL: https://arxiv.org/abs/2310.14821.
[37] Rati Gelashvili et al. Jolteon and Ditto: Network-Adaptive Efficient Consensus with Asynchronous Fallback. 2024. arXiv: 2106.10362 [cs.DC]. URL: https://arxiv.org/abs/2106.10362.
[38] Philipp Jovanovic et al. Mahi-Mahi: Low-Latency Asynchronous BFT DAG-Based Consensus. 2024. arXiv: 2410.08670 [cs.DC]. URL: https://arxiv.org/abs/2410.08670.
[39] Rust Team. The Rust Programming Language. Accessed On : 2025-06-05. 2025. URL: https://www.rust-lang.org.
[40] RustCrypto. Rustcrypto: Hashes. Accessed On : 2025-06-10. 2025. URL: https://github.com/RustCrypto/hashes.
[41] Tokio Team. Tokio. Accessed On : 2025-06-10. 2025. URL: https://tokio.rs.
[42] Henry de Valence. Ed25519 for consensus-critical contexts. Accessed On : 2025-06-11. 2025. URL: https://crates.io/crates/ed25519-consensus.
[43] Sui / Mysticeti. Accessed On : 2025-04-25. URL: https://sui.io/mysticeti.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Appendix A
Code Structure
A.1 Implementation
A.1.1 Decision Rule
Universal Committer
Listing A.1 shows a snippet of code that shows the primary modifications made to the Mysticeti UniversalCommitter structure [36]. Primarily, we include a new variable wave_length_async which stores how long our asynchronous mode wave length is going to be (i.e., either 4 or 5 rounds). Furthermore, we allow for this value to be set during the creation of the structure, via with_async_wave_length. Finally, we modified the try_commit function to also pass the AsyncState structure, which holds all the information required for the function to determine if a round should be run via its asynchronous mode or not (this structure is expanded upon in Appendix A.1.2).
pub fn try_commit( &self, last_decided: BlockReference, async_state: &AsyncState, ) -> Vec<LeaderStatus> { let mut leaders = VecDeque::new(); for round in (last_decided_round..=highest_known_round).rev() { let is_async = (round - async_state.last_round) % async_state.interval == 0; for committer in self.committers.iter().rev() { let mut status = committer.try_direct Decide(leader, round, is_async); if !status.is_decided() { status = committer.try_indirect Decide( leader, round, leaders.iter(), is_async ); } } } }
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
} leaders.push_front(status); } } // ... filter and return decided leaders }
pub struct UniversalCommitterBuilder { wave_length_async: RoundNumber, // ... other fields }
impl UniversalCommitterBuilder { pub fn with_async_wave_length(mut self, wave_length_async: RoundNumber) -> Self { self.wave_length_async = wave_length_async; self } }
Listing A.1: UniversalCommitter async state integration
BaseCommitter
Similarly to how we have modified the Universal Committer structure, Listing A.2 shows the primary modifications made to the Mysticeti BaseCommitter structure [36]. Both try_direct Decide and try_indirect Decide have a new is_async boolean that is set to true if the current leader_round should be run under the asynchronous mode. If it is, then the decision_round for this leader_round is calculated differently, via decision_round_async. Furthermore, depending on mode of operation, try_indirect Decide's threshold for anchor's round also changes depending on the is_async flag.
fn decision_round_async(&self, wave: WaveNumber) -> RoundNumber { wave * self.options.wave_length + self.options.wave_length_async - 1 + self.options.round_offset}
pub fn try_direct Decide( &self, leader: AuthorityIndex, leader_round: RoundNumber, is_async: bool, ) -> LeaderStatus { let wave_length = if is_async { self.options.wave_length_async } else { self.options.wave_length };
let decision_round = if is_async { self.decision_round_async(wave) } else { self.decision_round(wave) };
// ... rest of logic }
pub fn try_indirect Decide<a>( &self, leader: AuthorityIndex, leader_round: RoundNumber, leaders: impl Iterator<Item = &'a LeaderStatus>, is_async: bool, ) -> LeaderStatus { let anchor_round = if is_async { leader_round + self.options.wave_length_async } else { leader_round + self.options.wave_length }; // ... rest of decision logic }
Listing A.2: BaseCommitter async decision logic
A.1.2 Dual-Mode Scheduler
Asynchronous State
Listing A.3 shows the structure that keeps of the current state of the asynchronous round. The interval represents the current interval between asynchronous rounds, while last_round represents the last round which an asynchronous round was executed. Furthermore, hypothetically this structure can be included in the write-ahead-log (WAL) that our protocol utilises, allowing crashed nodes to recover their session correctly.
#[derive(Clone, Debug)] pub struct AsyncState { pub interval: RoundNumber, pub last_round: RoundNumber, }
impl Default for AsyncState { fn default() -> Self { Self { interval: DEFAULT_ASYNC_RATE, last_round: 0, } } }
impl AsyncState { pub fn is_async_round(&self, round: RoundNumber) -> bool { // If genesis round OR current round is still last_async_round if round == 0 || round <= self.last_round { return false; }
(round - self.last_round) % self.interval == 0 } }
Listing A.3: Asynchronous state structure
Dual Mode Configuration
Listing A.4 represents static configuration values that allow for ease of modularity regarding the aggressivity of the changes made by the dual mode scheduler. The following variables can be changed:
• wave_length: Length of partially-synchronous waves in rounds.
• leaders_per_round: Number of leaders elected per consensus round.
• pipeline: Enables/disables pipelined consensus execution. This is usually passed by core.rs, similarly to how UniversalCommitter is built.
• target_direct_commit_ratio: Desired fraction of direct commits (0.0-1.0).
-
adjustment_factor: Rate of interval adaptation changes. Default set to 0.1, meaning that the interval value may only change by 10% at each schedule change.
-
min_async_interval: Lower bound for asynchronous timing intervals.
-
max_async_interval: Upper bound for asynchronous timing intervals.
/// Dual Mode Scheduler configurations #[derive(Clone, Debug)] pub struct DualModeConfig { pub wave_length: RoundNumber, pub leaders_per_round: u64, pub pipeline: bool, pub target_direct_commit_ratio: f64, pub adjustment_factor: f64, pub min_async_interval: u64, pub max_async_interval: u64, }
impl Default for DualModeConfig { fn default() -> Self { Self { wave_length: DEFAULT_WAVE_LENGTH, leaders_per_round: 1, pipeline: false, // Adjustment Values target_direct_commit_ratio: 0.8, adjustment_factor: 0.1, // Intervals min_async_interval: 100, max_async_interval: 900, } } }
Listing A.4: Dual mode configuration structure
Dual Mode Scheduler
DualModeScheduler Listing A.5 shows the implementation of DualModeScheduler. Specifically, the scheduler requires Creates a DualModeConfig, the committee used by the protocol and the current, or new, AsyncState. Furthermore, the scheduler creates a vector to store leaders slots marked as to-commit, a sequence_length which stores the length of the decided leader slots (decided leader slots include either slots marked as to-commit or to-skip. If the protocol is run with the "simulator" flag, then we also keep track of all updates intervals to make sure that different validators have an identical history (schedule agreement).
pub struct DualModeScheduler { async_state: AsyncState, #[cfg(feature = "simulator")] async_rate_history: Vec<u64>, committee: Arc<Committee>, committed_leaders: Vec<BlockReference>, sequence_length: usize, config: DualModeConfig, }
impl DualModeScheduler { /// Creates a new dual mode scheduler with the given configuration pub fn new(config: DualModeConfig, committee: Arc<Committee>, async_state: AsyncState) -> Self { Self { config, committee, // Extra #[cfg(feature = "simulator")] async_rate_history: vec![async_state.interval], async_state, sequence_length: 0, committed_leaders: Vec::new(), } } }
Listing A.5: Structure and implementation of DualModeScheduler
IsAsync Listing A.6 shows a simple function is_async_round, where it takes a round, and given the current async_state, it returns true if the current round is supposed to be run with the asynchronous mode, or false if not.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
pub fn is_async_round(&self, round: RoundNumber) -> bool { // If genesis round OR current round is still last_async_round if round == 0 || round <= self.async_state.last_round { return false; }
(round - self.async_state.last_round) % self.async_state.interval == 0 }
Listing A.6: is_async_round function of DualModeScheduler
CollectSubdag Listing A.7 shows the function collect_subdag, that, given an anchor, we collect all the blocks in its subDAG, until the round right after the last asynchronous round (stored in the AsyncState structure).
fn collect_subdag(&self, block_store: &BlockStore, anchor: Data<StatementBlock>, -> Vec<Data<StatementBlock>> { let until = self.async_state.last_round + 1; let mut visited = HashSet::new(); let mut to_visit = vec![anchor]; let mut subdag_blocks = Vec::new();
while let Some(block) = to_visit.pop() { if visited.insert(*block.reference()) { subdag_blocks.push(block.clone()); for include_ref in block.includes() { if include_ref.round() >= (until) { if let Some(included_block) = block_store.get_block(*include_ref) { if !visited.contains(include_ref) { to_visit.push(included_block); } } } } } } subdag_blocks }
Listing A.7: collect_subdag function of DualModeScheduler
Update Dual-Mode Schedule Listing A.8 shows the function update_dualmode_schedule, which is what is called by core.rs when an asynchronous leader slot is marked as to-commit. First of all, we pop the first leader from the vector committed_leaders, and then we first run collect_subdag, using the popped leader, then we count the number of direct commits found within this subdag via the count_direct_commits function. Then, we get a ratio of direct commits against expected commits, which will allow us to calculate the new interval via the calculate_new_async_interval) function. Lastly, we update the AsyncStruct accordingly, and set the sequence_length to 0. If the function is run with the "simulator" flag (i.e., we are running a simulation), we store the new interval in the async_rate_history vector for later analysis.
pub fn update_dualmode_schedule(&mut self, block_store: &BlockStore) { let Some(anchor_ref) = self.committed_leaders.pop() else { return; }; let anchor = block_store .get_block(anchor_ref) .expect("Anchor block must exist in block store"); let blocks = self.collect_subdag(block_store, anchor.clone()); let ratio = self.count_direct_commits(&anchor, &blocks, block_store) as f64 / self.calculate_expected_commits(anchor.round()) as f64; let new_interval = self.calculate_new_async_interval(ratio); self.async_state.interval = new_interval; self.async_state.last_round = anchor.round(); self.sequence_length = 0;
#[cfg(feature = "simulator")] self.async_rate_history.push(new_interval); }
Listing A.8: update_dualmode_schedule function of DualModeScheduler
Expected Commits Listing A.9 shows the calculate_expected_commits_sequence function. This function takes the decided leaders length, obtained by the try_commit in core.rs, and returns the correct amount. As explained in Section 3, some leader slots cannot be determined (such as the two previous rounds from the anchor selected), thus, depending on whether pipeline is turned on or off, and alongside the amount of leaders per round, we need to remove some values from the sequence_length.
fn calculate_expected_commits_sequence(&self) -> usize { if self.config.pipeline { self.sequence_length.saturating_sub( self.config.wave_length as usize * self.config.leaders_per_round as usize ), } } else { self.sequence_length .saturating_sub(self.config.leaders_per_round as usize) }
Listing A.9: calculate_expected_commits_sequence function of DualModeScheduler
Direct Commits Listing A.10 and Listing A.11 show the calculate_expected_commits_sequence and is_directly_committed. calculate_expected_commits_sequence, as the name suggests, loops through all the leader slots in committed_leaders, alongside empting the vector at the same time, and then uses is_directly_committed to check if the current leader slot has been directly committed, given a subdag. Furthermore, is_directly_committed utilises the committee vector to determine the Stake of a given validator, making sure that validators with higher stake in the system will have the appropriate weight applied to the vote.
fn count_direct_commits( &mut self, anchor: &Data<StatementBlock>, blocks: &Vec<Data<StatementBlock>>, block_store: &BlockStore, ) -> usize { let leader_refs: Vec<_> = self.committed_leaders.drain(..).collect(); leader_refs .iter() .filter_map(|leader_ref| block_store.get_block(*leader_ref)) .filter(|leader| leader.round() <= anchor.round() - self.config.wave_length) .filter(|leader| self.is_directly_committed(leader, blocks)) .count() }
Listing A.10: calculate_expected_commits_sequence function of DualModeScheduler
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
fn is_directly_committed( &self, leader: &Data<StatementBlock>, blocks: &[Data<StatementBlock>], ) -> bool { let vote_round = leader.round() + 1; let cert_round = vote_round + 1; let leader_ref = leader.reference();
// Collect votes for the leader in round r+1 let votes: Vec<_> = blocks .iter() .filter(|block| block.round() == vote_round) .filter(|block| block.includes().contains(leader_ref)) .collect();
// In round r+2, use StakeAggregator to count certificates with proper stake weighting let mut certificate_stake_aggregator = StakeAggregator::<QuorumThreshold>::new(); for block in blocks.iter().filter(|block| block.round() == cert_round) { let mut vote_stake_aggregator = StakeAggregator::<QuorumThreshold>::new(); let has_enough_votes = votes .iter() .filter(|vote| block.includes().contains(vote.reference()) .any(|vote| vote_stake_aggregator.add(vote.reference().authority, &self.committee)); if has_enough_votes && certificate_stake_aggregator.add(block.reference().authority, &self.committee) { return true; } } } false }
Listing A.11: is_directly_committed function of DualModeScheduler
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Calculate New Asynchronous Rate Listing A.12 shows the function calculate_new_async_interval. This is a deterministic function that, given a commit_ratio, will increase or decrease the interval stored in async_state. Furthermore, min_async_interval and max_async_interval are used to make sure that the asynchronous interval does not go below or above a certain threshold.
\begin{lstlisting} fn calculate_new_async_interval(&self, commit_ratio: f64) -> u64 { let current_interval = self.async_state.interval; let ratio_diff = commit_ratio - self.config.target_direct_commit_ratio;
let mut adjustment = if ratio_diff >= 0.0 { // Good amount of direct commits (current_interval as f64 / (1.0 - self.config.adjustment_factor)) as u64 } else { // Too few direct commits (current_interval as f64 * (1.0 - self.config.adjustment_factor)) as u64 };
// Ensure async_round is a multiple of wave_length if pipeline is disabled if !self.config.pipeline { adjustment = (adjustment + 1) / self.config.wave_length * self.config.wave_length; }
adjustment.clamp( self.config.min_async_interval, self.config.max_async_interval, ) }
Listing A.12: calculate_new_async_interval function of DualModeScheduler
Add Committed Leaders Listing A.13 shows the function add_committed_leaders. A simple function always called by the try_commit function, in core.rs, that adds leader slots marked as to-commit to the committed_leaders, alongside the length of decided leaders to sequence_length.
pub fn add_committed_leaders( &mut self, leaders: Vec<Data<StatementBlock>>, )
4 5 6 7 8 9 10
sequence_length: usize, ) { self.sequence_length += sequence_length; let leader_refs: Vec<BlockReference> = leaders.iter().map(|block| *block.reference().collect(); self.committed_leaders.extend(leader_refs); }
Listing A.13: add_committed_leaders function of DualModeScheduler
Asynchronous Rate History Listing A.14 shows the function get_async_rate_history. This function can only be run if the flag "simulator" is used. It is used by the simulator tests, found in net_sync.rs, to make sure that all validators have the same asynchronous interval history.
#[cfg(feature = "simulator")] pub fn get_async_rate_history(&self) -> Vec<u64> { self.async_rate_history.clone() }
Listing A.14: get_async_rate_history function of DualModeScheduler
Safety Mechanism
Listing A.15 represent how core.rs (the core of the validator that runs the decider rule every time it receives a new block) handles unlikely long periods of asynchrony. In such periods, as stated in Section 3.4.1, it is possible for a validator to go for a long time without a direct commit, causing a long list of undecided leaders to begin stacking. It is possible, once a leader has been committed, that we go through two distinct asynchronous rounds (based on our AsyncState), which could cause a desynchronization of the asynchronous schedule between the validators. Thus, as we can see from Listing A.15, we correct this by making sure that, once we run the decision rule and we get a sequence of leaders, we truncate the sequence at the first found asynchronous leader. Then, we check if the top leader is asynchronous, and if it is, we update the schedule accordingly. This ensures that all validators agree on the sequence of asynchronous schedules, as proven by Lemma 9.
pub fn try_commit(&mut self) -> Vec<Data<StatementBlock>> { let async_state = self.dual_mode_scheduler.get_async_state(); }
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
let mut sequence: Vec<_> = self .committer .try_commit(self.last_commit_leader, async_state);
if let Some(pos) = sequence .iter() .position(|x| self.dual_mode_scheduler.is_async_round(x.round()) && x.is_commit()) { sequence.truncate(pos + 1); }
let sequence_length = sequence.len();
let sequence: Vec<_> = sequence .into_iter() .filter_map(|leader| leader.into_decided_block()) .collect();
self.dual_mode_scheduler .add_committed_leaders(sequence.clone(), sequence_length);
if let Some(last) = sequence.last() { if self.dual_mode_scheduler.is_async_round(last.round()) { self.dual_mode_scheduler .update_dualmode_schedule(&self.block_store); } self.last_commit_leader = *last.reference(); }
if self.last_commit_leader.round() > self.rounds_in_epoch { self.epoch_manager.epoch_change_begun(); }
sequence }
Listing A.15: core.rs try_commit function
A.2 Tests
A.2.1 Decision Rule
We now move onto the tests performed on the decision rule of our consensus protocol. These tests make sure that proposed blocks are correctly marked depending on a given structure of a DAG. To reduce redundancy, we only describe the tools utilised to conduct the tests on the base dual-mode functionality of our protocol. All tests passed successfully across the complete range of testing modes, as explained in Section 4.4, and all testing modes pass successfully when DEFAULT_WAVE_LENGTH_ASYNC is set to either 4 or 5.
• committee: Creates test committee with a specified amount of validators.
• build_dag: Create a completely connected DAG up to a specific round.
• build_dag_layer: Create a single DAG layer with customised validator connections, and block references. Specifically, this function is utilised to create scenarios where the decision rule marks a slot as either to-skip or undecided.
• TestBlockWriter::new: Initializes mock block writer for creating test blockchain structures.
• test_metrics: Provides instrumentation metrics collection for consensus performance testing.
• UniversalCommitterBuilder::new: Creates builder for configuring consensus committer with custom parameters.
• try_commit: Executes consensus commit attempt with given last committed block and asynchronous state.
• elect_leader: Deterministically selects leader validator for specified consensus round.
• BlockReference::new_test: Creates test block reference with authority ID and round number.
• quorum_threshold: Returns minimum validator count needed for consensus quorum decisions .
• validity_threshold: Returns minimum validator count required for block validity certification .
All decision rules related tests can be found in the following files:
• base_committer_tests.rs
• multi_committer_tests.rs
• pipelined_committer_tests.rs
For brevity, we present only a representative subset of tests. The following tests create scenarios where Sharpedo has to commit the first leader via its partially-synchronous mode, then either commit or skip the asynchronous mode leader (depending on the test), and lastly, commit another partially-synchronous leader.
Dual-Mode Commit
#[test] #[tracing_test::traced_test] fn direct_commit_dual_mode() { let committee = committee(4); let wave_length = DEFAULT_WAVE_LENGTH; let wave_length_async = DEFAULT_WAVE_LENGTH_ASYNC;
// async round begins after one full wave of mysticeti is completed let async_round = wave_length*2; let decision_round = async_round + wave_length_async+1;
let mut block_writer = TestBlockWriter::new(&committee); build_dag(&committee, &mut block_writer, None, decision_round);
let committer = UniversalCommitterBuilder::new( committee.clone(), block_writer.into_block_store(), test_metrics(), ) .build();
let last_committed = BlockReference::new_test(0, 0); let sequence = committer.try_commit( last_committed, &AsyncState { interval: async_round, last_round: 0, }, ); tracing::info!("Commit sequence: {sequence:?}"); }
32 33 34
// 3 leaders committed, 1 p-sync, 1 async, then 1 p-sync again assert_eq!(sequence.len(), 3); }
Dual-Mode Skip
#[test] #[tracing_test::traced_test] fn direct_skip_dual_mode() { let committee = committee(4); let wave_length = DEFAULT_WAVE_LENGTH; let wave_length_async = DEFAULT_WAVE_LENGTH_ASYNC;
let async_round = wave_length*2;
let mut block_writer = TestBlockWriter::new(&committee); let references_1 = build_dag(&committee, &mut block_writer, None, async_round);
// Filter out leader of async round. let references_without_leader_1: Vec<_> = references_1 .into_iter() .filter(|x| x.authority != committee elect_leader(async_round)) .collect();
let decision_round_1 = async_round + wave_length_async + 1; build_dag( &committee, &mut block_writer, Some(references_without_leader_1), decision_round_1, );
let committer = UniversalCommitterBuilder::new( committee.clone(), block_writer.into_block_store(), test_metrics(), ) .build();
let last_committed = BlockReference::new_test(0, 0); let sequence = committer.try_commit( last_committed, &AsyncState { interval: async_round, last_round: 0, }, ); tracing::info!("Commit sequence: {sequence:?}");
// 3 leaders decided, 1 p-sync - commit, 1 async - skip, then 1 p-sync again - commit assert_eq!(sequence.len(), 3); if let LeaderStatus::Skip(leader, round) = sequence[1] { assert_eq!(leader, committee elect_leader(async_round)); assert_eq!(round, async_round); } else { panic!("Expected to directly skip the asynchronous leader"); }
A.2.2 Dual-Mode Scheduler
Beyond simple unit tests that check edge cases of simple calculations function (e.g., checking that the is_async_rate(anchor.round) returns the correct value, either true if the anchor's round uses the asynchronous mode, or false otherwise), the important tests is making sure that our count_direct_commits() and collect_subdag() work correctly. In the case of count_direct_commits(), this meant making sure that the function works with pipeline turned on, and also cases with multi-leaders. Emphasis is placed on these two functions, as they are what determine the deterministic change in schedule consistent across all validators. All tests mentioned in this section can be found in dual_mode_scheduler.rs.
Collect Subdag
To test the collecting function of Sharpedo, a specific test has been created. Specifically, this test creates a DAG where only one leader has includes all the blocks from the previous round, causing that one leader to have a longer subDAG then the others. This test can be found in dual_mode_scheduler.rs.
Count Direct Commits
We then created tests to make sure that, in the scenario of a DAG with all direct commits, the counting function returns the correct amount (in this case being 1). This specific behaviour has also been tested in an instance with pipeline set to true and another with a multi-leader setup leaders per round $.
Count Direct Commits (Indirect)
In the scenario of a DAG with a indirect commits, the counting function has to return the correct amount (in this case being 0). This test is important as it shows that we are able to distinguish direct commits from indirect commits within a subDAG. The specific behaviour has also been tested in an instance with pipeline set to true and another with a multi-leader setup leaders per round).
Sequence Cutoff
Lastly we have created a test that makes sure a long enough sequence of leaders (as mentioned in Section 3.4.1), is correctly cut off. The test creates enough blocks (given an initial interval rate of every 300 rounds, our tests creates blocks) which guarantees the scenario we are looking for. We then run try_commit in a loop until no more leaders can be committed. Each loop should either stop at the correct async_rate_round (and update the async_rate_round accordingly) or until the sequence is empty. This test can be found in This test can be found in core.rs.
A.3 Simulations
Good Network Simulations
We will now go over the simulation tests that were run to test Sharpedo's dynamic scheduler. We first run Sharpedo under its ideal conditions (i.e., all validators reach their leader slot within the timeout). After running the simulation, we make sure that each validators have an increasing interval for the asynchronous round (i.e., the frequency of the asynchronous mode decreases), and that each validator has the same asynchronous interval history. This test can be found in net_sync.rs.
Slow Network Simulations
We also ran Sharpedo under a high-latency simulated network with 10 validators. In these simulations, f validators experience high-level of latency, causing them to miss their leader slot, subsequently making every other validator mark the slot as to-skip. Specifically, the function simulated_network_connect.all_high_latency() connects some validators with low-latency, and some validators with high-latency After running the simulation, we make sure that each validators have a decreasing interval for the asynchronous round (i.e., the frequency of the asynchronous mode increases), and that each validator has the same asynchronous interval history, including the slow validators. This test can be found in net_sync.rs.
Appendix B
Consensus Protocol Structures
PBFT

Figure B.1: Depiction of how consensus is reached in PBFT [13]. Process is a Byzantine/faulty node, thus, it does not communicate with the rest.
Hotstuff

Figure B.2: Depiction of how consensus is reached in Hotstuff [25]. Process is a Byzantine/faulty node, thus, it does not communicate with the rest.
Tusk

Figure B.3: Illustration of a DAG structure as interpreted by the Tusk protocol [31]. The proposed leader block (by validator ) does not have enough votes to be committed. The proposed leader block (by validator ) has votes necessary to be committed, but, since through the causal history of we encounter , is committed before . Thus the final sequence would be .
Bullshark Partially-Synchronous

Figure B.4: Illustration of a DAG structure as interpreted by the partially-synchronous version of the Bullshark protocol [33]. The proposed leader block (by validator ) does not have the necessary votes to be committed, and the proposed leader block (by validator ) has no votes. The proposed leader block (by validator ) has the necessary votes to be committed, but since appears in the causal history of , is committed first. can be safely skipped as it does not appear in the causal history of . Thus, the final sequence is [33].
Bullshark

Figure B.5: Illustration of a DAG structure as interpreted by the Bullshark protocol [32]. represent the steady-state leaders in sequential order, while represent the fallback leaders. is directly committed as it has the necessary votes to be committed, while does not. Since the second steady-state leader of wave failed to commit, wave will utilise the fallback leader . Once round is reached, leader is revealed by combining the shares of the common coin. Since there are enough validators voting for , is committed, and since does not appear in the causal history of , it can be safely skipped. The next wave will go back to using steady-state leaders.
Mysticeti

Figure B.6: Illustration of the DAG structure as interpreted by the Mysticeti protocol. Of note, we can see how Mysticeti utilises two leaders per round (multi-leader), and how each round signifies the beginning of a new wave (pipeline).
Appendix C
Sharpedo Additional Figures
Simulation Test Visualization
Consensus Latency Performance Across Different Modes

Figure C.1: Visualisation of Sharpedo's simulation results.
Direct Rule: Asynchronous Mode

Figure C.2: Certificate Pattern (Asynchronous mode ): is marked as to-commit because validator , and voted for leader block . This means, in the case of Sharpedo's asynchronous mode, leader block has been marked as to-commit because it appeared in the causal history of the blocks proposed by validators , , in round (i.e., the voting round).

Figure C.3: Skip Pattern (Asynchronous mode ): Leader block is marked as to-skip because validator , and did not vote for . This means, in the case of Sharpedo's asynchronous mode, leader block has not been marked as to-commit because it did not appear in the causal history of the blocks proposed by validators , , in round (i.e., the voting round).
Indirect Rule: Partially-Synchronous Mode

Figure C.4: Example of Sharpedo’s partially-synchronous mode using the indirect rule to mark as to-commit. While has the required votes from blocks in round , it’s lacking certificates. Block has been directly marked as to-commit, and, since there is a certificate link (i.e. observes votes for in its causal history) between and , can be marked as to-commit.

Figure C.5: Example of Sharpedo’s partially-synchronous mode using the indirect rule to mark as to-skip. While does not have the required votes from blocks in round , it also does not have blames required to directly skip the block. Leader block has been directly marked as to-commit, and, since there is no certificate link (i.e. does not observe votes for in its causal history) between and , can be safely marked as to-skip.
Example Evaluation Figures

Figure C.6: Throughput and Latency graph comparing Mysticeti-C with other state-of-the-art consensus protocols, as presented in the works of Babel et al. [36]

Figure C.7: Throughput and Latency graph comparing Mahi-Mahi with other state-of-the-art consensus protocols, as presented in the works of Jovanovic et al, [38]
Appendix D Algorithms
In this section we present the algorithms for Sharpedo in pseudo-code. Algorithm 1 and Algorithm 2 represents Sharpedo's main function and decider instance. As Sharpedo builds upon Mysticeti and Mahi-Mahi, the algorithms presented here adapt those used in the two protocols [36, 38], modified to support the dual-mode functionality. We begin with Algorithm 1, which assumes a Scheduler instance is already available. Everything passes through the TRYCOMMIT process, and is called whenever a valid block is presented to a validator. This process calls the TRYDECIDE process which will use the decision rules (talked about in Section 3.3.2) to try and classify each slot in the DAG from to . It will first try the TRYDIRECTDECIDE to mark the slot via the direct rule, if it fails, it will then try to mark the slot via the indirect rule, via the TRYINDIRECTDECIDE procedure. Before calling either decision rule, the round number is given to the scheduler to determine which mode of operation the decision rule should follow. The TRYCOMMIT process will then return a sequence of leaders, and commit as many in the sequence as possible. The returned sequence is truncated into two scenarios: one is, when the first undecided leader is encountered, and the other is, when one of the committed leaders is an asynchronous leader (i.e., the leader's round equals the current asynchronous rate). In the latter case, the sequence is cut short and we invoke process ADDSEQUENCE from Algorithm 3. In all cases, the sequence of leaders is also given to Sharpedo's dual-mode scheduler, for later analysis, by calling the process ADDSEQUENCE as defined in Algorithm 3.
Algorithm 1 Dual Mode Protocol Main Function
1: waveLength 2: proposersPerRound 3: scheduler 4: 5: procedure TRYCOMMIT(r_committed, r_highest) 6: 7: 8: for status do 9: if status = then 10: break 11: if status = COMMIT( ) then 12: if scheduler.ISASYNC( ) then 13: 14: scheduler.ADDSEQUENCE( ) 15: scheduler.UPDATEASYNCSCHEDULE 16: return 17: else 18: 19: scheduler.ADDSEQUENCE( ) 20: return 21: 22: procedure TRYDECIDE( ) 23: 24: for down to do 25: async scheduler.ISASYNC( ) 26: for to proposerPerRound -1 do 27: 28: 29: if D.PROPOSEROUND( ) = r then 30: status D.TRYDIRECTDECIDE( , async) 31: if status = then 32: status D.TRYINDIRECTDECIDE( , async) 33: 34: return L 35: end 36: end 37: end 38: end 39: end 40: end 41: end 42: end 43: end 44: end 45: end 46: end 47: end 48: end 49: end 50: end 51: end 52: end 53: end 54: end 55: end 56: end 57: end 58: end 59: end 60: end 61: end 62: end 63: end 64: end 65: end 66: end 67: end 68: end 69: end 70: end 71: end 72: end 73: end 74: end 75: end 76: end 77: end 78: end 79: end 80: end 81: end 82: end 83: end 84: end 85: end 86: end 87: end 88: end 89: end 90: end 91: end 92: end 93: end 94: end 95: end 96: end 97: end 98: end 99: end 100: end 101: end 102: end 103: end 104: end 105: end 106: end 107: end 108: end 109: end 110: end 111: end 112: end 113: end 114: end 115: end 116: end 117: end 118: end 119: end 120: end 121: end 122: end 123: end 124: end 125: end 126: end 127: end 128: end 129: end 130: end 131: end 132: end 133: end 134: end 135: end 136: end 137: end 138: end 139: end 140: end 141: end 142: end 143: end 144: end 145: end 146: end 147: end 148: end 149: end 150: end 151: end 152: end 153: end 154: end 155: end 156: end 157: end 158: end 159: end 160: end 161: end 162: end 163: end 164: end 165: end 166: end 167: end 168: end 169: end 170: end 171: end 172: end 173: end 174: end 175: end 176: end 177: end 178: end 179: end 180: end 181: end 182: end 183: end 184: end 185: end 186: end 187: end 188: end 189: end 190: end 191: end 192: end 193: end 194: end 195: end 196: end 197: end 198: end 199: end 200: end 201: end 202: end 203: end 204: end 205: end 206: end 207: end 208: end 209: end 210: end 211: end 212: end 213: end 214: end 215: end 216: end 217: end 218: end 219: end 220: end 221: end 222: end 223: end 224: end 225: end 226: end 227: end 228: end 229: end 230: end 231: end 232: end 233: end 234: end 235: end 236: end 237: end 238: end 239: end 240: end 241: end 242: end 243: end 244: end 245: end 246: end 247: end 248: end 249: end 250: end 251: end 252: end 253: end 254: end 255: end 256: end 257: end 258: end 259: end 260: end 261: end 262: end 263: end 264: end 265: end 266: end 267: end 268: end 269: end 270: end 271: end 272: end 273: end 274: end 275: end 276: end 277: end 278: end 279: end 280: end 281: end 282: end 283: end 284: end 285: end 286: end 287: end 288: end 289: end 290: end 291: end 292: end 293: end 294: end 295: end 296: end 297: end 298: end 299: end 300: end 301: end 302: end 303: end 304: end 305: end 306: end 307: end 308: end 309: end 310: end 311: end 312: end 313: end 314: end 315: end 316: end 317: end 318: end 319: end 320: end 321: end 322: end 323: end 324: end 325: end 326: end 327: end 328: end 329: end 330: end 331: end 332: end 333: end 334: end 335: end 336: end 337: end 338: end 339: end 340: end 341: end 342: end 343: end 344: end 345: end 346: end 347: end 348: end 349: end 350: end 351: end 352: end 353: end 354: end 355: end 356: end 357: end 358: end 359: end 360: end 361: end 362: end 363: end 364: end 365: end 366: end 367: end 368: end 369: end 370: end 371: end 372: end 373: end 374: end 375: end 376: end 377: end 378: end 379: end 380: end 381: end 382: end 383: end 384: end 385: end 386: end 387: end 388: end 389: end 390: end 391: end 392: end 393: end 394: end 395: end 396: end 397: end 398: end 399: end 400: end 401: end 402: end 403: end 404: end 405: end 406: end 407: end 408: end 409: end 410: end 411: end 412: end 413: end 414: end 415: end 416: end 417: end 418: end 419: end 420: end 421: end 422: end 423: end 424: end 425: end 426: end 427: end 428: end 429: end 430: end 431: end 432: end 433: end 434: end 435: end 436: end 437: end 438: end 439: end 440: end 441: end 442: end 443: end 444: end 445: end 446: end 447: end 448: end 449: end 450: end 451: end 452: end 453: end 454: end 455: end 456: end 457: end 458: end 459: end 460: end 461: end 462: end 463: end 464: end 465: end 466: end 467: end 468: end 469: end 470: end 471: end 472: end 473: end 474: end 475: end 476: end 477: end 478: end 479: end 480: end 481: end 482: end 483: end 484: end 485: end 486: end 487: end 488: end 489: end 490: end 491: end 492: end 493: end 494: end 495: end 496: end 497: end 498: end 499: end 500: end 501: end 502: end 503: end 504: end 505: end 506: end 507: end 508: end 509: end 510: end 511: end 512: end 513: end 514: end 515: end 516: end 517: end 518: end 519: end 520: end 521: end 522: end 523: end 524: end 525: end 526: end 527: end 528: end 529: end 530: end 531: end 532: end 533: end 534: end 535: end 536: end 537: end 538: end 539: end 540: end 541: end 542: end 543: end 544: end 545: end 546: end 547: end 548: end 549: end 550: end 551: end 552: end 553: end 554: end 555: end 556: end 557: end 558: end 559: end 560: end 561: end 562: end 563: end 564: end 565: end 566: end 567: end 568: end 569: end 570: end 571: end 572: end 573: end 574: end 575: end 576: end 577: end 578: end 579: end 580: end 581: end 582: end 583: end 584: end 585: end 586: end 587: end 588: end 589: end 590: end 591: end 592: end 593: end 594: end 595: end 596: end 597: end 598: end 599: end 600: end 601: end 602: end 603: end 604: end 605: end 606: end 607: end 608: end 609: end 610: end 611: end 612: end 613: end 614: end 615: end 616: end 617: end 618: end 619: end 620: end 621: end 622: end 623: end 624: end 625: end 626: end 627: end 628: end 629: end 630: end 631: end 632: end 633: end 634: end 635: end 636: end 637: end 638: end 639: end 640: end 641: end 642: end 643: end 644: end 645: end 646: end 647: end 648: end 649: end 650: end 651: end 652: end 653: end 654: end 655: end 656: end 657: end 658: end 659: end 660: end 661: end 662: end 663: end 664: end 665: end 666: end 667: end 668: end 669: end 670: end 671: end 672: end 673: end 674: end 675: end 676: end 677: end 678: end 679: end 680: end 681: end 682: end 683: end 684: end 685: end 686: end 687: end 688: end 689: end 690: end 691: end 692: end 693: end 694: end 695: end 696: end 697: end 698: end 699: end 700: end 701: end 702: end 703: end 704: end 705: end 706: end 707: end 708: end 709: end 710: end 711: end 712: end 713: end 714: end 715: end 716: end 717: end 718: end 719: end 720: end 721: end 722: end 723: end 724: end 725: end 726: end 727: end 728: end 729: end 730: end 731: end 732: end 733: end 734: end 735: end 736: end 737: end 738: end 739: end 740: end 741: end 742: end 743: end 744: end 745: end 746: end 747: end 748: end 749: end 750: end 751: end 752: end 753: end 754: end 755: end 756: end 757: end 758: end 759: end 760: end 761: end 762: end 763: end 764: end 765: end 766: end 767: end 768: end 769: end 770: end 771: end 772: end 773: end 774: end 775: end 776: end 777: end 778: end 779: end 780: end 781: end 782: end 783: end 784: end 785: end 786: end 787: end 788: end 789: end 790: end 791: end 792: end 793: end 794: end 795: end 796: end 797: end 798: end 799: end 800: end 801: end 802: end 803: end 804: end 805: end 806: end 807: end 808: end 809: end 810: end 811: end 812: end 813: end 814: end 815: end 816: end 817: end 818: end 819: end 820: end 821: end 822: end 823: end 824: end 825: end 826: end 827: end 828: end 829: end 830: end 831: end 832: end 833: end 834: end 835: end 836: end 837: end 838: end 839: end 840: end 841: end 842: end 843: end 844: end 845: end 846: end 847: end 848: end 849: end 850: end 851: end 852: end 853: end 854: end 855: end 856: end 857: end 858: end 859: end 860: end 861: end 862: end 863: end 864: end 865: end 866: end 867: end 868: end 869: end 870: end 871: end 872: end 873: end 874: end 875: end 876: end 877: end 878: end 879: end 880: end 881: end 882: end 883: end 884: end 885: end 886: end 887: end 888: end 889: end 890: end 891: end 892: end 893: end 894: end 895: end 896: end 897: end 898: end 899: end 900: end 901: end 902: end 903: end 904: end 905: end 906: end 907: end 908: end 909: end 910: end 911: end 912: end 913: end 914: end 915: end 916: end 917: end 918: end 919: end 920: end 921: end 922: end 923: end 924: end 925: end 926: end 927: end 928: end 929: end 930: end 931: end 932: end 933: end 934: end 935: end 936: end 937: end 938: end 939: end 940: end 941: end 942: end 943: end 944: end 945: end 946: end 947: end 948: end 949: end 950: end 951: end 952: end 953: end 954: end 955: end 956: end 957: end 958: end 959: end 960: end 961: end 962: end 963: end 964: end 965: end 966: end 967: end 968: end 969: end 970: end 971: end 972: end 973: end 974: end 975: end 976: end 977: end 978: end 979: end 980: end 981: end 982: end 983: end 984: end 985: end 986: end 987: end 988: end 989: end 990: end 991: end 992: end 993: end 994: end 995: end 996: end 997: end 998: end 999: end
Algorithm 2 represents the decider functions, functions that handle the logic for proposer slots. These functions are, for the most part, very similar to the decider functions found within Mysticeti and Mahi-Mahi [36, 38]. However, they differ specifically in the CERTIFYROUND and LEADERBLOCK processes.
- CERTIFYROUND (Line 12): This function takes two arguments: w represents the wave in question, and async represents whether the wave should be interpreted using asynchronous mode or partially-synchronous mode.
• LEADERBLOCK (Line 21): This procedure combines the logic of Mysticeti’s and Mahi-Mahi’s leader election systems. If the wave is to be run in asynchronous mode, an additional offset, obtained from the combined coin shares, is added before electing the leader, introducing randomness to the leader election. If the wave is to be run under the partially-synchronous mode, then the deterministic process GETLEADER will be used, just like Mysticeti [38, 36].
The certify round will change depending on the mode of execution of the specific round. For example, if we are checking the certify round for round r, utilising the partially-synchronous wave length, we will have , while within an asynchronous wave we might have either or depending on the chosen asynchronous wave length. Similarly, in the LEADERBLOCK process, if ASYNC, then when determining the leader, we also release the common coin. However, it is important to note, the implementation of the common coin in asynchronous consensus protocols is an open research question. This means that Sharpedo, like all other asynchronous protocols we have seen, does not actually implement the mechanism, but adoption of such mechanism can be easily inserted. Lastly, regarding WAVENUMBER, since Sharpedo's partially-synchronous mode is the "base" mode for Sharpedo, we do not need to change how the wave number is calculated. Sharpedo's asynchronous mode will always begin after a partially-synchronous wave. Thus, to maintain simplicity, we utilize the partially-synchronous mode as baseline counting.
Lastly, we have Algorithm 3. This represents Sharpedo's dual-mode scheduler, and contains all the logic for the scheduling of Sharpedo's asynchronous mode. Of note, decided leaders obtained from TRYCOMMIT are stored inside a schedule instance (added through the ADDSEQUENCE process).
-
UPDATEASYNCSCHEDULE (Line 7): This process is called by the TRYCOMMIT process, and initiates the asynchronous scheduling update. It will always be the case, when this process is called, that the newest leader block in decidedLeaders is a leader which has been committed through the asynchronous mode. This leader is popped, and its subDAG is obtained via GETSUBDAG, which is then used to count the direct commits that have happened. Lastly, the schedule is updated accordingly, decidedLeaders is drained, lastAsyncRound and asyncInterval are updated.
-
GETSUBDAG (Line 15): This process collects all the blocks from an anchor v, till a specified minimum round . is the oldest leader block found in decidedLeaders because we want the subDAG to find if leaders in decidedLeaders have been directly committed. We then collect all blocks that are reachable from v, including ones from . The process then returns a topological linearization of v's subDAG.
-
COUNTDIRECTCOMMITS (Line 30): counts direct commits by first finding and storing blocks that have voted for a leader inside of list . This is done by looking at blocks found in round (i.e., the voting round). Then, in round , we store, in , how many blocks
reference at least of the blocks found in . If has a magnitude of at least , then we know leader block has been directly committed within this specific subDAG. We repeat this process for all leader blocks marked as to-commit in decidedLeaders.
COUNTDIRECTCOMMITS thus returns the count of direct commits in the subDAG, allowing us to obtain a ratio of directly committed leaders against the expected number of directly committed leaders (DECIDEDLEADERS.LEN). This approach provides a deterministic decision regarding the network state, as all leaders are processed in order, and the first encountered asynchronous leader will trigger a possible schedule update.
Algorithm 2 Decider Functions 1: waveLength ▷ Set to 3 2: waveLengthAsync ▷ Set to 4 or 5 3: waveOffset ▷ for pipeline 4: leaderOffset ▷ base_committer 5: 6: procedure WaveNumber(r) 7: return (r − waveOffset)/waveLength 8: 9: procedure ProposeRound(w) 10: return w · waveLength + waveOffset 11: 12: procedure CertifyRound(w, async) 13: if async then 14: return w · waveLengthAsync + waveLength − 1 + waveOffset ▷ Calculate certify round via waveLengthAsync 15: else 16: return w · waveLength + waveLength − 1 + waveOffset ▷ Calculate certify round via waveLength 17: 18: procedure VoteRound(w) 19: return CertifyRound(w) − 1 20: 21: procedure LeaderBlock(w, async) 22: rpropose, rcertify ← ProposeRound(w), CertifyRound(w) 23: if async then 24: c ← CombineCoinShares({bshare : b ∈ DAG[rcertify, ∗]}) ▷ Common coin for async leader election 25: l ← c+ leaderOffset ▷ Modulo committee size 26: else 27: l ← GetLeader(rpropose+ leaderOffset) ▷ Deterministic 28: return DAG[rpropose, l] ▷ May return more than one block in case of equivocations 29: 30: procedure SkippedLeader(w, bleader) 31: rvote ← VoteRound(w) 32: return |{¬IsVote(b, bleader) : b ∈ DAG[rvote, ∗]}| ≥ 2f + 1 33: 34: procedure SupportedLeader(w, bleader) 35: rcertify ← CertifyRound(w) 36: return |{IsCert(b, bleader) : b ∈ DAG[rcertify, ∗]}| ≥ 2f + 1 37: 38: procedure TryDirectDecide(w) 39: for bleader ∈ LeaderBlock(w) do ▷ Loop over equivocations 40: if SkippedLeader(w, bleader) then 41: return skip(w) 42: if SupportedLeader(w, bleader) then 43: return commit(bleader) 44: return ⊥ 45: 46: procedure TryIndirectDecide(w, S) 47: sanchor ← min{s ∈ S : rcertify < sround ∧ s ̸= skip(w)} 48: if sanchor = commit(banchor) then 49: if ∃bleader ∈ LeaderBlock(w) : IsCertifiedLink(banchor, bleader) then 50: return commit(bleader) 51: else 52: return skip(w) 53: return ⊥ ▷ The anchor is undecided or not found 87
Algorithm 3 Dual Mode Scheduler Algorithm
1: decidedLeaders ← {} 2: lastAsyncRound ← 0 3: asyncInterval 4: targetRatio 5: scalingFactor 6: 7: procedure UPDATEASYNCSCHEDULE 8: v ← POP(decidedLeaders) 9: O ← GETSUBDAG(v) 10: R ← 11: asyncInterval ← CHANGEASYNCRATE(R) 12: lastAsyncRound ← 13: decidedLeaders ← {} 14: 15: procedure GETSUBDAG(v) 16: 17: O ← [] 18: for do 19: B ← { } 20: for do 21: O ← O b 22: return O 23: 24: procedure CHANGEASYNCRATE(R) 25: if then 26: asyncInterval ← asyncInterval/scalingFactor 27: else 28: asyncInterval ← asyncInterval · scalingFactor 29: 30: procedure COUNTDIRECTCOMMITS(O) 31: count ← 0 32: for do 33: 34: 35: if then 36: count ← count +1 37: return count 38: 39: procedure ADDSEQUENCE(leaders) 40: for 41: decidedLeaders ← decidedLeaders 42: 43: procedure ISASYNC(r) 44: return r % lastAsyncRound + asyncInterval == 0
Algorithm 4 represents some helper functions that are utilised by Algorithm 1 and Algorithm 2 to utilise the DAG. These have been mainly taken from Mahi-Mahi and Mysticeti, as the operations performed on the DAG itself remain the same [38, 36].
Algorithm 4 DAG Helper Functions
1: procedure ISVOTE() 2: function VOTEDBLOCK() 3: if then return ⊥ 4: for do 5: if then return 6: res ← VOTEDBLOCK() 7: if res ≠ ⊥ then return res 8: return ⊥ 9: 10: return VotedBlock() = 11: 12: procedure ISCERT() 13: res ← || 14: return res ≥ 2f + 1 15: 16: procedure ISLINK() 17: return ∃ path 18: 19: procedure ISCERTIFIEDLINK() 20: 21: 22: return ∃b ∈ B : IsCert() ∧ IsLink() 23:
Appendix E
Research Assistance Methods
I acknowledge the use of Anthropic's Claude (version 3.5 and 4 of Claude Sonnet, Anthropic, https://www.anthropic.com/) for guidance through the Mysticeti's codebase and assistance in learning the Rust programming language [36, 39]. Furthermore, I also acknowledge Claude for technical guidance in LATEX formatting and figure creation.