<?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 Rahul Garg on Medium]]></title>
        <description><![CDATA[Stories by Rahul Garg on Medium]]></description>
        <link>https://medium.com/@vihu89?source=rss-cc103c535385------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6ML_FsRe9z1e4g6b_WdrYA.jpeg</url>
            <title>Stories by Rahul Garg on Medium</title>
            <link>https://medium.com/@vihu89?source=rss-cc103c535385------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 19:45:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vihu89/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[Part 1: Blockchain? Consensus? Game!]]></title>
            <link>https://medium.com/helium-blog/part-1-blockchain-consensus-game-b4261efbb6cb?source=rss-cc103c535385------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4261efbb6cb</guid>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Rahul Garg]]></dc:creator>
            <pubDate>Thu, 31 May 2018 13:19:55 GMT</pubDate>
            <atom:updated>2018-08-07T19:01:30.182Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HYSn6Ae3fjrujG7VgELbBQ.png" /></figure><h4>We can think of a blockchain network as a game.</h4><p>Imagine playing poker with a group of friends, you may trust your friends outside of the game, but during the game every player assumes that the other players <em>are </em>going to bluff, essentially implying that in a game of poker there is no trust among the players. Poker, like any other game, has defined a set of rules, an objective, and rounds. Furthermore, every player has an equal chance of winning the hand. A keen observer may also note that even though the rules are defined in poker, some players may utilize <em>tricks</em> to gain an advantage over other players.</p><p>Now imagine playing a game with <strong>multiple unknown players</strong> and the rules are set such that if all players act honestly, they all have an equal chance of winning. In addition, since the game recognizes that cheaters cannot be avoided, the rules ensure the chances of winning for cheaters are lower than honest players and punishment for cheating is high. And the game continues on.</p><p>This is similar to how Helium’s blockchain and underlying consensus system are combined to power our Decentralized Machine Network (DMN); by establishing the rules to ensure fairness among players, like a game. Fairness is important because honest players and cheaters exist in any game. Our consensus algorithm is built to deter cheating and to root out repeated attempts to cheat in our distributed system.</p><h3>Why do I care?</h3><p>When playing poker online, is there a way for you to be sure you’re not playing against bots? Usually online poker allows players to chat with each other, perhaps you could share messages among the players and talk about the football game last weekend, maybe you could ask every single player the same question and reach a common agreement. But what if every player is a liar? Is there any way to be sure?</p><p>This problem of being unable to reach consensus on a common value because of mistrust among players is referred to as the <a href="https://en.wikipedia.org/wiki/Byzantine_fault_tolerance#Byzantine_Generals%27_Problem"><em>Byzantine Generals Problem</em></a> and people have been perplexed by it quite literally for centuries.</p><p>The Byzantine Generals Problem may seem like it has no solution and for a long time, it <em>actually</em> didn’t. Ever since Leslie Lamport published the <a href="https://people.eecs.berkeley.edu/~luca/cs174/byzantine.pdf">seminal paper</a> on it in 1982, researchers have been working on it tirelessly. One of the first solutions with wide applicability was <a href="http://pmg.csail.mit.edu/papers/osdi99.pdf">Practical Byzantine Fault Tolerance</a> (BFT) in 1999 by Castro and Liskov, which is what Bitcoin uses as the basis for its Proof-of-Work.</p><h3>Trust is Optional</h3><p>We need players, rules, and the game needs to identify players. Because the individual players may not know or trust each other, we need a way to secure the players. Now we need to make sure that, even though no one knows one another, they can at least check whether someone is telling the truth. For people not familiar with the terminology, this is called a <strong>consensus algorithm</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lNzRzkvQq4BNp2BzyP8j8A.png" /></figure><p>As the name suggests, a consensus algorithm is a way for players to agree on a single value. Since there are both honest and dishonest players, the consensus algorithm must be designed in a way to incorporate both.</p><p>In crypto land, consensus has a bit more of a nuanced meaning. For a distributed system of mistrusting actors, a consensus algorithm must achieve this Byzantine Fault Tolerance<em>.</em></p><h3>BFT is everywhere</h3><p>One of the misconceptions out there is that BFT is only related to blockchains. While that may be true to an extent, it rears its head whenever a system with distributed nodes has to deal with faults.</p><p>Think of a flight system which has to deal with monitoring the cabin pressure, fuel usage, engine, cockpit controls, flight dynamics and a plethora of other highly critical subsystems. Not only do these subsystems have to interact with each other in real-time, they also depend on one another to ensure the overall system works without a catastrophic failure and is able to recover from limited subsystem failures. For instance, the cabin pressure may affect the lift, or excess fuel usage may be causing a change in the flight dynamics. SpaceX Dragon and Boeing 777/787 flight systems use BFT extensively, and achieve BFT within few microseconds of latency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nj4aKNUKmwJHQI8vehyX0g.png" /><figcaption>Some flight systems achieve BFT</figcaption></figure><p>I think it’s fascinating that extensive research went into making sure these systems work to ensure BFT. And it also highlights that BFT has a much wider scope than you may have initially thought of.</p><p>There are many existing strategies to reach BFT (such as PBFT, RAFT, Paxos etc.) but we at Helium believe that the wonderfully named <a href="https://eprint.iacr.org/2016/199.pdf">Honey Badger of BFT protocols</a> fits our particular use case perfectly. Our Helium consensus protocol is comprised of two parts: we use our <em>Proof-of-Coverage </em>as a form of identity that we can then use to instantiate a BFT consensus group. Our VP of Engineering Andrew Thompson has a great blog post <a href="https://blog.helium.com/introducing-the-helium-blockchain-dc2f8997083c">explaining how our blockchain puts those pieces together</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*LSP7js2UtrKGuSatifGssg.jpeg" /><figcaption>The HoneyBadger consensus model is both asynchronous and censorship-resistant.</figcaption></figure><h3>Why Honey Badger BFT?</h3><p>Building a network of mutually distrusting players allows us only a modicum of flexibility and introduces quite a few quirks. After spending weeks brainstorming how to balance these two aspects, we unanimously reached the consensus that Honey Badger BFT offers the perfect balance between compromise and results. The absolute best features of Honey Badger BFT are:</p><ul><li><strong>No timing assumptions</strong>: Honey Badger BFT assumes that messages in a network get delivered eventually, which is usually the case in a network.</li><li><strong>Censorship resistance</strong>: In gaming terms, it essentially means players cannot pick and choose who to support so they always win. In mining terms, it implies that miners cannot look into transactions prior to agreeing upon publishing those.</li><li><strong>Permissionless</strong>: Anyone must be able to join the network, after all.</li></ul><h3>The Setup</h3><p>Every game has its own mechanics, a set of pre-requisites and guiding principles that every player must know. Poker, for instance, has its own set of rules and every player must know and abide by them. Along the same lines, the Honey Badger BFT protocol sets up the consensus algorithm following these assumptions:</p><ul><li>Suppose you have<strong> N players</strong>, and these players are exchanging transactions between them (more on what the transactions are will be explained in a later post). In fact, the Honey Badger BFT doesn’t care what the transactions are, recall that it’s censorship resistant) meaning players don’t know beforehand what exactly they will eventually be agreeing upon once a round of Honey Badger BFT completes.</li><li>Every game has cheaters, and we need to account for<strong> <em>f </em>such cheaters</strong>.</li><li>Among the total N players, we <em>choose</em> which players form a <strong>consensus group</strong>, perhaps based on the player behavior or score. An interesting aspect of the consensus group is that individual players don’t have an impact on the outcome of the protocol, so the consensus group can be formed completely at random. We’ll call that chosen <strong>consensus group <em>S</em></strong>, basically a subset of N.</li><li>The <em>S</em> group is responsible for determining whether everyone was truthful with the transactions they proposed to the group.</li><li>But the <em>S</em> group can only process transactions in batches, let <strong>B be that batch size</strong>.</li><li>We use an <a href="https://eprint.iacr.org/2012/377.pdf"><em>(N, T)</em> <em>Distributed Key Generation</em></a>, which, in a nutshell, allows N players to collectively generate a secret with its shards spread across the N players. A <strong>subset of size greater than T</strong> can reveal the secret while smaller subsets of size less than T learn nothing about the secret. This allows us to circumvent the need for having a trusted “dealer”.</li><li>The algorithm moves in rounds, just like betting rounds in Poker. Once all the sub-protocol rounds have completed and a <em>result </em>has been generated, the Honey Badger BFT protocol moves to the next round. The result is just a value or the outcome that all the players in the consensus group <em>S</em> have agreed upon.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mga5soprBT2PMKUDSuLAUw.png" /></figure><h3>What next?</h3><p>Now that you are <em>hopefully </em>familiar with the need, context and setup of our consensus algorithm, it’s time to move to the actual algorithm.</p><p>The Honey Badger BFT algorithm is composed of 4 sub-protocols and an encryption scheme.</p><ul><li>Common Coin</li><li>Binary Byzantine Agreement</li><li>Reliable Broadcast</li><li>Asynchronous Common Subset</li></ul><p>Understanding each of these sub-protocols is key to building the Honey Badger BFT consensus algorithm. We’ll go in depth of each of these sub-protocols in the next post. Stay tuned!</p><p>Thanks for reading. And if you are interested in the work we’re doing at Helium, <a href="http://helium.com/">visit our site</a>, <a href="https://t.me/helium_network">join our telegram</a>, read the <a href="http://whitepaper.helium.com/">Helium DMN Whitepaper</a>, and <a href="http://github.com/helium">take a look at the code we’re open sourcing</a> to make this possible.</p><figure><a href="http://t.me/helium_network"><img alt="" src="https://cdn-images-1.medium.com/max/610/1*fgCQWsakNXfBUVgwfvnSfg.png" /></a></figure><figure><a href="http://www.helium.com/"><img alt="" src="https://cdn-images-1.medium.com/max/610/1*AG902TeF2RCJiXgzN6Mo0Q.png" /></a></figure><figure><a href="http://whitepaper.helium.com/"><img alt="" src="https://cdn-images-1.medium.com/max/610/1*VPqg41pBgmw5zRJDuQUO2A.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4261efbb6cb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/helium-blog/part-1-blockchain-consensus-game-b4261efbb6cb">Part 1: Blockchain? Consensus? Game!</a> was originally published in <a href="https://medium.com/helium-blog">The Helium Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>