Abstract 1 Introduction 2 Deterministic Download in the Asynchronous Model with Crash Faults 3 Download in the Asynchronous Model with Byzantine Faults 4 Application: Efficient Blockchain Oracles References

Distributed Download from an External Data Source in Asynchronous Faulty Settings

John Augustine ORCID Indian Institute of Technology Madras, Chennai, India Soumyottam Chatterjee ORCID CISPA – Helmholtz Center for Information Security, Saarbrücken, Germany Valerie King ORCID University of Victoria, Canada Manish Kumar ORCID Indian Institute of Technology Madras, Chennai, India Shachar Meir ORCID Weizmann Institute of Science, Rehovot, Israel David Peleg ORCID Weizmann Institute of Science, Rehovot, Israel
Abstract

The distributed Data Retrieval (DR) model consists of k peers connected by a complete peer-to-peer communication network, and a trusted external data source that stores an array X of n bits (nk). Up to βk of the peers might fail in any execution (for β[0,1)). Peers can obtain the information either by inexpensive messages passed among themselves or through expensive queries to the source array X. In the DR model, we focus on designing protocols that minimize the number of queries performed by any nonfaulty peer (a measure referred to as the query complexity) while maximizing the resiliency parameter β.

The Download problem requires each nonfaulty peer to correctly learn the entire array X. Earlier work on this problem focused on synchronous communication networks and established several deterministic and randomized upper and lower bounds. Our work is the first to extend the study of distributed data retrieval to asynchronous communication networks. We address the Download problem under both the Byzantine and crash failure models. We present query-optimal deterministic solutions in an asynchronous model that can tolerate any fixed fraction β<1 of crash faults. In the Byzantine failure model, it is known that deterministic protocols incur a query complexity of Ω(n) per peer, even under synchrony. We extend this lower bound to randomized protocols in the asynchronous model for β1/2, and further show that for β<1/2, a randomized protocol exists with near-optimal query complexity.

Keywords and phrases:
Byzantine Fault Tolerance, Blockchain Oracle, Data Retrieval Model, Distributed Download, asynchrony
Funding:
John Augustine: Supported by the Centre for Cybersecurity, Trust and Reliability (CyStar) Centre, IIT Madras.
Soumyottam Chatterjee: Work done while at IIT Madras supported by CyStar.
Manish Kumar: Supported by CyStar, IIT Madras.
David Peleg: Venky Harinarayanan and Anand Rajaraman Visiting Chair Professor. The funds from this professorship enabled exchange visits between IIT Madras, India, and the Weizmann Institute of Science, Israel.
Copyright and License:
[Uncaptioned image] © John Augustine, Soumyottam Chatterjee, Valerie King, Manish Kumar, Shachar Meir, and
David Peleg; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Distributed algorithms
Related Version:
Full Version: https://arxiv.org/abs/2509.03755 [4]
Editors:
Andrei Arusoaie, Emanuel Onica, Michael Spear, and Sara Tucci-Piergiovanni

1 Introduction

1.1 Background and motivation

The Data Retrieval Model (DR) was first introduced in [3] to abstract the fundamental process of a group learning from a reliable external data source, where the data source is too large or it is too expensive to be learned individually (i.e., requires members of the group to collaborate), and some members of the group might crash during execution or act in other ways to deliberately sabotage the learning process. One key example of systems where this process takes place is blockchain oracles [12, 16]. We address this Oracle data delivery process in detail later and present a method for improving its performance using the DR model and the protocols designed in this work.

The DR model contains two entities: (i) a peer-to-peer network and (ii) an external data source in the form of an n bit array X. There are k peers, up to β fraction of which may be faulty (and at least γ=1β fraction of which are nonfaulty). Each peer has access to the content of the array through queries. The general class of retrieval problems consists of problems Retrieve(f) requiring every peer to output f(X) for some computable function f of the input array X. In this work, we focus on the most fundamental retrieval problem, Retrieve(fid) where fid(X)=X, referred to hereafter as the Download problem111It is fundamental since every retrieval problem Retrieve(f) can be solved by first performing download and then locally computing f(X)., where every peer needs to learn the entire input X.

In the absence of failures, the problem can be easily solved in a query-balanced manner. Even with failures, the problem can be trivially solved at the cost of a large number of queries, as the non-faulty peers can directly query all the bits. This solution is prohibitively expensive; thus, we focus on minimizing the number of queries made by each non-faulty peer. For synchronous systems with Byzantine faults, a lower bound of Ω(βn) on query complexity for deterministic Download is shown in [3] for every β<1, followed by a matching upper bound when β<1/2. This implies that in the presence of Byzantine faults, one cannot attain the ideal query complexity of nγk without using randomization.

In this work, we consider Download protocols in the asynchronous setting for both the crash and Byzantine fault models. In the asynchronous Byzantine fault setting, we prove that, unlike the synchronous setting, where randomization can overcome the deterministic lower bound, Ω(n) queries per peer are required when β1/2, even for randomized protocols. We complement this lower bound with a protocol for the β<1/2 regime that achieves a query complexity of O~(n(γβ)k), which, for a constant γβ , is within log factors of the generic lower bound of Ω(n/γk).

Turning to the more benign setting of crash faults (i.e., where all peers are honest but some β fraction may stop functioning), the picture is brighter. For this model, it turns out that even in the asynchronous setting, one can get efficient deterministic Download protocols that achieve the optimal query complexity of O(nγk), for any fraction β<1 of crashes.

1.2 The Model

In the Data Retrieval (DR) model, the system consists of two components. The first is a collection of k peers, each equipped with a unique ID from the range [1,k], connected by a complete communication network (or clique). The network provides peer-to-peer message passing, namely, every peer can send at time t a (possibly different) message of size at most ϕ bits to each other peer.

The second component of the DR model is an external data source. The source stores an n-bit input array X={b1,,bn}. It provides the peers with read-only access, allowing each peer to retrieve the data through queries of the form Query(i), for 1in. The answer returned by the source would then be bi, the ith element in the array. This type of communication is referred to as source-to-peer communication.

We consider asynchronous communication, where any communication (both among peer-to-peer and source-to-peer) can be delayed by any finite amount of time. For randomized protocols, we use the following notion of cycles.

Cycles.

In the asynchronous model, there is no global notion of rounds, as each peer operates at a different pace. Nevertheless, to describe our protocols and analyze their performance, it is convenient to divide the local execution of each peer μ into (varying time) cycles. Each such local cycle consists of the following stages.

  • Sending (0 or more) queries and getting answers.

  • Sending (0 or more) messages.

  • Waiting to receive messages.

We assume that local computation takes 0 time and can be performed at any point in a cycle. Moreover, when waiting for messages, after every message is received, the peer can adaptively decide whether to keep waiting for an additional message or continue to the next cycle. Note that the local cycle r of peer μ might coincide with a different local cycle r of another peer μ.

In the absence of global time units, it is convenient to break the time axis into “virtual blocks” by defining tr, for integer r1, as the first time any peer started its local cycle r.

Every message is of size at most ϕ bits, where ϕ is a system parameter. Note that throughout the paper, we either set ϕ to a specific value or leave it as a parameter, in which case increasing the message size parameter ϕ would result in faster protocols.

The adversary.

Our analysis uses the notion of an adversary, representing the adverse conditions in which the system operates, including the asynchronous communication and the possibility of failures.

The adversary has two types of operations. First, it can fail up to βk peers, under the restriction that it can only fail a peer between its cycles (or before the first cycle), meaning that a peer can make random decisions in its current cycle without the adversary being able to react until the end of the cycle. Second, it can set the time tμ,μr it takes a message sent by peer μ in its local cycle r to reach peer μ, under the restriction that it must set the time tμ,μr for every pair of peers μ,μ, before time tr. In other words, the adversary must set the latency of each message sent during a cycle r before any peer starts cycle r. The adversary can also decide when every peer starts its execution (i.e., we do not assume a simultaneous start). Note that in the case of deterministic protocols, the notion of cycles is irrelevant, and we consider a standard adversary that can fail a peer at any point of the execution and can delay messages for any finite amount of time.

The adversary 𝒜 selects the input data and determines the failure pattern of the peers. In the crash failure model, the adversary’s power is limited to crashing some of the peers in every execution of the protocol. Once a peer crashes, it stops its local execution of the protocol arbitrarily and permanently. This could happen in the middle of operation, e.g., after the peer has already sent some, but perhaps not all, of the messages it was instructed by the protocol to send out at a given point in time. In contrast, in the Byzantine failure model, a failed peer can deviate from the protocol in arbitrary ways. We assume that the adversary can fail at most βk peers, for some given222We do not assume β to be a fixed constant (unless mentioned otherwise). β[0,1). We let γ=1β, so there is (at least) a γ fraction of nonfaulty peers in every execution. Denote the set of faulty (respectively, nonfaulty) peers in the execution by . (resp., ).

We assume that the adversary knows the protocol and hence can simulate it (up to random coins).

We concentrate on the following complexity measures.

Query Complexity (𝒬):

the maximum number of bits queried by a nonfaulty peer during the execution.

Time Complexity (𝒯):

the time it takes for the protocol to terminate.

Message Complexity ():

the total number of messages sent by nonfaulty peers during the execution.

We assume that queries to the source are the more expensive component in the system, so we focus mainly on optimizing the query complexity 𝒬. Measuring the maximum cost per peer (rather than the total cost) gives priority to a balanced load of queries over the nonfaulty peers.

Let us now formally define the Download problem. Consider a DR network with k peers, where at most βk can be faulty, and a source that stores a bit array X=[b1,,bn]. Each peer is required to learn X. Formally, each nonfaulty peer μ outputs a bit array resμ, and it is required that, upon termination, resμ[i]=bi for every i{1,,n} and μ.

In the absence of failures, this problem can be solved by sharing the task of querying all n bits evenly among the k peers, yielding 𝒬=Θ(n/k). The message complexity is =O~(nk), assuming small messages of size O~(1), and the time complexity is 𝒯=O~(n/k) since Ω(n/k) bits need to be sent along each communication link when the workload is shared.

1.3 Related Work

The vast literature on fault-tolerant distributed computing includes extensive work on both crash faults and Byzantine faults. A foundational result by Fischer, Lynch, and Paterson (FLP)[20] demonstrated that in asynchronous networks, even a single crash fault renders many fundamental problems – such as consensus and reliable broadcast – impossible to solve deterministically. Specifically, they showed that the adversary can indefinitely delay progress, violating the termination property. To circumvent this impossibility, many subsequent works in asynchronous settings have adopted randomized techniques[7, 22] or relaxed the termination requirement [9].

Given the practical relevance of the asynchronous model, it has been widely adopted for studying fault-tolerant protocols under crash faults [19, 24, 17, 6] and Byzantine faults [1, 8, 10, 13, 14, 15, 18, 21, 23, 28]. Fundamental problems such as agreement and reliable broadcast have often served as building blocks in distributed protocol design, typically assuming that all input data is already locally available to the peers.

In contrast, our work addresses the Data Retrieval (DR) model, where each peer must actively fetch data from a trusted external source and disseminate it to the rest of the peers while minimizing the cost associated with querying the source. We focus on the Download problem, which requires every nonfaulty peer to correctly learn the entire data. Unlike classical problems, we show that Download – despite requiring termination – can be solved deterministically in asynchronous networks. This highlights that employing reliable broadcast or agreement as foundational components is not necessary to solve the Download problem. Moreover, this can be done with optimal query complexity for any fraction β<1 of crash-faults. In the more adversarial Byzantine setting, we also design randomized protocols that solve the problem even when a majority of the peers are Byzantine.

To the best of our knowledge, this work is the first to study retrieval problems in the Data Retrieval (DR) model under asynchronous communication. The DR model has previously been explored in synchronous networks, most notably in [3, 5]. In particular,[3] introduced the Download problem, motivated by practical applications such as Distributed Oracle Networks (DONs), which form a crucial component of blockchain systems and employ protocols like OCR and DORA[12, 16].

The primary focus of [3] was on minimizing query complexity in the presence of Byzantine faults in synchronous settings. They proved that any deterministic protocol must incur a query complexity of at least 𝒬=Ω(βn) and matched this with an upper bound when β<1/2. On the randomized front, they proposed two protocols. The first tolerates any constant fraction β<1 of Byzantine faults but has suboptimal query complexity, achieving 𝒬=O(nγk+n) with high probability. The second protocol improves upon this by achieving near-optimal query complexity O~(nγk)333We use the O~() notation to hide β factors and polylogarithmic terms in n and k. with high probability, but it can only tolerate up to a β<1/3 fraction of Byzantine faults.

The paper [5] builds upon the foundational work in [3] by closing several gaps in the randomized setting. It presents a randomized Download protocol with query complexity 𝒬=O(nγk), time complexity 𝒯=O(nlogk), and message complexity =O(nk2) for any Byzantine-fault fraction β[0,1). Additionally, it establishes a lower bound showing that in any single-round randomized protocol, each peer must essentially query the entire input, indicating the inherent limitations of extremely fast protocols.

Moving to two-round protocols, [5] proposes a randomized solution that achieves query complexity 𝒬=O(nγk+n) with high probability, improving upon the time complexity of [3] under the same fault threshold β<1. Notably, this protocol operates under a stronger adversarial model – referred to as Dynamic Byzantine – in which the set of Byzantine peers may change from one round to another. Under this dynamic fault model, the authors further develop a protocol that achieves expected query complexity O~(nγk) (within logarithmic factors), at the expense of a higher time complexity of O(logk).

In contrast to prior work, this paper explores the Download problem in asynchronous networks, under both crash and Byzantine faults. Our results are summarized in the next section; a concise comparison to prior synchronous protocols is provided in Table 1.

Table 1: An overview of our results with prior closely related work.
Synchrony Query Fault Model Resilience Type Reference
Prior Work
Synchronous O~(nγk) Byzantine β<13 Randomized [3]
Synchronous O~(nγk+n) Byzantine β<1 Randomized [3]
Synchronous O~(nγk) Byzantine β<1 Randomized [5]
This Paper
Asynchronous Θ(nγk) Crash β<1 Deterministic Thm 8
Asynchronous Ω(n) Byzantine β1/2 Randomized Thm 10
Asynchronous O~(n(γβ)k) Byzantine β<1/2 Randomized Thm 12

1.4 Contributions

We present the Download problem in asynchronous communication networks, under both crash and Byzantine failures settings. In the crash-fault setting, our deterministic results are optimal w.r.t. to the resilience (for any β<1) and query complexity. Notice that this optimality also holds for randomized algorithms. In the Byzantine failure setting, we provide deterministic and randomized lower bounds as well as upper bounds. The main results are:

  1. (1)

    Deterministic Download in Crash-Fault: We present a deterministic protocol for solving Download problem in the asynchronous setting with at most f<k crash faults (γ=1f/k) with 𝒬=Θ(nγk), 𝒯=O(nϕ+logk/f(ϕ)) and =O(nk2) where ϕ is the message size. Our result achieves the optimal query complexity for any fraction of crash fault, β<1.

  2. (2)

    Deterministic Lower Bound in Byzantine Fault: We show that for β1/2, every deterministic asynchronous Download protocol that is resilient to Byzantine faults requires 𝒬=n.

  3. (3)

    Deterministic Download in Byzantine Fault: We show that for β<1/2, there exists a deterministic asynchronous protocol that solves Download with Q=O(βn), 𝒯=O(βnϕ) and =O(fn).

  4. (4)

    Randomized Lower Bound in Byzantine Fault: We show that for any randomized asynchronous Download protocol where β1/2, there does not exist any execution in which every peer queries less than or equal n/2 bits.

  5. (5)

    2-cycle Randomized Download in Byzantine Fault: We present a 2-cycle asynchronous randomized protocol for Download with 𝒬=O(nγβ+nlogn(γβ)k) and =O(k2) where β1/2, and the message size is ϕ=O(nγk).

  6. (6)

    Randomized Download in Byzantine Fault: We present a O(log(γklnn))-cycle protocol that computes Download whp in the point-to-point model having expected query complexity 𝒬=O(nlogn(γβ)k) and =O(log(γklnn)k2) where β1/2, and the message size is ϕ=O(n).

2 Deterministic Download in the Asynchronous Model with Crash Faults

In this section, we present deterministic protocols that solve the Download problem in an asynchronous setting. In the full version of the paper, we show a deterministic protocol that handles a single crash failure. In the current version, we only present an extended solution that tolerates f crashes for f>1, in section 2.1.

2.1 Tolerating any Number 𝒇<𝒌 of Crashes

In this subsection, we present a protocol that can tolerate up to f crashes for any f<k (for a more basic algorithm for the case of f=1 see [4]). The main difficulty in achieving tolerance with up to f crashes is that in the presence of asynchrony, one cannot distinguish between a slow peer and a crashed peer, making it difficult to coordinate.

Algorithm 1 executes in phases, each consisting of three stages. Each peer μ stores the following local variables. (We omit the superscript μ when it is clear from the context.)

  • phase(μ): μ’s current phase.

  • stage(μ): μ’s current stage within the phase.

  • Hpμ: the correct set of μ for phase p, i.e., the set of peers μ heard from during phase p.

  • σpμ: the assignment function of μ for phase p, which assigns the responsibility for querying each bit i to some peer μ.

  • resμ: the output array.

In the first stage of phase p, each peer μ queries bits according to its local assignment σp and sends a 𝚙𝚑𝚊𝚜𝚎p𝚜𝚝𝚊𝚐𝚎 1 request (asking for bit values according to σp, namely {iσp(i)=μ}) to every other peer μ and then continues to stage 2. Upon receiving a 𝚙𝚑𝚊𝚜𝚎p𝚜𝚝𝚊𝚐𝚎 1 request, μ waits until it is at least in stage 2 of phase p and returns the requested bit values that it knows.

In stage 2 of phase p, μ waits until it hears from at least |Hpμ|kf peers (again, waiting for the remaining f peers risks deadlock). Then, it sends a 𝚙𝚑𝚊𝚜𝚎p𝚜𝚝𝚊𝚐𝚎 2 request containing the set of peers’ IDs Fpμ={1,,k}Hpμ (namely, all the peers it didn’t hear from during phase p) and continues to stage 3. Upon receiving a 𝚙𝚑𝚊𝚜𝚎p𝚜𝚝𝚊𝚐𝚎 2 request, μ waits until it is at least in stage 3 of phase p, and replies to every peer μ as follows. For every jFpμ, it sends μj’s bits if jHpμ and “me neither” otherwise.

In stage 3 of phase p, μ waits for kf 𝚙𝚑𝚊𝚜𝚎p𝚜𝚝𝚊𝚐𝚎 2 responses. Then, for every jFpμ, if it received only “me neither” messages, it reassigns μj’s bits evenly between peers 1,,k. Otherwise, it updates res in the appropriate indices. Finally, it continues to stage 1 of phase p+1. Upon receiving a 𝚙𝚑𝚊𝚜𝚎p𝚜𝚝𝚊𝚐𝚎i response, μ updates res in the appropriate index and updates Hp for every bit value in the message. The pseudocode is provided in Algorithm 1.

Before diving into the analysis, we overview the following intuitive flow of the protocol’s execution. At the beginning of phase 1, the assignment function σ1 is the same for every peer. Every peer is assigned n/k bits, which it queries and sends to every other peer. Every peer μ hears from at least kf peers, meaning that it has at most fn/k unknown bits after phase 1. In the following phases, every peer μ reassigns its unknown bits uniformly among all the peers, such that the bits assigned to every peer μ are either known to it from a previous phase or μ is about to query them in the current phase (i.e., μ assigned itself the same bits). Hence, after every phase, the number of unknown bits diminishes by a factor of f/k. After sufficiently many phases, the number of unknown bits will be small enough to be directly queried by every peer.

Protocol 1 Async Download version 2 for peer μ.

We start the analysis by showing some properties of the relations between local variables.

Observation 1.

For every nonfaulty peer μ, if Hpμ={1,,k} for some phase p0 then resμ=X

Proof.

Let p0 be such that Hp={1,,k}, and consider 1in. There exists some 1jk such that σp(i)=μj. Since jHpμ, μ has heard from μj, so resμ[i], and overall resμ=X.

Denote by σpμ the local value of σp for peer μ at the beginning of phase p. Denote by respμ[i] the local value of res[i] for peer μ after stage 1 of phase p.

Claim 2.

For every phase p, two nonfaulty peers μ,μ, and bit i, one of the following holds.

  1. (1p)

    σpμ(i)=σpμ(i), i.e., both μ and μ assign the task of querying i to the same peer, or

  2. (2p)

    respμ[i] or respμ[i].

Proof.

By induction on p. For the basis, p=0, the claim is trivially true because of the initialization values (specifically, property (10) holds).

For p1. By the induction hypothesis, either (1p1) or (2p1) holds. Suppose first that (2p1) holds, i.e., resp1μ[i] or resp1μ[i]. Without loss of generality, assume that resp1μ[i]. Then, since values are never overwritten, respμ[i], so (2p) holds as well.

Now suppose that (1p1) holds, i.e., σp1μ(i)=σp1μ(i). Let j be an index such that σp1μ(i)=μj. If both μ and μ didn’t hear from μj during phase p1, then both peers will assign the same peer to i in stage 3 of phase p1 (see Line 22), so (1p) holds. If one of the peers heard from μj, w.l.o.g assume μ did, then respμ[i]. Hence, (2p) holds.

Claim 2 yields the following corollary.

Corollary 3.

Every phase p stage 1 request received by a nonfaulty peer is answered with the correct bit values.

Next, we show that the protocol never deadlocks, i.e., whenever a nonfaulty peer waits in stages 2 and 3 (see Lines 14 and 18), it will eventually continue.

Claim 4.

If one nonfaulty peer has terminated, then every nonfaulty peer will eventually terminate.

Proof.

Let μ be a nonfaulty peer that has terminated. Prior to terminating, μ queried all the remaining unknown bits and sent all the bits to every other peer. Since μ is nonfaulty  every other nonfaulty peer μ will eventually receive the message sent by μ and will set Hpμ={1,,k}, resulting in resμ=X by Observation 1. Subsequently, μ will terminate as well.

Claim 5.

While no nonfaulty peer has terminated, a nonfaulty peer will not wait infinitely for kf responses.

Proof.

Let μ be the least advanced nonfaulty peer, i.e, for every nonfaulty peer μ either phase(μ)<phase(μ), or phase(μ)=phase(μ) with stage(μ)stage(μ). Note that there are at least kf nonfaulty peers. As none of these peers terminate before receiving a request from μ (premise of the claim), they will send back a response. Hence, μ will receive responses from at least kf different peers, and will not wait infinitely.

The combination of Claims 5 and 4 implies that eventually, every nonfaulty peer satisfies the termination condition (see Line 41) and subsequently terminates correctly (since it queries all unknown bits beforehand). That is because by Claim 5 some nonfaulty peer μ will get to phase logk/f(n/k), or set Hpμ={1,,k} prior to that, and terminate, which will lead to the termination of every nonfaulty peer by Claim 4.

Claim 6.

At the start of phase p0, every nonfaulty peer has at most n(fk)p unknown bits.

Proof.

By induction on p. Consider nonfaulty peer μ. For the base step p=0 the claim holds trivially by the initialization values.

Now consider p1. By the induction hypothesis on p1, μ has at most n^=n(fk)p1 unknown bits at the start of phase p1. Since unknown bits are assigned evenly in stage 3 (see Line 22), each peer is assigned n^/k unknown bits (to be queried during phase p1). During stage 2 of phase p1, μ waits until |Hp1μ|kf, meaning that μ did not receive the assigned bits from at most f peers. Hence, at most n^/kf=n(fk)p bits are unknown after stage 2 of phase p. The claim follows.

From the above discussion, we have the following lemma.

Lemma 7.

Algorithm 1 solves Download in the asynchronous setting with at most f crash faults after logk/f(n/k) phases with 𝒬=O(nγk) and 𝒯=O((βγ+1v)nϕ+logkf(ϕ))

Proof.

By Claim 6 and since unknown bits are distributed evenly among {0,,k1}, every nonfaulty peer queries at most nk(fk)p in phase 0plogk/f(n/k) and at most nk(fk)logk/f(n/k)=1 additional bits when terminating (By Observation 1). Hence, the worst case query complexity (per peer) is bounded by

𝒬 1+p=1logk/f(n/k)nk(fk)p=O(nγk).

We next turn to time analysis. Consider a peer μ. For every phase p, after nk(fk)p/ϕ time, every 𝚙𝚑𝚊𝚜𝚎p𝚜𝚝𝚊𝚐𝚎 1 response by a nonfaulty peer is heard by μ (even slow ones), and stage 2 starts. After that, it takes at most n(fk)p+1/ϕ time units for every 𝚙𝚑𝚊𝚜𝚎p𝚜𝚝𝚊𝚐𝚎 2 response to be heard by μ, allowing it to move to stage 3. Hence, it takes at most n/k(fk)p/ϕ+n(fk)p+1/ϕ time for phase p to finish once μ started it. Finally, upon termination, μ sends resμ which takes n time. Let p be the phase such that (n/k)(fk)p/ϕ=1 and p′′ be the phase such that (nf/k)(fk)p′′/ϕ=1. Hence, p=logk/f(nkϕ) and p′′=logk//f(nfkϕ). Overall the time complexity is

𝒯 nϕ+p=0logk/f(n/k)(nk(fk)p/ϕ+n(fk)p+1/ϕ)
=nϕ+p=0pnϕk(fk)p+p=p+1logk/f(n/k)1+p=0p′′nϕ(fk)p+1+p=p′′+1logk/f(n/k)1
nϕ+nγkϕ+logk/f(ϕ)+nfγkϕ+logk/f(ϕ/f)
=nϕ+O(nfγkϕ+logkf(ϕ))=O((βγ+1)nϕ+logkf(ϕ)).

The lemma follows.

Finally, a modification of the protocol (see [4]) yields an improved time complexity, resulting in the following theorem.

Theorem 8.

There is a deterministic protocol for solving Download in the asynchronous setting with at most f crash faults (for any f<k) with 𝒬=O(nγk), 𝒯=O(nϕ+logk/f(ϕ)) and =O(nk2).

3 Download in the Asynchronous Model with Byzantine Faults

In this section, we consider the asynchronous model with Byzantine faults, rather than crashes. In this setting, the Download problem is still solvable by the naive protocol where each honest peer queries all bits, but it is unclear whether one can do better. It turns out that this depends on whether β1/2 or not. The rest of the section handles these two cases.

3.1 Majority Byzantine Failures (𝜷𝟏/𝟐)

When β1/2, any asynchronous Download protocol that is resilient to Byzantine faults requires 𝒬=Ω(n). Moreover, any deterministic asynchronous Download protocol resilient to Byzantine faults requires 𝒬=n, namely, the only such protocol is the naive one.

Theorem 9.

When β1/2, every deterministic asynchronous Download protocol that is resilient to Byzantine faults has 𝒬=n.

We defer the proof to [4] since we next establish a similar result for randomized protocols (with a slightly weaker bound of n/2 instead of n).

One subtle point that makes the randomized lower bound more complicated has to do with the limitations imposed on the adversary due to the fact that honest peers are aware of the minimal number of honest peers in every execution, and are therefore entitled to wait for these many messages. This point deserves further scrutiny. In the asynchronous model, each peer operates in an event-driven mode. This means that its typical cycle consists of (a) performing some local computation, (b) sending some messages, and then (c) entering a waiting period, until “something happens.” Typically, this “something” is the arrival of a new message. However, the algorithm may instruct the peer μ to continue waiting until it receives new messages from kf1 distinct peers. Since it is guaranteed that at least this many honest peers exist in the execution, this instruction is legitimate (in the sense that it cannot cause the peer to deadlock). Moreover, in case μ has already identified and “blacklisted” a set F of peers as failed peers, it is entitled to wait until it receives new messages from kf1 distinct peers in VF. This observation restricts the ability of the adversary to delay messages sent by honest peers indefinitely. In particular, at some point during the execution, it may happen that all honest peers are waiting for new messages from other honest peers and will not take any additional actions until they do. In such a situation, sometimes referred to in the literature as reaching quiescence, the adversary may not continue delaying messages indefinitely and is compelled to “release” some of the delayed messages and let them reach their destination. Throughout, we assume that the adversary abides by this restriction.

Theorem 10.

For any asynchronous Download protocol where β1/2, there are executions in which some peer queries more than n/2 bits.

Proof.

Assume towards contradiction that there exists a randomized protocol 𝒫 such that in every execution of 𝒫 every peer queries at most n/2 bits. Consider the following (types of) executions.

Execution A.

The input is all 0’s. The adversary corrupts the peers μ2,,μk/2 and delays the peers μk/2+1,,μk until μ1 terminates. (If quiescence is reached before μ1 terminates, then the adversary forwards all delayed messages and abandons its attempt to fail the protocol). The adversary sets the random string used by the peers μ2,,μk/2 to r^ (r^ should be picked in a way that makes the probability of quiescence negligible; we explain later how this is done). The corrupted peers act as they would in an honest execution (except they use r^ set by the adversary).

Execution B.

The input is all 0’s, except for one index i (i should be picked according to the random distribution used by μ1 such that the probability that i gets queried by μ1 is less than 1/2; we explain later how this is done). The adversary corrupts the peers μ2,,μk/2 and delays the peers μk/2+1,,μk until μ1 terminates (same as in execution A). The adversary sets the random string used by the peers μ2,,μk/2 to the same r^ as in execution A. The corrupted peers act as if they are in execution A.

Denote by Ar,r^ (respectively Br,r^) an execution of type A (respectively B) where μ1 uses r as its random string and μ2,,μk/2 use r^. We denote by Ar (respectively, Br) the execution Ar,r^ (resp., Br,r^) where r^ is chosen by the adversary.

Note that from the point of view of μ1, executions Ar and Br are indistinguishable if μ1 does not query bit i. Also note that the adversary’s strategy is only valid if μ1 does not reach a quiescent state, namely, one in which it will not terminate before receiving a message from at least one of the peers μk/2+1,,μk. We now show that r^ and i can be chosen such that the probability (over the possible random choices r of μ1) of reaching quiescence is negligible and the fraction of pairs (Ar,Br) in which μ1 queries bit i is at most 1/2.

W.l.o.g, we assume that μ1 picks exactly n/2 bits to query. First, for every set S of n/2 bits, the adversary knows the probability pS that μ1 will query S. For every i, denote the probability that bit i gets queried by μ1 by xi=S:iSpS. Note that i=1nxi=Sn2pS=n/2 (since every set S contributes its probability pS to the sum n/2 times ). The adversary picks bit i with probability pi=1xin/2 (note that ipi=1).

Let S^ and I be random variables indicating the random selection of a set S by μ1 and an index i by the adversary, respectively. Then

P[IS^] = i=1nP[iS^I=i]=i=1nP[iS^]P[I=i]=i=1nxi1xin/2
= 2ni=1nxi(1xi)2nn4=12,

where the second equality follows since S^ and I are independent and the inequality is derived by the Cauchy–Schwarz inequality.

Next, we show that there is a choice of r^ for which the probability (over the possible random choices r of μ1) of reaching quiescence in Ar is negligible. Denote by Qr^ the event of reaching quiescence in Ar,r^ (where μ1 uses the random string r). Denote by Q the event of reaching quiescence in Ar,r^ (with the random strings r, r^). Assume towards contradiction that for every value of r^, the probability of Qr^, over the possible random choices r of μ1, is P[Qr^]1/n. Consider an execution Ar,r^, where the input is all 0’s, the adversary crashes peers μk/2+1,,μk, and the random strings used by the peers μ1 and μ2,,μk/2 are r and r^, respectively. Note that if quiescence is reached in Ar,r^, then quiescence is also reached in Ar,r^. Hence, Ar,r^ does not terminate. Noting that

P[Q]=r^P[Qr^]P[r^]1nr^P[r^]=1n,

we get that the probability that the algorithm fails (does not terminate) in Ar,r^ is at least 1/n, a contradiction. It follows that there must be a choice of r^ such that the probability of Qr^ over the possible random choices r of μ1 satisfies P[Qr^]<1/n. The theorem follows.

3.2 Minority Byzantine Failures (𝜷<𝟏/𝟐)

For β<1/2, we consider an input vector X that is divided into 𝒦=n/φ contiguous segments, each of length approximately φ. The th segment is denoted by X[,φ]. Peers issue queries for specific segments and obtain the corresponding bit strings as responses. These responses are then broadcast to all other peers in the form of messages ,s, where denotes the segment index and s the returned bit string. Two messages are said to be overlapping if they refer to the same segment and consistent if, in addition, they carry identical bit strings. A set of consistent responses from at least t peers is referred to as a t-frequent string, denoted by the function FS(MS,t) applied to a multiset MS of overlapping responses.

To handle inconsistencies caused by Byzantine peers, we employ a decision-tree construction for each set S of overlapping responses corresponding to a particular segment. If S contains only one candidate, the tree consists of a single leaf labeled by that bit string. Otherwise, two non-consistent bit strings s,sS are chosen, and the first index at which they differ is identified as a separating index. An internal node is created at this index, and the set S is split into two subsets according to the value of the separating bit. The process is applied recursively until the leaves correspond to distinct candidate bit strings. By querying X at the separating indices, inconsistencies can be resolved, and the correct bit string is determined as long as it appears among the leaves of the decision tree.

Next, the input is first partitioned into 𝒦 segments, and each peer μ independently selects one segment uniformly at random, queries it, and broadcasts the result to all other peers. Subsequently, each peer constructs decision trees for every segment using the overlapping responses it received. A segment is determined by forming a decision tree from the responses that appeared at least t=(γβ)k2𝒦 times, ensuring that the correct bit string for each segment is eventually recovered. From the above discussion, we have the following results (due to space constraints, details are deferred to [4].

Theorem 11.

There is a 2-cycle asynchronous randomized protocol for Download with 𝒬=O(nγβ+nlnn(γβ)k).

To extend the above protocol (2-cycle) into a multi-cycle protocol that improves the expected query complexity. The first cycle matches the first cycle of the 2-cycle protocol, but in each later cycle i>1, the input is divided into 𝒦i=n2iφ segments of size φi=2iφ. Each i-segment consists of two (i1)-segments. Every peer μ selects an i-segment uniformly at random, reconstructs its value from decision trees built in the previous cycle, and then broadcasts the result. Since segment size doubles each cycle, after O(log𝒦) cycles, each peer has the entire input and outputs correctly, therefore, leading to the following results (details are deferred to [4].

Theorem 12.

There is a O(log(γklnn))-cycle protocol which w.h.p. computes Download in the point-to-point model with expected query complexity 𝒬=O(nlogn/(γβk)) and message size O(n).

3.3 Deterministic Download protocol

We now present a deterministic asynchronous Download protocol for Byzantine faults where β<1/2. Consider the deterministic synchronous protocol presented in [3], where a committee Ci of size 2f+1 is formed for every i[1,n], and every peer μCi queries the bit X[i] and broadcasts the message (μ,X[i]=bi) to all other peers. In order to adapt that protocol to the asynchronous model, we modify the final part of the protocol, requiring each non-committee peer μCi to wait until it gets messages (μ,X[i]=b) with identical value b from at least f+1 peers μ, and then decide resμ[i]b. We get the following result (see [4]).

Theorem 13.

When β<1/2, there exists a deterministic asynchronous protocol that solves Download with Q=O(βn), 𝒯=O(βnϕ) and =O(fn).

4 Application: Efficient Blockchain Oracles

Blockchain systems [25] have seen a rise in popularity due to their ability to provide both transparency and strong cryptographic guarantees of agreement on the order of transactions, without the need for trusted third-party entities. More general computational abilities have also been well sought out for blockchains. Smart contracts [27] fulfill that need by providing users of the blockchain a way to run programs on the blockchain that ensures reliable and deterministic execution while providing transparency and immutability of both the program code and its state(s). Note that since the execution is required to be deterministic, i.e., every node must produce the same result, smart contracts are restricted to accessing (agreed upon) on-chain data, as off-chain data may introduce non-determinism to the execution.

Blockchain oracles [2, 11, 26] are components of blockchain systems that provide multiple services that support and extend the functionality of smart contracts (and other on-chain entities). The most important and fundamental service a blockchain oracle provides is bridging between the on-chain network and off-chain resources [12, 16], providing smart contracts access to external data without introducing non-determinism into their execution. We focus on this service and artificially consider it to be the sole responsibility of a blockchain oracle. In the remainder of this section, we explain in detail a possible application of the DR model and the Download problem for improved query efficiency within the context of blockchain oracles.

Blockchain oracles general structure.

Blockchain oracles consist of an on-chain component and an off-chain component. The off-chain component encompasses the different data sources that store the required external information (e.g., stock prices, weather predictions) and the network of nodes in charge of retrieving that information and transmitting it to the on-chain component. The on-chain component can be thought to be (but is not necessarily) a smart contract that is responsible for verifying the validity of the report, making the information public on the blockchain it is hosted on, and using it for its execution.

Formally, the off-chain component consists of two parts: an asynchronous444The network is sometimes assumed to be partially synchronous in blockchain oracles. oracle network, with peers (nodes) vi, i[1,k], capable of exchanging direct messages among themselves, and data sources DSj, j[1,m], each storing an array Xj of n variables in which the on-chain component is interested. Each peer can read the i-th cell from the j-th data source DSj by invoking Query(i,j). A fraction of up to βt1/3 of the peers may be Byzantine, and a fraction of up to βd1/2 of the m data sources may be Byzantine. Denote the on-chain component by SC.

The goal of blockchain oracles, as mentioned above, is to pull information from external sources and push a final value on-chain. There are a few difficulties that may arise when trying to develop such a system. First, it might be the case that different data sources report slightly different values (e.g., prices of a specific stock), even if all of them act honestly. Moreover, corrupted data sources might provide false and even inconsistent values (providing some nodes with value α and another with α). The system needs to pick a final value in a way that (1) represents the range of honest values pulled from honest data sources and (2) malicious players (both data sources and peers) cannot force the system to pick a final value that does not represent the range of honest values.

The Oracle Data Delivery (ODD) problem.

Denote by ds the set of honest data sources. Let hmin(i)=minj{Xj[i]} and hmax(i)=maxj{Xj[i]}. The honest range of i is the range σ(i)=[hmin(i),hmax(i)]. The ODD problem requires the on-chain SC to publish an array of values res to the target blockchain such that res[i]σ(i), for every i[n].

A blockchain oracle protocol can generally be split into three distinct steps: (1) collecting data, (2) reaching an agreement on the collected data, and (3) deriving and publishing a final value. Note that this abstraction is the minimum required abstraction to capture the operation of blockchain oracle protocols such as OCR [12] and DORA [16]555These protocols have many additional technical aspects, different structures, and different ways of handling steps (2) and (3). As our focus is on improving step (1), we may w.l.o.g. assume the abstract structure..

We now show how our Download protocols can be used to significantly reduce the cost of the Oracle Data Collection (ODC), i.e, step (1) of blockchain oracles.

Improving ODC by blockchain oracles via Download.

Current protocols perform the data collection step by the following ODC process:
For every node:

  • Pick 2mβd+1 data sources into a set ADS.

  • Perform oi,jQuery(i,j), for every i[1,n] and jADS.

  • Calculate the median oimedian({oi,jjADS}) and proceed to step (2).

The results of [12, 16], cast in our abstract formulation, yield the following result.

Theorem 14 ([12, 16]).

The ODC process guarantees that oiσ(i) for every i[1,n] and has total query cost O(mnk) and worst case individual query cost 𝒬=O(mn).

Instead, we propose utilizing the guarantees of Download protocols, namely, that for an honest data source DSj, the output of each peer is exactly Xj, to construct the following modification of the ODC steps.

  • For every node, pick 2mβd+1 data sources into a set ADS.

  • For every data source jADS, run a Download protocol (denote the result for cell i from data source j by oi,j).

  • Calculate the median oimedian({oi,jjADS}) and proceed to step (2).

It is easy to verify that this modified construction yields the following.

Theorem 15.

The Download-based ODC process guarantees oiσ(i) for every i[1,n] and takes O~(mn) total queries and 𝒬=O~(mn/k) w.h.p.

Note that the Download protocol presented in this paper assumes a binary input array, but this can be extended to numbers via a relatively simple extension. However, it is important to note that our solution relies on the following restrictive assumption. For two honest peers v,v, if both v and v issue the query Query(i,j), then they get the same result, for every i[1,n] and honest data source j (i.e., the data does not change if queried at different times). Getting rid of this assumption and solving the problem efficiently for dynamic data is left as an open problem for future study.

References

  • [1] Ittai Abraham, Dahlia Malkhi, and Alexander Spiegelman. Asymptotically optimal validated asynchronous byzantine agreement. In Proceedings of the 2019 ACM Symposium on Principles of Distributed Computing, pages 337–346, 2019. doi:10.1145/3293611.3331612.
  • [2] John Adler, Ryan Berryhill, Andreas Veneris, Zissis Poulos, Neil Veira, and Anastasia Kastania. Astraea: A decentralized blockchain oracle. In 2018 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData), pages 1145–1152, 2018. doi:10.1109/Cybermatics_2018.2018.00207.
  • [3] John Augustine, Jeffin Biju, Shachar Meir, David Peleg, Srikkanth Ramachandran, and Aishwarya Thiruvengadam. Byzantine Resilient Distributed Computing on External Data. In Dan Alistarh, editor, 38th International Symposium on Distributed Computing (DISC 2024), volume 319 of Leibniz International Proceedings in Informatics (LIPIcs), pages 3:1–3:23, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.DISC.2024.3.
  • [4] John Augustine, Soumyottam Chatterjee, Valerie King, Manish Kumar, Shachar Meir, and David Peleg. Distributed download from an external data source in asynchronous faulty settings. CoRR, abs/2509.03755, 2025. doi:10.48550/arXiv.2509.03755.
  • [5] John Augustine, Soumyottam Chatterjee, Valerie King, Manish Kumar, Shachar Meir, and David Peleg. Distributed Download from an External Data Source in Byzantine Majority Settings. In Dariusz R. Kowalski, editor, 39th International Symposium on Distributed Computing (DISC 2025), volume 356 of Leibniz International Proceedings in Informatics (LIPIcs), pages 9:1–9:22, Dagstuhl, Germany, 2025. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.DISC.2025.9.
  • [6] Adam D Barwell, Ping Hou, Nobuko Yoshida, and Fangyi Zhou. Crash-stop failures in asynchronous multiparty session types. Logical Methods in Computer Science, 21, 2025. doi:10.46298/LMCS-21(2:5)2025.
  • [7] Michael Ben-Or. Another advantage of free choice (extended abstract): Completely asynchronous agreement protocols. In Proceedings of the Second Annual ACM Symposium on Principles of Distributed Computing, PODC ’83, pages 27–30, New York, NY, USA, 1983. Association for Computing Machinery. doi:10.1145/800221.806707.
  • [8] Michael Ben-Or. Another advantage of free choice (extended abstract) completely asynchronous agreement protocols. In Proceedings of the second annual ACM symposium on Principles of distributed computing, pages 27–30, 1983.
  • [9] Gabriel Bracha. Asynchronous byzantine agreement protocols. Information & Computation, 75:130–143, 1987. doi:10.1016/0890-5401(87)90054-X.
  • [10] Gabriel Bracha. Asynchronous byzantine agreement protocols. Information and Computation, 75(2):130–143, 1987. doi:10.1016/0890-5401(87)90054-X.
  • [11] Lorenz Breidenbach, Christian Cachin, Benedict Chan, Alex Coventry, Steve Ellis, Ari Juels, Farinaz Koushanfar, Andrew Miller, Brendan Magauran, Daniel Moroz, Sergey Nazarov, Alexandru Topliceanu, Florian Tram‘er, and Fan Zhang. Chainlink 2.0: Next steps in the evolution of decentralized oracle networks. Technical report, Chainlink Labs, 2021.
  • [12] Lorenz Breidenbach, Christian Cachin, Alex Coventry, Ari Juels, and Andrew Miller. Chainlink off-chain reporting protocol. Technical report, Chainlink Labs, 2021.
  • [13] Christian Cachin, Klaus Kursawe, Frank Petzold, and Victor Shoup. Secure and efficient asynchronous broadcast protocols. In Annual International Cryptology Conference, pages 524–541. Springer, 2001. doi:10.1007/3-540-44647-8_31.
  • [14] Christian Cachin, Klaus Kursawe, and Victor Shoup. Random oracles in constantipole: practical asynchronous byzantine agreement using cryptography. In Proceedings of the nineteenth annual ACM symposium on Principles of distributed computing, pages 123–132, 2000.
  • [15] Ran Canetti and Tal Rabin. Fast asynchronous byzantine agreement with optimal resilience. In Proceedings of the twenty-fifth annual ACM symposium on Theory of computing, pages 42–51, 1993. doi:10.1145/167088.167105.
  • [16] Prasanth Chakka, Saurabh Joshi, Aniket Kate, Joshua Tobkin, and David Yang. DORA: distributed oracle agreement with simple majority. CoRR, abs/2305.03903, 2023. doi:10.48550/arXiv.2305.03903.
  • [17] Brian A. Coan. A compiler that increases the fault tolerance of asynchronous protocols. IEEE Transactions on Computers, 37(12):1541–1553, 1988. doi:10.1109/12.9732.
  • [18] Sisi Duan, Michael K Reiter, and Haibin Zhang. Beat: Asynchronous bft made practical. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, pages 2028–2041, 2018. doi:10.1145/3243734.3243812.
  • [19] Alan David Fekete. Asynchronous approximate agreement. In Proceedings of the sixth annual ACM Symposium on Principles of distributed computing, pages 64–76, 1987. doi:10.1145/41840.41846.
  • [20] Michael J. Fischer, Nancy A. Lynch, and Michael S. Paterson. Impossibility of distributed consensus with one faulty process. J. ACM, 32(2):374–382, April 1985. doi:10.1145/3149.214121.
  • [21] Bruce M Kapron, David Kempe, Valerie King, Jared Saia, and Vishal Sanwalani. Fast asynchronous byzantine agreement and leader election with full information. ACM Transactions on Algorithms (TALG), 6(4):1–28, 2010. doi:10.1145/1824777.1824788.
  • [22] Valerie King and Jared Saia. Breaking the o(n2) bit barrier: Scalable byzantine agreement with an adaptive adversary. J. ACM, 58(4), July 2011. doi:10.1145/1989727.1989732.
  • [23] Julian Loss and Tal Moran. Combining asynchronous and synchronous byzantine agreement: The best of both worlds. Cryptology ePrint Archive, 2018.
  • [24] Nancy Lynch and Srikanth Sastry. Consensus using asynchronous failure detectors. arXiv preprint arXiv:1502.02538, 2015. arXiv:1502.02538.
  • [25] Satoshi Nakamoto. Bitcoin: A peer-to-peer electronic cash system. whitepaper, May 2009.
  • [26] Supra Research. Supra’s blockchain infrastructure stack. Whitepaper, Supra Labs, November 2024. URL: https://supra.com/documents/SupraTech-Whitepaper.pdf.
  • [27] Nick Szabo. Formalizing and securing relationships on public networks. First Monday, 2, 1997. doi:10.5210/FM.V2I9.548.
  • [28] Lewis Tseng and Nitin H Vaidya. Asynchronous convex hull consensus in the presence of crash faults. In Proceedings of the 2014 ACM symposium on Principles of distributed computing, pages 396–405, 2014. doi:10.1145/2611462.2611470.