<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Albert Garreta on Medium]]></title>
        <description><![CDATA[Stories by Albert Garreta on Medium]]></description>
        <link>https://medium.com/@garreta.a?source=rss-1123fbae9f36------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7hqaZnqmPtkzWZpj78R1eg.png</url>
            <title>Stories by Albert Garreta on Medium</title>
            <link>https://medium.com/@garreta.a?source=rss-1123fbae9f36------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 22:36:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@garreta.a/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Fiat-Shamir security of FRI and related SNARKs — Part 1]]></title>
            <link>https://medium.com/nethermind-eth/fiat-shamir-security-of-fri-and-related-snarks-part-1-9b913728ddec?source=rss-1123fbae9f36------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b913728ddec</guid>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[snark]]></category>
            <category><![CDATA[zkproof]]></category>
            <dc:creator><![CDATA[Albert Garreta]]></dc:creator>
            <pubDate>Mon, 14 Aug 2023 12:11:32 GMT</pubDate>
            <atom:updated>2023-08-18T13:30:37.372Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fiat-Shamir security of FRI and related SNARKs — Part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*blHylapt9XYe2u5ogZt2Jg.png" /></figure><p><em>Blog post by </em><a href="https://twitter.com/0xAlbertG"><em>Albert Garreta</em></a><em>. Joint work with Alexander R. Block</em>, <em>Jonathan Katz</em>, <a href="https://twitter.com/SuccinctJT"><em>Justin Thaler</em></a>, <a href="https://twitter.com/PratyushRT"><em>Pratyush Ranjan Tiwari</em></a>, <em>and</em> <a href="https://twitter.com/mpfzajac"><em>Michał Zając</em></a><em>.</em></p><p>In the Nethermind Cryptography Research team, we have recently delved into analyzing the security of some SNARKs that are built on top of the FRI protocol. This emerging trend has seen numerous prominent projects utilizing some variation of the <a href="https://eprint.iacr.org/2021/582">ethSTARK protocol</a> or of Plonk compiled with FRI. However, an analysis of certain security aspects within these protocols has not yet taken place. We have addressed this <a href="https://eprint.iacr.org/2023/1071">in our work</a> [BGK+23], where we analyze the Fiat-Shamir transformation of a wide class of PIOPs compiled with FRI. Our main result is stated <a href="#ebbe">here</a>. TL;DR, these protocols are as secure as expected.</p><p>In a series of upcoming posts, we will present an intuitive overview of our work. The outline of our plan is as follows:</p><p><strong>Part 1 (this post!) — </strong>We outline some popular frameworks for constructing SNARG(K)s, including the approach where a Polynomial Interactive Oracle Proof (PIOP) is compiled with the FRI protocol and the Fiat-Shamir (FS) transformation.</p><p>Subsequently, we explain the pitfalls and technical issues that arise from this approach, and state our main <a href="#ebbe">result</a>. The main two issues are:</p><ul><li>Technically, FRI cannot be used as a Polynomial Commitment Scheme (beyond the “unique decoding radius”)</li><li>The Fiat-Shamir (FS) transformation can ruin the security of an interactive proof.<br> ⚠️ In particular, we explain a vulnerability that occurs in the FS transformation of a protocol that is <strong>repeated in parallel</strong>. This new attack was recently described in [AFK22].</li></ul><p><strong>Part 2 — </strong>We will discuss soundness notions that are well-behaved under the Fiat-Shamir transformation. Moreover, we will explain one of our main results, which describes a wide class of PIOPs that can be compiled safely with FRI and the FS transformation into a SNARK.</p><p><strong>Part 3 — </strong>We will outline why some popular FRI-based SNARKs fall into the class of PIOPs mentioned above. To do so, we also show that the FRI protocol is secure under the FS transform.</p><p><strong>Table of contents</strong></p><ul><li><a href="#1aee">Related work</a></li><li><a href="#2d4e">A recipe for building SNARG(K)s</a></li><li><a href="#79bc">Building SNARG(K)s with the FRI protocol</a></li><li><a href="#ebbe">Main result (informal)</a></li><li><a href="#45c1">FRI (not) as a Polynomial Commitment Scheme</a></li><li><a href="#4116">Pitfalls around the FS transformation</a></li><li><a href="#89cc">Next steps</a></li><li><a href="#37f5">Remarks</a></li><li><a href="#2cd3">References</a></li></ul><h3>Related work</h3><p>Part of our work has been developed independently and concurrently by StarkWare. Precisely, very recently StarkWare updated its ethSTARK documentation showing that <a href="https://eprint.iacr.org/2021/582">both FRI and ethSTARK are secure after the Fiat-Shamir transform</a> [S23].</p><h3>A recipe for building SNARG(K)s</h3><p>There is a nice framework that allows one to build a SNARG(K) from a nice type of interactive protocol. Such a protocol is called Polynomial Interactive Oracle Proof (PIOP) [CHM+20, BFS20]. In essence, in a PIOP, the prover’s messages are (oracles to) polynomials of degree below a certain prescribed bound. We refer to such polynomials as <strong>low degree polynomials</strong>. More precisely, the verifier is granted access to each of these polynomials in the form of an <strong>oracle</strong>, which is an ideal algorithm that takes as input a point in some prescribed set, and instantly returns the evaluation of the polynomial on that point. Notice that a PIOP is a particular instance of an Interactive Oracle Proof (IOP). In the latter, the prover’s messages are either constants or general functions, not necessarily low degree polynomials. In turn, IOPs (and PIOPs) are a generalization of Interactive Proofs (IP). These are IOPs where the prover is limited to sending constants (as opposed to functions) to the the verifier.</p><p>Both in PIOPs and in IOPs, the verifier sends messages as usual, namely, the verifier’s challenges are elements uniformly sampled in some (subset of a) field (or some other challenge space). At the end of the interactive phase of a PIOP or of a IOP, to decide whether to accept or reject the proof, the verifier evaluates the received functions on some points and uses these evaluations to reach a decision.</p><p>Importantly, a PIOP is considered secure if it is secure under the following assumption:</p><blockquote>✳️ <strong>Assumption</strong>: An adversary’s messages are always low degree polynomials.</blockquote><p>Working with Assumption ✳️ usually makes the security analysis of a PIOP a very tractable problem, since one can use all the nice properties that polynomials possess, such as the beloved-by-all Schwartz-Zippel lemma. On the other hand, the situation is more involved for IOPs, since the prover’s messages are not necessarily polynomials anymore, and thus the comfort of field algebra is replaced by wilder combinatorial problems.</p><p>Despite being such nice objects, PIOPs are just an idealized type of protocol that cannot be materialized per se in the “real world”. Several reasons contribute to this, one of which is that Assumption ✳️ is not realistic. Without any further constraints, an adversary may send arbitrary functions and pretend they are low degree polynomials. That’s from the security side. On the efficiency front, PIOPs (and also IOPs in this case) are “unusable” because “sending functions” to the verifier is dramatically impractical. Additionally, it’s worth noting that both PIOPs and IOPs require interaction between the prover and the verifier, which is something we ultimately want to eliminate.</p><p>Next, we outline two step recipe that take care of these issues, transforming a PIOP Π into a Succinct Non-interactive Argument (SNARG), denote it SNARG(Π). To clarify terms, recall that <strong>succinctness</strong> refers to the fact that <a href="https://a16zcrypto.com/posts/article/17-misconceptions-about-snarks/#section--3">proofs and verifier times are sublinear</a>; and <strong>argument</strong> refers to the fact that security is only considered for adversaries that run in polynomial time. Also, if a SNARG is knowledge sound, then it is a SNARK.</p><h4>Step 1: Adding a Polynomial Commitment Scheme</h4><p>To make a PIOP (or a IOP) Π succinct, one can modify Π so that the honest prover, instead of sending low-degree polynomials to the verifier, sends <strong>commitments</strong> to these polynomials. To do so, the prover uses a <strong>Polynomial Commitment Scheme (PCS)</strong><em>.</em> Importantly, and roughly speaking, in a PCS it is required that only low degree polynomials can be committed, except with negligible probability.</p><p>Thus, introducing a PCS both constrains the prover to send low degree polynomials, and reduces proof sizes dramatically (since the commitments are usually small objects). Assuming that both the verification algorithms of Π and PCS are succinct, we obtain a <strong>Succinct Interactive Argument</strong>, which we denote PCS(Π). Moreover, one can show that if both Π and the PCS are “secure”, the resulting protocol is also secure [CHM+20, BFS20], producing a <strong>Succinct Interactive Argument of Knowledge</strong>.</p><h4>Step 2: Applying the Fiat-Shamir (FS) transformation</h4><p>The next consists in applying the Fiat-Shamir (FS) transformation to PCS(Π). The resulting protocol, denote it SNARG(Π), is a Succinct Non-interactive Argument. The FS transform is a method that allows to remove the interactiveness in a protocol by having the prover replace each verifier’s random challenge with the hash of the input and all the messages produced so far. The idea is that, by modelling the hash function as a Random Oracle, the resulting hashes are, effectively, uniformly sampled elements.</p><p>Now, <a href="https://a16zcrypto.com/posts/article/17-misconceptions-about-snarks/#section--16">perhaps surprisingly</a>, the question of whether SNARG(Π) is secure is a delicate one. Indeed, it is possible that PCS(Π) is, for example, sound or knowledge sound, but SNARG(Π) is not. We will ellaborate on this aspect later, in the more general context of interactive protocols. For now, let us mention that, to ensure SNARG(Π) is secure after the FS transformation, one usually proves that PCS(Π) satisfies certain strengthened security properties, namely special soundness or round-by-round (RBR) knowledge soundness.</p><h4>Putting everything together</h4><p>The previous recipe is followed by well known protocols like Plonk (and variations), Sonic, Marlin, vsql, etc. Among these, all of them use KZG-type schemes as their Polynomial Commitment Scheme.</p><p>As mentioned, for each of these protocols Π, one can prove that PCS(Π) is secure by showing that Π is secure under Assumption ✳️, and by proving the employed PCS is secure. Finally, to prove that the final SNAR(K) is secure, one needs to make sure that PCS(Π) meets some of the aforementioned “strong” security properties that are well-behaved under the Fiat-Shamir transform.</p><h3>Building SNARG(K)s with the FRI protocol</h3><p>A recent line of work has taken some of the aforementioned protocols and replaced the KZG commitment scheme with the so-called FRI protocol. There are several reasons for doing so:</p><p><strong>One — </strong>FRI is <em>transparent</em>, while the KZG scheme requires an initial trusted setup.</p><p><strong>Two — </strong>The FRI protocol is highly flexible: one can configure its parameters to move along a wide tradeoff between proving time and proof size. More precisely, for a fixed level of security, setting a large <em>rate</em> results in small proofs but long proving times, and, conversely, a small rate produces big proofs, but a very fast proving algorithm. On the other hand, the KZG protocol relies on elliptic curve pairing cryptography, which is relatively rigid and in practice requires working over large fields of at least 256 bits.</p><p>This flexibility is especially useful when designing complex modular proof systems that leverage recursion. For example, very roughly, one could design the proof pipeline in a zk-rollup as follows:</p><ul><li>Step 1: A set of provers generate proofs off-chain using a SNARK protocol with large proofs and short proving times.</li><li>Step 2: Then, some prover uses recursion to prove that all the proofs above are valid, and it posts the resulting recursive proof for verification on an L1 blockchain. For this second step, one wants a small proof, since L1 storage is, in general, expensive.</li></ul><p>With this scheme in mind, one could use FRI-based protocols with different parameter configurations to accomodate the requirements of each step of the proving pipeline. This is the approach taken by <a href="https://polygon.technology/blog/plonky2-a-deep-dive">Plonky2</a>. Some protocols go as far as to use a FRI-based protocol for Step 1, and a completely different proving scheme for Step 2, e.g., Groth16.</p><p>Interestingly, after replacing KZG with FRI, some of these protocols (e.g., Plonk) become very much like the protocols that are often referred to as “STARKs”, namely DEEP-ALI and <a href="https://eprint.iacr.org/2021/582">ethSTARK</a>. With this in mind, in our work, we introduce a family of IOPs that encapsulate and abstract away all these protocols.</p><h4>Security challenges</h4><p>In terms of security, the usage of FRI raises a couple of formal difficulties. Below, we state the difficulties and elaborate on them in the subsequent sections.</p><ul><li>Technically speaking, <strong>FRI cannot be used as a PCS</strong>. However, as we will discuss, our work allows to, roughly, for a wide class of protocols, safely stick to the PIOP model (and thus use Assumption ✳️) even if FRI is used instead of a PCS. Here “safely” refers to strong notions of security that guarantee soundness after the Fiat-Shamir transform <a href="#6fba"><strong>[0]</strong></a><strong>.</strong></li><li>Before our work, there was <strong>no analysis of the security of</strong> <strong>FRI after the Fiat-Shamir transformation and of many protocols that use it</strong>.</li></ul><p>Moreover, there are a number of other protocols whose security had only been analyzed for their interactive version.</p><h3>Main result (informal)</h3><p>Let Π be a secure (i.e., round-by-round knowledge sound) PIOP of a certain form <a href="#b74b">[2]</a>. Then the IOP that results of compiling Π with batched FRI (possibly using a large proximity parameter δ) is also secure (RBR knowledge sound), with a small increase in the soundness error.</p><p>Moreover, applying the Fiat-Shamir transformation to the compiled protocol results in a knowledge sound protocol FS(FRI(Π)), i.e. a SNARK.</p><p>As a consequence, one can prove the security of FS(FRI(Π)) just by proving the security of Π under Assumption ✳️, i.e., in the interactive setting and assuming that adversaries always send low degree polynomials (as opposed to arbitrary functions).</p><p>This result applies for example to Plonky2, Risc Zero, and ethSTARK.</p><h3>FRI (not) as a Polynomial Commitment Scheme</h3><p>First things first, in the FRI protocol, the prover knows a function f(X):𝔽→ 𝔽 and the verifier has access to the evaluations of f(X) on a multiplicative subgroup H of 𝔽, where here 𝔽 denotes any finite field.</p><p>Then, FRI allows the prover to prove that f(X) is a polynomial of degree at most a publicly specified bound… Ugh oh, unfortunately this sentence is not entirely true, but let’s assume for a moment that it is. Later we will come back to the “real world”.</p><p>Before we move on, let us recommend <a href="https://medium.com/starkware/low-degree-testing-f7614f5172db">this excellent post</a> by StarkWare for an introduction to FRI. Another great more technical source is [H22].</p><h4>A PCS from FRI, in an ideal world</h4><p>We refer to the Appendix in this post for a formal definition of PCS.</p><p>In an ideal world where FRI allows to prove that functions are low degree polynomials, FRI can be used to build a PCS as follows:</p><ol><li>The commitment to f(X) is the root of the Merkle tree of the vector (f(v)∣ v∈ H).</li><li>To evaluate f(X) on some element v∈ 𝔽, the prover reveals a field element y which is, purportedly, f(v), and then the prover and the verifier use the FRI protocol to check that the following function (defined over H) is a polynomial of degree at most d-1, where d is a publicly known degree bound for f(X):</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*05NFAt2dO_bgGX__aZSsTA.png" /></figure><p>If the FRI protocol passes for the function q(X), then (in our ideal world), except with negligible probability, the function q(X) is a polynomial of degree ≤ d-1, and so f(X) = q(X)(X-v) +y is a polynomial of degree ≤ d, satisfying f(v)=y.</p><p><strong>The real world</strong></p><p>The problem is that, in truth, FRI applied on a map g(X) for a degree bound d does not guarantee that g(X) is a polynomial of degree at most d. Rather, it guarantees that there is at least one polynomial q(X) of degree ≤ d that is δ<strong>-close</strong> to g(X). Here δ-closeness means that there is a subset S⊆ H such that</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*ipNOEFUSPbqFv_XuwKIW-Q.png" /></figure><p>and S is “reasonably large”.</p><p>What “large” means here is controlled by the so-called <strong>proximity parameter</strong> δ. One has 0&lt;δ&lt;1 and asks that the number of points in H where g(X) and q(X) disagree is at most δ |H|, more precisely, |H∖ S| ≤ δ |H|. The smaller the δ, the closer to a polynomial g(X) is. Then, as one would expect, the cost of running FRI (with a fixed level of targeted security) increases as δ diminishes.</p><p>This may already look like a deal-breaker; allowing the prover to commit to non-low degree polynomials is not what we wanted, since it breaks Assumption ✳️. However, perhaps unexpectedly, if δ is very small then the previously described “ideal world PCS” can still be used as a PCS [VP19].</p><p>The reason is that for a “small” δ <a href="#b640"><strong>[1]</strong></a>, any function f(X) has at most one δ-close low-degree polynomial p(X). It is not hard to prove that, if the map</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/166/1*wrz8xNALRqhPDI0BMRB_cA.png" /></figure><p>passes the FRI protocol, then, except with negligible probability, y=q(v). Thus, in this setting, the PCS can only be used to open the polynomial q(X), even if q(X) is not the initially committed map. This is good enough within the settings we’re concerned about.</p><p>The issue appears for “large” values of δ <a href="#b640"><strong>[1]</strong></a>, which are the values commonly used due to efficiency reasons. In this case it is perfectly possible that there are more than one polynomial of degree at most d that are δ-close to g(X). As observed and formalized in the RedShift paper [KPV22], in this scenario the (non-)”PCS” binds the committed map f(X) to a list of polynomials q₁(X), …, qᵣ(X), so that, given v∈ 𝔽, the prover can successfully prove that f(v)=qᵢ(v) for any i of the prover’s choice. RedShift calls this primitiva a <em>list Polynomial Commitment Scheme</em>.</p><p>While this is enough for protocols that deal with “very narrow execution traces” (as proved in RedShift in the interactive setting), this scheme does not scale to wider traces. More precisely, the soundness proof yields an error which is exponential on the number of witness polynomials. We will ellaborate on this in Part 2 of the series.</p><p>Therefore, in general, it is currently not possible to stick to the PIOP + PCS recipe if one wants to use FRI “as a PCS”. Instead, one needs to step out of the PIOP and analyze the protocol under the IOP framework, which as we mentioned is much more unhospitable, since Assumption ✳️ can’t be used. This is the approach taken (not with the formalism here) by protocols such as DEEP-ALI and ethSTARK [S23].</p><p>These protocols use the so-called <em>batched FRI</em> protocol. There, instead of having a FRI invocation for each quotient map (f(X)- y)/(X-v), FRI is performed on a random linear combination of all the quotient maps. As we will explain in Part 2, this, which may simply look like “an efficiency hack”, has a dramatic impact on the (provable) soundness of the protocol.</p><p><strong><em>Remark: </em></strong><em>While RedShift is arguably the first academic work combining Plonk and FRI, “related” protocols such as Plonky2 and Risc Zero use FRI in a similar way to how FRI is used in DEEP-ALI and ethSTARKs (which is different to RedShift’s).</em></p><p><em>In particular, the IOP security of these protocols does not follow from the RedShift paper (since they work with wide traces). Moreover, these protocols, along with DEEP-ALI and ethSTARK, were not known to be secure after the FS transform. Our work addresses these gaps.</em></p><p>We now informally state one of our results. The security notion we deal with is <strong>round-by-round knowledge soundness</strong>, which guarantees knowledges soundness under the Fiat-Shamir transform. In the next part of the series, we will explain this concept and state the result in a more formal manner.</p><h3>Pitfalls around the FS transformation</h3><p>As mentioned, in terms of security, applying the Fiat-Shamir transformation on an interactive proof is not straightforward, as this transformation can ruin the security of the initial protocol. Below, we describe two examples of this phenomenon, one well-known, and the other recently described in [AFK22].</p><p>Before we begin, let us introduce some further formalism around Interactive Proofs (IP). A <em>relation</em> R is a set of of pairs of the form (x,w). Here x is called an <strong>instance</strong> or a <strong>public input</strong>, and w is called a <strong>witness</strong>. An IP Π for a relation R is a tuple of algorithms Π=(P, V), the prover and the verifier, respectively. Both P and V take an instance x as common input. Additionally, P takes a witness w as input such that (x,w)∈ R.</p><p>Then, P and V engage in an interactive protocol during which, for μ <strong>rounds of communication</strong>, P sends a message mᵢ to V, and V replies with a random challenge cᵢ (i=1,…,μ). Finally, P sends one last message m_μ, and then V inspects the <strong>transcript</strong> (m₁, c₁, …, m_μ, c_μ, m_{μ+1}) and decides whether to accept or reject.</p><h4>Sequential repetition of a protocol</h4><p>Suppose Π is an interactive proof with soundness error 1/2, meaning that, for any malicious prover P*<em>, the chances that P*</em> convinces the verifier after executing the protocol are at most 1/2.</p><p>Now assume that, to increase the security of our protocol, we create a new interactive proof Πₜ consisting in repeating Π for t times in a row. I.e. in Πₜ first the prover Pₜ and verifier Vₜ execute Π, then, if the verifier of Π would reject the proof, Vₜ rejects. Otherwise, they repeat this process for t-1 more times.</p><p>The resulting protocol, Πₜ, has soundness error 1/2ᵗ. This is because, to falsely convince Vₜ, a malicious prover for Πₜ has to convince Π’s verifier t times in a row.</p><p>Consider now the Fiat-Shamir transformation of Πₜ, which we denote FS(Πₜ). Ideally, we would like FS(Πₜ) to have roughly the same level of security as Πₜ, i.e. we’d like that, to break FS(Πₜ), an attacker P* is required to perform at least O(2ᵗ) work.</p><p>However, with just O(t) work <a href="#13f7">[3]</a>, it is possible to maliciously construct a false proof with reasonably high probability. The intuition is the following: suppose P^<em> manages to (falsely) find a valid proof π₁ for the first instance of FS(Π) in FS(Πₜ). Suppose, however, that afterward P*</em> attempts to find a valid proof π₂ for the 2nd instance of FS(Π), but that it does not succeed. In an interactive scenario, P*<em> would need to start its malicious attempt from scratch, since the verifier would simply reject the proof. However, in the non-interactive scenario, P^</em> can instead keep the proof π₁, delete π₂, and attempt again to “break” the second instance of FS(Π) in FS(Πₜ).</p><p>This is called a <strong>rewinding attack</strong> and is the crux of the security behind the Fiat-Shamir transformation.</p><p>Inductively, if the prover has (dishonestly) generated valid proofs π₁, …, πᵤ for the first u&lt;t instances of of FS(Π) in FS(Πₜ), then it can attempt to generate a valid proof π_{u+1} for the (u+1)-th instance. Even if it fails, it can keep the prior proofs π₁, …, πᵤ and attempt to generate a valid π_{u+1}, and so on until it has u+1 valid proofs. Assuming P*<em> is able to break Π with probability 1/2, then just by performing, say, 10 attempts, P*</em> has very high chances of ending up with the next valid proof π_{u+1}. Overall, with about 10t work <a href="#13f7">[3]</a>, P* obtains a valid false proof for FS(Πₜ).</p><h4>Parallel repetition of a special unsound protocol</h4><p>As mentioned, the following vulnerability was only described recently in [AFK22].</p><p>For the second example, let Π be an Interactive Proof with soundness error (1/2)^λ. To increase the soundness of Π, instead of repeating Π sequentially, we now repeat it in parallel. More precisely, we let Πᵗ be the IP consisting in a prover and a verifier executing Π for t times in parallel. Formally, given a public instance x, Πᵗs prover and verifier run t parallel instances of the prover and the verifier from Π, on the instance x. Then, the verifier of Πᵗ accepts if and only if each of the t verifier instances of Π accept.</p><p>Intuitively, it is clear that Πᵗ has soundness error 1/2^{tλ}. However, for a wide (and natural) class of IPs, called <em>special unsound</em>, it turns out that, again, FS(Πᵗ)<a href="#6aaa"> [4]</a> does not achieve this level of soundness.</p><p>This phenomenon is better explained with an example. To this end, we consider the following toy IP, inspired on ethSTARK and Plonk. We omit discussing some technical details, and the whys and hows of the protocol, because of this resemblance.</p><p>Below, 𝔽 is a finite field, H is a multiplicative subgroup of 𝔽, and Q₁(Y₁,Y₂), Q₂(Y₁,Y₂) are two fixed bivariate polynomials.</p><p><strong>Claim</strong>: The prover claims it nows two low degree polynomials such that, for all x∈ H,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*tDQyOeL_kia3Mpv5AYNG3g.png" /></figure><p><strong>Round 1</strong></p><p>The prover first sends a commitment (via a Polynomial Commitment Scheme) to f₁(X) and f₂(X). The verifier replies with a random field element c₁.</p><p><strong>Round 2</strong></p><p>The honest prover replies with a commitment to the polynomial</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*7LD_SwRt6GFiMseJ1SF7hQ.png" /></figure><p>where Z_H(X) is the vanishing polynomial of H. Note that, if the prover is being honest, then Z_H(X) indeed divides Q₁(f₁(X), f₂(X)) + c₁Q₂(f₁(X), f₂(X)) as the latter polynomial vanishes on H. The verifier replies with another random field element c₂.</p><p><strong>Round 3</strong></p><p>The honest prover replies with f₁(c₂) and f₂(c₂). The honest prover and the verifier use the evaluation protocol from the Polynomial Commitment Scheme to certify that the evaluations f₁(c₂) and f₂(c₂) are correct (technically, this would add more rounds of communication to the protocol).</p><p><strong>Verifier’s decision</strong></p><p>The verifier accepts if and only if the previous verifications passed, and</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*STnO5IWa7tHHD7yGuYDCIA.png" /></figure><p>In our subsequent analysis we make Assumption ✳️ for simplicity, i.e. we assume that dishonest provers only commit to low degree polynomials f₁(X), f₂(X), q(X) (as opposed to arbitrary maps). Note that, if we see that there is a security issue for such prover, then there is a security issue in general.</p><p>Now suppose a malicious prover commits to low degree polynomials that do not satisfy (1) for some x∈ H. Then, Z_H(X) does not divide Q₁(f₁(X), f₂(X)) and/or it does not divide Q₂(f₁(X), f₂(X)). However, in principle it is possible that there exists c₁∈𝔽 such that Z_H(X) divides Q₁(f₁(X), f₂(X)) + c₁Q₂(f₁(X), f₂(X)) <a href="#06fc">[5]</a>.</p><p>If the verifier were to send such c₁, then the malicious prover could continue with the protocol as if it was honest, and it would for sure convince the verifier at the end of it. Let’s call a challenge c₁ with this property a <strong>special</strong> <strong>challenge</strong>.</p><p>Now suppose the verifier does not send a special challenge. Then, the right-hand side of (2) is not a low-degree polynomial, and so</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*wp6qml3XFYlplnAHvL73vg.png" /></figure><p>as polynomials, no matter what low-degree polynomial q(X) the prover commits to. However, there may still be a number of field elements c₂ such that (3) holds, namely, as many as the degree of q(X) Z_H(X) — Q₁(f₁(X), f₂(X)) + c₁Q₂(f₁(X), f₂(X)).</p><p>Similarly as before, if the verifier were to send one such c₂, the malicious prover could complete the protocol as if it was honest, and eventually falsely convince the verifier. Again, we call c₂ a <strong>special challenge</strong>.</p><p>This situation is captured by the following definition, which was introduced in [AFK22].</p><p><strong>Special unsound Interactive Proof (informal)</strong></p><p>An interactive proof Π is <em>special unsound</em> if, at each round i=1,…, μ, there is a set of “special” verifier challengers Cᵢ such that, if the verifier sends a challenge from Cᵢ, then a malicious prover can complete the protocol as if it was honest, and convince the verifier at the end.</p><p>Next, we explain why, for a special unsound IP Π, we have that the FS transform of Πᵗ does not have the soundness one might expect. For simplicity we restrict to t=2.</p><p>To do so, we continue with our example toy Interactive Proof, and we show that FS(Π²) has roughly the same security as FS(Π). Indeed, let x be a public input and suppose a malicious prover P* selects as its first message for FS(Π²) a tuple (m₁₁,m₁₂) where <a href="#6aaa"><strong>[4]</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*0A-QhkqRDUk3y35q-nG3tg.png" /></figure><p>for some low degree polynomials f₁(X), f₂(X) and g₁(X), g₂(X) such that either f₁(X), f₂(X) or g₁(X), g₂(X) do not satisfy (1) for all x∈ H.</p><p>Then P* computes challenges a challenge (c₁₁, c₁₂), where</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*nP8X5Rvv-UxSveP2Na9nXg.png" /></figure><p>Suppose P*<em> is lucky enough that c₁₁ is a special challenge (but c₁₂ is not necessarily special). Then, from this point on, P*</em> can select the messages of the first instance of Π in FS(Π²) as if it was honest, and the verifier will accept the final proof corresponding to this instance. As a consequence, from this point on, P^<em> needs only worry about “breaking” the second instance of Π. To do so, it can rewind the proof as many times as it needs, as long as it does not modify the initial partial transcript (x, (m₁₁, m₁₂), (c₁₁,c₁₂)). Thus, for example, P*</em> may attempt multiple times to find a 2nd message (m₂₁, m₂₂) such that</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*F6WR7DghbSZH-Mms1cBaKA.png" /></figure><p>is special. If it succeeds, then P* can complete the proof as if it was honest, no matter what the challenge c₂₁ is.</p><p>Summarizing, P* can attack FS(Π²) as follows:</p><ul><li>First, attempt multiple times to find an initial message (m₁₁, m₁₂) such that c₁₁=Hash(x, (m₁₁,m₁₂), 1) is special.</li><li>Once the previous step is successful, attempt multiple times to find a second message (m₂₁, m₂₂) such that c₂₂=Hash(x, (m₁₁, m₁₂), (c₁₁,c₁₂), (m₂₁, m₂₂), 2) is special.</li><li>Once the previous step is successful, complete the protocol as if honest.</li></ul><p><strong>Amount of work required</strong></p><p>For the attack above to succeed, P*<em> has to, essentially, “break” two instances of FS(Π), one during the first round, and the other during the second round. Given that Π has soundness error 1/2^λ, we can reasonably assume these tasks require both about 2^λ work. Hence, overall, P*</em> has to make ≈ 2^λ + 2^λ = 2^{λ+1} work, to have a reasonable chance of breaking FS(Π²). This is dramatically lower than what one would expect, namely 2^{2λ}, given that the interactive protocol Π² has soundness error 1/2^{2λ}.</p><h4>This is a plausible pitfall</h4><p>The work [DMW+23] found many protocol vulnerabilities related to using the so-called weak Fiat-Shamir transform (in which one does not include the statement as part of the random oracle’s inputs).</p><p>We think that using (the standard) FS on a protocol that has some parallelized components is also a likely pitfall. While we haven’t found any protocol with this vulnerability, we emphasize it here so it is easier for practitioners to avoid it.</p><p>In our work [BGK+23] we describe a subtle (and arguably more natural) variation of Plonky2 that does have the vulnerability. Let us remark that this variation is just hypothetical; as we show in our work, Plonky2 as described in our paper is secure.</p><h4>Contradicting heuristics around the FS transformation</h4><p>The attack to the FS transform of the parallel repetition of an IP contradicts a somewhat common heuristic regarding the security of the FS transformation. Namely, this heuristic/intuition states that, as long as each round of an interactive protocol “has λ bits of security”, then the FS-transformed protocol also has, roughly, λ bits of security. In other words, the FS-transformation is dangerous only when the interactive protocol builds up to λ bits of security by “accumulating soundness across individually less secure rounds”. The latter is precisely what occurs in Example 1, and we have seen that, indeed, in that case the FS transformation has disastrous results.</p><p>However, Example 2 does not accommodate to this heuristic. Indeed, let Π₀ be an IP with μ rounds of communication, all whose rounds have λ₀ bits of security, and let Π₀ᵗ be the result of repeating Π₀ for t times in parallel. Then one could reasonably say that each round of Π₀ᵗ has, roughly speaking, λ := t λ₀ bits of security. However, the FS transform of Π₀ᵗ has about t λ/μ bits of security.</p><h3>Next steps</h3><p>In the next two posts we will discuss different “Fiat-Shamir compatible” notions of soundness, including round-by-round (knowledge soundness). Then we will explain our <a href="https://www.notion.so/Fiat-Shamir-security-of-FRI-and-related-SNARKs-Part-1-0a380766fecc4c30ab33004049918887?pvs=21">main result</a> in detail, and provide intuition on its proof. In particular, we will explain why FRI is round-by-round sound.</p><h3>Remarks</h3><ul><li><strong>[0]</strong> For the weaker notion of knowledge soundness (which does not guarantee security after the Fiat-Shamir transformation), this was already known (under a different formulation) for “DEEP-ALI based” protocols [S23, H22].</li><li><strong>[1]</strong> Here “small” means δ &lt; (1-ρ)/2, where ρ is the <em>rate</em> (the degree plus one over the size of H). “Large” means (1-ρ)/2 ≤ δ &lt; 1-sqrt(ρ), where “sqrt” stands for square root. The quantity (1-ρ)/2 is called <em>unique decoding radius</em> and 1-sqrt(ρ) the <em>Jonson bound</em></li><li><strong>[2]</strong> This include the ethSTARK protocol. Roughly, even though this protocol is not formally a PIOP, our framework allows to think of it as a PIOP that has been compiled with FRI and the FS transform. As a consequence our results apply to it. This will become more apparent in the next posts of the series.</li><li><strong>[3]</strong> “Work” here refers to the number of Random Oracle queries the malicious prover needs to make. We do not take into account the cost of runninig the rest of the protocol FS(Πₜ).</li><li><strong>[4]</strong> In FS(Πᵗ) the t verifier challenges in the i-th round of the protocol, cᵢ₁, …, c_{il}, are computed as</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*s60R5mZhGJnYBhZ600845A.png" /></figure><ul><li>where x is the public input, and the mⱼ=(mⱼ₁, …, mⱼₜ) are the t parallel messages sent by the t provers running in parallel in Πᵗ.</li><li>We note that there are other “equivalent” methods of computing the challenges c_{il}.</li><li><strong>[5]</strong> Admittedly, in this toy Interactive Proof, it is perfectly possible that this “dangerous” challenge c₁ does not exist (since it needs to be a common solution to |H| linear equations). However, it is still possible that for some Q₁, Q₂ and maliciously chosen f₁, f₂, such c₁ exists. In this scenario, the attack on FS(Π²) we will describe would apply.</li></ul><h3>References</h3><ul><li>[AFK22] Attema, T., Fehr, S., Klooß, M. (2022). Fiat-Shamir Transformation of Multi-round Interactive Proofs. In: Kiltz, E., Vaikuntanathan, V. (eds) Theory of Cryptography. TCC 2022. Lecture Notes in Computer Science, vol 13747. Springer, Cham. <a href="https://doi.org/10.1007/978-3-031-22318-1_5">https://doi.org/10.1007/978-3-031-22318-1₅</a></li><li>[BGK+23] Block, A. R., Garreta, A., Katz, J., Thaler, J., Tiwari, P. R., &amp; Zajac, M. (2023). Fiat-Shamir Security of FRI and Related SNARKs. <em>Cryptology ePrint Archive</em>. <a href="https://eprint.iacr.org/2023/1071">https://eprint.iacr.org/2023/1071</a></li><li>[BFS20] Bünz, B., Fisch, B., Szepieniec, A. (2020). Transparent SNARKs from DARK Compilers. In: Canteaut, A., Ishai, Y. (eds) Advances in Cryptology — EUROCRYPT 2020. EUROCRYPT 2020. Lecture Notes in Computer Science(), vol 12105. Springer, Cham. <a href="https://doi.org/10.1007/978-3-030-45721-1_24">https://doi.org/10.1007/978-3-030-45721-1₂4</a></li><li>[CHM+20] Chiesa, A., Hu, Y., Maller, M., Mishra, P., Vesely, N., Ward, N. (2020). Marlin: Preprocessing zkSNARKs with Universal and Updatable SRS. In: Canteaut, A., Ishai, Y. (eds) Advances in Cryptology — EUROCRYPT 2020. EUROCRYPT 2020. Lecture Notes in Computer Science(), vol 12105. Springer, Cham. <a href="https://doi.org/10.1007/978-3-030-45721-1_26">https://doi.org/10.1007/978-3-030-45721-1₂6</a></li><li>[DMW+23] Dao, Q., Miller, J., Wright, O., &amp; Grubbs, P. (2023). Weak Fiat-Shamir Attacks on Modern Proof Systems. <em>Cryptology ePrint Archive</em>.</li><li>[H22] Haböck, U. (2022). A summary on the FRI low degree test. <em>Cryptology ePrint Archive</em>. <a href="https://eprint.iacr.org/2022/1216">https://eprint.iacr.org/2022/1216</a></li><li>[KPV22] Kattis, A. A., Panarin, K., &amp; Vlasov, A. (2022, November). RedShift: transparent SNARKs from list polynomial commitments. In <em>Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security</em> (pp. 1725–1737).ISO 690</li><li>[Polygon] Plonky2: A deep dive (2022). <a href="https://polygon.technology/blog/plonky2-a-deep-dive">https://polygon.technology/blog/plonky2-a-deep-dive</a></li><li>[S23] StarkWare (2023). ethSTARK Documentation v1.2. <em>IACR Cryptol. ePrint Arch.</em>, <em>2023</em>, 582. <a href="https://eprint.iacr.org/2021/582">https://eprint.iacr.org/2021/582</a></li><li>StarkWare (2019). Low degree testing, the secret sauce of succinctness. <a href="https://medium.com/starkware/low-degree-testing-f7614f5172db">https://medium.com/starkware/low-degree-testing-f7614f5172db</a></li><li>Thaler, J. (2023). 17 misconceptions about SNARKs (and why they hold us back) <a href="https://a16zcrypto.com/posts/article/17-misconceptions-about-snarks/">https://a16zcrypto.com/posts/article/17-misconceptions-about-snarks/</a></li><li>[VP19] Vlasov, A., &amp; Panarin, K. (2019). Transparent polynomial commitment scheme with polylogarithmic communication complexity. <em>Cryptology ePrint Archive</em>. <a href="https://eprint.iacr.org/2019/1020">https://eprint.iacr.org/2019/1020</a></li></ul><h3><strong>Disclaimer</strong></h3><p>This article has been prepared for the general information and understanding of the readers, and it does not indicate Nethermind’s endorsement of any particular asset, project or team, nor guarantee its security. No representation or warranty, express or implied, is given by Nethermind as to the accuracy or completeness of the information or opinions contained in the above article. No third party should rely on this article in any way, including without limitation as financial, investment, tax, regulatory, legal or other advice, or interpret this article as any form of recommendation.</p><h3>About Us</h3><p><a href="https://nethermind.io/">Nethermind</a> is a blockchain research and software engineering company empowering enterprises and developers worldwide to work with and build on decentralized networks. We are a leading contributor to critical infrastructure and developer tooling for blockchain ecosystems, focused on upholding the core ethos of decentralization and security. The Nethermind execution layer client plays an important role in advancing the network, and we actively collaborate with the broader Ethereum community. Furthering Ethereum scalability through Starknet, we deliver infrastructure and developer resources, including a node implementation and a block explorer and data analytics platform.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b913728ddec" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nethermind-eth/fiat-shamir-security-of-fri-and-related-snarks-part-1-9b913728ddec">Fiat-Shamir security of FRI and related SNARKs — Part 1</a> was originally published in <a href="https://medium.com/nethermind-eth">Nethermind.eth</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to reach consensus with strangers]]></title>
            <link>https://medium.com/nethermind-eth/how-to-reach-consensus-with-strangers-9b57264afd65?source=rss-1123fbae9f36------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b57264afd65</guid>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[consensus-algorithm]]></category>
            <dc:creator><![CDATA[Albert Garreta]]></dc:creator>
            <pubDate>Fri, 09 Sep 2022 11:56:24 GMT</pubDate>
            <atom:updated>2022-11-21T08:50:01.674Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9gcaOvRo-V5J692ieTzjRA.png" /></figure><p>by <a href="https://twitter.com/0xAlbertG">Albert Garreta</a> and <a href="https://twitter.com/Volkg_">Isaac Villalobos Gutiérrez</a>. Special thanks to <a href="https://twitter.com/mpfzajac">Michal Zajac</a> and <a href="http://www.linkedin.com/in/aragirtas">Ahmet Ramazan Agirtas</a> for helpful comments and revisions.</p><p>In this post, we discuss the notion of <strong>Byzantine Fault Tolerant (BFT) consensus protocols</strong>. To start with, we offer an overview of the main concepts and their properties. Following that, we describe a large family of such protocols, and we discuss the world of synchronous BFT consensus, getting into the details of <a href="https://eprint.iacr.org/2020/458">OptSync</a>, a state-of-the-art synchronous protocol.</p><p>This post can be read either on its own or as the third installment of our Distributed Validator Technology (DVT) series and the primitives that enable it. In the <a href="https://medium.com/nethermind-eth/sorting-out-distributed-validator-technology-a6f8ca1bbce3">first post</a>, we gave an overview of DVT, while in the <a href="https://medium.com/nethermind-eth/a-tour-of-verifiable-secret-sharing-schemes-and-distributed-key-generation-protocols-3c814e0d47e1">second</a>, we discussed Distributed Key Generation protocols.</p><p><strong>Table of contents</strong></p><ul><li><a href="#6c35">Introduction</a></li><li><a href="#f1d0">Crash course on Byzantine Fault Tolerant consensus protocols</a></li><li><a href="#0a56">A general recipe for PBFT-based consensus</a></li><li><a href="#3d07">The protocols used in Distributed Validator Technology</a></li><li><a href="#0bcf">Synchronous protocols</a></li><li><a href="#fd4b">Description of OptSync (steady-state)</a></li><li><a href="#0295">Security analysis</a></li><li><a href="#dc9b">Final remarks</a></li><li><a href="#ec52">References</a></li></ul><h3>Introduction</h3><p>Let’s begin with a classic example that explains some of the terms used in the field of consensus algorithms.</p><p>Suppose an army is trying to conquer the city of Byzantium. The army is distributed across divisions, with one general in command per division. The army has managed to surround the city. Still, the defenses are more resilient than expected, and the generals are now trying to decide whether they should continue the attack or withdraw their divisions. The problem is that, for the attack to have a chance of succeeding, a majority of divisions need to remain. Otherwise, the army will not be large enough.</p><p>Hence, the generals face the following task: they need to communicate with one another to reach a joint decision. In this example, we assume the generals cannot meet in person and instead use “raven mail” to communicate 🐦. There are a couple of issues with this method:</p><ul><li>Ravens can get lost or arbitrarily delayed.</li><li>Some of the generals could be secretly allied with the city of Byzantium. i.e., some of the generals could be <strong>Byzantine</strong>.</li></ul><p>This classical scenario is commonly called the <strong>Byzantine Generals Problem.</strong> It showcases the need for robust methods that allow a group of parties to reach a coordinated decision, even if some are unreliable or malicious.</p><p>In some settings, it is common to assume that no generals are dishonest. This makes the problem less demanding, and consequently, one can devise efficient solutions which would not work in our more general setting. We will not discuss these in this post.</p><p>In modern terms, consensus protocols are fundamental to distributed computing technologies, including many blockchain systems and applications built around them. Indeed, for example, <a href="https://bitcoin.org/bitcoin.pdf">Nakamoto consensus</a> (sometimes referred to as “Bitcoin’s Proof of Work”) is one among many consensus protocols. And yes, more generally, all Layer 1’s are built around such a mechanism.</p><p>Besides blockchains, consensus is essential in many other applications, such as cloud computing, clock synchronization, PageRank, etc. Additionally, as we discussed in an <a href="https://medium.com/nethermind-eth/sorting-out-distributed-validator-technology-a6f8ca1bbce3">earlier post</a>, it is a crucial piece of Distributed Validator Technology (DVT), where a group of nodes running an Ethereum validator must agree on what block to attest to or propose.</p><p>Next up, we will go through a few crucial notions and definitions that underpin consensus mechanisms. We will describe a “meta-protocol” that many PBFT-based protocols follow, and briefly outline <a href="https://github.com/ethereum/EIPs/issues/650">IBFT</a>/<a href="https://arxiv.org/abs/2002.03613">QBFT</a>, a partially synchronous protocol used by companies working on DVT technology such as <a href="https://obol.tech/">Obol</a> and <a href="http://blox.io/">Blox.io</a>.</p><p>We strongly recommend the blog <a href="https://decentralizedthoughts.github.io/">Decentralized Thoughts</a> for tons of excellent material on consensus and other cryptography topics.</p><h3>Crash course on Byzantine Fault Tolerant consensus protocols</h3><p>From now on, we call each party participating in a consensus protocol a <strong>replica</strong>. We let <strong>n be the number of replicas</strong>. A replica is called <strong>Byzantine</strong> if either:</p><ul><li>It is actively trying to sabotage the successful functioning of the protocol.</li><li>It is malfunctioning or offline.</li></ul><p>Otherwise, we say the replica is <strong>honest</strong>. Perhaps counterintuitively, in this context, a replica that is trying to follow the protocol but is offline or malfunctioning due to external circumstances would not count as an honest replica, even if it has the best of intentions.</p><p>We let f be the number of<strong> Byzantine replicas.</strong></p><h4>The problem: State Machine Replication</h4><p>What goal are the replicas trying to achieve? Assume a client is interacting with a program, and as this happens, it submits requests to a mempool. The objective of each replica R is to create an ordered list of <strong>blocks</strong> containing requests and to execute the requests in the order specified by this list. We denote such a list as C(R). Moreover, this needs to be done in a way where the following requirements are met:</p><ul><li><strong>Safety (or Security)</strong>: For any two honest replicas, R₁ and R₂, one of the lists among C(R₁) and C(R₂) extends the other list. For example, if C(R₁)=(B₁, B₂) and C(R₂)=(B₁, B₂, B₃), then C(R₂) extends C(R₁) and we are happy. But if C(R₁)=(B₁, B₂) and C(R₂)=(B₁, B₃), then there has been a security breach (Here each Bᵢ denotes a different block).</li><li><strong>Liveness</strong>: Each client request is eventually included in some block of C(R), for each honest replica R.</li></ul><p>The above is essentially the definition of the <strong>State Machine Replication (SMR) </strong>problem. Other common (less demanding) problems in the BFT consensus literature are <a href="https://decentralizedthoughts.github.io/2019-06-27-defining-consensus/"><strong>Byzantine Broadcast and Byzantine Agreement</strong></a><strong>.</strong></p><p>Note that even though our terminology evokes the blockchain space, the formulation above can accommodate various unrelated applications.</p><p>Next, we focus on two of the most critical assumptions one can make in this context: the communication model and the number of tolerated Byzantine replicas.</p><h4>Communication model</h4><p>An important characterizing property of consensus protocols revolves around the assumptions made on how replicas communicate with each other. These are the most common assumptions in <a href="https://decentralizedthoughts.github.io/2019-06-01-2019-5-31-models/">the literature</a>:</p><ul><li><strong>Synchronous communication model</strong>: There is a time bound Δ, known to all replicas, such that, for any two replicas R₁, R₂, any message that R₁ sends to R₂ takes at most Δ time to reach R₂.</li><li><strong>Asynchronous communication model</strong>: Messages can take an arbitrary amount of time to travel from one replica to another.</li><li><strong>Partially synchronous communication model</strong>: There is a time bound GST (Global Stabilization Time), unknown to at least all honest replicas, such that, after GST time has passed since the start of the protocol, the communication becomes synchronous.</li></ul><p>An <strong>example</strong> may help illustrate the motivation behind the last model: suppose the replicas can communicate at a reasonable speed, but suddenly there is an “exceptional event” — e.g., a country-wide blackout or a big server bug — that makes communication highly delayed and unpredictable. It is reasonable to expect that, after an indeterminate amount of time, communication will return to its usual timely functioning. The partial synchronous model aims to capture this type of scenario. See this <a href="https://decentralizedthoughts.github.io/2019-09-14-flavours-of-partial-synchrony/">post by Ittai Abraham</a> for further details about this model.</p><p>Further on, we will classify well-known protocols according to their communication model and Byzantine Fault Tolerance threshold (see below).</p><h4>BFT protocols</h4><p>This blog post considers only <strong>Byzantine Fault Tolerant (BFT)</strong> protocols. These algorithms guarantee security and liveness even if some parties participating in them are malicious. There are other families of protocols that make alternative assumptions about the possible behavior of parties. For example, protocols used by companies may only assume that, at worst, a “party” can crash. Most definitions given here apply to such protocols as well.</p><h4>Maximum fraction of Byzantine replicas, or BFT threshold</h4><p>This specifies the maximum ratio f/n of Byzantine replicas the BFT protocol can tolerate while guaranteeing security and liveness. The communication model in use heavily determines this ratio. More precisely, one can achieve safety and liveness if:</p><ul><li><strong>Synchronous model:</strong> Less than half of the replicas are Byzantine, i.e., f&lt;n/2.</li><li><strong>Partially synchronous model</strong>: Less than one-third of the replicas are Byzantine, i.e., f&lt;n/3.</li><li><strong>Asynchronous model</strong>: It is impossible to build a secure and lively protocol in this model! For proof of this fact, see the following video by <a href="https://www.youtube.com/watch?v=vJhm9uhd34E&amp;list=PLEGCF-WLh2RLOHv_xUGLqRts_9JxrckiA&amp;index=17">Tim Roughgarden</a> or the <a href="https://groups.csail.mit.edu/tds/papers/Lynch/jacm85.pdf">original paper</a> presented in 1985.</li></ul><p>Both thresholds above are sharp, i.e., it is proven that there do not exist secure and lively protocols that can tolerate exactly or more than n/2 or n/3 Byzantine replicas, respectively. We refer to <a href="https://decentralizedthoughts.github.io/2021-10-29-consensus-cheat-sheet/">this post</a> by Ittai Abraham for references and an overview of these types of thresholds.</p><p>Concerning asynchrony, if f&lt;n/3, then the impossibility result disappears if one relaxes the liveness (or the security) requirements. For example, <a href="https://decentralizedthoughts.github.io/2022-03-30-asynchronous-agreement-part-one-defining-the-problem/">it is possible</a> to build an asynchronous protocol with f&lt;n/3 if, instead of liveness, one only requires that a request seen by all honest replicas is eventually included in each of the honest replicas’ list of blocks C(R) <strong>with very high probability</strong>.</p><h4>PBFT-based protocols</h4><p>A classic BFT protocol is the so-called <a href="https://pmg.csail.mit.edu/papers/osdi99.pdf">Practical Byzantine Fault Tolerant (PBFT) protocol</a> (1999). To the best of our knowledge, this was the first BFT protocol to be used in practical settings. Many subsequent algorithms can be seen as variations and extensions of this one, e.g., <a href="https://arxiv.org/abs/2003.03052">Gasper</a>, <a href="https://tendermint.com/">Tendermint</a>, <a href="https://github.com/ethereum/EIPs/issues/650">IBFT</a>, <a href="https://arxiv.org/abs/2002.03613">QBFT,</a> <a href="https://arxiv.org/abs/1803.05069">HotStuff</a>, etc.</p><p>This post will use the non-standard term <strong>PBFT-based protocol</strong> to refer to a family of algorithms of this kind, and going forward, we will almost exclusively focus on them.</p><h4>Leaders</h4><p>PBFT-based protocols (and many others) assign to some replicas the special role of <strong>leader</strong>. Such a leader is usually responsible for :</p><ul><li>Proposing blocks,</li><li>(At times) managing the communication between replicas (to reduce the communication complexity),</li><li>Performing a variety of tasks specific to each protocol.</li></ul><p>We cannot have the protocol rely on the leader replica to function honestly. Otherwise, such a leader may just as well process and finalize blocks on its own. For this reason, all protocols that rely on leaders implement a <strong>leader-change mechanism</strong> (sometimes called a <strong>view-change mechanism</strong>)<em>.</em> Such mechanism is used when the network realizes that the leader is not doing its job as expected, or there is a scheduled change of the leader.</p><h4>Steady-state and view-change</h4><p>PBFT-based protocols progress through a series of <strong>views</strong>. Each view v is a positive integer and corresponds to a leader Lᵥ. A <strong>view-change</strong> is a subprotocol that makes it possible to increase the view number v by one so that the replica Lᵤ replaces replica Lᵥ as the leader, where u=v+1.</p><p>There are two trends in regards to when view-changes are executed:</p><ul><li>Some protocols do not perform a view-change until the leader is detected to misbehave. In particular, in this type of protocol, if a leader is perpetually honest, there will never be a view-change.</li><li>Other protocols execute a view-change every time a block is finalized. This is common of PBFT-based protocols used in Layer 1’s such as <a href="https://arxiv.org/abs/2003.03052">Gasper</a>, <a href="https://tendermint.com/">Tendermint</a>, <a href="https://github.com/ethereum/EIPs/issues/650">IBFT</a>, <a href="https://arxiv.org/abs/2002.03613">QBFT,</a> <a href="https://arxiv.org/abs/1803.05069">HotStuff</a>, etc. Another example is Nakamoto consensus (though this one is not “PBFT-based” and does not use the “view” terminology).<br>These protocols are sometimes referred to as <strong>leader-rotating.</strong></li></ul><p>As long as a replica is not trying to change the leader, we say the replica is in <strong>steady-state</strong>.</p><h4>Block finalization, latency, throughput, and communication complexity</h4><p>We say that an honest replica R <strong>finalizes</strong> (or <strong>commits</strong>) a block when it includes it in its list of blocks C(R). The <strong>latency</strong> of the protocol is the amount of time that passes between the moment a designated replica (for example, the leader) includes the request in a block proposal and when all honest replicas have finalized a block containing such a request.</p><blockquote><em>Once a communication model and a Byzantine Fault Tolerance threshold have been fixed, the latency of the protocol is perhaps the property that receives the most attention in the literature.</em></blockquote><p>The protocol’s <strong>throughput</strong> is the inverse of the time T that passes between the finalization of two consecutive blocks into all the lists C(R) of honest replicas. This T is at most the latency, but T can be significantly lower. For example, several “instantiations” of the same core consensus protocol can be run in parallel, giving the overall setting a high throughput without altering the latency.</p><p>The <strong>communication complexity</strong> refers to the total number of messages the replicas send each other, from when a designated replica (the leader) includes a client request in a block proposal, to when the request is included in a finalized block by all honest replicas.</p><p>Sometimes only digital signatures are counted regarding communication complexity, as these are often the largest pieces of data interchanged between replicas.</p><p>Below we list a few well-known consensus protocols and their properties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2qHr6fxJbqd-l_gbxEUBWg.png" /></figure><p>(Links for each protocol are provided at the end of the post)</p><p>(1): The security of Nakamoto Consensus is a nontrivial topic. See, for example, <a href="https://eprint.iacr.org/2019/943">this paper by Ling Ren (2019)</a>. Roughly, the “right setting” consists of having blocks produced at least every 10 minutes.</p><p>(2): <a href="https://algorandcom.cdn.prismic.io/algorandcom%2F218ddd09-8d6f-42f7-9db9-5cfbc0aedbe5_algorand_agreement.pdf">Algorand’s</a> proof of liveness assumes synchronous communication. However, Algorand retains security under asynchronous communication.</p><p>(3): Security and liveness proofs in <a href="https://arxiv.org/pdf/1906.08936.pdf">Snowflake</a> are guaranteed to hold with high probability p. The BFT threshold can be increased at the expense of reducing p.</p><h3>A general recipe for PBFT-based consensus</h3><p>As we mention, PBFT-based protocols are quite similar. For this reason, in this section, we present a “general scheme” for such protocols. Later, we will describe a particular instantiation of this scheme as the so-called <a href="https://eprint.iacr.org/2020/458">OptSync protocol</a>.</p><p>We assume that honest replicas use digital signatures and a Public Key Infrastructure (PKI) to guarantee that messages are untampered and authenticated.</p><p>For each view v we let Lᵥ denote the leader during view v. While in view v, each replica R (including the leader) follows the next steps (see the figure below as well):</p><h4><strong>Propose step</strong></h4><p>The replica R ignores this step unless R is the leader Lᵥ.</p><ul><li>Lᵥ collects requests from a mempool and bundles them into a block B.</li><li>Lᵥ broadcasts a &lt;propose B&gt; message containing B, the block B is attached to, and a signature of Lᵥ (and perhaps more data).</li></ul><h4><strong>Voting step(s)*</strong></h4><p>Intuitively, R verifies that a block proposal satisfies several security properties (specified by the particular protocol in use). If so, it broadcasts a message to all replicas attesting to this fact. Otherwise, it broadcasts a complaint against the leader, and it may proceed to execute the view-change mechanism.</p><p>More precisely:</p><p>1) Upon receiving a &lt;propose B&gt; message, the replica makes several security checks. These are specific to each protocol, but usually, they include making sure that the following (or similar) conditions are met:</p><ul><li>The message signature is valid.</li><li>B is well-formed and points to a “valid” parent block.</li><li>The message &lt;propose B&gt; is not incompatible with other “propose” messages received during view v.</li><li>Less than (1-f)n replicas have complained against the leader (such complaints may be triggered by the leader failing to propose valid blocks — e.g., by being inactive).</li></ul><p>2) If some of these checks fail, the replica broadcasts a complaint message along with evidence supporting such a complaint (if possible). If the detected issues are severe enough, the replica exits the view and proceeds to execute the view-change mechanism. By “severe” we refer to issues that unequivocally prove that the leader is Byzantine.</p><p>3) Otherwise if some (protocol specific) extra conditions are met R sends a &lt;vote B&gt; message to all replicas.</p><p>The figure below schematizes how the “vote step” works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uO6nqVNj_tibDlsujIN9Wg.png" /></figure><p>(*) Different protocols have a different number of instantiations of this step. That is, state-of-the-art protocols usually have two or even three “vote steps” (with a different name each). For example, <a href="https://tendermint.com/">Tendermint</a> has two vote steps, Prevote and Pre-commit; and <a href="https://arxiv.org/abs/1803.05069">HotStuff</a> has three, Prepare, Pre-commit, and Commit.</p><p>The 2nd vote step is essentially like the 1st one, except that the replica now expects to receive messages of the type &lt;vote B&gt; instead of messages of the form &lt;propose B&gt;, and it broadcasts &lt;vote (2nd version) B&gt; once certain protocol-specific conditions are met (e.g. once it has received at least (1-f)n &lt;vote B&gt; messages for the same block B). Similarly, in the 3rd vote step, R receives messages of the form &lt;vote (2nd version) B&gt;, and it broadcasts messages as &lt;vote (3rd version) B&gt;, etc.</p><h4><strong>Finalization and Execution step</strong></h4><p>This step works similarly to an extra vote step, with the difference that, at the moment when R would vote for a message, here R includes B in its list of finalized blocks C(R), and executes the requests contained in the block.</p><p>As we mentioned, PBFT-based consensus also relies on a subprotocol that allows to replace the current leader. For brevity, we will not describe this in this post.</p><h3>The protocols used in Distributed Validator Technology</h3><p>As we mentioned in the table above, the consensus mechanism currently used by <a href="https://obol.tech/">Obol</a> and <a href="https://www.bloxstaking.com/">Blox</a> is the so-called <a href="https://arxiv.org/abs/2002.03613">Quorum BFT</a> (or just QBFT) consensus protocol. This is a variation of the <a href="https://github.com/ethereum/EIPs/issues/650">Istanbul BFT</a> (or just IBFT) protocol, which achieves a better message complexity of O(n²). It follows our general scheme closely, having two vote steps (called “prepare” and “commit”). The conditions in Step 2.3 consist precisely in receiving at least 2n/3 Propose or Vote messages from the previous step. Similarly, in Step 3, a block B is executed and included in the replica’s list of finalized blocks only when at least 2n/3 messages of the form &lt;commit B&gt; are received.</p><p>The protocol includes a so-called <strong>block-locking mechanism,</strong> akin to <a href="https://tendermint.com/">Tendermint</a>’s, to ensure safety after performing a view-change.</p><h3>Synchronous protocols</h3><p>In what follows, we opt to specialize our discussion to a synchronous communication model. This is because synchronous BFT protocols are less known in the blockchain space than partially synchronous ones. For further information on specific partially synchronous protocols, we refer, for example, to this <a href="https://decentralizedthoughts.github.io/2019-06-23-what-is-the-difference-between/">excellent post by Ittai Abraham</a> discussing <a href="https://pmg.csail.mit.edu/papers/osdi99.pdf">PBFT</a>, <a href="https://research.vmware.com/files/attachments/0/0/0/0/0/7/2/sbft_scaling_up_byzantine_fault_tolerance_5_.pdf">SBFT</a>, <a href="https://tendermint.com/">Tendermint</a>, and <a href="https://arxiv.org/abs/1803.05069">HotStuff</a>. We note that most of these protocols adhere quite closely to the general scheme we presented above.</p><h4>Overview</h4><p>In this section, we assume a synchronous communication model. We let Δ be the publicly known pessimistic maximum communication delay, and we let δ denote the <strong>actual network delay</strong>. This parameter is an approximation of the actual delivery time of messages within the network of replicas, while Δ is a pessimistic “worst-case scenario” bound for such time. In general, δ is much smaller than Δ.</p><p>Perhaps counterintuitively, synchronous protocols generally have <strong>significantly more latency than partially synchronous ones.</strong> Indeed, partially synchronous protocols can achieve a latency of O(δ) (think, for example, something like 4δ to 8δ) when communication works normally. For example, <a href="https://arxiv.org/abs/1803.05069">HotStuff</a> is one such protocol — we note that Tendermint has a O(Δ) bottleneck in its view-change mechanism, even during periods of fast communication. In contrast, synchronous protocols must have a latency of O(Δ) when f is close to n/2, <strong>even if all honest replicas communicate at network speed δ </strong>(see this <a href="https://eprint.iacr.org/2020/458">paper by Shrestha et al</a>).</p><h4><strong>A sub-threshold: fast path and slow path</strong></h4><p>On the other hand, a protocol called <a href="https://eprint.iacr.org/2017/913.pdf">Thunderella</a> was presented in 2017, which is capable of finalizing blocks at network speed — i.e., with O(δ) time — when f&lt;n/4 (i.e., when less than a fourth of the replicas are Byzantine). This and subsequent protocols (for example, <a href="https://eprint.iacr.org/2019/270">Sync HotStuff</a>) feature <strong>fast</strong> and <strong>slow paths</strong>. Each of these “paths” is a subprotocol that is activated when f&lt;n/4 or n/4≤ f &lt;n/2, respectively. The corresponding latencies are O(δ) and O(Δ), respectively.</p><p>However, such protocols need an extra mechanism that allows honest replicas to know which path they should follow (i.e., the replicas need to spend communication resources trying to estimate the current value of f) and how to switch securely from one path to the other.</p><p>This “path-switching” process represents a costly one in terms of latency. For example, in Thunderella, this cost is O(κΔ) where κ is a security parameter. Hence, protocols following the “fast-and-slow path paradigm” may not be the best fit for environments where f changes frequently. Furthermore, n/4 coordinated Byzantine replicas could cause endless “path-switching” triggers by successively misbehaving for a while and then behaving correctly for another while. This could effectively DoS the whole protocol.</p><h4><strong>Optimistic and responsive block finalization</strong></h4><p>One of the first synchronous BFT protocols to address this issue is the <a href="https://eprint.iacr.org/2020/458"><strong>OptSync</strong></a> protocol (see also the <a href="https://eprint.iacr.org/2018/980.pdf">PiLi</a> and <a href="https://eprint.iacr.org/2020/406">Hybrid-BFT</a> protocols).</p><p>Intuitively speaking, instead of switching from a fast to a slow path and vice-versa, OptSync has two subprotocols running simultaneously. Let’s call them the <strong>optimistic subprotocol</strong> and the <strong>synchronous subprotocol</strong>. Roughly, they work and interplay as follows:</p><ul><li>If f&lt;n/4, then the <strong>optimistic subprotocol</strong> is guaranteed to finalize blocks with latency O(δ).</li><li>If n/4≤ f&lt;n/2, in general, the optimistic subprotocol will not be able to reach a consensus. However, the slower <strong>synchronous subprotocol will be there, waiting to save the day</strong>, guaranteeing that blocks are finalized within time O(Δ).</li></ul><p>Next, we provide a rather detailed description of OptSync’s steady-state. We describe it as an instantiation of the general scheme outlined previously. Some arguments we use are standard arguments from the PBFT-based consensus literature; hence they are of general interest.</p><h3>Description of OptSync (steady-state)</h3><p>The authors introduce two versions of the protocol which are Byzantine Fault Tolerant. We refer to these as OptSync V1 and V2. They also describe a third version that does not tolerate Byzantine replicas. The latencies of OptSync V1 and V2 are annotated below. Note that the first version has a slightly faster steady-state, while the second is able to replace leaders at network speed when f&lt;n/4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5QAc0ritYZZA6z0gqKGbtQ.png" /></figure><p>We will describe the simplest of OptSync’s versions, namely V1 in the table above.</p><h4><strong>Block organization</strong></h4><p>For our explanations to make complete sense, we need to be a little more elaborate regarding how replicas store the blocks they receive.</p><p>In the protocol, each block points to a <strong>predecessor block.</strong> Honest replicas store a <a href="https://en.wikipedia.org/wiki/Directed_acyclic_graph"><strong>Directed Acyclic Graph (DAG)</strong></a><strong> of blocks</strong>, which is updated with each non-erroneous (more on this later) block they receive.</p><p>As with the list of blocks C(R), each honest replica R stores its version of such a DAG. Two blocks in the DAG <strong>equivocate</strong> one another if neither is an ancestor of the other (i.e., there is no path from one to the other).</p><p>If the protocol functions correctly, then for each replica R, the stored DAG has a path C(R) of finalized blocks. In particular, C(R) contains no two equivocating blocks.</p><p>Notice that the DAG is only used to organize the blocks that each replica sees. Adding a block to the DAG does not necessarily mean that it is finalized or has any validity.</p><p>Below we schematize how such a DAG may look like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WMQdnA_EA2TOdQKa0N8R3w.png" /></figure><p>We now proceed to describe the steady-state of OptSync.</p><blockquote><em>We present a simplified protocol version, omitting several technicalities for clarity and space.</em></blockquote><p>As usual, we let v be a view number and let Lᵥ be the leader of view v. While in view v, an honest replica R follows the below protocol.</p><h4><strong>Propose step</strong></h4><p>This step is essentially the same as the one outlined in our general scheme.</p><h4><strong>Vote step</strong></h4><p>Upon receiving &lt;propose B&gt; from the leader, if no <strong>error</strong> is detected (see below), then:</p><ul><li>R broadcasts a message of the form &lt;vote B&gt;</li><li>R adds B to its DAG.</li></ul><p>We call each of the following an <strong>error</strong>:</p><ul><li>B equivocates a block from R’s list of finalized blocks C(R).</li><li>While in view v, R has previously broadcasted a message of the form &lt;vote B&#39;&gt; for a block B&#39; that equivocates B (and since equivocation is a symmetric relation, B equivocates B&#39;).</li><li>The contents of B are faulty in some application-specific sense (for example, focusing on the blockchain world, B could contain a smart contract transaction with an invalid signature).</li><li>&lt;propose B&gt; does not have a valid signature.</li></ul><p><strong>Technical note:</strong> &lt;vote B&gt; includes the message &lt;propose B&gt; . Otherwise, Byzantine replicas could broadcast a vote for an arbitrary equivocating block, causing a DoS attack on the system due to Bullet 1.</p><p>Additionally, R ignores proposals from other views.</p><p><strong>What if a valid message of the form</strong> &lt;propose B&gt; <strong>never arrives?</strong> Roughly speaking, the replica broadcasts a “complaint” against the leader, which we call a <strong>blame message</strong>.</p><h4><strong>Execute step (non-blocking)</strong></h4><p>R finalizes a block B (and all predecessors of B) into its list of blocks C(R) as soon as the following two conditions are met:</p><p><strong>Condition 1</strong>: R has not decided to change the leader Lᵥ (more on this later).</p><p><strong>Condition 2</strong>: One of the following is true:</p><ul><li><strong>Responsive finalization</strong>: R has received at least 3n/4 messages of the form &lt;vote B&gt; from different replicas. If R voted for B previously, we also count such a vote towards the 3n/4 votes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bGjcf2MeRtHhp5y4PxCO9Q.png" /></figure><ul><li><strong>Synchronous finalization</strong>: 2Δ time has passed since R broadcasted its message &lt;vote B&gt;.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_CuqJii5xP5z7hdt7YtJWA.png" /></figure><p><strong>When to initiate a view-change?</strong> R decides to change the leader, i.e. R begins a view-change, when:</p><ul><li>R receives evidence of the leader being faulty: this may be at least ⌊n/2⌋ +1 blame messages, or cryptographic proof of a severe issue with the leader’s behavior (sent by another replica).</li><li>R receives an erroneous (in the sense described in the vote step) vote or block proposal for a block B. In this case R broadcasts cryptographic evidence of such an event.</li></ul><p>This is the entirety of the steady-state of our simplified version of the OptSync protocol. Describing the view-change protocol is out of scope.</p><h3>Security analysis</h3><p>Next, we sketch the main points that make the steady-state secure. Don’t let the math deter you — it’s easier than it looks.</p><p>Recall that in our context <strong>security</strong> refers to the fact that for any two replicas R, R’, there are no two equivocating blocks in the lists C(R) and C(R’). Assuming the leader Lᵥ is not Byzantine, we now discuss why this is indeed the case.</p><p>We see that no two honest replicas R, R’ can finalize blocks B, B’, respectively, that equivocate each other. This means that, as long as all honest replicas stay in view v, C(R) and C(R) do not contain two equivocating blocks. Hence, one is an extension of the other, as required. To prove so, we argue that if this is not the case, then a contradiction occurs. Hence let us assume R finalizes B while in view v and R’ finalizes a block B’ that equivocates B when in view v. There are four scenarios:</p><ul><li>Both B and B’ were finalized responsively.</li><li>Both B and B’ were finalized synchronously.</li><li>B was finalized responsively and B’ synchronously, or vice-versa.</li></ul><h4><strong>Case 1: Both B and B’ were finalized responsively</strong></h4><p>The following type of argument is ubiquitous in the literature about consensus protocols.</p><p>Denote by S, S’ the sets of replicas that have voted for the blocks B and B’ when in view v, respectively.</p><p>We <strong>claim</strong> that there must exist an honest replica that belongs to both S and S’. This contradicts the fact that, by design, while in view v, an honest replica Rₕ never votes for two blocks that equivocate one another (see the “Vote” step above).</p><p><strong>Proof of the claim</strong>: We present the general argument. Along the way we give the actual numbers for the example n=8 and f &lt; n/2 = 4.</p><p>Since B and B’ have been finalized responsively, we have |S|, |S’|≥ 3n/4= 6.</p><p>Hence the sets S and S’ must have at least n/2=4 replicas in common. In the example, if there are less than n/2=4 replicas in common, say there are 3 replicas in common, then there must be at least 3 replicas belonging to B and not to B’, and 3 other replicas belonging to B’ but not to B, forcing |S|≥ 9, a contradiction.</p><p>Since f &lt; n/2 =4, and S and S’ have at least n/2=4 replicas in common, there must be at least one honest replica R among these. This means that R voted for the two equivocating blocks B, B’: a contradiction.◾</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x0OG5Voh4TQe6puQSmhIVg.png" /></figure><p>(Figure: Illustration of the example discussed above. The blue dots (1, 2, 3, 5, 6) represent honest replicas, while the Byzantine replicas are represented as hollow green dots (4, 7, 8). S’ and S are indicated as orange and dashed gray lines, respectively. The reader may convince themselves that it is impossible to draw two such sets with at least 6 replicas each in such a way that no honest replica lies in both sets).</p><h4><strong>Case 2: Both B and B’ were finalized synchronously</strong></h4><p>Suppose the honest replicas R and R’ make a synchronous finalization for the equivocating blocks B and B’. Suppose the finalizations occur at times t and t’, respectively, and t&gt;t’, i.e., B’ is the first among the two blocks to be finalized.</p><p>By design, R voted for B at time t-2Δ, and it did not detect <strong>errors</strong> later since, otherwise, it would have started the view-change protocol and exited view v (see Condition 1 in the description of the Execute step). This implies that <strong>no other replica voted for an equivocating block proposal before time t-Δ.</strong> Indeed, otherwise, R would have seen the vote before time t, and it would not have finalized B; see the figure below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NZz3MLf0XDzTlcA9CmCSjA.png" /></figure><p>However, since t’&lt;t, we know that R’ voted for B’ at time t’-2Δ &lt; t — 2Δ. This is a contradiction. Hence, Case 2 cannot occur.</p><h4><strong>Case 3: B was finalized responsively, and B’ was finalized synchronously</strong></h4><p>Suppose R finalized B responsively at time t. By a similar argument as before, we know that no replica voted for an equivocating block before time t-Δ, since otherwise, R would have seen such a vote before finalizing B. Hence R’ broadcasted its vote at a time at least t-Δ and made its synchronous finalization at a time at least t-Δ + 2Δ = t+Δ.</p><p>Since R finalized B responsively, some honest replica must have voted for B before time t (for example, R itself). All replicas will receive such a vote before time t+Δ.</p><p>Hence it is impossible for the honest replica R’ to finalize B’ synchronously. This is because we know that such finalization occurs at a time at least t+Δ, but we also know that R’ receives a vote for an equivocating block before such time; see the following figure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_I8mI6joH2H0Jb7X0fGZHw.png" /></figure><h3>Final remarks</h3><p>This concludes our overview of consensus protocols. We started with the basics and made our way into understanding some low-level details of <a href="https://eprint.iacr.org/2020/458">OptSync</a>, a state-of-the-art synchronous BFT protocol. We have also described two of the three main primitives that enable Decentralized Validator Technology (DVT). Stay tuned for our next post of the series discussing the last one: <strong>Threshold Signature Schemes!</strong></p><h3>References</h3><ul><li>Decentralized thoughts blog: <a href="https://decentralizedthoughts.github.io/">https://decentralizedthoughts.github.io/</a></li><li>Byzantine broadcast and Byzantine agreement: <a href="https://decentralizedthoughts.github.io/2019-06-27-defining-consensus/">https://decentralizedthoughts.github.io/2019-06-27-defining-consensus/</a></li><li>Communication models: <a href="https://decentralizedthoughts.github.io/2019-06-01-2019-5-31-models/">https://decentralizedthoughts.github.io/2019-06-01-2019-5-31-models/</a></li><li>Partial synchrony communication: <a href="https://decentralizedthoughts.github.io/2019-09-14-flavours-of-partial-synchrony/">https://decentralizedthoughts.github.io/2019-09-14-flavours-of-partial-synchrony/</a></li><li>Authenticated Synchronous BFT: <a href="https://decentralizedthoughts.github.io/2019-11-11-authenticated-synchronous-bft/">https://decentralizedthoughts.github.io/2019-11-11-authenticated-synchronous-bft/</a></li><li><a href="https://arxiv.org/pdf/2102.07240.pdf">Good-case latency of Byzantine Broadcast: a complete characterization (2022)</a></li><li><a href="https://arxiv.org/abs/2003.13155">Byzantine Agreement, Byzantine Broadcast, and State Machine Replication with near optimal latency (2020)</a></li><li>Byzantine threshold cheat sheet: <a href="https://decentralizedthoughts.github.io/2021-10-29-consensus-cheat-sheet/">https://decentralizedthoughts.github.io/2021-10-29-consensus-cheat-sheet/</a></li><li>Asynchronous Agreement: <a href="https://decentralizedthoughts.github.io/2022-03-30-asynchronous-agreement-part-one-defining-the-problem/">https://decentralizedthoughts.github.io/2022-03-30-asynchronous-agreement-part-one-defining-the-problem/</a></li><li>What is the difference between PBFT, Tendermint, SBFT and HotStuff?: <a href="https://decentralizedthoughts.github.io/2019-06-23-what-is-the-difference-between/">https://decentralizedthoughts.github.io/2019-06-23-what-is-the-difference-between/</a></li><li>What is a DAG?: <a href="https://en.wikipedia.org/wiki/Directed_acyclic_graph">https://en.wikipedia.org/wiki/Directed_acyclic_graph</a></li><li>Presentation on the impossibility result: <a href="https://www.youtube.com/watch?v=vJhm9uhd34E&amp;list=PLEGCF-WLh2RLOHv_xUGLqRts_9JxrckiA&amp;index=17">https://www.youtube.com/watch?v=vJhm9uhd34E&amp;list=PLEGCF-WLh2RLOHv_xUGLqRts_9JxrckiA&amp;index=17</a></li><li>Original proof of the impossibility result: <a href="https://groups.csail.mit.edu/tds/papers/Lynch/jacm85.pdf">https://groups.csail.mit.edu/tds/papers/Lynch/jacm85.pdf</a></li><li>Partial Byzantine Fault Tolerance: <a href="https://pmg.csail.mit.edu/papers/osdi99.pdf">https://pmg.csail.mit.edu/papers/osdi99.pdf</a></li><li>Gasper: <a href="https://arxiv.org/abs/2003.03052">https://arxiv.org/abs/2003.03052</a></li><li>Tendermint’s homepage: <a href="https://tendermint.com/">https://tendermint.com/</a></li><li>Tendermint: <a href="https://arxiv.org/pdf/1807.04938.pdf">https://arxiv.org/pdf/1807.04938.pdf</a></li><li>IBFT consensus: <a href="https://github.com/ethereum/EIPs/issues/650">https://github.com/ethereum/EIPs/issues/650</a></li><li>QBFT whitepaper original idea: <a href="https://arxiv.org/pdf/2002.03613.pdf">https://arxiv.org/pdf/2002.03613.pdf</a></li><li>SyncHotStuff — Decentralized Thoughts post: <a href="https://decentralizedthoughts.github.io/2019-11-12-Sync-HotStuff/">https://decentralizedthoughts.github.io/2019-11-12-Sync-HotStuff/</a></li><li>SyncHotStuff: <a href="https://eprint.iacr.org/2019/270">https://eprint.iacr.org/2019/270</a></li><li>Hotstuff: <a href="https://arxiv.org/abs/1803.05069">https://arxiv.org/abs/1803.05069</a></li><li>Nakamoto consensus: <a href="https://bitcoin.org/bitcoin.pdf">https://bitcoin.org/bitcoin.pdf</a></li><li>Analysis of Nakamoto Consensus: <a href="https://eprint.iacr.org/2019/943">https://eprint.iacr.org/2019/943</a></li><li>OptSync — Presentation: <a href="https://www.youtube.com/watch?v=4nZHp1-kM4U&amp;t=883s">https://www.youtube.com/watch?v=4nZHp1-kM4U&amp;t=883s</a></li><li>OptSync: <a href="https://eprint.iacr.org/2020/458.pdf">https://eprint.iacr.org/2020/458.pdf</a></li><li>Thunderella: <a href="https://eprint.iacr.org/2017/913.pdf">https://eprint.iacr.org/2017/913.pdf</a></li><li>On the Optimality of Optimistic Responsiveness: <a href="https://decentralizedthoughts.github.io/2020-06-12-optimal-optimistic-responsiveness/">https://decentralizedthoughts.github.io/2020-06-12-optimal-optimistic-responsiveness/</a></li><li>Authenticated Synchronous BFT: <a href="https://decentralizedthoughts.github.io/2019-11-11-authenticated-synchronous-bft/">https://decentralizedthoughts.github.io/2019-11-11-authenticated-synchronous-bft/</a></li><li>PiLi: <a href="https://eprint.iacr.org/2018/980.pdf">https://eprint.iacr.org/2018/980.pdf</a></li><li>Hybrid-BFT: <a href="https://eprint.iacr.org/2020/406">https://eprint.iacr.org/2020/406</a></li><li><a href="https://decentralizedthoughts.github.io/2022-06-09-phase-king-via-gradecast/">Phase-King through the lens of Gradecast: A simple unauthenticated synchronous Byzantine Agreement protocol</a></li></ul><p><em>Nethermind is a team of world-class builders and researchers. We empower enterprises and developers worldwide to access and build upon the decentralized web. Our work touches every part of the Web3 ecosystem, from our Nethermind node to fundamental cryptography research and application-layer protocol development. We’re always looking for passionate people to join us in solving Ethereum’s most difficult challenges. Are you interested? Check out our job board</em> <a href="https://nethermind.io/company/">https://nethermind.io/company/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b57264afd65" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nethermind-eth/how-to-reach-consensus-with-strangers-9b57264afd65">How to reach consensus with strangers</a> was originally published in <a href="https://medium.com/nethermind-eth">Nethermind.eth</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>