Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Construction of a Byzantine Linearizable SWMR Atomic Register from SWSR Atomic Registers

Ajay D. Kshemkalyani111University of Illinois Chicago, USA. Email: ajay@uic.edu, Manaswini Piduguralla222Indian Institute of Technology Hyderabad, India. Email: cs20resch11007@iith.ac.in, Sathya Peri333Indian Institute of Technology Hyderabad, India. Email: sathya_p@cs.iith.ac.in, Anshuman Misra444University of Illinois Chicago, USA. Email: amisra7@uic.edu
Abstract

The SWMR atomic register is a fundamental building block in shared memory distributed systems and implementing it from SWSR atomic registers is an important problem. While this problem has been solved in crash-prone systems, it has received less attention in Byzantine systems. Recently, Hu and Toueg gave such an implementation of the SWMR register from SWSR registers. While their definition of register linearizability is consistent with the definition of Byzantine linearizability of a concurrent history of Cohen and Keidar, it has these drawbacks. (1) If the writer is Byzantine, the register is linearizable no matter what values the correct readers return. (2) It ignores values written consistently by a Byzantine writer. We need a stronger notion of a correct write operation. (3) It allows a value written to just one or a few readers’ SWSR registers to be returned, thereby not validating the intention of the writer to write that value honestly. (4) Its notion of a “current” value returned by a correct reader is not related to the most recent value written by a correct write operation of a Byzantine writer. We need a more up to date version of the value that can be returned by a correct reader. In this paper, we give a stronger definition of a Byzantine linearizable register that overcomes the above drawbacks. Then we give a construction of a Byzantine linearizable SWMR atomic register from SWSR registers that meets our stronger definition. The construction is correct when n>3f𝑛3𝑓n>3fitalic_n > 3 italic_f, where n𝑛nitalic_n is the number of readers, f𝑓fitalic_f is the maximum number of Byzantine readers, and the writer can also be Byzantine. The construction relies on a public-key infrastructure.

Keywords: Byzantine fault tolerance, SWMR atomic register, Linearizability, SWSR register

1 Introduction

Implementing shared registers from weaker types of registers is a fundamental problem in distributed systems and has been extensively studied [2, 3, 5, 11, 6, 8, 12, 13, 18, 19, 21, 17, 22, 23, 24]. We consider the problem of implementing a single-writer multi-reader register (SWMR) from single-writer single-reader (SWSR) registers in a system with Byzantine processes. This SWMR register in a Byzantine setting is of great importance in recent research. For example, Mostefaoui et al. [16] prove that in message-passing systems with Byzantine failures, there is a f𝑓fitalic_f-resilient implementation of a SWMR register if and only if f<n/3𝑓𝑛3f<n/3italic_f < italic_n / 3 processes are faulty, where f𝑓fitalic_f is the number of Byzantine processes and n𝑛nitalic_n is the total number of processes. It was the first to give the definition of a linearizable SWMR register in the presence of Byzantine processes and [4] generalized it to objects of any type. Aguilera et al. [1] use atomic SWMR registers to solve some agreement problems in hybrid systems subject to Byzantine process failures. Cohen and Keidar [4] give f𝑓fitalic_f-resilient implementations of three objects – asset transfer, reliable broadcast, atomic snapshots – using atomic SWMR registers in systems with Byzantine failures where at most f<n/2𝑓𝑛2f<n/2italic_f < italic_n / 2 processes are faulty. Their implementations were based on their definition of Byzantine linearizability of a concurrent history.

In other related work, a SWMR register was built above a message-passing system where processes communicate using send/receive primitives with the constraint that f<n/3𝑓𝑛3f<n/3italic_f < italic_n / 3 [10, 16]. These works do not use signatures. Unbounded history registers were required in [10] whereas [16] used O(n2)𝑂superscript𝑛2O(n^{2})italic_O ( italic_n start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) messages per write operation. Although building SWMR registers over SWSR registers or over message-passing systems is equivalent as SWSR registers can be emulated over send/receive and vice versa, this is a round-about and expensive solution. A similar problem for the client-server paradigm in message-passing systems was solved in [14] using cryptography.

1.1 Motivation

The SWMR atomic register is seen to be a basic building block in shared memory distributed systems and implementing it from SWSR atomic registers is an important problem. While this problem has been solved in crash-prone systems, it has received recent attention in Byzantine systems. Recently, Hu and Toueg gave such an implementation of the SWMR register from SWSR registers [9]. While their definition of register linearizability is consistent with the definition of Byzantine linearizability of a concurrent history of Cohen and Keidar [4], both [9, 4] as well as [10, 16] have the following drawbacks.

  1. 1.

    If the writer is Byzantine, the register is vacuously linearizable no matter what values the correct readers return. Reads by correct processes can return any value whatsoever including the initial value while the register meets their definition of linearizability. In particular, there is no view consistency. For example, in the Hu-Toueg algorithm, consider a scenario where a Byzantine writer writes a different data value associated with the same counter value to the various readers’ SWSR registers. The correct readers will return different data values associated with the same counter value, thus having inconsistent views. An example application where this is a problem is collaborative editing for a document hosted on a single server. Another reason why this is problematic is that it violates the agreement clause of the well-known consensus/Byzantine agreement problem, which requires that all non-faulty processes must agree on the same value even if the source is Byzantine. We require view consistency.

  2. 2.

    Their definition of register linearizability does not factor in, or ignores, those values written by a Byzantine writer, by honestly following the writer protocol for those values. We need a stronger notion of a correct write operation that factors in such values as being written correctly. Also, note that the Byzantine writer is in control of the execution both above and below the SWMR register interface and hence the value that it writes in a correct write operation can be assumed to be the value intended to be written (correctly) and not altered by Byzantine behavior.

  3. 3.

    Their definition of register linearizability allows a value written by a Byzantine writer to just a single reader’s SWSR register to be returned by a correct process. In order to validate that the writer intended to write that value honestly, we would like a minimum threshold number of readers’ SWSR registers to be written that same value to enable that value to become eligible for being returned to a correct reader. This validates the intention of the Byzantine writer to write that particular value.

  4. 4.

    In their definition of register linearizability, their notion of a “current” value returned by a correct reader is not related to the most recent value written by a correct write operation of a Byzantine writer. We need a more up to date version of the value that can be returned by a correct reader. This helps give a stronger guarantee of progress from the readers’ perspective.

Our definition of a Byzantine linearizable register is stronger than not just that of [4, 9] but also that of [10, 16, 14] and overcomes the above drawbacks. Further, we are interested in implementing the SWMR register over SWSR registers directly in the shared memory model.

1.2 Contributions

  1. 1.

    In this paper, we give a stronger definition of a Byzantine linearizable register that overcomes all the above drawbacks of [4, 9] and [10, 16, 14]. We introduce the concept of a correct write operation by a Byzantine writer as one that conforms to the write protocol. We also introduce the notion of a pseudo-correct write operation by a Byzantine writer, which has the effect of a correct write operation. Only correct and pseudo-correct writes may be returned by correct readers. The correct and pseudo-correct writes are totally ordered and this order is the total order in logical time [15, 20] in which the writes are performed.

  2. 2.

    Then we give a construction of a Byzantine linearizable SWMR atomic register from SWSR atomic registers that meets our stronger definition. The construction is correct when n>3f𝑛3𝑓n>3fitalic_n > 3 italic_f, where n𝑛nitalic_n is the number of readers, f𝑓fitalic_f is the maximum number of Byzantine readers, and the writer can also be Byzantine. The construction relies on a public-key infrastructure (PKI).

    The construction develops the idea of the readers issuing logical read timestamps to the values set aside for them by the writer. Logical global states on the readers’ SWSR registers, akin to consistent cuts in message-passing systems [15], are then constructed. The algorithm logic ensures that values read at/along such global states form a total order, thereby helping to ensure Byzantine register linearizability.

    As compared to the algorithm in [9] which can tolerate any number of Byzantine readers, our algorithm requires f<n/3𝑓𝑛3f<n/3italic_f < italic_n / 3. Also, in the algorithm in [9], a reader that stops reading also stops taking implementation steps whereas our algorithm requires a reader helper thread to take infinitely many steps even if it has no read operation to apply. The algorithm in [9] as well as our algorithm use a PKI.

Outline: Section 2 gives the system model and preliminaries. Section 3 gives our characterization of a Byzantine linearizable register based on logical time and culminates in the definition of such a register. Section 4 gives our construction of the SWMR Byzantine linearizable register using SWSR registers. Section 5 gives the correctness proof. Section 6 concludes.

2 Model and Preliminaries

2.1 Model Basics

We consider the shared memory model of a distributed system. The system contains a set P𝑃Pitalic_P of asynchronous processes. These processes access some shared memory objects. All inter-process communication is done through an API exposed by the objects. Processes invoke operations that return some response to the invoking process. We assume reliable shared memory but allow for an adversary to corrupt up to f𝑓fitalic_f processes in the course of a run. A corrupted process is defined as being Byzantine and such a process may deviate arbitrarily from the protocol. A non-Byzantine process is correct and such a process follows the protocol and takes infinitely many steps.

We also assume a PKI. Using this, each process has a public-private key pair used to sign data and verify signatures of other processes. A values v𝑣vitalic_v signed by process p𝑝pitalic_p is denoted vpsubscriptdelimited-⟨⟩𝑣𝑝\langle v\rangle_{p}⟨ italic_v ⟩ start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT.

We give an algorithm that emulates an object O𝑂Oitalic_O, viz., a SWMR register from SWSR registers. We assume that there is adequate access control such that a SWSR register can be accessed only by the single writer and the single reader between whom the register is set up, and that another (Byzantine) process cannot access it. The algorithm is organized as methods of O𝑂Oitalic_O. A method execution is a sequence of steps. It begins with the invoke step, goes through steps that access lower-level objects, viz., SWSR registers, and ends with a return step. The invocation and response delineate the method’s execution interval. In an execution σ𝜎\sigmaitalic_σ, each correct process invokes methods sequentially, and steps of different processes are interleaved. Byzantine processes take arbitrary steps irrespective of the protocol. The history H𝐻Hitalic_H of an execution σ𝜎\sigmaitalic_σ is the sequence of high-level invocation and response events of the emulated SWMR register in σ𝜎\sigmaitalic_σ. A history H𝐻Hitalic_H defines a partial order Hsubscriptprecedes𝐻\prec_{H}≺ start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT on operations. op1Hop2subscriptprecedes𝐻𝑜subscript𝑝1𝑜subscript𝑝2op_{1}\prec_{H}op_{2}italic_o italic_p start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ≺ start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT italic_o italic_p start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT if the response event of op1𝑜subscript𝑝1op_{1}italic_o italic_p start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT precedes the invocation event of op2𝑜subscript𝑝2op_{2}italic_o italic_p start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT in H𝐻Hitalic_H. op1𝑜subscript𝑝1op_{1}italic_o italic_p start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT is concurrent with op2𝑜subscript𝑝2op_{2}italic_o italic_p start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT if neither precedes the other.

In our algorithm, we assume that each reader process has a helper thread that takes infinitely many steps even if the reader stops reading the implemented register. These steps are outside the invocation-response intervals of the readers’ own operations. Also, the linearization point of a pseudo-correct write operation may fall after the invocation-response interval. These are non-standard features of our shared memory model.

2.2 Linearizability of a Concurrent History

Linearizability, a popular correctness condition for concurrent objects, is defined using an object’s sequential specification.

Definition 1.

(Linearization of a concurrent history:) A linearization of a concurrent history H𝐻Hitalic_H of object o𝑜oitalic_o is a sequential history Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT such that:

  1. 1.

    After removing some pending operations from H𝐻Hitalic_H and completing others by adding matching responses, it contains the same invocations and responses as Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT,

  2. 2.

    Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT preserves the partial order Hsubscriptprecedes𝐻\prec_{H}≺ start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT, and

  3. 3.

    Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT satisfies o𝑜oitalic_o’s sequential specification.

A SWMR register as well as a SWSR register expose the read and write operations. The sequential specification of a SWMR and a SWSR register states that a read operation from register Reg𝑅𝑒𝑔Regitalic_R italic_e italic_g returns the value last written to Reg𝑅𝑒𝑔Regitalic_R italic_e italic_g. Following Cohen and Keidar [4], we manage Byzantine behavior in a way that provides consistency to correct processes. This is achieved by linearizing correct processes’ operations and offering a degree of freedom to embed additional operations by Byzantine processes.

Let H|correctevaluated-at𝐻𝑐𝑜𝑟𝑟𝑒𝑐𝑡H|_{correct}italic_H | start_POSTSUBSCRIPT italic_c italic_o italic_r italic_r italic_e italic_c italic_t end_POSTSUBSCRIPT denote the projection of history H𝐻Hitalic_H to all correct processes. History H𝐻Hitalic_H is Byzantine linearizable if H|correctevaluated-at𝐻𝑐𝑜𝑟𝑟𝑒𝑐𝑡H|_{correct}italic_H | start_POSTSUBSCRIPT italic_c italic_o italic_r italic_r italic_e italic_c italic_t end_POSTSUBSCRIPT can be augmented by (some) operations of Byzantine processes such that the completed history is linearizable. Thus, there is another history with the same operations by correct processes as in H𝐻Hitalic_H, and additional operations by at most f𝑓fitalic_f Byzantine processes.

Definition 2.

(Byzantine linearization of a concurrent history [4]:) A history H𝐻Hitalic_H is Byzantine linearizable if there exists a history Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT such that H|correct=H|correctevaluated-atsuperscript𝐻𝑐𝑜𝑟𝑟𝑒𝑐𝑡evaluated-at𝐻𝑐𝑜𝑟𝑟𝑒𝑐𝑡H^{\prime}|_{correct}=H|_{correct}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT | start_POSTSUBSCRIPT italic_c italic_o italic_r italic_r italic_e italic_c italic_t end_POSTSUBSCRIPT = italic_H | start_POSTSUBSCRIPT italic_c italic_o italic_r italic_r italic_e italic_c italic_t end_POSTSUBSCRIPT and Hsuperscript𝐻H^{\prime}italic_H start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT is linearizable.

An object supports Byzantine linearizable executions if all of its executions are Byzantine linearizable. SWMR registers support Byzantine linearizable executions because before every read from such a register, invoked by a correct process, one can add a corresponding Byzantine write.

2.3 Linearizability of Register Implementations

Hu and Toueg defined register linearizability in a system with Byzantine processes as follows [9]. They let v0subscript𝑣0v_{0}italic_v start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT be the initial value of the implemented register and vksubscript𝑣𝑘v_{k}italic_v start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT be the value written by the k𝑘kitalic_kth write operation by the writer w𝑤witalic_w of the implemented register.

Definition 3.

(Register Linearizability [9]:) In a system with Byzantine process failures, an implementation of a SWMR register is linearizable if and only if the following holds. If the writer is not malicious, then:

  • (Reading a “current” value) If a read operation R by a process that is not malicious returns the value v𝑣vitalic_v then:

    • there is a write v𝑣vitalic_v operation that immediately precedes R or is concurrent with R, or

    • v=v0𝑣subscript𝑣0v=v_{0}italic_v = italic_v start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT (the initial value) and no write operation precedes R.

  • (No “new-old” inversion) If two read operations R and R’ by processes that are not malicious return values vksubscript𝑣𝑘v_{k}italic_v start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT and vksubscript𝑣superscript𝑘v_{k^{\prime}}italic_v start_POSTSUBSCRIPT italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT, respectively, and R precedes R’, then kk𝑘superscript𝑘k\leq k^{\prime}italic_k ≤ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT.

While this definition of register linearizability is consistent with the definition of a Byzantine linearization of a concurrent history (Definition 2), in the sense that both are concerned only with correct processes’ views, it is not ideal for the reasons given in Section 1.1. Therefore the register should meet stronger criteria of a linearizable register, in the face of Byzantine processes, to accommodate the behavior of the Byzantine writer when it is behaving (writing) correctly. We term such a register as a Byzantine linearizable register. In this paper, we first define a Byzantine linearizable register, and then solve the problem of constructing a Byzantine linearizable SWMR register from SWSR registers.

3 Characterization of Byzantine Register Linearizability

The object SWMR register supports Byzantine linearizable executions [4]. However, we need to construct a SWMR register from SWSR registers. We assume wlog that there are n𝑛nitalic_n SWSR registers R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT writable by the single writer w𝑤witalic_w and readable by reader i[i,n]𝑖𝑖𝑛i\in[i,n]italic_i ∈ [ italic_i , italic_n ]. Here we characterize the requirements for such a construction, culminating in Definition 13 of Byzantine Register Linearizability.

The writer as well as the reader processes can be Byzantine. As a Byzantine reader can return any value whatsoever, the linearizability specification is based on values that correct readers return. The Byzantine writer can behave anyhow and can write different values to the SR registers, or write different values to different subsets of SR registers while not writing to some of them at all, or write multiple different values over time to the same some or all SR registers, as part of the same write operation. We assume that t𝑡titalic_t of the n𝑛nitalic_n readers are Byzantine. In our characterization, we seek recourse to logical time but present the final definition of the Byzantine linearizable register using physical time.

We refer to a write operation o(v)𝑜𝑣o(v)italic_o ( italic_v ) by a timestamp vector T𝑇Titalic_T of size n𝑛nitalic_n, where T[i]𝑇delimited-[]𝑖T[i]italic_T [ italic_i ] is the logical timestamp assigned to a value of v𝑣vitalic_v written into R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT. This vector gives the logical time vector of the write operation o(v)𝑜𝑣o(v)italic_o ( italic_v ). As T[i]𝑇delimited-[]𝑖T[i]italic_T [ italic_i ] is a logical timestamp, it can equivalently be assigned by reader i𝑖iitalic_i. Thus, correct readers assign monotonically increasing timestamp values whereas a timestamp that violates this must have been assigned by a Byzantine reader and can be rejected/ignored by correct readers. We define the relations \leq, <<<, and ||||| | (concurrent) on the set of timestamp vectors 𝒯𝒯{\cal T}caligraphic_T in the standard way as follows.

  • T1T2=defi[1,n],T1[i]T2[i]formulae-sequencesubscript𝑇1subscript𝑇2subscript𝑑𝑒𝑓for-all𝑖1𝑛subscript𝑇1delimited-[]𝑖subscript𝑇2delimited-[]𝑖T_{1}\leq T_{2}=_{def}\forall i\in[1,n],T_{1}[i]\leq T_{2}[i]italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ≤ italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT = start_POSTSUBSCRIPT italic_d italic_e italic_f end_POSTSUBSCRIPT ∀ italic_i ∈ [ 1 , italic_n ] , italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT [ italic_i ] ≤ italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT [ italic_i ]

  • T1<T2=defT1T2i|T1[i]<T2[i]subscript𝑇1brasubscript𝑑𝑒𝑓subscript𝑇2subscript𝑇1subscript𝑇2𝑖subscript𝑇1delimited-[]𝑖subscript𝑇2delimited-[]𝑖T_{1}<T_{2}=_{def}T_{1}\leq T_{2}\wedge\exists i\,|\,T_{1}[i]<T_{2}[i]italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT < italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT = start_POSTSUBSCRIPT italic_d italic_e italic_f end_POSTSUBSCRIPT italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ≤ italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ∧ ∃ italic_i | italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT [ italic_i ] < italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT [ italic_i ]

  • T1||T2=defi|T1[i]<T2[i]j|T1[j]>T2[j]T_{1}\,||\,T_{2}=_{def}\exists i\,|T_{1}[i]<T_{2}[i]\wedge\exists j\,|\,T_{1}[% j]>T_{2}[j]italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT | | italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT = start_POSTSUBSCRIPT italic_d italic_e italic_f end_POSTSUBSCRIPT ∃ italic_i | italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT [ italic_i ] < italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT [ italic_i ] ∧ ∃ italic_j | italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT [ italic_j ] > italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT [ italic_j ]

(𝒯,<)𝒯({\cal T},<)( caligraphic_T , < ) forms a lattice.

In general, when an object O1subscript𝑂1O_{1}italic_O start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, denoted a high-level object (HLO) is simulated or constructed using objects of another type O2subscript𝑂2O_{2}italic_O start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT, denoted a low-level object (LLO), there are two interfaces. A process interacts with the HLO through a high-level interface (HLI) through alternating invocations and matching responses. Between such a pair of matching invocation and response, the process interacts with the LLO through a low-level interface (LLI) using alternating invocations and responses. Such interactions are in software.

For our problem, the HLO is the Byzantine-tolerant SWMR atomic register and the HLI is the read and write operation. The LLO is the SWSR atomic register and the LLI is also the read and write operation. We term the program code executed below the HLI and above the LLI for a single invocation of a write/read at the HLI as the code or protocol for the (HLI) write operation/read operation, respectively.

In the face of Byzantine readers as well as a Byzantine writer, we need to define a correct write operation. In the sequel, we use u𝑢uitalic_u or v𝑣vitalic_v to refer to the actual data value written. A write(v)𝑤𝑟𝑖𝑡𝑒𝑣write(v)italic_w italic_r italic_i italic_t italic_e ( italic_v ) invocation at the HLI may be converted at a Byzantine writer into possibly multiple operation invocations for different write(v)𝑤𝑟𝑖𝑡𝑒superscript𝑣write(v^{\prime})italic_w italic_r italic_i italic_t italic_e ( italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) at the LLI to all or some subset of the various instances of the LLO. If a write(v)𝑤𝑟𝑖𝑡𝑒𝑣write(v)italic_w italic_r italic_i italic_t italic_e ( italic_v ) invocation at the HLI is converted by a Byzantine writer into an invocation of write(v)𝑤𝑟𝑖𝑡𝑒superscript𝑣write(v^{\prime})italic_w italic_r italic_i italic_t italic_e ( italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) and it executes the protocol exactly for this value vsuperscript𝑣v^{\prime}italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, it is considered as a correct write operation because that can be taken to be the value the writer writes or intended to write. Likewise if the write(v)𝑤𝑟𝑖𝑡𝑒𝑣write(v)italic_w italic_r italic_i italic_t italic_e ( italic_v ) at the HLI is converted into multiple serial invocations of write(v)𝑤𝑟𝑖𝑡𝑒superscript𝑣write(v^{\prime})italic_w italic_r italic_i italic_t italic_e ( italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) (for different values of vsuperscript𝑣v^{\prime}italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT) and the protocol for each of these vsuperscript𝑣v^{\prime}italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT is correctly followed, these various write(v)𝑤𝑟𝑖𝑡𝑒superscript𝑣write(v^{\prime})italic_w italic_r italic_i italic_t italic_e ( italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) are considered correct write operations because that sequence of write operations can be taken to be the values the writer writes or intended to write. This is because the invocation/response at the HLI is at a Byzantine process which controls the execution of code above the LLI and above the HLI. In a correct write operation, the code between the HLI and the LLI is followed correctly by the Byzantine process.

Definition 4.

A correct write operation is a write operation that follows the write protocol.

So far in the literature [4, 9], any behavior of a Byzantine writer is allowable in the linearizability definition. We accommodate a Byzantine writer differently and introduce the concept of a pseudo-correct write operation (Definition 7), which is a Byzantine write operation that has the effect of a correct write operation. This is first informally motivated as follows. A Byzantine write operation can, for example,

  1. 1.

    write multiple values to the various R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT (possibly resulting in multiple pseudo-correct write operations) or

  2. 2.

    together with earlier write operations write a single value (possibly resulting in a pseudo-correct write operation), or

  3. 3.

    together with earlier write operations that wrote different values write those values (possibly resulting in multiple pseudo-correct write operations).

Thus, there is no longer a one-one mapping from write operations issued to the HLI object interface to values written to the object; it is a many-many mapping. If a pseudo-correct write operation is a result of values written across multiple HLO write operations, we define that pseudo-correct write operation to occur in the latest of those HLO write operations. Its invocation and response are those of that latest HLO operation. Its linearization point occurs when the write takes effect for correct readers and this can happen even after the HLO write response to the HLO write invocation in which the pseudo-correct write occurred. Due to the many-many mapping, one HLO write invocation-response can result in different values being written by the pseudo-correct operations and read/returned by correct readers. This does not pose any ambiguity because the different values that are returned to the correct readers have different logical timestamp vectors.

Definition 5.

A potential pseudo-correct write operation of value v𝑣vitalic_v is a write operation, timestamped T(v)𝑇𝑣T(v)italic_T ( italic_v ), that may not follow the write protocol but

  1. 1.

    T𝑇Titalic_T is such that there does not exist any correct write operation timestamp Tsuperscript𝑇T^{\prime}italic_T start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT where i|T[i]<T[i]j|T[j]>T[j]conditional𝑖𝑇delimited-[]𝑖inner-productsuperscript𝑇delimited-[]𝑖𝑗𝑇delimited-[]𝑗superscript𝑇delimited-[]𝑗\exists i\,|\,T[i]<T^{\prime}[i]\wedge\exists j\,|\,T[j]>T^{\prime}[j]∃ italic_i | italic_T [ italic_i ] < italic_T start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT [ italic_i ] ∧ ∃ italic_j | italic_T [ italic_j ] > italic_T start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT [ italic_j ], and

  2. 2.

    there is a quorum of size ntabsent𝑛𝑡\geq n-t≥ italic_n - italic_t indices i𝑖iitalic_i such that v𝑣vitalic_v was written to R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT and logically timestamped T(v)[i]𝑇𝑣delimited-[]𝑖T(v)[i]italic_T ( italic_v ) [ italic_i ] (equivalently and in practice by reader i𝑖iitalic_i).

Definition 6.

A write operation stabilizes if its value is returnable, meaning eligible for being returned, by a correct reader.

A correct write operation always stabilizes whereas a potential pseudo-correct write may stabilize, depending on run-time dynamic data races, steps of Byzantine readers, and the algorithm. Only all write operations that stabilize have a linearization point.

Definition 7.

A pseudo-correct write operation is a potential pseudo-correct write operation that stabilizes.

Definition 8.

(Monotonicity/Total Order of stabilized write operation vector timestamps Property:) The set of write operation timestamps that stabilize is totally ordered.555This definition is not about the monotonicity of vector timestamp values as a function of the physical time order in which their operations stabilize, but about the set of such vector timestamps which is totally ordered.

If the Monotonicity/Total Order Property is satisfied, of any two potential pseudo-correct writes whose vector timestamps are concurrent, at most one can stabilize.

Definition 9.

(Genuine Advance of Timestamp Property:) For vector timestamps T1(v1)subscript𝑇1subscript𝑣1T_{1}(v_{1})italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( italic_v start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) and T2(v2)subscript𝑇2subscript𝑣2T_{2}(v_{2})italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_v start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) of correct and pseudo-correct write operations such that T1<T2subscript𝑇1subscript𝑇2T_{1}<T_{2}italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT < italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT, there is index i𝑖iitalic_i of a correct reader process such that T1[i]<T2[i]subscript𝑇1delimited-[]𝑖subscript𝑇2delimited-[]𝑖T_{1}[i]<T_{2}[i]italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT [ italic_i ] < italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT [ italic_i ].

In conjunction with the Monotonicity/Total Order Property, the Genuine Advance of Timestamp Property guarantees that there has been progress from T1subscript𝑇1T_{1}italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT to T2subscript𝑇2T_{2}italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT and this progress includes a new write of v2subscript𝑣2v_{2}italic_v start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT to a R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT register for a correct process i𝑖iitalic_i. Thus the progress is not a fake operation reported by a Byzantine reader. Further, the latest values as per T2subscript𝑇2T_{2}italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT at nt𝑛𝑡n-titalic_n - italic_t R_initwj𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑗R\_init_{wj}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_j end_POSTSUBSCRIPT are also v2subscript𝑣2v_{2}italic_v start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT.

Let Tcorrsubscript𝑇𝑐𝑜𝑟𝑟T_{corr}italic_T start_POSTSUBSCRIPT italic_c italic_o italic_r italic_r end_POSTSUBSCRIPT denote the timestamp of a correct or a pseudo-correct write operation, which is the timestamp of a stabilized write operation.

Definition 10.

A consistent timestamp of a write operation is a vector timestamp T𝑇Titalic_T such that Tcorr|(i|T[i]<Tcorr[i]j|T[j]>Tcorr[j])\not\exists T_{corr}\,|\,(\exists i\,|\,T[i]<T_{corr}[i]\wedge\exists j\,|\,T[% j]>T_{corr}[j])∄ italic_T start_POSTSUBSCRIPT italic_c italic_o italic_r italic_r end_POSTSUBSCRIPT | ( ∃ italic_i | italic_T [ italic_i ] < italic_T start_POSTSUBSCRIPT italic_c italic_o italic_r italic_r end_POSTSUBSCRIPT [ italic_i ] ∧ ∃ italic_j | italic_T [ italic_j ] > italic_T start_POSTSUBSCRIPT italic_c italic_o italic_r italic_r end_POSTSUBSCRIPT [ italic_j ] ).

The set of consistent timestamps forms a sublattice (𝒯c,<)subscript𝒯𝑐({\cal T}_{c},<)( caligraphic_T start_POSTSUBSCRIPT italic_c end_POSTSUBSCRIPT , < ) of (𝒯,<)𝒯({\cal T},<)( caligraphic_T , < ). No consistent write timestamp is concurrent with a correct or pseudo-correct write timestamp. Thus at run-time, it is determined that a correct write timestamp and a pseudo-correct write timestamp is an inevitable timestamp in (𝒯c,<)subscript𝒯𝑐({\cal T}_{c},<)( caligraphic_T start_POSTSUBSCRIPT italic_c end_POSTSUBSCRIPT , < ). The execution path traced in the lattice (𝒯c,<)subscript𝒯𝑐({\cal T}_{c},<)( caligraphic_T start_POSTSUBSCRIPT italic_c end_POSTSUBSCRIPT , < ) passes through these correct and pseudo-correct write operation timestamp states.

Definition 11.

(View Consistency Property:) If a write operation T(v)𝑇𝑣T(v)italic_T ( italic_v ) is returned to a correct reader’s read R, it is returned to all correct readers’ read operations that are preceded by R, assuming there are no further writes to R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT after T(v)𝑇𝑣T(v)italic_T ( italic_v ).

Definition 12.

(Total Ordering Property:) If two write operations T(v1)𝑇subscript𝑣1T(v_{1})italic_T ( italic_v start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) and T(v2)𝑇subscript𝑣2T(v_{2})italic_T ( italic_v start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) are seen by any two correct readers, they are seen in a same common order.

View Stability and Total Ordering properties together guarantee that all correct readers can see all correct and pseudo-correct writes in the same order.

Only correct and pseudo-correct writes may be returned by correct readers. A correct reader cannot distinguish between a correct and a pseudo-correct write operation. A pseudo-correct write operation o1(v1)subscript𝑜1subscript𝑣1o_{1}(v_{1})italic_o start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( italic_v start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) timestamped T1(v1)subscript𝑇1subscript𝑣1T_{1}(v_{1})italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( italic_v start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) may lose a race due to asynchrony of process executions to a pseudo-correct or correct write operation timestamped T2(v2)subscript𝑇2subscript𝑣2T_{2}(v_{2})italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_v start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) where T1<T2subscript𝑇1subscript𝑇2T_{1}<T_{2}italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT < italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT, in which case v1subscript𝑣1v_{1}italic_v start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT is not actually returned to any read operation and o1subscript𝑜1o_{1}italic_o start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT is deemed to have an invisible linearization point. The correct and pseudo-correct writes are totally ordered by their linearization points, and (if the Monotonicity/Total Order on Vector Timestamps Property is satisfied) this order is (a) the total order on their timestamps, which is (b) the total order in logical time in which these writes were performed, as also (c) the total order in which these write operation timestamped values are encountered in a run-time traversal of the lattice (𝒯c,<)subscript𝒯𝑐({\cal T}_{c},<)( caligraphic_T start_POSTSUBSCRIPT italic_c end_POSTSUBSCRIPT , < ) and potentially returned by HLI read operations. 666Note this this total order on the linearization points is not uniquely defined by the natural total order in which operations were issued to the HLI object interface, because as observed earlier, there is a many-many mapping from the writes issued to the HLI object interface to values written to the object.

In our characterization, we used logical time and LLOs but now present the final definition of the Byzantine linearizable register using physical time and HLOs. Let visuperscript𝑣𝑖v^{i}italic_v start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT be the value written by the i𝑖iitalic_ith correct or pseudo-correct write Wisuperscript𝑊𝑖W^{i}italic_W start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT, following the notation in [7]. Note that to determine i𝑖iitalic_i, visuperscript𝑣𝑖v^{i}italic_v start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT and Wisuperscript𝑊𝑖W^{i}italic_W start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT requires knowing what happened below the HLI and above the LLI because of the nature of pseudo-correct writes; but there is actually no need to determine i𝑖iitalic_i, visuperscript𝑣𝑖v^{i}italic_v start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT, and Wisuperscript𝑊𝑖W^{i}italic_W start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT.

Definition 13.

(Byzantine Linearizable Register). In a system with Byzantine process failures, an implementation of a SWMR register is linearizable if and only if the following two properties are satisfied.

  1. 1.

    Reading a current value: When a read operation R by a non-Byzantine process returns the value v𝑣vitalic_v:

    1. (a)

      if v=v0𝑣subscript𝑣0v=v_{0}italic_v = italic_v start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT then no correct or pseudo-correct write operation precedes R

    2. (b)

      else if vv0𝑣subscript𝑣0v\neq v_{0}italic_v ≠ italic_v start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT then v𝑣vitalic_v was written by the most recent correct write operation that precedes R or by a later pseudo-correct or correct write operation (either a pseudo-correct write operation, that precedes or overlaps with R, or a correct write operation that overlaps R).

  2. 2.

    No “new-old” inversions: If read operations R and R’ by non-Byzantine processes return values visuperscript𝑣𝑖v^{i}italic_v start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT and vjsuperscript𝑣𝑗v^{j}italic_v start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT, respectively, and R precedes R’, then ij𝑖𝑗i\leq jitalic_i ≤ italic_j.

In Definition 13, “precedes”, “overlaps”, and “later” are with respect to physical time of HLI invocations and responses. In Case 1b, note that the most recent correct write operation W that precedes R has its linearization point within the physical time duration of W. Later pseudo-correct write operations that precede R or overlap with R may have their linearization points after their response in physical time. In particular, the most recent pseudo-correct write operation that precedes R in physical time may have its linearization point after its physical time duration completes and hence it may be during R or even after R completes.

Additionally, Monotonicity/Total Order of Vector Timestamps Property, Genuine Advance Property, View Consistency Property, and Total Ordering Property are useful properties that overcome the drawbacks of the previous definition(s) of Byzantine Register Linearizability discussed in Section 1.1.

4 The Algorithm

4.1 Basic Idea and Operation

Because the writer w𝑤witalic_w is Byzantine, a reader i𝑖iitalic_i cannot unilaterally use the value in its register R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT but needs to coordinate with other readers. But a reader may not invoke a read operation indefinitely. So we assume that each reader process has a reader helper thread that is always running and participates in this coordination. A correct write operation needs to wait for acknowledgements from the readers so that the write value is guaranteed to get written in the algorithm data structures and stabilize, and is not overwritten before it stabilizes. This guarantees progress by ensuring that the most recent correct write operation advances with time. The algorithm data structures are described in Algorithm 1. The reader helper thread is given in Algorithm 2. w𝑤witalic_w is the writer process and P𝑃Pitalic_P denotes the set of n𝑛nitalic_n readers.

The writer writes k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩, where u𝑢uitalic_u is the value to be written and k𝑘kitalic_k is a sequence number assigned by the writer, to all the reader registers R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT and then waits for nt𝑛𝑡n-titalic_n - italic_t of the acknowledgement registers R_ackiw𝑅_𝑎𝑐subscript𝑘𝑖𝑤R\_ack_{iw}italic_R _ italic_a italic_c italic_k start_POSTSUBSCRIPT italic_i italic_w end_POSTSUBSCRIPT to be written with this value.

The reader helper thread (pPfor-all𝑝𝑃\forall p\in P∀ italic_p ∈ italic_P) loops forever. In each iteration, it reads R_initwp𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑝R\_init_{wp}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_p end_POSTSUBSCRIPT and if the value overwrites the earlier value, it increments its local logical time s𝑠sitalic_s (the witness time) and writes k,u,s,p𝑘𝑢𝑠𝑝\langle\langle k,u\rangle,s,p\rangle⟨ ⟨ italic_k , italic_u ⟩ , italic_s , italic_p ⟩ to all the registers R_witnesspi𝑅_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑝𝑖R\_witness_{pi}italic_R _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_p italic_i end_POSTSUBSCRIPT. It then reads each R_witnessip𝑅_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑖𝑝R\_witness_{ip}italic_R _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_i italic_p end_POSTSUBSCRIPT and if the logical time of an entry is larger than the previous logical time read, it stores the value in a local variable T_witnessi𝑇_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑖T\_witness_{i}italic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT (if less than, or equal but the entry is different, i𝑖iitalic_i is marked as Byzantine). If there are at least nt𝑛𝑡n-titalic_n - italic_t T_witnessq𝑇_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑞T\_witness_{q}italic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT entries with identical k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ values then these T_witnessq𝑇_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑞T\_witness_{q}italic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT entries are placed in the local set Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_t. This Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_t signed by p𝑝pitalic_p is written to all R_informpi𝑅_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑝𝑖R\_inform_{pi}italic_R _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_p italic_i end_POSTSUBSCRIPT. Each R_informip𝑅_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑖𝑝R\_inform_{ip}italic_R _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_i italic_p end_POSTSUBSCRIPT is read to local variable T_informi𝑇_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑖T\_inform_{i}italic_T _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. If there are at least nt𝑛𝑡n-titalic_n - italic_t T_informj𝑇_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑗T\_inform_{j}italic_T _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT having identical entries k,u,sl,l𝑘𝑢subscript𝑠𝑙𝑙\langle\langle k,u\rangle,s_{l},l\rangle⟨ ⟨ italic_k , italic_u ⟩ , italic_s start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT , italic_l ⟩ for at least nt𝑛𝑡n-titalic_n - italic_t readers l𝑙litalic_l, these T_informj𝑇_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑗T\_inform_{j}italic_T _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT are placed in local variable Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t, which is then written in all R_finalpi𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝𝑖R\_final_{pi}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p italic_i end_POSTSUBSCRIPT, and R_ackpw𝑅_𝑎𝑐subscript𝑘𝑝𝑤R\_ack_{pw}italic_R _ italic_a italic_c italic_k start_POSTSUBSCRIPT italic_p italic_w end_POSTSUBSCRIPT is updated with k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩. All the R_finalip𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑖𝑝R\_final_{ip}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_i italic_p end_POSTSUBSCRIPT are read and placed in set Z𝑍Zitalic_Z. All the elements in Z𝑍Zitalic_Z, i.e., (ifor-all𝑖\forall i∀ italic_i) R_finalip𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑖𝑝R\_final_{ip}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_i italic_p end_POSTSUBSCRIPT are totally ordered by a relation maps-to\mapsto, (to be defined in Definition 18), as will be proved in Theorem 4. The latest element in Z𝑍Zitalic_Z is identified as Y𝑌Yitalic_Y via a call to Find_Latest(Z)𝐹𝑖𝑛𝑑_𝐿𝑎𝑡𝑒𝑠𝑡𝑍Find\_Latest(Z)italic_F italic_i italic_n italic_d _ italic_L italic_a italic_t italic_e italic_s italic_t ( italic_Z ) and if Y𝑌Yitalic_Y is different from the local Inform_set𝐼𝑛𝑓𝑜𝑟𝑚_𝑠𝑒𝑡Inform\_setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_s italic_e italic_t, (a) it is written to all R_finalpi𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝𝑖R\_final_{pi}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p italic_i end_POSTSUBSCRIPT and (b) R_ackpw𝑅_𝑎𝑐subscript𝑘𝑝𝑤R\_ack_{pw}italic_R _ italic_a italic_c italic_k start_POSTSUBSCRIPT italic_p italic_w end_POSTSUBSCRIPT is updated with the common k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ occurring in identical T_witness𝑇_𝑤𝑖𝑡𝑛𝑒𝑠𝑠T\_witnessitalic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s entries k,u,sl,l𝑘𝑢subscript𝑠𝑙𝑙\langle\langle k,u\rangle,s_{l},l\rangle⟨ ⟨ italic_k , italic_u ⟩ , italic_s start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT , italic_l ⟩ for \geq nt𝑛𝑡n-titalic_n - italic_t values of l𝑙litalic_l in all the at least nt𝑛𝑡n-titalic_n - italic_t Witness_Sets𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡𝑠Witness\_Setsitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_t italic_s in Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t that is Y𝑌Yitalic_Y.

Observe that R_inform𝑅_𝑖𝑛𝑓𝑜𝑟subscript𝑚absentR\_inform_{**}italic_R _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT ∗ ∗ end_POSTSUBSCRIPT registers are needed to ensure that the R_final𝑅_𝑓𝑖𝑛𝑎subscript𝑙absentR\_final_{**}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT ∗ ∗ end_POSTSUBSCRIPT entries, i.e., their vector timestamps, form a total order; otherwise if two correct processes were to concurrently write their respective Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts into their R_final𝑅_𝑓𝑖𝑛𝑎𝑙R\_finalitalic_R _ italic_f italic_i italic_n italic_a italic_l rows, the two entries may be partially ordered. This introduces an additional level of indirection in the algorithm.

1 Shared variables:
2 For all processes iP𝑖𝑃i\in Pitalic_i ∈ italic_P: R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT: atomic SWSR register 0,u0absent0subscript𝑢0\leftarrow\langle 0,u_{0}\rangle← ⟨ 0 , italic_u start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ⟩
3 For all processes iP𝑖𝑃i\in Pitalic_i ∈ italic_P: R_ackiw𝑅_𝑎𝑐subscript𝑘𝑖𝑤R\_ack_{iw}italic_R _ italic_a italic_c italic_k start_POSTSUBSCRIPT italic_i italic_w end_POSTSUBSCRIPT: atomic SWSR register 0,u0absent0subscript𝑢0\leftarrow\langle 0,u_{0}\rangle← ⟨ 0 , italic_u start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ⟩
4 For all processes i𝑖iitalic_i and j𝑗jitalic_j in P𝑃Pitalic_P: R_witnessij𝑅_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑖𝑗R\_witness_{ij}italic_R _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_i italic_j end_POSTSUBSCRIPT: atomic SWSR register 0,u0,0,iabsent0subscript𝑢00𝑖\leftarrow\langle\langle 0,u_{0}\rangle,0,i\rangle← ⟨ ⟨ 0 , italic_u start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ⟩ , 0 , italic_i ⟩
5 For all processes i𝑖iitalic_i and j𝑗jitalic_j in P𝑃Pitalic_P: R_informij𝑅_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑖𝑗R\_inform_{ij}italic_R _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_i italic_j end_POSTSUBSCRIPT: atomic SWSR register kP{0,u0,0,k}iabsentsubscriptdelimited-⟨⟩subscript𝑘𝑃0subscript𝑢00𝑘𝑖\leftarrow\langle\bigcup_{k\in P}\{\langle\langle 0,u_{0}\rangle,0,k\rangle\}% \rangle_{i}← ⟨ ⋃ start_POSTSUBSCRIPT italic_k ∈ italic_P end_POSTSUBSCRIPT { ⟨ ⟨ 0 , italic_u start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ⟩ , 0 , italic_k ⟩ } ⟩ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT
6 For all processes i𝑖iitalic_i and j𝑗jitalic_j in P𝑃Pitalic_P: R_finalij𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑖𝑗R\_final_{ij}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_i italic_j end_POSTSUBSCRIPT: atomic SWSR register lL{kP{0,u0,0,k}l}absentsubscript𝑙𝐿subscriptdelimited-⟨⟩subscript𝑘𝑃0subscript𝑢00𝑘𝑙\leftarrow\bigcup_{l\in L}\{\langle\bigcup_{k\in P}\{\langle\langle 0,u_{0}% \rangle,0,k\rangle\}\rangle_{l}\}← ⋃ start_POSTSUBSCRIPT italic_l ∈ italic_L end_POSTSUBSCRIPT { ⟨ ⋃ start_POSTSUBSCRIPT italic_k ∈ italic_P end_POSTSUBSCRIPT { ⟨ ⟨ 0 , italic_u start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ⟩ , 0 , italic_k ⟩ } ⟩ start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT }, where |L|ntLP𝐿𝑛𝑡𝐿𝑃|L|\geq n-t\wedge L\subseteq P| italic_L | ≥ italic_n - italic_t ∧ italic_L ⊆ italic_P
7 Local variables:
8 variable of w𝑤witalic_w: c𝑐citalic_c \leftarrow 0
9 variable of iP𝑖𝑃i\in Pitalic_i ∈ italic_P: s𝑠sitalic_s \leftarrow 0
10 variables of jP𝑗𝑃j\in Pitalic_j ∈ italic_P: For all processes iP𝑖𝑃i\in Pitalic_i ∈ italic_P: T_witnessi𝑇_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑖T\_witness_{i}italic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT \leftarrow 0,u0,0,i0subscript𝑢00𝑖\langle\langle 0,u_{0}\rangle,0,i\rangle⟨ ⟨ 0 , italic_u start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ⟩ , 0 , italic_i ⟩
11 variables of jP𝑗𝑃j\in Pitalic_j ∈ italic_P: For all processes iP𝑖𝑃i\in Pitalic_i ∈ italic_P: T_informi𝑇_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑖T\_inform_{i}italic_T _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT \leftarrow kP{0,u0,0,k}isubscriptdelimited-⟨⟩subscript𝑘𝑃0subscript𝑢00𝑘𝑖\langle\bigcup_{k\in P}\{\langle\langle 0,u_{0}\rangle,0,k\rangle\}\rangle_{i}⟨ ⋃ start_POSTSUBSCRIPT italic_k ∈ italic_P end_POSTSUBSCRIPT { ⟨ ⟨ 0 , italic_u start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ⟩ , 0 , italic_k ⟩ } ⟩ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT
12 variable of jP𝑗𝑃j\in Pitalic_j ∈ italic_P: Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_t \leftarrow kP{0,u0,0,k}psubscriptdelimited-⟨⟩subscript𝑘𝑃0subscript𝑢00𝑘𝑝\langle\bigcup_{k\in P}\{\langle\langle 0,u_{0}\rangle,0,k\rangle\}\rangle_{p}⟨ ⋃ start_POSTSUBSCRIPT italic_k ∈ italic_P end_POSTSUBSCRIPT { ⟨ ⟨ 0 , italic_u start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ⟩ , 0 , italic_k ⟩ } ⟩ start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT
13 variable of jP𝑗𝑃j\in Pitalic_j ∈ italic_P: Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t \leftarrow lL{kP{0,u0,0,k}l}subscript𝑙𝐿subscriptdelimited-⟨⟩subscript𝑘𝑃0subscript𝑢00𝑘𝑙\bigcup_{l\in L}\{\langle\bigcup_{k\in P}\{\langle\langle 0,u_{0}\rangle,0,k% \rangle\}\rangle_{l}\}⋃ start_POSTSUBSCRIPT italic_l ∈ italic_L end_POSTSUBSCRIPT { ⟨ ⋃ start_POSTSUBSCRIPT italic_k ∈ italic_P end_POSTSUBSCRIPT { ⟨ ⟨ 0 , italic_u start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ⟩ , 0 , italic_k ⟩ } ⟩ start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT }, where |L|ntLP𝐿𝑛𝑡𝐿𝑃|L|\geq n-t\wedge L\subseteq P| italic_L | ≥ italic_n - italic_t ∧ italic_L ⊆ italic_P
14
15WRITE(u𝑢uitalic_u):
16 c=c+1𝑐𝑐1c=c+1italic_c = italic_c + 1
17 W(c,u)𝑊𝑐𝑢W(\langle c,u\rangle)italic_W ( ⟨ italic_c , italic_u ⟩ )
18 return
19
20READ():
21 R()𝑅R()italic_R ( )
22 return the value returned by the R𝑅Ritalic_R call
23
24W(k,u)𝑊𝑘𝑢W(\langle k,u\rangle)italic_W ( ⟨ italic_k , italic_u ⟩ ):
25 for every process iP𝑖𝑃i\in Pitalic_i ∈ italic_P do
26       R_initwi=k,u𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖𝑘𝑢R\_init_{wi}=\langle k,u\rangleitalic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT = ⟨ italic_k , italic_u ⟩
27d=0𝑑0d=0italic_d = 0
28 while d<nt𝑑𝑛𝑡d<n-titalic_d < italic_n - italic_t do
29       for each new k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ in R_ackiw𝑅_𝑎𝑐subscript𝑘𝑖𝑤R\_ack_{iw}italic_R _ italic_a italic_c italic_k start_POSTSUBSCRIPT italic_i italic_w end_POSTSUBSCRIPT among R_ack𝑅_𝑎𝑐𝑘R\_ackitalic_R _ italic_a italic_c italic_k registers do
30             d=d+1𝑑𝑑1d=d+1italic_d = italic_d + 1
31      
32return done
33R()𝑅R()italic_R ( ):
34 execute one iteration of the reader helper thread, Algorithm 2
35 return the value last written in R_ackpw𝑅_𝑎𝑐subscript𝑘𝑝𝑤R\_ack_{pw}italic_R _ italic_a italic_c italic_k start_POSTSUBSCRIPT italic_p italic_w end_POSTSUBSCRIPT in that execution
Algorithm 1 Constructing a linearizable SWMR atomic register. Code at process p𝑝pitalic_p.
1 reader helper thread:
2 while true𝑡𝑟𝑢𝑒trueitalic_t italic_r italic_u italic_e do
3       if R_initwp(=k,u)annotated𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑝absent𝑘𝑢R\_init_{wp}(=\langle k,u\rangle)italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_p end_POSTSUBSCRIPT ( = ⟨ italic_k , italic_u ⟩ ) is newly written (overwrites a different value)  then
4             s=s+1𝑠𝑠1s=s+1italic_s = italic_s + 1
5             for each iP𝑖𝑃i\in Pitalic_i ∈ italic_P do
6                   R_witnesspik,u,s,p𝑅_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑝𝑖𝑘𝑢𝑠𝑝R\_witness_{pi}\leftarrow\langle\langle k,u\rangle,s,p\rangleitalic_R _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_p italic_i end_POSTSUBSCRIPT ← ⟨ ⟨ italic_k , italic_u ⟩ , italic_s , italic_p ⟩
7            
8      for each iP𝑖𝑃i\in Pitalic_i ∈ italic_P do
9             if R_witnessip(=k,u,s,i)annotated𝑅_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑖𝑝absent𝑘𝑢superscript𝑠𝑖R\_witness_{ip}(=\langle\langle k,u\rangle,s^{\prime},i\rangle)italic_R _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_i italic_p end_POSTSUBSCRIPT ( = ⟨ ⟨ italic_k , italic_u ⟩ , italic_s start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_i ⟩ ) is newly written, i.e., s>T_witnessi.sformulae-sequencesuperscript𝑠𝑇_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑖𝑠s^{\prime}>T\_witness_{i}.sitalic_s start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT > italic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT . italic_s  then
10                   T_witnessik,u,s,i𝑇_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑖𝑘𝑢superscript𝑠𝑖T\_witness_{i}\leftarrow\langle\langle k,u\rangle,s^{\prime},i\rangleitalic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ← ⟨ ⟨ italic_k , italic_u ⟩ , italic_s start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_i ⟩
11            else if s<T_witnessi.s(s=T_witnessi.sk,u(Line2)T_witnessi.k,u)s^{\prime}<T\_witness_{i}.s\vee(s^{\prime}=T\_witness_{i}.s\wedge\langle k,u% \rangle(Line~{}\ref{line:ku})\neq T\_witness_{i}.\langle k,u\rangle)italic_s start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT < italic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT . italic_s ∨ ( italic_s start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = italic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT . italic_s ∧ ⟨ italic_k , italic_u ⟩ ( italic_L italic_i italic_n italic_e ) ≠ italic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT . ⟨ italic_k , italic_u ⟩ ) then
12                   (optionally) mark process i𝑖iitalic_i as Byzantine
13            
14      
15      if \exists \geq nt𝑛𝑡n-titalic_n - italic_t latest elements k,u,,q𝑘𝑢𝑞\langle\langle k,u\rangle,*,q\rangle⟨ ⟨ italic_k , italic_u ⟩ , ∗ , italic_q ⟩ T_witnessq𝑇_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑞T\_witness_{q}italic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT  then
16             add all these ntabsent𝑛𝑡\geq n-t≥ italic_n - italic_t elements T_witnessq𝑇_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑞T\_witness_{q}italic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT to the emptyset Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_t
17             for each iP𝑖𝑃i\in Pitalic_i ∈ italic_P do
18                   R_informpiWitness_Setp𝑅_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑝𝑖subscriptdelimited-⟨⟩𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡𝑝R\_inform_{pi}\leftarrow\langle Witness\_Set\rangle_{p}italic_R _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_p italic_i end_POSTSUBSCRIPT ← ⟨ italic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_t ⟩ start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT
19            for each iP𝑖𝑃i\in Pitalic_i ∈ italic_P do
20                   T_informiR_informip𝑇_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑖𝑅_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑖𝑝T\_inform_{i}\leftarrow R\_inform_{ip}italic_T _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ← italic_R _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_i italic_p end_POSTSUBSCRIPT
21            if nt𝑛𝑡\exists\geq n-t∃ ≥ italic_n - italic_t processes j𝑗jitalic_j (i.e., T_informj𝑇_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑗T\_inform_{j}italic_T _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT) having identical entries k,u,sl,l𝑘𝑢subscript𝑠𝑙𝑙\langle\langle k,u\rangle,s_{l},l\rangle⟨ ⟨ italic_k , italic_u ⟩ , italic_s start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT , italic_l ⟩ for ntabsent𝑛𝑡\geq n-t≥ italic_n - italic_t processes l𝑙litalic_l then
22                   Place the ntabsent𝑛𝑡\geq n-t≥ italic_n - italic_t T_informj𝑇_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑗T\_inform_{j}italic_T _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT in emptyset Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t
23                   for each iP𝑖𝑃i\in Pitalic_i ∈ italic_P do
24                         R_finalpiInform_Set𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝𝑖𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡R\_final_{pi}\leftarrow Inform\_Setitalic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p italic_i end_POSTSUBSCRIPT ← italic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t
25                  R_ackpwk,u𝑅_𝑎𝑐subscript𝑘𝑝𝑤𝑘𝑢R\_ack_{pw}\leftarrow\langle k,u\rangleitalic_R _ italic_a italic_c italic_k start_POSTSUBSCRIPT italic_p italic_w end_POSTSUBSCRIPT ← ⟨ italic_k , italic_u ⟩
26            
27      Z𝑍Z\leftarrow\emptysetitalic_Z ← ∅
28       for each iP𝑖𝑃i\in Pitalic_i ∈ italic_P do
29             ZZ{R_finalip}𝑍𝑍𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑖𝑝Z\leftarrow Z\cup\{R\_final_{ip}\}italic_Z ← italic_Z ∪ { italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_i italic_p end_POSTSUBSCRIPT }
30            
31      YFind_Latest(Z)𝑌𝐹𝑖𝑛𝑑_𝐿𝑎𝑡𝑒𝑠𝑡𝑍Y\leftarrow Find\_Latest(Z)italic_Y ← italic_F italic_i italic_n italic_d _ italic_L italic_a italic_t italic_e italic_s italic_t ( italic_Z )
32       if YInform_Set𝑌𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Y\neq Inform\_Setitalic_Y ≠ italic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t then
33             for each iP𝑖𝑃i\in Pitalic_i ∈ italic_P do
34                   R_finalpiY𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝𝑖𝑌R\_final_{pi}\leftarrow Yitalic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p italic_i end_POSTSUBSCRIPT ← italic_Y
35            R_ackpw𝑅_𝑎𝑐subscript𝑘𝑝𝑤absentR\_ack_{pw}\leftarrowitalic_R _ italic_a italic_c italic_k start_POSTSUBSCRIPT italic_p italic_w end_POSTSUBSCRIPT ← the common k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ value occurring in identical T_witness𝑇_𝑤𝑖𝑡𝑛𝑒𝑠𝑠T\_witnessitalic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s entries k,u,sl,l𝑘𝑢subscript𝑠𝑙𝑙\langle\langle k,u\rangle,s_{l},l\rangle⟨ ⟨ italic_k , italic_u ⟩ , italic_s start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT , italic_l ⟩ for ntabsent𝑛𝑡\geq n-t≥ italic_n - italic_t values of l𝑙litalic_l in all the ntabsent𝑛𝑡\geq n-t≥ italic_n - italic_t Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts in Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t that is Y𝑌Yitalic_Y
36      
37Find_Latest(Z)𝐹𝑖𝑛𝑑_𝐿𝑎𝑡𝑒𝑠𝑡𝑍Find\_Latest(Z)italic_F italic_i italic_n italic_d _ italic_L italic_a italic_t italic_e italic_s italic_t ( italic_Z ):
38 while |Z|>1𝑍1|Z|>1| italic_Z | > 1 do
39       let Zi,Zjsubscript𝑍𝑖subscript𝑍𝑗Z_{i},Z_{j}italic_Z start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , italic_Z start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT be any two elements of Z𝑍Zitalic_Z; Zisubscript𝑍𝑖Z_{i}italic_Z start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT (Zjsubscript𝑍𝑗Z_{j}italic_Z start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT) has ntabsent𝑛𝑡\geq n-t≥ italic_n - italic_t entries and is the Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t of some reader
40       Let Qisubscript𝑄𝑖Q_{i}italic_Q start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT (Qjsubscript𝑄𝑗Q_{j}italic_Q start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT) be the set of ntabsent𝑛𝑡\geq n-t≥ italic_n - italic_t processes that have identical T_witness𝑇_𝑤𝑖𝑡𝑛𝑒𝑠𝑠T\_witnessitalic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s entries in the ntabsent𝑛𝑡\geq n-t≥ italic_n - italic_t Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts in Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t that is Zisubscript𝑍𝑖Z_{i}italic_Z start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT (Zjsubscript𝑍𝑗Z_{j}italic_Z start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT). For the n2tabsent𝑛2𝑡\geq n-2t≥ italic_n - 2 italic_t readers qQiQj𝑞subscript𝑄𝑖subscript𝑄𝑗q\in Q_{i}\cap Q_{j}italic_q ∈ italic_Q start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ∩ italic_Q start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT, let eqi=k,u,sqi,qsubscriptsuperscript𝑒𝑖𝑞𝑘𝑢subscriptsuperscript𝑠𝑖𝑞𝑞e^{i}_{q}=\langle\langle k,u\rangle,s^{i}_{q},q\rangleitalic_e start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT = ⟨ ⟨ italic_k , italic_u ⟩ , italic_s start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT , italic_q ⟩ and eqj=k,u,sqj,qsubscriptsuperscript𝑒𝑗𝑞superscript𝑘superscript𝑢subscriptsuperscript𝑠𝑗𝑞𝑞e^{j}_{q}=\langle\langle k^{\prime},u^{\prime}\rangle,s^{j}_{q},q\rangleitalic_e start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT = ⟨ ⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_u start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩ , italic_s start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT , italic_q ⟩ be these T_witness𝑇_𝑤𝑖𝑡𝑛𝑒𝑠𝑠T\_witnessitalic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s entries in the ntabsent𝑛𝑡\geq n-t≥ italic_n - italic_t Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts in the Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_ts that are Zisubscript𝑍𝑖Z_{i}italic_Z start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and Zjsubscript𝑍𝑗Z_{j}italic_Z start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT, resp.
41      
42      if sqisqjsubscriptsuperscript𝑠𝑖𝑞subscriptsuperscript𝑠𝑗𝑞s^{i}_{q}\geq s^{j}_{q}italic_s start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT ≥ italic_s start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT for any/all processes q𝑞qitalic_q then
43             ZZZj𝑍𝑍subscript𝑍𝑗Z\leftarrow Z\setminus Z_{j}italic_Z ← italic_Z ∖ italic_Z start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT
44      else
45             ZZZi𝑍𝑍subscript𝑍𝑖Z\leftarrow Z\setminus Z_{i}italic_Z ← italic_Z ∖ italic_Z start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT
46      
47return(element in Z𝑍Zitalic_Z)
Algorithm 2 Reader helper thread for constructing a linearizable SWMR atomic register. Code at process p𝑝pitalic_p.

4.2 Instantiating Framework Definitions in the Algorithm

A reader sees the value written by the most recent correct write operation that precedes the read operation, or it may return a later written value that is written by a correct or pseudo-correct write operation. In the context of our algorithm, the definitions of a correct write operation, a potential pseudo-correct write operation, and a pseudo-correct write operation apply directly. A write operation stabilizes (Definition 16) if the value is potentially returnable by a correct read operation, i.e., when it is written to R_finalp𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝R\_final_{p*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT for all values of * (in the form of an Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t containing the required number of correctly signed Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts). A correct write operation always stabilizes whereas a potential pseudo-correct write operation may stabilize depending on the outcome of concurrency data races and behavior of the writer and Byzantine readers.

A correct write operation always stabilizes because it waits for nt𝑛𝑡n-titalic_n - italic_t acknowledgements in R_ackw𝑅_𝑎𝑐subscript𝑘absent𝑤R\_ack_{*w}italic_R _ italic_a italic_c italic_k start_POSTSUBSCRIPT ∗ italic_w end_POSTSUBSCRIPT before completion, thereby allowing the value it has written to R_finalp𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝R\_final_{p*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT to be eligible for being returned by a read operation. A correct write operation corresponds to a sufficient condition for stabilization. Writing the same value to nt𝑛𝑡n-titalic_n - italic_t readers’ R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT in a potential pseudo-correct operation is a necessary condition for stabilization. For the potential pseudo-correct write operation to become a pseudo-correct write operation, the Byzantine readers need to collaborate to allow the value being written to the other correct readers’ R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT to stabilize. Recall that a pseudo-correct write operation may have the value written to the readers’ R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT registers across multiple prior write operations. The set of correct and pseudo-correct writes is exactly the set of writes whose values stabilize (follows from Theorem 3).

We show (Corollary 2) that the set of all values that stabilize are totally ordered by the logical times of their “reading” from the readers’ registers R_initw𝑅_𝑖𝑛𝑖subscript𝑡𝑤R\_init_{w*}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w ∗ end_POSTSUBSCRIPT. Specifically, we use T¯¯𝑇\overline{T}over¯ start_ARG italic_T end_ARG to denote the vector of logical times of reading a value k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ from R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT by the various readers i𝑖iitalic_i, and we denote this total order relation maps-to\mapsto. The notation T¯¯𝑇\overline{T}over¯ start_ARG italic_T end_ARG as opposed to the timestamp vector T𝑇Titalic_T we introduced in Section 3 is useful because not all readers may report the logical times of their reading u𝑢uitalic_u from R_initw𝑅_𝑖𝑛𝑖subscript𝑡𝑤R\_init_{w*}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w ∗ end_POSTSUBSCRIPT. Thus T¯(u)¯𝑇𝑢\overline{T}(u)over¯ start_ARG italic_T end_ARG ( italic_u ) may not have all n𝑛nitalic_n components whereas T(u)𝑇𝑢T(u)italic_T ( italic_u ) has all n𝑛nitalic_n components. Roughly speaking, the T1¯T2¯maps-to¯subscript𝑇1¯subscript𝑇2\overline{T_{1}}\mapsto\overline{T_{2}}over¯ start_ARG italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_ARG ↦ over¯ start_ARG italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_ARG relation is equivalent to T1<T2subscript𝑇1subscript𝑇2T_{1}<T_{2}italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT < italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT; the formal definition of maps-to\mapsto is given later in Definition 18. We will also abbreviate k,v.T¯k,v.T¯formulae-sequence𝑘𝑣maps-to¯𝑇superscript𝑘superscript𝑣¯𝑇\langle k,v\rangle.\overline{T}\mapsto\langle k^{\prime},v^{\prime}\rangle.% \overline{T}⟨ italic_k , italic_v ⟩ . over¯ start_ARG italic_T end_ARG ↦ ⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩ . over¯ start_ARG italic_T end_ARG as simply k,vk,vmaps-to𝑘𝑣superscript𝑘superscript𝑣\langle k,v\rangle\mapsto\langle k^{\prime},v^{\prime}\rangle⟨ italic_k , italic_v ⟩ ↦ ⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩. The total order maps-to\mapsto on timestamp vectors of values that stabilize is the total order on the linearization points of correct and pseudo-correct write operations.777As noted in Section 3, the total order in which the values stabilize may be different from this total order because of concurrency races for stabilization between a pseudo-correct write T1(u1)subscript𝑇1subscript𝑢1T_{1}(u_{1})italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( italic_u start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) and a pseudo-correct or correct write T2(u2)subscript𝑇2subscript𝑢2T_{2}(u_{2})italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_u start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ), where T1<T2subscript𝑇1subscript𝑇2T_{1}<T_{2}italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT < italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT. If T2(u2)subscript𝑇2subscript𝑢2T_{2}(u_{2})italic_T start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_u start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) stabilizes before T1(u1)subscript𝑇1subscript𝑢1T_{1}(u_{1})italic_T start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( italic_u start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ), the write of u1subscript𝑢1u_{1}italic_u start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT will have a invisible linearization point as it will not be returned to any correct read operation. This follows from the no “new-old” inversions clause in Theorem 8.

More than one value can stabilize as part of the same HLO write operation. This can happen when, for example, some of the readers’ registers could have been written to in earlier Write operations or a HLO invocation-response of a Byzantine write contains multiple pseudo-correct write operations. For any pair of values that stabilize, this total order maps-to\mapsto between them satisfies the Genuine Advance Property if n>3t𝑛3𝑡n>3titalic_n > 3 italic_t, as we will prove in Theorem 5.

With the introduction of the maps-to\mapsto relation, the definition of register linearizability (Definition 2) is adapted to the algorithm by rephrasing the No ‘‘new-old’’ inversions property as follows.

Definition 14.

(Byzantine Linearizabile Register for the algorithm). In a system with Byzantine process failures, an implementation of a SWMR register is linearizable if and only if the following two properties are satisfied.

  • Reading a current value: When a read operation R by a non-Byzantine process returns the value v𝑣vitalic_v:

    • if v=v0𝑣subscript𝑣0v=v_{0}italic_v = italic_v start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT then no correct or pseudo-correct write operation precedes R

    • else if vv0𝑣subscript𝑣0v\neq v_{0}italic_v ≠ italic_v start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT then v𝑣vitalic_v was written by the most recent correct write operation that precedes R or by a later pseudo-correct or correct write operation (either a pseudo-correct write operation, that precedes or overlaps with R, or a correct write operation that overlaps R).

  • No “new-old” inversions: If read operations R and R’ by non-Byzantine processes return values k,v𝑘𝑣\langle k,v\rangle⟨ italic_k , italic_v ⟩ and k,vsuperscript𝑘superscript𝑣\langle k^{\prime},v^{\prime}\rangle⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩, respectively, and R precedes R’, then k,v.T¯=k,v.T¯formulae-sequence𝑘𝑣superscriptmaps-to¯𝑇superscript𝑘superscript𝑣¯𝑇\langle k,v\rangle.\overline{T}\stackrel{{\scriptstyle=}}{{\mapsto}}\langle k^% {\prime},v^{\prime}\rangle.\overline{T}⟨ italic_k , italic_v ⟩ . over¯ start_ARG italic_T end_ARG start_RELOP SUPERSCRIPTOP start_ARG ↦ end_ARG start_ARG = end_ARG end_RELOP ⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩ . over¯ start_ARG italic_T end_ARG.

5 Correctness Proof

Definition 15.

The witness set of an Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t IS𝐼𝑆ISitalic_I italic_S that is formed, WS(IS)𝑊𝑆𝐼𝑆WS(IS)italic_W italic_S ( italic_I italic_S ), is the maximal set of at least nt𝑛𝑡n-titalic_n - italic_t T_witness𝑇_𝑤𝑖𝑡𝑛𝑒𝑠𝑠T\_witnessitalic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s entries k,u,sl,l𝑘𝑢subscript𝑠𝑙𝑙\langle\langle k,u\rangle,s_{l},l\rangle⟨ ⟨ italic_k , italic_u ⟩ , italic_s start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT , italic_l ⟩ common to the at least nt𝑛𝑡n-titalic_n - italic_t elements (Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts) of the Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t IS𝐼𝑆ISitalic_I italic_S.

Those at least nt𝑛𝑡n-titalic_n - italic_t identical entries in the intersection of the at least nt𝑛𝑡n-titalic_n - italic_t Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts in the Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t IS𝐼𝑆ISitalic_I italic_S form WS(IS)𝑊𝑆𝐼𝑆WS(IS)italic_W italic_S ( italic_I italic_S ).

Definition 16.

The field/value k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ common to all the entries in the WS(IS)𝑊𝑆𝐼𝑆WS(IS)italic_W italic_S ( italic_I italic_S ) witness set of an inform set IS𝐼𝑆ISitalic_I italic_S is defined to stabilize when the Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t IS𝐼𝑆ISitalic_I italic_S containing correctly signed Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts is written to all the R_finalpi𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝𝑖R\_final_{pi}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p italic_i end_POSTSUBSCRIPT for some process p𝑝pitalic_p.

Definition 17.

For a value k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ that stabilizes with Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t IS𝐼𝑆ISitalic_I italic_S, k,u.T¯formulae-sequence𝑘𝑢¯𝑇\langle k,u\rangle.\overline{T}⟨ italic_k , italic_u ⟩ . over¯ start_ARG italic_T end_ARG is the set of tuples (l,sl)𝑙subscript𝑠𝑙(l,s_{l})( italic_l , italic_s start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT ) for all the at least nt𝑛𝑡n-titalic_n - italic_t reader processes l𝑙litalic_l for all the at least nt𝑛𝑡n-titalic_n - italic_t T_witnessl𝑇_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑙T\_witness_{l}italic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT entries k,u,sl,l𝑘𝑢subscript𝑠𝑙𝑙\langle\langle k,u\rangle,s_{l},l\rangle⟨ ⟨ italic_k , italic_u ⟩ , italic_s start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT , italic_l ⟩ in WS(IS)𝑊𝑆𝐼𝑆WS(IS)italic_W italic_S ( italic_I italic_S ).

Only a value that stabilizes may be returned by a reader.

Theorem 1.

A correct write operation is guaranteed to stabilize provided n>2t𝑛2𝑡n>2titalic_n > 2 italic_t.

Proof.

A correct write operation writes the same k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ to R_initwp𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑝R\_init_{wp}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_p end_POSTSUBSCRIPT for all correct p𝑝pitalic_p and will not complete unless it gets nt𝑛𝑡n-titalic_n - italic_t acks in R_ackpw𝑅_𝑎𝑐subscript𝑘𝑝𝑤R\_ack_{pw}italic_R _ italic_a italic_c italic_k start_POSTSUBSCRIPT italic_p italic_w end_POSTSUBSCRIPT. It may get t𝑡titalic_t acks from Byzantine processes but as n>2t𝑛2𝑡n>2titalic_n > 2 italic_t, it will need an ack from at least one correct process. A correct process p𝑝pitalic_p gives the ack only after it has written the value to R_finalp𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝R\_final_{p*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT, i.e., when the value has stabilized. We now show that at least one correct process will have the value stabilize, before which the value written to the R_initw𝑅_𝑖𝑛𝑖subscript𝑡𝑤R\_init_{w*}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w ∗ end_POSTSUBSCRIPT will not be overwritten.

For all correct p𝑝pitalic_p, the witness timestamps are correctly written to R_witnessp𝑅_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠𝑝R\_witness_{p*}italic_R _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT. At least nt𝑛𝑡n-titalic_n - italic_t correct reader helper threads of correct processes p𝑝pitalic_p will eventually read from R_witnessp𝑅_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠absent𝑝R\_witness_{*p}italic_R _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT ∗ italic_p end_POSTSUBSCRIPT, form their Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts, sign those sets and write to R_informp𝑅_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑝R\_inform_{p*}italic_R _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT. Some first correct reader thread p𝑝pitalic_p will eventually read from R_informp𝑅_𝑖𝑛𝑓𝑜𝑟subscript𝑚absent𝑝R\_inform_{*p}italic_R _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT ∗ italic_p end_POSTSUBSCRIPT and have at least nt𝑛𝑡n-titalic_n - italic_t T_informj𝑇_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑗T\_inform_{j}italic_T _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT having identical entries k,u,sl,l𝑘𝑢subscript𝑠𝑙𝑙\langle\langle k,u\rangle,s_{l},l\rangle⟨ ⟨ italic_k , italic_u ⟩ , italic_s start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT , italic_l ⟩ for at least nt𝑛𝑡n-titalic_n - italic_t processes l𝑙litalic_l. It will thus be able to form its Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t, then write it to all R_finalp𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝R\_final_{p*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT, and will then write k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ to R_ackpw𝑅_𝑎𝑐subscript𝑘𝑝𝑤R\_ack_{pw}italic_R _ italic_a italic_c italic_k start_POSTSUBSCRIPT italic_p italic_w end_POSTSUBSCRIPT after which the correct write operation will complete. Thus, k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ is guaranteed to have stabilized as the R_initwi(i)𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖for-all𝑖R\_init_{wi}(\forall i)italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT ( ∀ italic_i ) will not be overwritten until then. ∎

Theorem 2.

A potential pseudo-correct write operation may stabilize provided n>2t𝑛2𝑡n>2titalic_n > 2 italic_t.

Proof.

A value written by a potential pseudo-correct operation writes the same value to nt𝑛𝑡n-titalic_n - italic_t readers’ R_initwp𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑝R\_init_{wp}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_p end_POSTSUBSCRIPT, i.e., to at least n2t𝑛2𝑡n-2titalic_n - 2 italic_t correct readers’ R_initwp𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑝R\_init_{wp}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_p end_POSTSUBSCRIPT, across possibly multiple prior write operations and the current write operation. These reader processes write that value, if not overwritten, to R_witnessp𝑅_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠absent𝑝R\_witness_{*p}italic_R _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT ∗ italic_p end_POSTSUBSCRIPT. Let the t𝑡titalic_t Byzantine processes b𝑏bitalic_b read the value from their R_witnessb𝑅_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠absent𝑏R\_witness_{*b}italic_R _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT ∗ italic_b end_POSTSUBSCRIPT and thereafter behave as though the value had been written to their R_initwp𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑝R\_init_{wp}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_p end_POSTSUBSCRIPT and thenceforth behave correctly. There is now a way that the value may stabilize if the Byzantine writer does not overwrite the values in R_initwp𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑝R\_init_{wp}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_p end_POSTSUBSCRIPT (pfor-all𝑝\forall p∀ italic_p) until at least one process q𝑞qitalic_q forms its Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t of correctly signed Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts for that value and writes the Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t to R_finalq𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑞R\_final_{q*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_q ∗ end_POSTSUBSCRIPT. This condition will be satisfied as per the logic in the proof of Theorem 1 (although the writer need not wait for nt𝑛𝑡n-titalic_n - italic_t acks) as now the Byzantine reader processes b𝑏bitalic_b are collaborating and behaving like correct reader processes after having read the value set aside for them in R_witnessb𝑅_𝑤𝑖𝑡𝑛𝑒𝑠subscript𝑠absent𝑏R\_witness_{*b}italic_R _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s start_POSTSUBSCRIPT ∗ italic_b end_POSTSUBSCRIPT. ∎

Theorem 3.

If a value stabilizes, it must have been written by a correct write operation or by a potential pseudo-correct write operation.

Proof.

A correct write operation stabilizes (Theorem 1). So we need to only prove the following contrapositive, namely that if a write is not a potential pseudo-correct write operation, it will not stabilize.

If a write is not a potential pseudo-correct operation, it is not written to at least n2t𝑛2𝑡n-2titalic_n - 2 italic_t correct processes’ R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT across possibly multiple write operations. Then there is no way a Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_t of at least nt𝑛𝑡n-titalic_n - italic_t T_witness𝑇_𝑤𝑖𝑡𝑛𝑒𝑠𝑠T\_witnessitalic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s entries can form at at least nt𝑛𝑡n-titalic_n - italic_t processes, and hence an Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t of nt𝑛𝑡n-titalic_n - italic_t correctly signed Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts cannot form at any process, correct or Byzantine, and cannot be written to any R_finalp𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝R\_final_{p*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT. If a Byzantine process attempts to write a fake Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t in R_finalp𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝R\_final_{p*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT, that will be detected by correct processes as that Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t written in R_finalp𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝R\_final_{p*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT will not pass the signature test. Hence that value is deemed to not have stabilized. ∎

Lemma 1.

The View Consistency Property (Definition 11) is satisfied by Algorithm 1.

Proof.

If one correct process p𝑝pitalic_p returns a value v𝑣vitalic_v of write T(v)𝑇𝑣T(v)italic_T ( italic_v ), it must have written the Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t corresponding to this T(v)𝑇𝑣T(v)italic_T ( italic_v ) to all R_finalp𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝R\_final_{p*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT. If there are no further writes to R_initw𝑅_𝑖𝑛𝑖subscript𝑡𝑤R\_init_{w*}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w ∗ end_POSTSUBSCRIPT beyond T(v)𝑇𝑣T(v)italic_T ( italic_v ) by the writer, all correct readers’ read operations issued after p𝑝pitalic_p is returned v𝑣vitalic_v will return v𝑣vitalic_v, based on the pseudo-code. Hence View Consistency is satisfied. ∎

If an Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t IS1𝐼𝑆1IS1italic_I italic_S 1 is formed at reader x𝑥xitalic_x, it has read from R_informx𝑅_𝑖𝑛𝑓𝑜𝑟subscript𝑚absent𝑥R\_inform_{*x}italic_R _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT ∗ italic_x end_POSTSUBSCRIPT at least nt𝑛𝑡n-titalic_n - italic_t Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts having at least nt𝑛𝑡n-titalic_n - italic_t identical entries across those Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts. Likewise if an Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t IS2𝐼𝑆2IS2italic_I italic_S 2 is formed at reader y𝑦yitalic_y. (Recall that those at least nt𝑛𝑡n-titalic_n - italic_t identical entries in the intersection of the at least nt𝑛𝑡n-titalic_n - italic_t Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts in the Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t IS𝐼𝑆ISitalic_I italic_S form WS(IS)𝑊𝑆𝐼𝑆WS(IS)italic_W italic_S ( italic_I italic_S ).) x𝑥xitalic_x and y𝑦yitalic_y write Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t IS1𝐼𝑆1IS1italic_I italic_S 1 and Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t IS2𝐼𝑆2IS2italic_I italic_S 2 to R_finalx𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑥R\_final_{x*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_x ∗ end_POSTSUBSCRIPT and R_finaly𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑦R\_final_{y*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_y ∗ end_POSTSUBSCRIPT, respectively. When a third reader z𝑧zitalic_z reads these two values and as part of Find_Latest(Z)𝐹𝑖𝑛𝑑_𝐿𝑎𝑡𝑒𝑠𝑡𝑍Find\_Latest(Z)italic_F italic_i italic_n italic_d _ italic_L italic_a italic_t italic_e italic_s italic_t ( italic_Z ) invocation compares IS1𝐼𝑆1IS1italic_I italic_S 1 and IS2𝐼𝑆2IS2italic_I italic_S 2 (Z𝑍Zitalic_Z and Zsuperscript𝑍Z^{\prime}italic_Z start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT),

  • there are at least n2t𝑛2𝑡n-2titalic_n - 2 italic_t reader witness timestamps common to WS1(=WS(IS1))annotated𝑊𝑆1absent𝑊𝑆𝐼𝑆1WS1(=WS(IS1))italic_W italic_S 1 ( = italic_W italic_S ( italic_I italic_S 1 ) ) and WS2(=WS(IS2))annotated𝑊𝑆2absent𝑊𝑆𝐼𝑆2WS2(=WS(IS2))italic_W italic_S 2 ( = italic_W italic_S ( italic_I italic_S 2 ) ). As the corresponding processes provided witnesses to both witness sets, any such process would have done so first for WS1𝑊𝑆1WS1italic_W italic_S 1 and then for WS2𝑊𝑆2WS2italic_W italic_S 2 or vice-versa.

  • there are at least n2t𝑛2𝑡n-2titalic_n - 2 italic_t processes p𝑝pitalic_p that provided (signed) Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts written to R_informp𝑅_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑝R\_inform_{p*}italic_R _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT that formed part of both IS1𝐼𝑆1IS1italic_I italic_S 1 and IS2𝐼𝑆2IS2italic_I italic_S 2. Any such process p𝑝pitalic_p would have written its Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_t that formed part of IS1𝐼𝑆1IS1italic_I italic_S 1 to R_Informp𝑅_𝐼𝑛𝑓𝑜𝑟subscript𝑚𝑝R\_Inform_{p*}italic_R _ italic_I italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT before it wrote its Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_t that formed part of IS2𝐼𝑆2IS2italic_I italic_S 2 or vice-versa.

Observation 1.

A correct process forms its successive Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts only in non-decreasing order of source witness timestamps for the at least n2t𝑛2𝑡n-2titalic_n - 2 italic_t common witnesses as it writes these Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts to R_inform𝑅_𝑖𝑛𝑓𝑜𝑟𝑚R\_informitalic_R _ italic_i italic_n italic_f italic_o italic_r italic_m.

Let p𝑝pitalic_p sign Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_t WS1𝑊𝑆superscript1WS1^{\prime}italic_W italic_S 1 start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT that is part of IS1𝐼𝑆1IS1italic_I italic_S 1. Then let p𝑝pitalic_p sign WS2𝑊𝑆superscript2WS2^{\prime}italic_W italic_S 2 start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT that is part of IS2𝐼𝑆2IS2italic_I italic_S 2. (p𝑝pitalic_p is one of the at least n2t𝑛2𝑡n-2titalic_n - 2 italic_t processes that sign WS1IS1𝑊𝑆superscript1𝐼𝑆1WS1^{\prime}\in IS1italic_W italic_S 1 start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ∈ italic_I italic_S 1 and WS2IS2𝑊𝑆superscript2𝐼𝑆2WS2^{\prime}\in IS2italic_W italic_S 2 start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ∈ italic_I italic_S 2, assuming n>2t𝑛2𝑡n>2titalic_n > 2 italic_t. Note that these at least n2t𝑛2𝑡n-2titalic_n - 2 italic_t processes may not include any correct process.) For all correct p𝑝pitalic_p, we have the property that all the at least n2t𝑛2𝑡n-2titalic_n - 2 italic_t witnesses common to IS1𝐼𝑆1IS1italic_I italic_S 1 and IS2𝐼𝑆2IS2italic_I italic_S 2 have a higher or equal witness timestamp in IS2𝐼𝑆2IS2italic_I italic_S 2 than in IS1𝐼𝑆1IS1italic_I italic_S 1. Up to t𝑡titalic_t Byzantine processes p𝑝pitalic_p can sign WS1𝑊𝑆superscript1WS1^{\prime}italic_W italic_S 1 start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT that is part of IS1𝐼𝑆1IS1italic_I italic_S 1 and WS2𝑊𝑆superscript2WS2^{\prime}italic_W italic_S 2 start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT that is intended to be part of IS2𝐼𝑆2IS2italic_I italic_S 2 such that some of the common witness timestamps common to IS1𝐼𝑆1IS1italic_I italic_S 1 and IS2𝐼𝑆2IS2italic_I italic_S 2 will have a smaller witness timestamp in IS2𝐼𝑆2IS2italic_I italic_S 2 than in IS1𝐼𝑆1IS1italic_I italic_S 1 (while some will have a greater or equal witness timestamp in IS2𝐼𝑆2IS2italic_I italic_S 2 than in IS1)IS1)italic_I italic_S 1 ). Such IS1𝐼𝑆1IS1italic_I italic_S 1 and IS2𝐼𝑆2IS2italic_I italic_S 2, which require a quorum of at least nt𝑛𝑡n-titalic_n - italic_t signed Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts having identical T_witness𝑇_𝑤𝑖𝑡𝑛𝑒𝑠𝑠T\_witnessitalic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s entries k,u,sl,l𝑘𝑢subscript𝑠𝑙𝑙\langle\langle k,u\rangle,s_{l},l\rangle⟨ ⟨ italic_k , italic_u ⟩ , italic_s start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT , italic_l ⟩ for \geq nt𝑛𝑡n-titalic_n - italic_t processes l𝑙litalic_l will form at any correct or Byzantine process only if ntt𝑛𝑡𝑡n-t\leq titalic_n - italic_t ≤ italic_t, ie., n2t𝑛2𝑡n\leq 2titalic_n ≤ 2 italic_t. This is because the t𝑡titalic_t Byzantine processes p𝑝pitalic_p would be using fake (out-of-order) witness timestamp entries for at least one of WS1𝑊𝑆superscript1WS1^{\prime}italic_W italic_S 1 start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT and WS2𝑊𝑆superscript2WS2^{\prime}italic_W italic_S 2 start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. To prevent such a quorum IS1𝐼𝑆1IS1italic_I italic_S 1 or IS2𝐼𝑆2IS2italic_I italic_S 2 from forming, we require n>2t𝑛2𝑡n>2titalic_n > 2 italic_t.

Definition 18.

Given WS1(=WS(IS))annotated𝑊𝑆1absent𝑊𝑆𝐼𝑆WS1(=WS(IS))italic_W italic_S 1 ( = italic_W italic_S ( italic_I italic_S ) ) and WS2(=WS(IS))annotated𝑊𝑆2absent𝑊𝑆𝐼superscript𝑆WS2(=WS(IS^{\prime}))italic_W italic_S 2 ( = italic_W italic_S ( italic_I italic_S start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) ), WS1WS2maps-to𝑊𝑆1𝑊𝑆2WS1\mapsto WS2italic_W italic_S 1 ↦ italic_W italic_S 2 iff for the at least n2t𝑛2𝑡n-2titalic_n - 2 italic_t readers z𝑧zitalic_z that witnessed values in both WS1𝑊𝑆1WS1italic_W italic_S 1 and WS2𝑊𝑆2WS2italic_W italic_S 2, z𝑧zitalic_z’s WS1𝑊𝑆1WS1italic_W italic_S 1 timestamp \leq z𝑧zitalic_z’s WS2𝑊𝑆2WS2italic_W italic_S 2 timestamp and there is at least one reader zsuperscript𝑧z^{\prime}italic_z start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT that witnessed values in both WS1𝑊𝑆1WS1italic_W italic_S 1 and WS2𝑊𝑆2WS2italic_W italic_S 2 and zsuperscript𝑧z^{\prime}italic_z start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT’s WS1𝑊𝑆1WS1italic_W italic_S 1 timestamp <<< zsuperscript𝑧z^{\prime}italic_z start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT’s WS2𝑊𝑆2WS2italic_W italic_S 2 timestamp.

If for any z𝑧zitalic_z that witnessed both WS1𝑊𝑆1WS1italic_W italic_S 1 and WS2𝑊𝑆2WS2italic_W italic_S 2 the witness timestamps are equal, then WS1𝑊𝑆1WS1italic_W italic_S 1 and WS2𝑊𝑆2WS2italic_W italic_S 2 have the same k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ value.

If WS(IS)WS(IS)maps-to𝑊𝑆𝐼𝑆𝑊𝑆𝐼superscript𝑆WS(IS)\mapsto WS(IS^{\prime})italic_W italic_S ( italic_I italic_S ) ↦ italic_W italic_S ( italic_I italic_S start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ), we also interchangeably say that for the corresponding values, k,uk,umaps-to𝑘𝑢superscript𝑘superscript𝑢\langle k,u\rangle\mapsto\langle k^{\prime},u^{\prime}\rangle⟨ italic_k , italic_u ⟩ ↦ ⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_u start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩ and k,u.T¯k,u.T¯formulae-sequence𝑘𝑢maps-to¯𝑇superscript𝑘superscript𝑢¯𝑇\langle k,u\rangle.\overline{T}\mapsto\langle k^{\prime},u^{\prime}\rangle.% \overline{T}⟨ italic_k , italic_u ⟩ . over¯ start_ARG italic_T end_ARG ↦ ⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_u start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩ . over¯ start_ARG italic_T end_ARG.

Definition 19.

Given distinct WS1(=WS(IS))annotated𝑊𝑆1absent𝑊𝑆𝐼𝑆WS1(=WS(IS))italic_W italic_S 1 ( = italic_W italic_S ( italic_I italic_S ) ) and WS2(=WS(IS))annotated𝑊𝑆2absent𝑊𝑆𝐼superscript𝑆WS2(=WS(IS^{\prime}))italic_W italic_S 2 ( = italic_W italic_S ( italic_I italic_S start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) ), WS1WS2conditional𝑊𝑆1𝑊𝑆2WS1\|WS2italic_W italic_S 1 ∥ italic_W italic_S 2 iff WS1↦̸WS2WS2↦̸WS1not-maps-to𝑊𝑆1𝑊𝑆2𝑊𝑆2not-maps-to𝑊𝑆1WS1\not\mapsto WS2\wedge WS2\not\mapsto WS1italic_W italic_S 1 ↦̸ italic_W italic_S 2 ∧ italic_W italic_S 2 ↦̸ italic_W italic_S 1.

Observation 2.

If WS1||WS2WS1||WS2italic_W italic_S 1 | | italic_W italic_S 2 then of the at least n2t𝑛2𝑡n-2titalic_n - 2 italic_t processes that provided witness timestamps to both WS1𝑊𝑆1WS1italic_W italic_S 1 and WS2𝑊𝑆2WS2italic_W italic_S 2 there is a process a𝑎aitalic_a whose WS1𝑊𝑆1WS1italic_W italic_S 1 witness timestamp ta1𝑡𝑎1ta1italic_t italic_a 1 <<< its WS2𝑊𝑆2WS2italic_W italic_S 2 witness timestamp ta2𝑡𝑎2ta2italic_t italic_a 2 and there is a process b𝑏bitalic_b whose WS2𝑊𝑆2WS2italic_W italic_S 2 witness timestamp tb2𝑡𝑏2tb2italic_t italic_b 2 <<< its WS1𝑊𝑆1WS1italic_W italic_S 1 witness timestamp tb1𝑡𝑏1tb1italic_t italic_b 1.

Theorem 4.

For Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_ts IS1𝐼𝑆1IS1italic_I italic_S 1 and IS2𝐼𝑆2IS2italic_I italic_S 2 at any two (possibly different) reader processes, WS(IS1)WS(IS2)WS(IS2)IS(IS1)maps-to𝑊𝑆𝐼𝑆1𝑊𝑆𝐼𝑆2𝑊𝑆𝐼𝑆2maps-to𝐼𝑆𝐼𝑆1WS(IS1)\mapsto WS(IS2)\vee WS(IS2)\mapsto IS(IS1)italic_W italic_S ( italic_I italic_S 1 ) ↦ italic_W italic_S ( italic_I italic_S 2 ) ∨ italic_W italic_S ( italic_I italic_S 2 ) ↦ italic_I italic_S ( italic_I italic_S 1 ), i.e., WS(IS1)∦WS(IS2)conditional𝑊𝑆𝐼𝑆1𝑊𝑆𝐼𝑆2WS(IS1)\not\|\,WS(IS2)italic_W italic_S ( italic_I italic_S 1 ) ∦ italic_W italic_S ( italic_I italic_S 2 ), provided n>2t𝑛2𝑡n>2titalic_n > 2 italic_t.

Proof.

We prove by contradiction. Assume WS(IS1)WS(IS2)conditional𝑊𝑆𝐼𝑆1𝑊𝑆𝐼𝑆2WS(IS1)\|WS(IS2)italic_W italic_S ( italic_I italic_S 1 ) ∥ italic_W italic_S ( italic_I italic_S 2 ). Given WS1(=WS(IS1))annotated𝑊𝑆1absent𝑊𝑆𝐼𝑆1WS1(=WS(IS1))italic_W italic_S 1 ( = italic_W italic_S ( italic_I italic_S 1 ) ) and WS2(=WS(IS2))annotated𝑊𝑆2absent𝑊𝑆𝐼𝑆2WS2(=WS(IS2))italic_W italic_S 2 ( = italic_W italic_S ( italic_I italic_S 2 ) ), from Observation 2 there is a process a𝑎aitalic_a whose WS1𝑊𝑆1WS1italic_W italic_S 1 witness timestamp ta1𝑡𝑎1ta1italic_t italic_a 1 <<< its WS2𝑊𝑆2WS2italic_W italic_S 2 witness timestamp ta2𝑡𝑎2ta2italic_t italic_a 2 and there is a process b𝑏bitalic_b whose WS2𝑊𝑆2WS2italic_W italic_S 2 witness timestamp tb2𝑡𝑏2tb2italic_t italic_b 2 <<< its WS1𝑊𝑆1WS1italic_W italic_S 1 witness timestamp tb1𝑡𝑏1tb1italic_t italic_b 1. As noted earlier, a process p𝑝pitalic_p that provided witness set inputs to both IS1𝐼𝑆1IS1italic_I italic_S 1 and IS2𝐼𝑆2IS2italic_I italic_S 2 by writing to R_informp𝑅_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑝R\_inform_{p*}italic_R _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT could have provided its input for IS1𝐼𝑆1IS1italic_I italic_S 1 first and then for IS2𝐼𝑆2IS2italic_I italic_S 2 or vice-versa.

Without loss of generality assume p𝑝pitalic_p provides the witness set input for IS1𝐼𝑆1IS1italic_I italic_S 1 before providing the witness set input for IS2𝐼𝑆2IS2italic_I italic_S 2. Then consider the process b𝑏bitalic_b’s witness timestamps. So let process p𝑝pitalic_p provide b𝑏bitalic_b’s WS1𝑊𝑆1WS1italic_W italic_S 1 witness timestamp tb1𝑡𝑏1tb1italic_t italic_b 1 (along with other WS1𝑊𝑆1WS1italic_W italic_S 1 witness timestamps) which is written to R_informp𝑅_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑝R\_inform_{p*}italic_R _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT. If p𝑝pitalic_p is correct, it will not consider/input b𝑏bitalic_b’s WS2𝑊𝑆2WS2italic_W italic_S 2 witness timestamp tb2𝑡𝑏2tb2italic_t italic_b 2 as tb2<tb1𝑡𝑏2𝑡𝑏1tb2<tb1italic_t italic_b 2 < italic_t italic_b 1. Only up to t𝑡titalic_t Byzantine processes can process/input b𝑏bitalic_b’s WS2𝑊𝑆2WS2italic_W italic_S 2 timestamp tb2𝑡𝑏2tb2italic_t italic_b 2 after tb1𝑡𝑏1tb1italic_t italic_b 1 but, as n>2t𝑛2𝑡n>2titalic_n > 2 italic_t, that falls short of the nt𝑛𝑡n-titalic_n - italic_t threshold required to form an Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t (of signed Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts) at any process. So IS2𝐼𝑆2IS2italic_I italic_S 2 and WS2𝑊𝑆2WS2italic_W italic_S 2 will not exist.

Likewise if we assume the process p𝑝pitalic_p provides its witness set input for IS2𝐼𝑆2IS2italic_I italic_S 2 before providing its witness set input for IS1𝐼𝑆1IS1italic_I italic_S 1, then consider process a𝑎aitalic_a’s witness timestamps. Let process p𝑝pitalic_p provide a𝑎aitalic_a’s WS2𝑊𝑆2WS2italic_W italic_S 2 witness timestamp ta2𝑡𝑎2ta2italic_t italic_a 2 (along with other WS2𝑊𝑆2WS2italic_W italic_S 2 witness timestamps) which is written to R_informp𝑅_𝑖𝑛𝑓𝑜𝑟subscript𝑚𝑝R\_inform_{p*}italic_R _ italic_i italic_n italic_f italic_o italic_r italic_m start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT. If p𝑝pitalic_p is correct, it will not consider/input a𝑎aitalic_a’s WS1𝑊𝑆1WS1italic_W italic_S 1 witness timestamp ta1𝑡𝑎1ta1italic_t italic_a 1 as ta1<ta2𝑡𝑎1𝑡𝑎2ta1<ta2italic_t italic_a 1 < italic_t italic_a 2. Only up to t𝑡titalic_t Byzantine processes can process/input a𝑎aitalic_a’s WS1𝑊𝑆1WS1italic_W italic_S 1 witness timestamp ta1𝑡𝑎1ta1italic_t italic_a 1 after ta2𝑡𝑎2ta2italic_t italic_a 2. But as n>2t𝑛2𝑡n>2titalic_n > 2 italic_t, each correct or Byzantine process will fall short of the nt𝑛𝑡n-titalic_n - italic_t threshold required to form an Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t (of signed Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts). So IS1𝐼𝑆1IS1italic_I italic_S 1 and WS1𝑊𝑆1WS1italic_W italic_S 1 will not exist.

Thus if IS1𝐼𝑆1IS1italic_I italic_S 1 and IS2𝐼𝑆2IS2italic_I italic_S 2 form, all processes that provide input witness timestamps to both WS1𝑊𝑆1WS1italic_W italic_S 1 and WS2𝑊𝑆2WS2italic_W italic_S 2 provide first to WS1𝑊𝑆1WS1italic_W italic_S 1 and then to WS2𝑊𝑆2WS2italic_W italic_S 2 or all provide first to WS2𝑊𝑆2WS2italic_W italic_S 2 and then to WS1𝑊𝑆1WS1italic_W italic_S 1. Thus WS1∦WS2conditional𝑊𝑆1𝑊𝑆2WS1\not\|WS2italic_W italic_S 1 ∦ italic_W italic_S 2. ∎

Definition 20.

(Genuine Advance Property in the algorithm:) When WS1(=WS(IS1))WS2(=WS(IS2)WS1(=WS(IS1))\mapsto WS2(=WS(IS2)italic_W italic_S 1 ( = italic_W italic_S ( italic_I italic_S 1 ) ) ↦ italic_W italic_S 2 ( = italic_W italic_S ( italic_I italic_S 2 ), WS2𝑊𝑆2WS2italic_W italic_S 2 is a genuine advance over WS1𝑊𝑆1WS1italic_W italic_S 1 if there is at least one correct reader process i𝑖iitalic_i such that i𝑖iitalic_i’s WS1𝑊𝑆1WS1italic_W italic_S 1 witness timestamp <<< i𝑖iitalic_i’s WS2𝑊𝑆2WS2italic_W italic_S 2 witness timestamp.

Only value k,v𝑘𝑣\langle k,v\rangle⟨ italic_k , italic_v ⟩ corresponding to an Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t that is written to R_finalp𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝R\_final_{p*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT could be returned by a correct process if the signed Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts in that Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t pass the signature test. The Genuine Advance Property is useful because each new value returned by a correct reader is a new value genuinely written to at least one correct reader i𝑖iitalic_i’s R_initwi𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑖R\_init_{wi}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_i end_POSTSUBSCRIPT and not falsely reported by a Byzantine reader, in addition to that same value being the most recent value in a total of nt𝑛𝑡n-titalic_n - italic_t readers j𝑗jitalic_j’s R_initwj𝑅_𝑖𝑛𝑖subscript𝑡𝑤𝑗R\_init_{wj}italic_R _ italic_i italic_n italic_i italic_t start_POSTSUBSCRIPT italic_w italic_j end_POSTSUBSCRIPT registers as per k,u.T¯formulae-sequence𝑘𝑢¯𝑇\langle k,u\rangle.\overline{T}⟨ italic_k , italic_u ⟩ . over¯ start_ARG italic_T end_ARG. Another very important reason why this property is important is explained after Theorem 6. Definition 20 is the counterpart of Definition 9.

Theorem 5.

Algorithm 1 satisfies the Genuine Advance Property if n>3t𝑛3𝑡n>3titalic_n > 3 italic_t.

Proof.

If WS1(=WS(IS1))WS2(=WS(IS2))maps-toannotated𝑊𝑆1absent𝑊𝑆𝐼𝑆1annotated𝑊𝑆2absent𝑊𝑆𝐼𝑆2WS1(=WS(IS1))\mapsto WS2(=WS(IS2))italic_W italic_S 1 ( = italic_W italic_S ( italic_I italic_S 1 ) ) ↦ italic_W italic_S 2 ( = italic_W italic_S ( italic_I italic_S 2 ) ), then in order that the Genuine Advance Property holds, there is at least one correct reader process i𝑖iitalic_i such that i𝑖iitalic_i’s WS1𝑊𝑆1WS1italic_W italic_S 1 witness timestamp <<< i𝑖iitalic_i’s WS2𝑊𝑆2WS2italic_W italic_S 2 witness timestamp. For this to happen, we require that two quora of size n2t𝑛2𝑡n-2titalic_n - 2 italic_t, which is the minimum number of correct processes having T_witness𝑇_𝑤𝑖𝑡𝑛𝑒𝑠𝑠T\_witnessitalic_T _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s entries in WS1𝑊𝑆1WS1italic_W italic_S 1 and WS2𝑊𝑆2WS2italic_W italic_S 2, intersect among the set of correct processes (having size ntabsent𝑛𝑡\geq n-t≥ italic_n - italic_t). Thus,

2(n2t)>ntn>3t2𝑛2𝑡𝑛𝑡𝑛3𝑡2(n-2t)>n-t\Longrightarrow n>3t2 ( italic_n - 2 italic_t ) > italic_n - italic_t ⟹ italic_n > 3 italic_t

Only value k,v𝑘𝑣\langle k,v\rangle⟨ italic_k , italic_v ⟩ corresponding to an Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t that is written to R_finalp𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝R\_final_{p*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT could be returned by a correct process if the signed Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts in that Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t pass the signature test. From Theorem 4, all the k,v.T¯formulae-sequence𝑘𝑣¯𝑇\langle k,v\rangle.\overline{T}⟨ italic_k , italic_v ⟩ . over¯ start_ARG italic_T end_ARG form a total order based on maps-to\mapsto. This leads to the following corollary.

Corollary 1.

The partial vector timestamps k,u.T¯formulae-sequence𝑘𝑢¯𝑇\langle k,u\rangle.\overline{T}⟨ italic_k , italic_u ⟩ . over¯ start_ARG italic_T end_ARG of k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ values that stabilize are totally ordered.

Recall that the k,u.T¯formulae-sequence𝑘𝑢¯𝑇\langle k,u\rangle.\overline{T}⟨ italic_k , italic_u ⟩ . over¯ start_ARG italic_T end_ARG are partial vectors having ntabsent𝑛𝑡\geq n-t≥ italic_n - italic_t entries because not all n𝑛nitalic_n readers’ entries may be present in the Witness_Set𝑊𝑖𝑡𝑛𝑒𝑠𝑠_𝑆𝑒𝑡Witness\_Setitalic_W italic_i italic_t italic_n italic_e italic_s italic_s _ italic_S italic_e italic_ts of the Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t. Let those entries that are not reported have a timestamp value denoted perpendicular-to\perp in T¯¯𝑇\overline{T}over¯ start_ARG italic_T end_ARG.

Theorem 6.

The Monotonicity/Total Order of Vector Timestamps of Stabilized Writes Property (Definition 8) and the Genuine Advance Property (Definition 9) are satisfied by Algorithm 1, provided n>2t𝑛2𝑡n>2titalic_n > 2 italic_t and n>3t𝑛3𝑡n>3titalic_n > 3 italic_t, respectively.

Proof.

For every partial timestamp vector T¯¯𝑇\overline{T}over¯ start_ARG italic_T end_ARG of a value that stabilizes in the algorithm, we construct a full timestamp vector T𝑇Titalic_T as follows. Let T¯currentsubscript¯𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡\overline{T}_{current}over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT and Tcurrentsubscript𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡T_{current}italic_T start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT be the corresponding timestamps of the current value that has stabilized. Let T¯nextsubscript¯𝑇𝑛𝑒𝑥𝑡\overline{T}_{next}over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT be the smallest timestamp greater than T¯currentsubscript¯𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡\overline{T}_{current}over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT to stabilize and let Tnextsubscript𝑇𝑛𝑒𝑥𝑡T_{next}italic_T start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT denote the corresponding full vector timestamp we construct.

Initialize: T¯current,Tcurrent[0,0]subscript¯𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡subscript𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡00\overline{T}_{current},T_{current}\leftarrow[0,\ldots 0]over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT , italic_T start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT ← [ 0 , … 0 ]
loop:
      Identify T¯nextsubscript¯𝑇𝑛𝑒𝑥𝑡\overline{T}_{next}over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT
      // Invariant 1: T¯currentT¯nextmaps-tosubscript¯𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡subscript¯𝑇𝑛𝑒𝑥𝑡\overline{T}_{current}\mapsto\overline{T}_{next}over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT ↦ over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT
      i|T¯next[i]:Tnext[i]T¯next[i]\forall i\,|\,\overline{T}_{next}[i]\neq\perp:T_{next}[i]\leftarrow\overline{T% }_{next}[i]∀ italic_i | over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_i ] ≠ ⟂ : italic_T start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_i ] ← over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_i ]
      i|T¯next[i]=:Tnext[i]Tcurrent[i]\forall i\,|\,\overline{T}_{next}[i]=\perp:T_{next}[i]\leftarrow T_{current}[i]∀ italic_i | over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_i ] = ⟂ : italic_T start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_i ] ← italic_T start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT [ italic_i ]
      // Invariant 2: Tcurrent<Tnextsubscript𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡subscript𝑇𝑛𝑒𝑥𝑡T_{current}<T_{next}italic_T start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT < italic_T start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT
      TcurrentTnextsubscript𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡subscript𝑇𝑛𝑒𝑥𝑡T_{current}\leftarrow T_{next}italic_T start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT ← italic_T start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT, T¯currentT¯nextsubscript¯𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡subscript¯𝑇𝑛𝑒𝑥𝑡\overline{T}_{current}\leftarrow\overline{T}_{next}over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT ← over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT
endloop

Let 𝒯¯¯𝒯\overline{{\cal T}}over¯ start_ARG caligraphic_T end_ARG denote the (total order) set of k,u.T¯formulae-sequence𝑘𝑢¯𝑇\langle k,u\rangle.\overline{T}⟨ italic_k , italic_u ⟩ . over¯ start_ARG italic_T end_ARG partial vector timestamps for values k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ that have stabilized. Let 𝒯fsuperscript𝒯𝑓{\cal T}^{f}caligraphic_T start_POSTSUPERSCRIPT italic_f end_POSTSUPERSCRIPT denote the set of corresponding full vector timestamps.

Theorem 7.

(𝒯¯,)¯𝒯maps-to({\overline{\cal T}},\mapsto)( over¯ start_ARG caligraphic_T end_ARG , ↦ ) is isomorphic to (𝒯f,<)superscript𝒯𝑓({\cal T}^{f},<)( caligraphic_T start_POSTSUPERSCRIPT italic_f end_POSTSUPERSCRIPT , < ).

Proof.

With respect to Invariant 1,

  • let j𝑗jitalic_j be any index such that T¯current[j]<T¯next[j]subscript¯𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡delimited-[]𝑗subscript¯𝑇𝑛𝑒𝑥𝑡delimited-[]𝑗\overline{T}_{current}[j]<\overline{T}_{next}[j]over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT [ italic_j ] < over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_j ],

  • let k𝑘kitalic_k be any index such that T¯current[k]=T¯next[k]subscript¯𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡delimited-[]𝑘subscript¯𝑇𝑛𝑒𝑥𝑡delimited-[]𝑘perpendicular-to\overline{T}_{current}[k]=\overline{T}_{next}[k]\neq\perpover¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT [ italic_k ] = over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_k ] ≠ ⟂,

  • let l𝑙litalic_l be any index such that T¯current[l]=T¯next[l]=subscript¯𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡delimited-[]𝑙subscript¯𝑇𝑛𝑒𝑥𝑡delimited-[]𝑙perpendicular-to\overline{T}_{current}[l]=\overline{T}_{next}[l]=\perpover¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT [ italic_l ] = over¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_l ] = ⟂,

  • let a𝑎aitalic_a be any index such that T¯current[a]subscript¯𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡delimited-[]𝑎perpendicular-to\overline{T}_{current}[a]\neq\perpover¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT [ italic_a ] ≠ ⟂ and T¯next[a]=subscript¯𝑇𝑛𝑒𝑥𝑡delimited-[]𝑎perpendicular-to\overline{T}_{next}[a]=\perpover¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_a ] = ⟂,

  • let b𝑏bitalic_b be any index such that T¯current[b]=subscript¯𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡delimited-[]𝑏perpendicular-to\overline{T}_{current}[b]=\perpover¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT [ italic_b ] = ⟂ and T¯next[b]subscript¯𝑇𝑛𝑒𝑥𝑡delimited-[]𝑏perpendicular-to\overline{T}_{next}[b]\neq\perpover¯ start_ARG italic_T end_ARG start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_b ] ≠ ⟂.

Invariant 2 follows because of the following.

  • For all j𝑗jitalic_j, Tcurrent[j]<Tnext[j]subscript𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡delimited-[]𝑗subscript𝑇𝑛𝑒𝑥𝑡delimited-[]𝑗T_{current}[j]<T_{next}[j]italic_T start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT [ italic_j ] < italic_T start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_j ],

  • for all k𝑘kitalic_k, Tcurrent[k]=Tnext[k]subscript𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡delimited-[]𝑘subscript𝑇𝑛𝑒𝑥𝑡delimited-[]𝑘T_{current}[k]=T_{next}[k]italic_T start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT [ italic_k ] = italic_T start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_k ],

  • for all l𝑙litalic_l, Tcurrent[l]=Tnext[l]subscript𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡delimited-[]𝑙subscript𝑇𝑛𝑒𝑥𝑡delimited-[]𝑙T_{current}[l]=T_{next}[l]italic_T start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT [ italic_l ] = italic_T start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_l ],

  • for all a𝑎aitalic_a, Tcurrent[a]=Tnext[a]subscript𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡delimited-[]𝑎subscript𝑇𝑛𝑒𝑥𝑡delimited-[]𝑎T_{current}[a]=T_{next}[a]italic_T start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT [ italic_a ] = italic_T start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_a ],

  • for all b𝑏bitalic_b, Tcurrent[b]Tnext[b]subscript𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡delimited-[]𝑏subscript𝑇𝑛𝑒𝑥𝑡delimited-[]𝑏T_{current}[b]\leq T_{next}[b]italic_T start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT [ italic_b ] ≤ italic_T start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_b ].

From Invariant 1, there must exist at least one index j𝑗jitalic_j, or one index b𝑏bitalic_b such that Tcurrent[b]<Tnext[b]subscript𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡delimited-[]𝑏subscript𝑇𝑛𝑒𝑥𝑡delimited-[]𝑏T_{current}[b]<T_{next}[b]italic_T start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT [ italic_b ] < italic_T start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_b ]. Hence Tcurrent<Tnextsubscript𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡subscript𝑇𝑛𝑒𝑥𝑡T_{current}<T_{next}italic_T start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT < italic_T start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT and Invariant 2 holds.

In order to satisfy the Genuine Advance of Timestamps Property (Definition 9) for Tcurrent<Tnextsubscript𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡subscript𝑇𝑛𝑒𝑥𝑡T_{current}<T_{next}italic_T start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT < italic_T start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT, there must exist a correct process index j𝑗jitalic_j, or b𝑏bitalic_b satisfying Tcurrent[b]<Tnext[b]subscript𝑇𝑐𝑢𝑟𝑟𝑒𝑛𝑡delimited-[]𝑏subscript𝑇𝑛𝑒𝑥𝑡delimited-[]𝑏T_{current}[b]<T_{next}[b]italic_T start_POSTSUBSCRIPT italic_c italic_u italic_r italic_r italic_e italic_n italic_t end_POSTSUBSCRIPT [ italic_b ] < italic_T start_POSTSUBSCRIPT italic_n italic_e italic_x italic_t end_POSTSUBSCRIPT [ italic_b ], in the analysis above. This requires 2 quora of n2t𝑛2𝑡n-2titalic_n - 2 italic_t processes to intersect among the set of correct processes, requiring n>3t𝑛3𝑡n>3titalic_n > 3 italic_t as shown in the proof of Theorem 5.

The theorem follows from Invariants 1 and 2. ∎

As (𝒯¯,)¯𝒯maps-to(\overline{{\cal T}},\mapsto)( over¯ start_ARG caligraphic_T end_ARG , ↦ ) is a total order from the proof of Theorem 4, Theorem 7 implies that (𝒯f,<)superscript𝒯𝑓({\cal T}^{f},<)( caligraphic_T start_POSTSUPERSCRIPT italic_f end_POSTSUPERSCRIPT , < ) is also a total order. The Monotonocity/Total Order of Vector Timestamps of Stabilized Writes Property is thus satisfied, and requires n>2t𝑛2𝑡n>2titalic_n > 2 italic_t as Theorem 4 also requires it.

From the proof of Theorem 7, the Genuine Advance of Timestamps Property over (𝒯f,<)superscript𝒯𝑓({\cal T}^{f},<)( caligraphic_T start_POSTSUPERSCRIPT italic_f end_POSTSUPERSCRIPT , < ) is satisfied by the algorithm, provided n>3t𝑛3𝑡n>3titalic_n > 3 italic_t. ∎

Note that when 3tn>2t3𝑡𝑛2𝑡3t\geq n>2t3 italic_t ≥ italic_n > 2 italic_t, nt𝑛𝑡n-titalic_n - italic_t different values written to different correct readers’ R_init𝑅_𝑖𝑛𝑖𝑡R\_inititalic_R _ italic_i italic_n italic_i italic_t registers can be ordered/stabilized in any permutation by the Byzantine processes but in any given execution, only one permutation can occur. But as the Genuine Advance Property is not satisfied when n3t𝑛3𝑡n\leq 3titalic_n ≤ 3 italic_t as is this case, the Byzantine readers can cause any arbitrary sequence of unbounded length (with each member of the sequence being distinct from the one before it) of these nt𝑛𝑡n-titalic_n - italic_t different values to successively stabilize and be returned by correct readers. This is an unbounded sequence of fake writes that can be returned to reads. This is another reason why the Genuine Advance Property is important.

An Inform_Set𝐼𝑛𝑓𝑜𝑟𝑚_𝑆𝑒𝑡Inform\_Setitalic_I italic_n italic_f italic_o italic_r italic_m _ italic_S italic_e italic_t that is formed at any process p𝑝pitalic_p is written to R_finalp𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑝R\_final_{p*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_p ∗ end_POSTSUBSCRIPT and thus stabilizes, by Definition 16. We now have the following corollary to Theorems 4 and  5.

Corollary 2.

The set of all values that stabilize is totally ordered by maps-to\mapsto provided n>2t𝑛2𝑡n>2titalic_n > 2 italic_t (from Theorem 4). The Genuine Advance Property is satisfied provided n>3t𝑛3𝑡n>3titalic_n > 3 italic_t (from Theorem 5).

Theorem 8.

Algorithm 1 implements a linearizable SWMR register using SWSR registers, provided n>3t𝑛3𝑡n>3titalic_n > 3 italic_t.

Proof.

We show that the value returned by a read operation satisfies “reading a current value” and “no new-old inversions”.

  • Reading a current value: From the algorithm pseudo-code, a read R returns the value k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ such that k,u.T¯formulae-sequence𝑘𝑢¯𝑇\langle k,u\rangle.\overline{T}⟨ italic_k , italic_u ⟩ . over¯ start_ARG italic_T end_ARG is the latest value ordered by maps-to\mapsto that has stabilized, up until some point of time during R. By Theorem 3, such a value must have been written by a correct write operation or by a pseudo-correct write operation that has stabilized. From Theorem 1, a correct write always stabilizes before the write operation returns/completes. Therefore, k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ will be the value written by the most recent correct write operation that precedes R, or by a later write operation. The later write operation may be (i) a correct write operation that overlaps with R, or (ii) a pseudo-correct write operation that has stabilized (and which precedes or overlaps R). Thus a current value is read.

  • No “new-old” inversions: Let read R by i𝑖iitalic_i return k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ and let read R’ by j𝑗jitalic_j return k,usuperscript𝑘superscript𝑢\langle k^{\prime},u^{\prime}\rangle⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_u start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩, where R precedes R’. R will write k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ in R_finali𝑅_𝑓𝑖𝑛𝑎subscript𝑙𝑖R\_final_{i*}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT italic_i ∗ end_POSTSUBSCRIPT before returning. R’ will read from R_finalj𝑅_𝑓𝑖𝑛𝑎subscript𝑙absent𝑗R\_final_{*j}italic_R _ italic_f italic_i italic_n italic_a italic_l start_POSTSUBSCRIPT ∗ italic_j end_POSTSUBSCRIPT, add these elements to Z𝑍Zitalic_Z and invoke Find_Latest(Z)𝐹𝑖𝑛𝑑_𝐿𝑎𝑡𝑒𝑠𝑡𝑍Find\_Latest(Z)italic_F italic_i italic_n italic_d _ italic_L italic_a italic_t italic_e italic_s italic_t ( italic_Z ) which will return the most recent value k,umaxsuperscript𝑘𝑢𝑚𝑎𝑥\langle k,u\rangle^{max}⟨ italic_k , italic_u ⟩ start_POSTSUPERSCRIPT italic_m italic_a italic_x end_POSTSUPERSCRIPT as per maps-to\mapsto. It is guaranteed that if k,umaxk,usuperscript𝑘𝑢𝑚𝑎𝑥𝑘𝑢\langle k,u\rangle^{max}\neq\langle k,u\rangle⟨ italic_k , italic_u ⟩ start_POSTSUPERSCRIPT italic_m italic_a italic_x end_POSTSUPERSCRIPT ≠ ⟨ italic_k , italic_u ⟩ then k,u.T¯k,umax.T¯formulae-sequence𝑘𝑢maps-to¯𝑇superscript𝑘𝑢𝑚𝑎𝑥¯𝑇\langle k,u\rangle.\overline{T}\mapsto\langle k,u\rangle^{max}.\overline{T}⟨ italic_k , italic_u ⟩ . over¯ start_ARG italic_T end_ARG ↦ ⟨ italic_k , italic_u ⟩ start_POSTSUPERSCRIPT italic_m italic_a italic_x end_POSTSUPERSCRIPT . over¯ start_ARG italic_T end_ARG because all the values in Z𝑍Zitalic_Z are totally ordered by maps-to\mapsto (Theorem 4, Corollary 2) and from Definition 18, k,u.T¯k,umax.T¯formulae-sequence𝑘𝑢maps-to¯𝑇superscript𝑘𝑢𝑚𝑎𝑥¯𝑇\langle k,u\rangle.\overline{T}\mapsto\langle k,u\rangle^{max}.\overline{T}⟨ italic_k , italic_u ⟩ . over¯ start_ARG italic_T end_ARG ↦ ⟨ italic_k , italic_u ⟩ start_POSTSUPERSCRIPT italic_m italic_a italic_x end_POSTSUPERSCRIPT . over¯ start_ARG italic_T end_ARG implies that the write of k,umaxsuperscript𝑘𝑢𝑚𝑎𝑥\langle k,u\rangle^{max}⟨ italic_k , italic_u ⟩ start_POSTSUPERSCRIPT italic_m italic_a italic_x end_POSTSUPERSCRIPT had greater (or equal) witness timestamps than the write of k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ for the at least n2t𝑛2𝑡n-2titalic_n - 2 italic_t common processes that witnessed both writes. The value k,usuperscript𝑘superscript𝑢\langle k^{\prime},u^{\prime}\rangle⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_u start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩ returned by R’ is k,umaxsuperscript𝑘𝑢𝑚𝑎𝑥\langle k,u\rangle^{max}⟨ italic_k , italic_u ⟩ start_POSTSUPERSCRIPT italic_m italic_a italic_x end_POSTSUPERSCRIPT. Thus there are no inversions.

The Genuine Advance Property implicitly needed requires n>3t𝑛3𝑡n>3titalic_n > 3 italic_t (Theorem 5). ∎

Let correct reader i𝑖iitalic_i return k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩ to R(i,1) and return k,usuperscript𝑘superscript𝑢\langle k^{\prime},u^{\prime}\rangle⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_u start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩ to R(i,2), where R(i,1) precedes R(i,2). Let correct reader j𝑗jitalic_j return k,usuperscript𝑘superscript𝑢\langle k^{\prime},u^{\prime}\rangle⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_u start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩ to R(j,1) and let it then issue R(j,2), where R(j,1) precedes R(j,2). As the register is Byzantine linearizable (Theorem 8), from the values returned to i𝑖iitalic_i, we have k,u.T¯k,u.T¯formulae-sequence𝑘𝑢maps-to¯𝑇superscript𝑘superscript𝑢¯𝑇\langle k,u\rangle.\overline{T}\mapsto\langle k^{\prime},u^{\prime}\rangle.% \overline{T}⟨ italic_k , italic_u ⟩ . over¯ start_ARG italic_T end_ARG ↦ ⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_u start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩ . over¯ start_ARG italic_T end_ARG. If R(j,2) were to return k,u𝑘𝑢\langle k,u\rangle⟨ italic_k , italic_u ⟩, k,u.T¯k,u.T¯formulae-sequencesuperscript𝑘superscript𝑢maps-to¯𝑇𝑘𝑢¯𝑇\langle k^{\prime},u^{\prime}\rangle.\overline{T}\mapsto\langle k,u\rangle.% \overline{T}⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_u start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩ . over¯ start_ARG italic_T end_ARG ↦ ⟨ italic_k , italic_u ⟩ . over¯ start_ARG italic_T end_ARG which leads to a contradiction. Hence R(j,2) must return k,usuperscript𝑘superscript𝑢\langle k^{\prime},u^{\prime}\rangle⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_u start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩ or a value with a higher timestamp vector T¯¯𝑇\overline{T}over¯ start_ARG italic_T end_ARG. Thus, the Total Ordering Property cannot be violated by the algorithm. This logic along with Theorem 5 about the Genuine Advance Property, implicitly needed for linearization, gives the following corollary.

Corollary 3.

The Total Ordering property (Definition 12) of values returned by correct readers is satisfied, provided n>3t𝑛3𝑡n>3titalic_n > 3 italic_t.

As stated in Section 2, a SWMR register supports Byzantine linearizable executions because before every read operation of a correct process, one can add a corresponding Byzantine write in the linearization [4]. Next, we elaborate on this to give a linearization of an execution to show that the SWMR Byzantine linearizable register we constructed supports Byzantine linearizability of executions. First, read operations of correct readers are linearized in the order of the return values, as per the maps-to\mapsto relation. Then an update of a value k,v𝑘𝑣\langle k,v\rangle⟨ italic_k , italic_v ⟩ by the Byzantine writer is added just before the first read operation that reads that value. In general, the value returned by a read operation is based on the values written by one or more than one HLI write operation as the writer is Byzantine. Further, one HLI write operation by the Byzantine writer may result in different read values being returned by multiple correct readers. To differentiate among the multiple updates of different values over time to the SWMR register, we treat each update, which has stabilized, as an independent Byzantine (correct or pseudo-correct) write operation, associated with its vector timestamp.

Theorem 9.

The SWMR Byzantine linearizable register implemented by Algorithm 1 satisfies Byzantine linearizability of executions.

Proof.

Let LRsubscript𝐿𝑅L_{R}italic_L start_POSTSUBSCRIPT italic_R end_POSTSUBSCRIPT be a linearization of the correct readers’ read operations such that (i) the local order of reads at each such reader is preserved, and (ii) if read R returns k,v𝑘𝑣\langle k,v\rangle⟨ italic_k , italic_v ⟩, read R’ returns k,vsuperscript𝑘superscript𝑣\langle k^{\prime},v^{\prime}\rangle⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩, and k,v.T¯formulae-sequence𝑘𝑣¯𝑇\langle k,v\rangle.\overline{T}⟨ italic_k , italic_v ⟩ . over¯ start_ARG italic_T end_ARG maps-to\mapsto k,v.T¯formulae-sequencesuperscript𝑘superscript𝑣¯𝑇\langle k^{\prime},v^{\prime}\rangle.\overline{T}⟨ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_v start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ⟩ . over¯ start_ARG italic_T end_ARG then R precedes R’ in LRsubscript𝐿𝑅L_{R}italic_L start_POSTSUBSCRIPT italic_R end_POSTSUBSCRIPT.

When k,v𝑘𝑣\langle k,v\rangle⟨ italic_k , italic_v ⟩ is returned by a read, the latest write operation to which any of the witness timestamps in k,v.T¯formulae-sequence𝑘𝑣¯𝑇\langle k,v\rangle.\overline{T}⟨ italic_k , italic_v ⟩ . over¯ start_ARG italic_T end_ARG belongs is denoted as latest_W(𝚁)𝑙𝑎𝑡𝑒𝑠𝑡_𝑊𝚁latest\_W({\tt R})italic_l italic_a italic_t italic_e italic_s italic_t _ italic_W ( typewriter_R ). In the linearization LRsubscript𝐿𝑅L_{R}italic_L start_POSTSUBSCRIPT italic_R end_POSTSUBSCRIPT, place a (Byzantine) write operation writing a value k,v𝑘𝑣\langle k,v\rangle⟨ italic_k , italic_v ⟩ and assigned timestamp k,v.T¯formulae-sequence𝑘𝑣¯𝑇\langle k,v\rangle.\overline{T}⟨ italic_k , italic_v ⟩ . over¯ start_ARG italic_T end_ARG immediately before the first read operation R in LRsubscript𝐿𝑅L_{R}italic_L start_POSTSUBSCRIPT italic_R end_POSTSUBSCRIPT that reads k,v𝑘𝑣\langle k,v\rangle⟨ italic_k , italic_v ⟩ – this is one of the possibly multiple Byzantine write operations corresponding to the write operation latest_W(𝚁)𝑙𝑎𝑡𝑒𝑠𝑡_𝑊𝚁latest\_W({\tt R})italic_l italic_a italic_t italic_e italic_s italic_t _ italic_W ( typewriter_R ).

The resulting linearization is seen to be a Byzantine linearization that considers all the read operations of correct readers, and includes some Byzantine write operations. In the extreme case, before every correct read operation in LRsubscript𝐿𝑅L_{R}italic_L start_POSTSUBSCRIPT italic_R end_POSTSUBSCRIPT, we add a corresponding Byzantine write operation. ∎

Additionally, the algorithm satisfies Monotonicity/Total Order of Stabilized Vector Timestamps (Def. 8 & Theorem 6, n>2t𝑛2𝑡n>2titalic_n > 2 italic_t), Genuine Advance of Timestamps (Def. 9 & Theorem 6, n>3t𝑛3𝑡n>3titalic_n > 3 italic_t), View Consistency (Def. 11 & Lemma 1, n>2t𝑛2𝑡n>2titalic_n > 2 italic_t), Total Ordering (Def. 12 & Corollary 3, n>3t𝑛3𝑡n>3titalic_n > 3 italic_t).

Space Complexity

The algorithm uses 3n23superscript𝑛23n^{2}3 italic_n start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT shared SWSR registers: n2superscript𝑛2n^{2}italic_n start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT R_witness𝑅_𝑤𝑖𝑡𝑛𝑒𝑠𝑠R\_witnessitalic_R _ italic_w italic_i italic_t italic_n italic_e italic_s italic_s registers of size O(1)𝑂1O(1)italic_O ( 1 ), n2superscript𝑛2n^{2}italic_n start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT R_inform𝑅_𝑖𝑛𝑓𝑜𝑟𝑚R\_informitalic_R _ italic_i italic_n italic_f italic_o italic_r italic_m registers of size O(n)𝑂𝑛O(n)italic_O ( italic_n ), n2superscript𝑛2n^{2}italic_n start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT R_final𝑅_𝑓𝑖𝑛𝑎𝑙R\_finalitalic_R _ italic_f italic_i italic_n italic_a italic_l registers of size O(n2)𝑂superscript𝑛2O(n^{2})italic_O ( italic_n start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ). It also uses 2n22superscript𝑛22n^{2}2 italic_n start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT shared SWSR registers: n𝑛nitalic_n R_init𝑅_𝑖𝑛𝑖𝑡R\_inititalic_R _ italic_i italic_n italic_i italic_t registers of size O(1)𝑂1O(1)italic_O ( 1 ), and n𝑛nitalic_n R_ack𝑅_𝑎𝑐𝑘R\_ackitalic_R _ italic_a italic_c italic_k registers of size O(1)𝑂1O(1)italic_O ( 1 ).

The local space at each reader process can be seen to be O(n2)𝑂superscript𝑛2O(n^{2})italic_O ( italic_n start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ).

6 Conclusions

This paper studied Byzantine tolerant construction of a SWMR atomic register from SWSR atomic registers. It is the first to propose a definition of Byzantine register linearizability by non-trivially taking into account Byzantine behavior of the writer and readers, and by overcoming the drawbacks of the definition used by previous works. We introduced the concept of a correct write operation by a Byzantine writer. We also introduced the notion of a pseudo-correct write operation by a Byzantine writer, which has the effect of a correct write operation. Only correct and pseudo-correct writes may be returned by correct readers. The correct and pseudo-correct writes are totally ordered by their linearization points and this order is the total order in logical time in which the writes were performed. We then gave an algorithm to construct a Byzantine tolerant SWMR atomic register from SWSR atomic registers that meets our definition of Byzantine register linearizability.

References

  • [1] Marcos K. Aguilera, Naama Ben-David, Rachid Guerraoui, Virendra J. Marathe, and Igor Zablotchi. The impact of RDMA on agreement. In Peter Robinson and Faith Ellen, editors, Proceedings of the 2019 ACM Symposium on Principles of Distributed Computing, PODC 2019, Toronto, ON, Canada, July 29 - August 2, 2019, pages 409–418. ACM, 2019.
  • [2] Hagit Attiya, Amotz Bar-Noy, and Danny Dolev. Sharing memory robustly in message-passing systems. J. ACM, 42(1):124–142, 1995.
  • [3] James E. Burns and Gary L. Peterson. Constructing multi-reader atomic values from non-atomic values. In Fred B. Schneider, editor, Proceedings of the Sixth Annual ACM Symposium on Principles of Distributed Computing, Vancouver, British Columbia, Canada, August 10-12, 1987, pages 222–231. ACM, 1987.
  • [4] Shir Cohen and Idit Keidar. Tame the wild with byzantine linearizability: Reliable broadcast, snapshots, and asset transfer. In Seth Gilbert, editor, 35th International Symposium on Distributed Computing, DISC 2021, October 4-8, 2021, Freiburg, Germany (Virtual Conference), volume 209 of LIPIcs, pages 18:1–18:18. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021.
  • [5] Sibsankar Haldar and K. Vidyasankar. Constructing 1-writer multireader multivalued atomic variable from regular variables. J. ACM, 42(1):186–203, 1995.
  • [6] Maurice Herlihy. Wait-free synchronization. ACM Trans. Program. Lang. Syst., 13(1):124–149, 1991.
  • [7] Maurice Herlihy and Nir Shavit. The Art of Multiprocessor Programming. Morgan-Kaufmann, 2008.
  • [8] Maurice Herlihy and Jeannette M. Wing. Linearizability: A correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst., 12(3):463–492, 1990.
  • [9] Xing Hu and Sam Toueg. On implementing SWMR registers from SWSR registers in systems with byzantine failures. In Christian Scheideler, editor, 36th International Symposium on Distributed Computing, DISC 2022, October 25-27, 2022, Augusta, Georgia, USA, volume 246 of LIPIcs, pages 36:1–36:19. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2022.
  • [10] Damien Imbs, Sergio Rajsbaum, Michel Raynal, and Julien Stainer. Read/write shared memory abstraction on top of asynchronous byzantine message-passing systems. J. Parallel Distributed Comput., 93-94:1–9, 2016.
  • [11] Amos Israeli and Amnon Shaham. Optimal multi-writer multi-reader atomic register. In Norman C. Hutchinson, editor, Proceedings of the Eleventh Annual ACM Symposium on Principles of Distributed Computing, Vancouver, British Columbia, Canada, August 10-12, 1992, pages 71–82. ACM, 1992.
  • [12] Leslie Lamport. On interprocess communication. part I: basic formalism. Distributed Comput., 1(2):77–85, 1986.
  • [13] Leslie Lamport. On interprocess communication. part II: algorithms. Distributed Comput., 1(2):86–101, 1986.
  • [14] Dahlia Malkhi and Michael K. Reiter. Secure and scalable replication in phalanx. In The Seventeenth Symposium on Reliable Distributed Systems, SRDS 1998, West Lafayette, Indiana, USA, October 20-22, 1998, Proceedings, pages 51–58. IEEE Computer Society, 1998.
  • [15] Friedemann Mattern. Virtual time and global states of distributed systems. In Parallel and Distributed Algorithms, pages 215–226. North-Holland, 1988.
  • [16] Achour Mostéfaoui, Matoula Petrolia, Michel Raynal, and Claude Jard. Atomic read/write memory in signature-free byzantine asynchronous message-passing systems. Theory Comput. Syst., 60(4):677–694, 2017.
  • [17] Richard E. Newman-Wolfe. A protocol for wait-free, atomic, multi-reader shared variables. In Fred B. Schneider, editor, Proceedings of the Sixth Annual ACM Symposium on Principles of Distributed Computing, Vancouver, British Columbia, Canada, August 10-12, 1987, pages 232–248. ACM, 1987.
  • [18] Gary L. Peterson. Concurrent reading while writing. ACM Trans. Program. Lang. Syst., 5(1):46–55, 1983.
  • [19] Gary L. Peterson and James E. Burns. Concurrent reading while writing II: the multi-writer case. In 28th Annual Symposium on Foundations of Computer Science, Los Angeles, California, USA, 27-29 October 1987, pages 383–392. IEEE Computer Society, 1987.
  • [20] Michel Raynal and Mukesh Singhal. Logical time: Capturing causality in distributed systems. Computer, 29(2):49–56, 1996.
  • [21] Ambuj K. Singh, James H. Anderson, and Mohamed G. Gouda. The elusive atomic register revisited. In Fred B. Schneider, editor, Proceedings of the Sixth Annual ACM Symposium on Principles of Distributed Computing, Vancouver, British Columbia, Canada, August 10-12, 1987, pages 206–221. ACM, 1987.
  • [22] K. Vidyasankar. Converting lamport’s regular register to atomic register. Inf. Process. Lett., 28(6):287–290, 1988.
  • [23] K. Vidyasankar. A very simple construction of 1-writer multireader multivalued atomic variable. Inf. Process. Lett., 37(6):323–326, 1991.
  • [24] Paul M. B. Vitányi and Baruch Awerbuch. Atomic shared register access by asynchronous hardware (detailed abstract). In 27th Annual Symposium on Foundations of Computer Science, Toronto, Canada, 27-29 October 1986, pages 233–243. IEEE Computer Society, 1986.