This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Phalanx: A Practical Byzantine Ordered Consensus Protocol

1st Guangren Wang Zhejiang University
   2nd Liang Cai Zhejiang University
   3rd Fangyu Gai University of British Columbia
   4th Jianyu Niu Southern University of Science and Technology
Abstract

Byzantine fault tolerance (BFT) consensus is a fundamental primitive for distributed computation. However, BFT protocols suffer from the ordering manipulation, in which an adversary can make front-running. Several protocols are proposed to resolve the manipulation problem, but there are some limitations for them. The batch-based protocols such as Themis has significant performance loss because of the use of complex algorithms to find strongly connected components (SCCs). The timestamp-based protocols such as Pompe have simplified the ordering phase, but they are limited on fairness that the adversary can manipulate the ordering via timestamps of transactions. In this paper, we propose a Byzantine ordered consensus protocol called Phalanx, in which transactions are committed by anchor-based ordering strategy. The anchor-based strategy makes aggregation of the Lamport logical clock of transactions on each participant and generates the final ordering without complex detection for SCCs. Therefore, Phalanx has achieved satisfying performance and performs better in resisting ordering manipulation than timestamp-based strategy.

Index Terms:
Blockchain, Byzantine Fault Tolerance, Ordering Manipulation, Distributed System

I Introduction

Byzantine Fault Tolerance (BFT) consensus protocols could be used to deal with arbitrary behaviors. However, the most widely used BFT consensus protocols (PBFT[1][2], HotStuff [3], etc.), limited types of malicious manners could be prevented because of the limitation of the leader-based system model. The leader always determines the next proposal to be applied, while backups can only detect whether a leader is crashed or the proposal is proposed on a duplicated serial number. Therefore, the leader could always decide on the content of proposals and could decide the ordering of proposals to commit. As for permissioned blockchain and some of the permissionless blockchain, they are mostly constructed based on leader-based BFT consensus protocols that Diem (Libra) is based on DiemBFT (HotStuff [3]) and Solana takes use of protocol based on PBFT, so we need to deal with the potential risks on ordering manipulation.

The possibilities of manipulating the ordering have left latent danger of malicious behavior. In recent works [4], researchers found that the manipulation of transactions in the permissionless blockchain, such as Ethereum [5], has made the attackers grab millions of profits. In the traditional financial system, front-running is a well-known illegal means to grab profits, especially on Wall Street [6]. For instance, when a broker receives a market order from a customer to buy a large amount of stock, before placing the order for the customer, he or she buys a few amounts of shares of the same stock for the broker’s account. Then, the broker places the customer’s order and the price of the stock will be driven up. If we allow the broker to immediately sell his or her shares, a significant profit will be generated in just a short time. The profits are just a part of the additional cost to the customer’s purchase caused by the broker’s self-dealing. In the situation such as sec-killing, the priority of transactions determines whether the dealer can get the products he or she prefers.

To deal with the ordering manipulation in BFT protocols, recently, the property called order-fairness has been widely discussed. Researchers have found that though collecting quorum[7] votes to decide the context of transactions seems like an effective approach. However, the Condorcet Paradox [8] [9] prevents us to reach a deterministic execution ordering. So that, how to resolve the Condorcet Paradox is the major barrier to designing a practical protocol to achieve order-fairness. Kelkar et al. proposed Aequitas[10] and Themis[11], which are batch-based protocols and achieve the order-fairness between by detecting strongly connected components (SCCs). But because of the complex graph algorithm to detect SCCs, the performance of Aequitas/Themis seems not satisfying. Pompe[12] proposed by Zhang et al. and Wendy[13] proposed by Kursawe et al. are timestamp-based protocols. They discard the logical clock and ordering the transactions with the timestamps. Because of the linearity of real clock, these protocols avoid the Condorcet Paradox and simplify the ordering phase to reduce performance loss. However, the timestamp-based protocols are easily destroyed by manipulating timestamps [14]. It might not be a good choice to construct industrial systems. (See Section VI for details)

It should be noted that we cannot distinguish the adversarial participants from the honest ones in a distributed system, and recent works [10] [11] [12] show that we cannot make the final ordering completely independent of Byzantine nodes. However, we are supposed to minimize the impact of the adversary on execution ordering, and an effective Byzantine ordered strategy should try to eliminate malicious behavior as much as possible and reduce the impact on performance at the same time.

In this paper, we aim to introduce a new strategy that could avoid complex graph detection and could achieve more fairness than the timestamp-based protocols. Based on previous work, we believe that the Byzantine ordered consensus has two properties, free will and correctness. Because of the vulnerability of real clock, we take the Lamport Logical Clock as the indicator to order transactions. Then, to achieve the fairness, we make aggregation of each participant preferences on transactions ordering to find the anchor commands with linear reliable context to make a commitment. It has prevented the occurrence the Condorcet Paradox, and the complex graph detection has been avoided. So that, we design, implement, and evaluate Phalanx, a anchor-based Byzantine ordered consensus protocol. It avoids complex graph detection and reflects the real preference of each node to commit transactions. In summary, we make the following contributions:

  • We propose anchor-based ordering strategy, which has avoided graph detection and could resist ordering manipulation.

  • We propose a protocol called Phalanx which has achieved anchor-based ordering and we implement it as a modular component. We release it for public use111https://github.com/Grivn/phalanx.

  • We conduct a comprehensive evaluation of Phalanx for performance and reliability. Phalanx does not introduce too much performance loss and has advantages in the WAN environment. And Phalanx performs better in resisting ordering manipulation than timestamp-based strategy.

II System Model and Anchor-Based Ordering

In this section, we firstly present the system model, then define ordering properties. Finally we introduce our strategy to prevent ordering manipulation with logical clock, and how to avoid the occurrence of the Condorcet Paradox.

II-A System Model

We consider a system of n=3f+1n=3f+1 consensus nodes (hereinafter referred to as nodes for short) and any number of proposers (or we can call them clients). In this paper, we focus on the adversary in nodes and ignore the potential malicious behavior of proposers. We assume that an adversary can control up to ff nodes.

Command and Context. The command is the atomic unit for our Byzantine ordered consensus system. It is generated by proposers. Let rr denotes command. For commands r1r_{1} and r2r_{2}, we use notion \prec to describe their context, which means the sequential relationship between r1r_{1} and r2r_{2}. If r1r_{1} should be committed before r2r_{2}, then r1r2r_{1}\prec r_{2}. The command can be assigned with sequence number to indicate the preference ordering for the proposer. Whenever proposer PiP_{i} is trying to propose request mm, it should generate a command with data structure i,n,d,m\langle i,n,d,m\rangle, in which ii is the identifier of proposer, mm is the request content, nn is a monotonically increasing sequence number which indicates the sending order for current command on PiP_{i}, dd is the digest of command that dh(i,n,m)d\leftarrow h(\langle i,n,m\rangle).

Partial Ordering and Total Ordering. The commands generated by proposers would be broadcast to every node. The node NiN_{i} needs to generate its partial ordering according to the order of reception. And NiN_{i} generates logs to describe its partial ordering. Each node has a logical clock starting from 0. Every time NiN_{i} has received command rr, the logical clock is advanced by 1. Then, NiN_{i} generates a log for rr assigned with current logical clock. The structure is i,n,dr\langle i,n,d_{r}\rangle, in which ii is the identifier of NiN_{i}, nn is the logical clock stamp when current log has been generated, drd_{r} is the digest of rr that drr.dd_{r}\leftarrow r.d.

Taking the partial ordering of each node as the material, Byzantine ordered consensus would make all the trusted nodes obtain a consistent total ordering. The commands would be committed according to the consistent total ordering and would send back reply message to specific proposers.

Let oo denotes log. Call that oro\to r, if and only if o.dr=r.do.d_{r}=r.d. Let i\prec_{i} denote the context in NiN_{i}’s partial ordering. For logs o1o_{1} and o2o_{2} from NiN_{i}, there are r1r_{1} and r2r_{2} that o1r1o_{1}\to r_{1} and o2r2o_{2}\to r_{2}. There is a context that r1ir2r_{1}\prec_{i}r_{2} if and only if o1.n<o2.no_{1}.n<o_{2}.n. Although the partial ordering for each node might- be different, every non-faulty node would eventually find the same total ordering to commit commands.

II-B Network Model

The modular implemented Phalanx component should be combined with a BFT protocol so that the network assumptions should support both Phalanx component itself and the combined original BFT protocol.

The communication in Phalanx component is asynchronous, so that, in addition to the network assumption of the original BFT protocol, we only need to satisfy the messages sent from one participant will reach the recipient(s) eventually. As asynchronous network assumption is the weakest one in BFT protocol groups’ network assumptions, the Phalanx component will not impact the robustness of the original BFT cluster.

Besides, there is another basic assumption called sending-receiving model that messages receiving order should always be the same as their sending order. For instance, N1N_{1} is trying to send messages toward N2N_{2}. If N1N_{1} has sent m1m_{1} before m2m_{2}, N2N_{2} must receive m1m_{1} before m2m_{2}. It could be achieved easily with the use of sequence numbers.

II-C Ordering Properties

In state-of-the-art leader-based BFT consensus protocols, the total ordering is determined by the leader and followers can only detect limited malicious behaviors. It doesn’t respect the collective preferences of each correct participant, and, because a leader has controlled the total ordering, there is a risk of suffering a manipulation attack, which means the adversaries make the transactions more likely to be committed according to their own wishes.

Byzantine ordered consensus protocol is used to tolerate Byzantine faults in ordering manipulation. To achieve it, we believe Byzantine ordered consensus protocol should have two essential properties, free will and fairness.

Free Will. Free will is a concept proposed by Zhang et al. [12]. Briefly, it means no one could manipulate the total ordering directly. For instance, here is a pair of commands r1r_{1} and r2r_{2}. If their context in each node’s partial ordering indicates r1r2r_{1}\prec r_{2} (or r2r1r_{2}\prec r_{1}), their context in the total ordering must be the same that r1r2r_{1}\prec r_{2} (or r2r1r_{2}\prec r_{1}). If some of the nodes prefer r1r2r_{1}\prec r_{2} while others r2r1r_{2}\prec r_{1}, in the total ordering of trusted node, the context between such a pair of commands should be determined by every participant’s preference which means both of them have an opportunity to be committed at first.

Fairness. The ordering in reality deserves some intuitive expectations as below. 1) The commands proposed by the same proposer may born with context that for r1.i=r2.ir_{1}.i=r_{2}.i, we have r1r2r_{1}\prec r_{2}, iff r1.n<r2.nr_{1}.n<r_{2}.n. 2) The commands proposed by different proposers may deserve context because of the physical limitations. For instance, P1P_{1} and P2P_{2} are located in the same place. If P1P_{1} has proposed r1r_{1} several seconds earlier than P2P_{2} proposing r2r_{2}, r1r_{1} deserves the context r1r2r_{1}\prec r_{2} in the total ordering commitment. Although, the ordering can be affected by multiple factors that we cannot find the totally correct ordering, we can make the context in total ordering show the intuitive expectations to the maximum.

By using some reasonable ordering strategies, which take every node’s partial ordering into thought, we can always achieve certain free-will characteristics. To achieve better fairness, we need to aggregate the logical clock from each participant. However, the Condorcet Paradox prevents us to find distinct total ordering. Next, we would like to introduce our method to deal with the paradox.

II-D Anchor-Based Ordering

Definition 1 (Reliable Context).

For a pair of commands r1r_{1} and r2r_{2}, there is a reliable context r1r2r_{1}\prec r_{2} (or r2r1r_{2}\prec r_{1}), iff at least one non-faulty node NiN_{i} believes r1ir2r_{1}\prec_{i}r_{2} (or r2ir1r_{2}\prec_{i}r_{1}).

Theorem 1.

Let r\prec_{r} denote the reliable context. For commands r1r_{1} and r2r_{2}, if there are f+1f+1 nodes believe r1r2r_{1}\prec r_{2}, then there is reliable context r1rr2r_{1}\prec_{r}r_{2}.

For the reliable context is generated by the non-faulty nodes, selecting it into the total ordering satisfy the free-will. If the context is not reliable, it means the context could be generated by a byzantine node, and might be the will of the adversaries. It is risky to select such a unreliable context into total ordering.

Linear Anchor. To prevent the Condorcet Paradox, we need to find something with linearity. Here, a series of commands with linear reliable context can help us commit the commands. We call such series of commands as anchor commands. Let rar_{a} denote a anchor command. With the reliable context between anchor commands, we find a partial ordering set {ra},r\langle\{r_{a}\},\prec_{r}\rangle.

Then we need to commit the anchor commands according to the partial ordering set. Each time when we commit an anchor command rar_{a}, we need to generate command set FF which is constructed with rar_{a} and the commands {r}\{r^{\prime}\} with reliable context rrrar^{\prime}\prec_{r}r_{a}. After that, the commands would be committed linearly, which has avoided the Condorcet Paradox, and make the ordering process more practical and conducive to implementation.

In the next section, we would like to introduce the protocol we design with the anchor-based ordering strategy.

III Phalanx

Phalanx is a Byzantine ordered consensus protocol that can be implemented as a modular component and combined with any state-of-the-art BFT consensus algorithms, without neither additional hardware support nor additional network assumptions. It could help the BFT protocols to achieve anchor-base ordering strategy, and not take much effect on the original protocol. In this section, we would like to introduce Phalanx and make proof of its basic properties.

III-A Overview

Phalanx has two types of roles: proposers and nodes. A proposer PiP_{i} could propose command cc with given order. The non-faulty nodes {Ni}\{N_{i}\} are trying to reach consensus on the total ordering of commands.

Refer to caption
Figure 1: The workflow for Phalanx nodes.

As is shown in Fig. 1, a node is constructed with three main parts: mempool, consensus, and executor. Whenever node NiN_{i} has received the command sent from proposers, firstly, put them into NiN_{i}’s partial ordering according to FIFO (First-In-First-Out) receiving the ordering. Then, pending logs for NiN_{i} are created. After the process of order-protocol, verifiable logs are generated to notify others its own partial ordering. The mempool is a container of logs received from each node. In consensus module, using the logs in mempool, we generate order-batch to trigger consensus and get the same log stream for non-faulty nodes with the help of any state-of-the-art BFT protocols. Taking the log stream as material, in executor, the non-faulty nodes eventually find the same total ordering for commands. In particular, we list some basic notations as needed in Table I. As for the sets and vectors, unless otherwise specified, they do not have preset size. If the vector have preset size, every element in it should have a initial value.

TABLE I: Basic Notations.
Notation Description
rr Command.
\prec Context.
r\prec_{r} Reliable context.
NN Node.
NiN_{i} The node with identifier ii.
PP Proposer.
PiP_{i} The proposer with identifier ii.
\bot Empty value.
AA A set or a vector
A[i]A[i] The element in AA whose keyword is ii.
𝔸\mathbb{A} FIFO queue.
𝔸.front()\mathbb{A}.front() Take out the front-log in the FIFO queue.
𝔸.read_front()\mathbb{A}.read\_front() Read the front-log without taking it out.
𝔸.remove_front()\mathbb{A}.remove\_front() Remove the front-log in the FIFO queue.
𝔸.push_back(v)\mathbb{A}.push\_back(v) Add the element vv to the end of queue.
𝔸.len()\mathbb{A}.len() The number of elements in current queue.
h(m)h(m) Calculate the hash of mm.
ρi\rho_{i} Partial signature generated with private key.
psigi(e)psig_{i}(e) Generate partial signature for ee.
pverify(ρi)pverify(\rho_{i}) Verify the partial signature ρi\rho_{i}.
agg(e,{ρi}iP)agg(e,\{\rho_{i}\}_{i\in P}) Aggregate the partial signatures {ρi}iP\{\rho_{i}\}_{i\in P} for ee.
verify(sig)verify(sig) Verify the aggregated signature with public key.

III-B Cryptographic Notations

We use standard hash function (e.g., SHA256) to generate the digest of messages. Generate the digest of mm, dh(m)d\leftarrow h(m), then dd could be regarded as the identifier of mm. If there is another message mm^{\prime}, we say that mm^{\prime} is the same as mm if and only if h(m)=h(m)h(m^{\prime})=h(m).

We assume a public key infrastructure (PKI) of each participant in our system including proposers and nodes which means each of them is identified by its own public key. When proposer PiP_{i} or node NiN_{i} is trying to send message mm, the communication transmission will be carried out reliably through mi\langle m\rangle_{i}.

Besides, we make use of (k,nk,n)-threshold signature among nodes. There is a single public key and each NiN_{i} holds a distinct private key. If event ee needs to be determined by the vote of the nodes. Sending a vote means approval, and not sending a vote means denial. Each time when NiN_{i} sends a vote, it generates a partial signature with its private key ρipsigi(e)\rho_{i}\leftarrow psig_{i}(e). We could verify the validation of partial signature with ρi\rho_{i} with pverify(ρi)pverify(\rho_{i}). When there is a set of valid partial signatures {ρi}iP\{\rho_{i}\}_{i\in P} and |P|=k|P|=k, generate aggregated signature for ee, sigagg(e,{ρi}iP)sig\leftarrow agg(e,\{\rho_{i}\}_{i\in P}). Every node could verify the aggregated signature with the single public key that verify(sig)verify(sig). If it is a valid aggregated signature, the function should return truetrue value.

The aggregated signature could be regarded as a kind of certificate, denoted as certcert. If certcert is valid, then it means there are kk nodes have voted on event ee. Make use of (2f+1,n)(2f+1,n)-threshold signature to generate certcert for ee in BFT consensus algorithm, and we could verify the certcert to check the quorum agreement on ee.

III-C Mempool

Each node NiN_{i} has its own mempool. Let mempooli\mathrm{mempool}_{i} denote it. Whenever NiN_{i} receives commands from proposers, the mempooli\mathrm{mempool}_{i} would receive them and generate NiN_{i} partial ordering according to FIFO receiving ordering. At the same time, certified logs would be generated with ordering protocol and notify other participants.

TABLE II: Structures Notations for Mempool.
Notation Description
mempooli\mathrm{mempool}_{i} The mempool module for node NiN_{i}.
oo The verifiable log to describe ordering preference.

Structures. The structure notion for mempool is shown in Table II. To make the log verifiable, we upgrade the structure of oo in section 3. The verifiable oo is i,n,t,dr,dpre,dcur,cert\langle i,n,t,d_{r},d_{pre},d_{cur},cert\rangle, in which tt is the timestamp when we generate current log, dpred_{pre} is the digest of previous log, which refers to the log with sequence number n1n-1 (if nn is equal to 1, then dpred_{pre} is empty), dcurd_{cur} is the digest of current log that dcurh(i,n,t,dr,dpre)d_{cur}\leftarrow h(\langle i,n,t,d_{r},d_{pre}\rangle), certcert is a certificate generated by ordering protocol with 2f+12f+1 nodes and it could be used to verify the validation of current log.

TABLE III: States Notations for Mempool.
Notation Description
seqseq An integer, initialized to 0, is used to track the latest log
generated by NiN_{i} that it is NiN_{i} logical clock.
opendingo_{pending} A log type element, initialized to \bot, which is used to track
the log without certificate.
HH An nn-sized vector of log, where H[j]H[j], initialized to \bot,
is used to track the latest verifiable log from NjN_{j}.
F\mathbb{R}_{F} A FIFO queue command, is used to receive the commands
from proposers.

States. To operate the ordering protocol, NiN_{i} needs to maintain local states as is shown in Table III. The seqseq is used to track the latest log. The opendingo_{pending} is used to track the log without certificate. The nn-sized vector HH is used to track the latest verifiable log. The F\mathbb{R}_{F} is used to receive the commands from proposers.

Protocol. As is shown in Fig. 2, nodes run order-protocol to generate verifiable logs. The steps are as follows.

Refer to caption
Figure 2: Here are 4 nodes and N4N_{4} is crashed. When N1N_{1} is trying to generate verifiable logs, N1N_{1} should broadcast pre-order message at first. Then, each node that received pre-order message should verify it and send back vote to N1N_{1} if it is legal. After N1N_{1} has collected quorum (here is 3) votes from every participant including itself, generate a verifiable log and broadcast it.

Step 1: Pre-Order. If the FIFO queue F\mathbb{R}_{F} isn’t empty and there isn’t a pending log that opending=o_{pending}=\bot, NiN_{i} would take the front element rF.front()r\leftarrow\mathbb{R}_{F}.front() and then try to generate verifiable log for it. NiN_{i} advances its local logical clock seqseq+1seq\leftarrow seq+1, and generates the order tuple without certificate oi,n,dc,dpre,dcuro\leftarrow\langle i,n,d_{c},d_{pre},d_{cur}\rangle, o.nseqo.n\leftarrow seq, o.dcc.do.d_{c}\leftarrow c.d, o.dpreH[i].dcur(o.n>1)o.d_{pre}\leftarrow H[i].d_{cur}(o.n>1). Store the tuple oo as a pending log that opendingoo_{pending}\leftarrow o. Then, NiN_{i} broadcasts pre-order message \langlePRE_ORDER oio\rangle_{i} and starts to wait for the responses from 2f+12f+1 nodes (including itself).

Step 2: Vote. A node NjN_{j} (including NiN_{i} itself) receives the pre-order message sent from NiN_{i} and tries to verify the tuple oo with NiN_{i}’s latest verifiable log that ohH[i]o_{h}\leftarrow H[i]. First, oo should have a valid digest. Next, if oho_{h} is \bot, then o.no.n should be equal to 1. If oho_{h} is not \bot, then oo should be the next log of oho_{h} that o.n=oh.n+1o.n=o_{h}.n+1 and o.dpre=oh.dcuro.d_{pre}=o_{h}.d_{cur}. If oo satisfies these requirements above, it could be regarded as a valid tuple. Then, the node NjN_{j} would respond with \langleVOTE d,ρjjd,\rho_{j}\rangle_{j}, where dd is the digest of oo that do.dcurd\leftarrow o.d_{cur}, and ρj\rho_{j} is a partial signature generated by NjN_{j} for digest dd that ρjpsigj(d)\rho_{j}\leftarrow psig_{j}(d). Whenever NjN_{j} has voted log oo from NiN_{i}, NjN_{j} will not vote for another log oo^{\prime} from NiN_{i} that o.n=o.no^{\prime}.n=o.n.

Step 3: Order. Whenever NiN_{i} receives response vjv_{j} from NjN_{j}, it verifies the partial signature with pverify(vj.ρj)pverify(v_{j}.\rho_{j}). If it is valid, accept it. When NiN_{i} has received valid responses from 2f+12f+1 nodes (including itself), there is a set of valid partial signatures {ρj}\{\rho_{j}\} and |{ρj}||\{\rho_{j}\}| is equal to 2f+12f+1. Generate aggregated signature with the set and complete log that o.certagg(o.dcur,{ρj})o.cert\leftarrow agg(o.d_{cur},\{\rho_{j}\}). Next, NiN_{i} broadcasts partial order message \langleORDER oio\rangle_{i} to notify others with its latest verifiable partial order. When node NjN_{j} receives the log oo from NiN_{i}, verify it with verify(o.cert)verify(o.cert). If it’s valid, then update the latest log of NiN_{i} in local states that H[i]oH[i]\leftarrow o.

At last, the logs generated by NiN_{i} is constructed like Fig. 3. The subscript of oko_{k} in the figure indicates the log’s serial number. The digests of logs construct a chained structure and the certificate could be used to verify the validation of each log. Besides, mempooli\mathrm{mempool}_{i} stores the commands and verifiable logs NiN_{i} has received. Every time trying to use them, we could get the command rr according to its digest and get log oo according to tuple i,n\langle i,n\rangle, where ii is the author of partial order and nn is the sequence number.

Refer to caption
Figure 3: The verifiable logs generated by the same node form a chain structure with hash digest.

III-D Consensus

Let consensusi\mathrm{consensus}_{i} denotes the consensus module for node NiN_{i}. It is used to find the same log stream for each non-faulty node. To achieve this goal, Phalanx could employs any state-of-the-art BFT protocols, such as PBFT, HotStuff, and even HoneyBadgerBFT, an asynchronous protocol. The primitive BFT protocol could help the non-faulty node reach consensus on the order of txtx-batch. Here, in Phalanx, the contents of consensus batch are replaced by the latest logs for each node. We call it order-batch. After the consensus process of primitive BFT protocol, we can find the consistent logs set to generate total ordering in the executor module.

TABLE IV: Structure Notations for Consensus.
Notation Description
consensusi\mathrm{consensus}_{i} The consensus module for node NiN_{i}.
bb An order-batch, which is constructed with element HH.
HH An nn-sized vector of log, where H[i]H[i], initialized to \bot,
stores the latest verifiable log from NiN_{i}.
SS A set of logs {o}\{o\}, in which the elements are the logs
from every node.

Structures. The consensus module takes use of some basic data structures as is shown in Table IV. We take the order-batch bb into the primitive BFT consensus process. After the consensus agreement of the ordering to submit bb, non-faulty nodes can generate the same logs set SS. In addition, the elements in SS should be sorted by the strategy that sort the logs in ascending order according to the sequence number o.no.n, and if logs have the same sequence number, sort them in ascending order according to the generators’ identifier o.io.i.

TABLE V: States Notations for Consensus.
Notation Description
VV An nn-sized vector of integers where V[i]V[i], initialized with 0,
tracks the sequence number of logs which is committed in
consensus module from NiN_{i}, and we could regard VV as
a kind of vector clock
𝕊\mathbb{S} A FIFO queue for sets of logs SS.

States. Each node NiN_{i}’s consenter maintains the basic local states as is shown in Table V. The nn-sized verctor VV is used to track the sequence number of committed logs. The FIFO queue 𝕊\mathbb{S} is used to store the logs.

Actions. If we employ leader-based BFT protocol, such as PBFT or HotStuff, the order-batch could be always generated by the leader in the current view (or round), so that we could provide a standard interface to generate order-batch. Whenever the leader has found a latest log for NiN_{i} in mempool which has a larger sequence number than V[i]V[i], it could try to generate order-batch bb and trigger the BFT protocol. The content in bb could be generated from mempool that b.Hmempooli.Hb.H\leftarrow\mathrm{mempool}_{i}.H. After the process of BFT protocol, every non-faulty node will find {b1,b2,,bm,}\{b_{1},b_{2},...,b_{m},...\}, in which there are a series of order-batches in the same order.

Next, commit the order-batches in {bm}\{b_{m}\} one by one. Whenever trying to commit bmb_{m}, a set of logs SS would be generated. The steps are as follows.

Step 1. Verify the certificates of logs in bm.Hb_{m}.H. If there is an invalid log, stop the process and change the leader in BFT protocol. If they are valid, initialize an empty log set SS. For each logs in bm.Hb_{m}.H, we should process it according to step 2.

Step 2. Let nhbm.H[j].nn_{h}\leftarrow b_{m}.H[j].n and ncV[j]n_{c}\leftarrow V[j]. If nhncn_{h}\leq n_{c}, just return. If nh>ncn_{h}>n_{c}, then (1) update V[i]V[i] with nhn_{h}, (2) add bm.H[j]b_{m}.H[j] into SS, (3) get the logs generated by NjN_{j} with sequence number belonging to (nc,nh)(n_{c},n_{h}) from mempool and add them into SS. If we cannot find the expected logs from mempool, request other nodes for it and verify the digests and certificates.

Step 3. After the process of each log in bm.Hb_{m}.H, add SS into the end of 𝕊\mathbb{S}.

As for employing leadless BFT protocols, the generation of order-batch depends on the generation strategy of the primitive protocol. For instance, in HoneyBadger-BFT (HB-BFT), each node would generate a slice of the proposal, and the final committed block is constructed by part of them. So that, if we employ Phalanx in HB-BFT, node NiN_{i} would just propose its latest log to trigger BFT protocol. After each time the BFT protocol consensus process is finished, an order-batch could be constructed. At last, we could find a series of order-batches in the same order and commit them one by one to generate the log sets to update 𝕊\mathbb{S}.

After the process of consensus module, each non-faulty node would find the same FIFO queue 𝕊\mathbb{S}. The FIFO queue 𝕊\mathbb{S} is going to be used in executor module to generate total ordering.

III-E Executor

Refer to caption
Figure 4: This figure indicates the process Phalanx to generate total ordering in a 4 nodes cluster. Assume that the primitive BFT protocol here is a leader-based protocol and the leader is N1N_{1}. The cubes have the same color denote the verifiable logs pointing to the same command. With the help of protocol in mempool, each node has generated its own partial ordering and the verifiable logs are stored in mempool. The first time N1N_{1} trying to trigger primitive BFT consensus, it has only received verifiable logs from N1N_{1} and N2N_{2} as is shown in B1B_{1}. Then, generate order-batch b1b_{1}. Next, while trying to generate the second batch, the logs in mempool is shown as B2B_{2}, so that generate order-batch b2b_{2}. The third order-batch is constructed as b3b_{3} while the mempool shown as B3B_{3}. The order-batches will be confirmed on non-faulty nodes via BFT primitive consensus one by one. The non-faulty node should submit b1b_{1}, b2b_{2}, and b3b_{3} by order, and generate the corresponding log sets S1S_{1}, S2S_{2}, and S3S_{3}. In executor, we need to restore each node’s partial ordering, and then try to commit the commands. For the following description, the dashed cubes indicate the commands which have already been committed, and the blank cubes indicate the corresponding element in the queue has been removed. With the help of FIFO queue, the log sets will be submitted into executor by order. After we submit S1S_{1}, the FIFO queues in executor is constructed as E1E_{1}. Now, we cannot find any anchor command. After we submit S2S_{2}, the FIFO queue in executor is shown as E2E_{2}. Then, we find N1N_{1} and N3N_{3} believe the red command should be committed at first, so that the red command becomes the anchor command. Commit the red command. After the commitment of red command, in E2E_{2}, the yellow command be selected as anchor command via alter path and the anchor-set contains the yellow command only. Then, commit the yellow one. After we submit the log set S3S_{3}, the procession in executor is shown as E3E_{3}. Then, the green command is selected as anchor command because N1,N3,N4N_{1},N_{3},N_{4} believe we should commit it first. After the commitment of green command, the executor should wait for log sets submitted to push forward the ordering phase.

The executor module aims to get the final ordering (total ordering) according to the log stream in consensusi.𝕊\mathrm{consensus}_{i}.\mathbb{S}. To achieve anchor-based ordering, we need to find the anchor commands with specific ordering rules. In this part, we would like to introduce the generation of final ordering.

TABLE VI: Structures Notations for Executor.
Notation Description
executori\mathrm{executor}_{i} The executor module for node NiN_{i}.
cc A command info to collect essential information for
one command’s commitment.

Structures. The command rr is the basic unit for Byzantine ordered consensus. Here, as is shown in Table VI, we take command info cc to collect essential information for command’s commitment. We say that crc\to r if and only if cc is used to collect essential information for command rr. The command info cc that crc\to r contains: (1) dd, the digest of command that dr.dd\leftarrow r.d. (2) OO, An nn-sized vector of logs where O[i]O[i], initialized to \bot, tracks the log oo from NiN_{i} that oro\to r, and the method |c.O||c.O| would return the number of element in OO which is not \bot. (3) TT, a set that is used to store the timestamps. Whenever oo is added into c.Oc.O, o.to.t would be added into TT. The timestamps in TT are sorted in ascending numerical order. If the length of c.Tc.T is greater or equal to 2f+12f+1, then the (f+1)(f+1)-th one would be recognized as trusted timestamp.

TABLE VII: States Notations for Executor.
Notation Description
DD A set of strings, tracks the digests of commands
which have been committed.
CC A vector of command info, where C[d]C[d] refers
to the command info cc whose digest is equal to dd.
QQ An nn-sized vector of FIFO queues, where Q[j]Q[j] is the
FIFO queue j\mathbb{Q}_{j}.
j\mathbb{Q}_{j} The queue used to record the logs from NjN_{j}
according to the commitment order into executor.
θj\theta_{j} The front-log in j\mathbb{Q}_{j} that θjQ[j].read_front()\theta_{j}\leftarrow Q[j].read\_front().
If j.len()=0\mathbb{Q}_{j}.len()=0, then θj\theta_{j}\leftarrow\bot.
Θ\Theta An nn-sized vector of front-logs, where Θ[j]\Theta[j] tracks
the front-log θj\theta_{j}.

States. Each node NiN_{i}’s executor maintains the states as is shown in Table VII. The set DD is used to track the committed commands. The vector CC is used to track the command info in executor module. The nn-sized vector QQ is used to store the commands submitted from consensus module. The Q[j]Q[j] refers to the FIFO queue j\mathbb{Q}_{j}, which is used store the logs of NjN_{j}. The θj\theta_{j} refers to the front-log in j\mathbb{Q}_{j}. And we use an nn-sized vector Θ\Theta to track the θj\theta_{j}.

Actions. Whenever consensusi.𝕊\mathrm{consensus}_{i}.\mathbb{S} is not empty, take the front element in it that Sconsensusi.𝕊.front()S\leftarrow\mathrm{consensus}_{i}.\mathbb{S}.front() and try to process SS with the ordering process as follows.

Step 1. Commit logs in SS one by one into executor module. For each log oo in SS, read the command info cc from CC at first that cC[o.dr]c\leftarrow C[o.d_{r}] (if there doesn’t exist such a command info, initiate it). Update c.O[o.i]c.O[o.i] with oo and add oo into the end of FIFO queue Q[o.i]Q[o.i].

Step 2. Find the anchor-set. Initialize an empty anchor-set FF. Read every FIFO queue in QQ. While reading i\mathbb{Q}_{i}, if the front-log θi\theta_{i} points to a committed command that θi.drD\theta_{i}.d_{r}\in D, then remove it and read the latest front-log. Repeat the process till the front-log θi\theta_{i} is \bot or points to uncommitted command. Add each θi\theta_{i} into a vector Θ\Theta that Θ[i]\Theta[i] tracks the front-log θiQ[i].read_front()\theta_{i}\leftarrow Q[i].read\_front(). If there exists commands {r}\{r\} that at least f+1f+1 front-logs point to rr, then put all these command info crc\to r into FF, return the anchor-set FF. If not, jump into alter path.

alter path. For all the command info with |c.O|2f+1|c.O|\leq 2f+1, get the command info cc with the lowest trusted timestamp. Then regard the command crc\to r as anchor command rar_{a}. If crac\to r_{a}, that we can find cc^{\prime}, crc^{\prime}\to r^{\prime}, that there is not a reliable context rarr_{a}\prec r^{\prime}, then add rr^{\prime} into FF. Repeat this process until no such a cc^{\prime} can be found or the cc^{\prime} added into FF has |c.O|<2f+1|c^{\prime}.O|<2f+1.

Step 3. Check the front set. For each command info cc in FF, if |c.O|<f+1|c.O|<f+1, then remove cc from FF. If cF\exists c\in F that there are at least f+1f+1 non-empty values in c.Oc.O but |c.O||c.O| is less than 2f+12f+1, then directly return an empty anchor-set.

Step 5. Commit the commands according to FF. First of all, sort the command info {c} in anchor-set FF according to the in ascending order by trusted timestamp of cc. If the trusted timestamps are the same, then sort the command info alphabetically. After that, according to the sorted command info set {c}\{c\}, we would commit the command rr that crc\to r one by one. To obtain the command rr, we could read the mempool or request it from others.

As is shown in Fig 4, it is the journey for non-faulty nodes to create total ordering after each participant has generated partial ordering in its mempool.

After the commitment of commands, each non-faulty node gets the same total ordering to execute them. After the execution of the command, nodes would feedback the results to proposers. If the proposer has received f+1f+1 the same response for one command, accept the execution result for it.

III-F Proof

Theorem 2 (Validity).

If a non-faulty node appends rr into its final ordering, then at least one non-faulty node has selected rr into its partial ordering.

Proof:

Before command rr has been committed into final ordering, the node should collect at least 2f+12f+1 logs from different participants pointing to it. The logs are related to nodes’ partial ordering. As the adversary can only control up to ff nodes, rr has been selected at least one non-faulty node. ∎

Theorem 3 (Consistency).

For logs o1o_{1} and o2o_{2} from the same node, if their certificates are valid, then o1.no2.no_{1}.n\neq o_{2}.n.

Proof:

For logs o1o_{1} and o2o_{2} both generated by NiN_{i}, assume that they have valid certificates and o1.n=o2.n=ko_{1}.n=o_{2}.n=k. So that, 2f+12f+1 nodes have voted for o1o_{1} and o2o_{2} which means at least f+1f+1 nodes have voted for logs from NiN_{i} on sequence number kk twice. But the adversary can only control up to ff nodes. Therefore, here is a paradox. ∎

Theorem 4 (Consistency).

For non-faulty nodes N1N_{1} and N2N_{2}, let I1I_{1} and I2I_{2} denote their total ordering. If there is context r1r2r_{1}\prec r_{2} in I1I_{1}, then we could eventually find r1r2r_{1}\prec r_{2} in I2I_{2}.

Proof:

In consensus module, every non-faulty node will find the same log stream. While generating the total ordering, non-faulty node should process the log stream by order. Because of the strategy of SMR, if the log stream is the same, the state on each node would be the same. So that, the final ordering on each non-faulty node is the same. ∎

Theorem 5 (Consistency).

For nodes N1N\forall N_{1}\in N and N2N\forall N_{2}\in N, regard their final order decision as O1O_{1} and O2O_{2}. If c1,c2O1c1c2\exists c_{1},c_{2}\in O_{1}\land c_{1}\prec c_{2}, then c1,c2O2c1c2\exists c_{1},c_{2}\in O_{2}\land c_{1}\prec c_{2}.

Theorem 6 (Finality).

For valid verifiable logs o1o_{1} and o2o_{2} from the same node that o2.n=o1.n+1o_{2}.n=o_{1}.n+1, if there is a committed order-batch bb that o2b.Ho_{2}\in b.H, then each non-faulty node can receive the consistent o1o_{1}.

Proof:

For the verifiable logs o1o_{1} and o2o_{2} from NiN_{i}, n1o1.nn_{1}\leftarrow o_{1}.n, n2o2.nn_{2}\leftarrow o_{2}.n, n2=n1+1n_{2}=n_{1}+1. Because of the validation of o2o_{2}, 2f+12f+1 nodes have voted for it, which means they have already received o1o_{1}. While the commitment of logs in executor, we could request o1o_{1} from others, since there are at most f malicious nodes, everyone could receive the valid o1o_{1} at last. ∎

Theorem 7 (Anchor Linearity).

Let RaR_{a} denote the set of anchor commands generated by Phalanx. There is a partial ordering set Ra,r\langle R_{a},\prec_{r}\rangle.

Proof:

For r1,r2Ra\forall r_{1},r_{2}\in R_{a} and r1r_{1} is committed before r2r_{2}, make an assumption that there isn’t reliable context that r1rr2r_{1}\prec_{r}r_{2}. If r1r_{1} is selected by normal path, then at least f+1f+1 nodes believe we should commit r1r_{1} at first, so that there is r1rr2r_{1}\prec_{r}r_{2}. If r1r_{1} is selected by alter path, then the commands {r}\{r^{\prime}\} without r1rrr_{1}\prec_{r}r^{\prime} are committed at the same anchor-set, so that for the uncommitted r2r_{2}, there is reliable context that r1rr2r_{1}\prec_{r}r_{2}. ∎

As for the commands belonging to the same anchor-set, the timestamp-based strategy can be taken to decide their ordering. For there are at most ff faulty nodes, the (f+1)(f+1)-th largest timestamp is most likely sent from a non-faulty node, when we have received at least 2f+12f+1 logs pointing to specific command from different nodes.

IV Implementation

We implement Phalanx as a modular component in Go and should employ it with state-of-the-art BFT protocol. Bamboo[15] is an evaluation framework for chained-BFT protocols in Go. It has implemented multi kinds of chained-BFT protocols, e.g. chained HotStuff, StreamLet and etc.. Here, we complete Phalanx system on Bamboo chained-BFT implementations. The following experiments concentrate on the Phalanx system employed on HotStuff in Bamboo. Refer to HotStuff as HS. Refer to the extended protocol from HS as Phalanx-HS.

To amortize the cost of protocol, batching is a common optimization for performance improvement. In our implementation of Phalanx, we would like to make use of batching strategy. Each proposer could propose a command batch with bb requests in it. Each node could generate one batched log to declare its ordering preference for a series of commands that node could request ordering phase every Δo\Delta_{o} interval to declare its partial ordering in that duration. As for the performance, the batching strategy amortize the cost of hash calculation and signature verification, and Phalanx could achieve a more satisfying performance with batching strategy.

V Experiment and Evaluation

In this section, we evaluate the performance and reliability of Phalanx system which is employed in BFT protocol implementations on Bamboo. The main concern is about the impact of Phalanx component on latency and throughput in our system. To analyze it, we compare Phalanx system with its baseline BFT protocols in both LAN and WAN environments. Next, we concentrate on the fair ordering functionality of Phalanx. After that, we compare the robustness of anchor-based Phalanx with timestamp-based strategy.

V-A Performance Evaluation

Baseline and Metrics. We take HS as the baseline of our performance evaluation. We would like to compare the throughput and latency between HS and Phalanx-HS in both LAN and WAN environment. In this part, we concentrate on the performance loss caused by Phalanx component and some other factors which could affect performance. The latency has ignored the transmission delay of commands.

LAN Deployment and Performance. We deployed our evaluation on 4 instances in the same datacenter to compare the performance of baseline and Phalanx. Each Phalanx node ran on Aliyun ECS c7 with 8vCPU (Intel Xeon 8369B) and 16GiB memory.

For each datacenter, we use the default batch size b=200b=200 and the ordering interval Δo=50\Delta_{o}=50ms. The results are shown in Table VIII. If there is only 1 proposer (p=1p=1) to propose commands in Phalanx-HS, the throughput of it is almost the same as HS while the latency of Phalanx-HS is 15.3% higher than HS. If we increase the number of proposers from 1 to 4, the throughput of Phalanx-HS increases in direct proportion to the number of proposers, while the latency of Phalanx-HS has barely changed. Then, we evaluate the performance of HS with b=800b=800, and we found that its performance is almost the same as Phalanx-HS with b=200b=200 and p=4p=4.

TABLE VIII: Performance of Phalanx in LAN.
throughput (txs/s) latency (ms)
HS(b=200) 38,680 54.1
Phalanx-HS(b=200, p=1) 35,956 62.4
Phalanx-HS(b=200, p=2) 51,815 63.8
Phalanx-HS(b=200, p=3) 72,197 62.3
Phalanx-HS(b=200, p=4) 100,564 63.6
HS(b=800) 119,499 57.4

WAN Deployment and Performance. We deployed our evaluation on 4 geo-distributed nodes to compare the performance of baseline and Phalanx. Each Phalanx node ran on Aliyun ECS c5e with 8vCPU (Intel Xeon 8269CY) and 16GiB memory. Servers are located in Silicon Valley, Frankfurt, London, and Tokyo.

For each geo-distributed node, we use the default batch size b=200b=200 and the ordering interval Δo=200\Delta_{o}=200ms. The results are as shown in Table IX. If there is only 1 proposer (p=1p=1) to propose commands in Phalanx-HS, the throughput of it is almost the same as HS. However, the latency of Phalanx-HS is 5.57% lower than HS, which is satisfying. It is mainly because that the main bottleneck of geo-distributed system is network communication and the order-batch which only contains the latest logs of each participant has reduced the volume of HS consensus proposal. Besides, each part of Phalanx (mempool, consensus, and executor) are running concurrently, which can make full use of computing resources. Then, we increase the number of proposers from 1 to 4, and also find that the throughput of Phalanx-HS increases in direct proportion to the number of proposers with barely changed latency in geo-distributed environment.

TABLE IX: Performance of Phalanx in WAN.
throughput (txs/s) latency (ms)
HS(b=200) 1,288 1,324.6
Phalanx-HS(b=200, p=1) 1,294 1,250.8
Phalanx-HS(b=200, p=2) 2,515 1,264.8
Phalanx-HS(b=200, p=3) 3,781 1,142.5
Phalanx-HS(b=200, p=4) 5,196 1,252.1

Evaluation. Compared to the baseline, Phalanx incurs signatures and more network communications to process verifiable logs. However, the order-batch reduces the volume of the state-of-the-art BFT proposals. Then, as for the latency for Phalanx, it is about 15% higher than HS in LAN and could be slightly lower than HS in WAN environment. As for throughput, Phalanx is almost the same as HS if there is only 1 proposer, and the throughput of Phalanx increases in direct proportion to the number of proposers, while the latency of Phalanx-HS has barely changed. It can be considered that Phalanx does not bring too much performance loss, and it has advantages in some situations.

V-B Fault-Tolerance Functionality

Simulation for Ordering Manipulation. In this part, we simulate the ordering manipulation to verify the ability for Phalanx to resist attacks. For the commands generated by the same proposer, there should be an intuitively distinct ordering that we need to commit the earlier proposed command at first. So that, we add sequence number on commands proposed to note the intuitive distinct ordering. To simulate the Byzantine behaviour, we inject some codes to make the adversary disorder the commands it has received and generate wrong partial ordering. With the monitoring on whether the commands are committed according to the sequence number, we can evaluate the ability to resist ordering manipulation.

TABLE X: Fault Tolerance on Ordering.
reordered commands ratio
following byzantine 99.8%
f=0f=0 0%
f=1f=1 0%
f=2f=2 21.1%

Table X shows the change of reordered commands ratio with the number of Byzantine nodes. If there is no adversary that f=0f=0, no intuitively distinct context is broken. If there is one Byzantine node and follow the attacker’s ordering, then almost all the intuitively distinct contexts are destroyed. However, after the activation of Phalanx strategy, only almost every intuitively distinct context has been resisted. If the number of adversarial nodes is larger than the fault-tolerance threshold, we can find there are part of command pairs with intuitively distinct context have been reordered.

V-C Adversary Resistance

In this part, we compare the adversarial attack resistance ability between timestamp-based strategy and Phalanx. For Byzantine fault tolerance protocols, if the number of Byzantine nodes is no larger than the fault-tolerance threshold, we expect the intuitively distinct contexts should be preserved. Here, we do not implement a timestamp-based protocol[12][13]. We compare the Phalanx with timestamp-based strategy directly.

TABLE XI: Adversarial Attack Resistance Comparison.
ff Phalanx Timestamp-based
0
1
2
3 ×\times
4 ×\times
5 ×\times

We deployed our evaluation on 16 nodes. Each Phalanx node ran on Aliyun ECS c7 with 8vCPU (Intel Xeon 8369B) and 16GiB memory. We inject codes to make some of them malicious and set 2 proposers. Increase the byzantine node number from 0 to threshold (f=5f=5) and detect the ratio of commands which have been reordered. Here, let us consider that the system has resisted manipulation attack if the ratio of reordered commands is less than 0.5%. As is shown in Table XI, both Phalanx and timestamp-based strategy could reserve the intuitively distinct context without any Byzantine nodes. However, if there exists Byzantine nodes in current situation, the timestamp-based strategy sometimes cannot prevent manipulation attack, while Phalanx could still reverse intuitively distinct contexts.

Refer to caption
Figure 5: Results for experiment on adversary resistance comparison between Phalanx and timestamp-based strategy in cluster with 34 nodes.

To take further evaluation on adversary resistance, we deployed our evaluation on 34 nodes. Each Phalanx node ran on Aliyun ECS c7 with 4vCPU (Intel Xeon 8369B) and 8GiB memory. We also inject codes to make some of them malicious and set 2 proposers. Increase the byzantine node number from 0 to threshold (f=11f=11) and detect the reordered commands ratio. As is shown in Fig 5, the probability of timestamp-based strategy causing command reordered which has destroyed intuitively distinct context is significantly higher than Phalanx. As the number of Byzantine nodes increases within the threshold, the commands ordered by timestamp-based strategy will be much easier to be attacked, while the reordered commands ratio through Phalanx does not increase rapidly. We found that the Phalanx performs better in resisting ordering manipulation than timestamp-based strategy.

Besides, we find that, whenever reordered commands ratio of Phalanx goes up, there are more anchor-sets selected through alter path. It is an attention-worth problem that can be further studied in the future.

VI Related Works

Aequitas[10] proposed by Kelkar et al. in 2020 are the first class of protocols which have achieved weak order-fairness in both synchronous and asynchronous situations. To deal with Condorcet Paradox, Aequitas construct a relation graph of transactions and find out all of the strongly connected components (SCCs) and the transactions in the same SCC would constitute Condorcet Paradox. After that Aequitas could find deterministic ordering to execute each SCC, and the transactions in the same SCC would be applied in the same batch. It could be considered as a batch-based ordering protocol. In 2021, Themis[11] was proposed by Kelkar et al.. It is the upgraded batch-based ordering protocol from Aequitas. It has resolved the liveness problem and has reduced communication complexity. However, to detect SCCs in relation graph, the commonly used algorithm such as Tarjan[16] and Kosaraju[17] have high computation complexity which is related to the number of transactions and their context. It is an obvious system bottleneck. The experiment of Themis shows that its throughput is about 20% of HS with the same batch-size in LAN.

Pompe[12] proposed by Zhang et al. has also proposed a practical protocol to deal with ordering manipulation. Here, transactions are ordered according to the medium timestamp that it is a naturally linear ordering indicator which could avoid Condorcet Paradox. With this simplified ordering strategy, Pompe has achieved higher throughput at competitive latencies compared with the state-of-the-art BFT protocols. As the indicator is constructed by timestamps, the ordering strategy in Pompe could be regarded as a timestamp-based ordering protocol. In the same year, Wendy[13] proposed by Kursawe et al. has also achieved order-fairness with medium timestamp similar to Pompe.

Although, without detecting SCCs, timestamp-based ordering strategy seems like to have resolved the bottleneck of Byzantine ordered protocols, it just provides each node an opportunity to decide the final order, which reduces the impact of the adversary but cannot prevent arbitrary behavior of manipulating ordering. As is shown in Table XII. There are 4 nodes that N3N_{3} is a malicious node. Here is a pair of commands c1c_{1} and c2c_{2} with intuitively distinct context c1c2c_{1}\prec c_{2} that they are proposed by the same proposer and c1c_{1} is proposed several seconds before c2c_{2}. N2N_{2} and N4N_{4} receive these commands slightly later, while N1N_{1} received these commands earlier. If we select N1N_{1}, N2N_{2}, and N3N_{3} as the final set, then c1c_{1}’s medium timestamp 2 would be smaller than c1c_{1} that such pair of commands would be reserved.

TABLE XII: Medium timestamp failure.
N1N_{1} N2N_{2} N3N_{3} N4N_{4}
c1c_{1} 0 3 3 3
c2c_{2} 1 4 2 4

Fiary[18], proposed by Stathakopoulou et al. is an ordering system with the assistance of TEE to prevent front-running attacks. Fairy needs to introduce specific hardware to support the operation of the protocol, and its correctness depends on the reliability of the TEE itself. So that, the scope of its application is relatively limited. In 2021, Cachin et al. also theoretically proposed a quick order fairness atomic broadcasting protocol [19], which can ensure that messages are delivered in different fair orders. However, it has not been implemented.

VII Conclusion

To propose an efficient Byzantine ordered consensus protocol, we propose anchor-based ordering strategy and design a protocol called Phalanx based on it. Phalanx is a practical Byzantine ordered protocol, which can be employed in each state-of-the-art BFT protocol. The ordering phase in Phalanx does not take too much performance loss that only 15% more latency and slightly decrease of throughput in LAN. Because of the optimization of communication, the latency of Phalanx is lower than HS in WAN. As for resisting ordering manipulation, Phalanx is better than the timestamp-based strategy. Besides, the ratio of anchor-sets generated through alter path seems to be taken to track the reliability of Phalanx, which could be further studied in the future.

References

  • [1] M. Castro, B. Liskov et al., “Practical byzantine fault tolerance,” in OSDI, vol. 99, no. 1999, 1999, pp. 173–186.
  • [2] M. Castro and B. Liskov, “Practical byzantine fault tolerance and proactive recovery,” ACM Transactions on Computer Systems (TOCS), vol. 20, no. 4, pp. 398–461, 2002.
  • [3] M. Yin, D. Malkhi, M. K. Reiter, G. G. Gueta, and I. Abraham, “Hotstuff: Bft consensus with linearity and responsiveness,” in Proceedings of the 2019 ACM Symposium on Principles of Distributed Computing, 2019, pp. 347–356.
  • [4] P. Daian, S. Goldfeder, T. Kell, Y. Li, X. Zhao, I. Bentov, L. Breidenbach, and A. Juels, “Flash boys 2.0: Frontrunning in decentralized exchanges, miner extractable value, and consensus instability,” in 2020 IEEE Symposium on Security and Privacy (SP).   IEEE, 2020, pp. 910–927.
  • [5] V. Buterin et al., “Ethereum white paper,” GitHub repository, vol. 1, pp. 22–23, 2013.
  • [6] M. Lewis, Flash boys: a Wall Street revolt.   WW Norton & Company, 2014.
  • [7] R. Shostak, M. Pease, and L. Lamport, “The byzantine generals problem,” ACM Transactions on Programming Languages and Systems, vol. 4, no. 3, pp. 382–401, 1982.
  • [8] F. Brandt, V. Conitzer, U. Endriss, J. Lang, and A. D. Procaccia, Handbook of computational social choice.   Cambridge University Press, 2016.
  • [9] M. d. Condorcet, “Essay on the application of analysis to the probability of majority decisions,” Paris: Imprimerie Royale, 1785.
  • [10] M. Kelkar, F. Zhang, S. Goldfeder, and A. Juels, “Order-fairness for byzantine consensus,” in Annual International Cryptology Conference.   Springer, 2020, pp. 451–480.
  • [11] M. Kelkar, S. Deb, S. Long, A. Juels, and S. Kannan, “Themis: Fast, strong order-fairness in byzantine consensus,” Cryptology ePrint Archive, 2021.
  • [12] Y. Zhang, S. Setty, Q. Chen, L. Zhou, and L. Alvisi, “Byzantine ordered consensus without byzantine oligarchy,” in 14th {\{USENIX}\} Symposium on Operating Systems Design and Implementation ({\{OSDI}\} 20), 2020, pp. 633–649.
  • [13] K. Kursawe, “Wendy, the good little fairness widget: Achieving order fairness for blockchains,” in Proceedings of the 2nd ACM Conference on Advances in Financial Technologies, 2020, pp. 25–36.
  • [14] M. Kelkar, S. Deb, and S. Kannan, “Order-fair consensus in the permissionless setting.” IACR Cryptol. ePrint Arch., vol. 2021, p. 139, 2021.
  • [15] F. Gai, A. Farahbakhsh, J. Niu, C. Feng, I. Beschastnikh, and H. Duan, “Dissecting the performance of chained-bft,” arXiv preprint arXiv:2103.00777, 2021.
  • [16] R. Tarjan, “Depth-first search and linear graph algorithms,” SIAM journal on computing, vol. 1, no. 2, pp. 146–160, 1972.
  • [17] M. Sharir, “A strong-connectivity algorithm and its applications in data flow analysis,” Computers & Mathematics with Applications, vol. 7, no. 1, pp. 67–72, 1981.
  • [18] C. Stathakopoulou, S. Rüsch, M. Brandenburger, and M. Vukolić, “Adding fairness to order: Preventing front-running attacks in bft protocols using tees,” in 2021 40th International Symposium on Reliable Distributed Systems (SRDS).   IEEE, 2021, pp. 34–45.
  • [19] C. Cachin, J. Mićić, and N. Steinhauer, “Quick order fairness,” arXiv preprint arXiv:2112.06615, 2021.