<?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 b0rg on Medium]]></title>
        <description><![CDATA[Stories by b0rg on Medium]]></description>
        <link>https://medium.com/@b0rg?source=rss-f073da41f060------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*WiVpsjo3-7vCQam4</url>
            <title>Stories by b0rg on Medium</title>
            <link>https://medium.com/@b0rg?source=rss-f073da41f060------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 13:29:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@b0rg/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[On Tangle Voting]]></title>
            <link>https://b0rg.medium.com/on-tangle-voting-d057217adee6?source=rss-f073da41f060------2</link>
            <guid isPermaLink="false">https://medium.com/p/d057217adee6</guid>
            <dc:creator><![CDATA[b0rg]]></dc:creator>
            <pubDate>Wed, 20 Oct 2021 15:29:36 GMT</pubDate>
            <atom:updated>2021-10-27T14:09:13.117Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*khHKjnio046Mrb0Hrrp75g.png" /></figure><p>In my <a href="https://b0rg.medium.com/on-voting-on-the-tangle-on-the-tangle-part-2-10d77043f610">last post</a> I described a variation of <a href="https://husqy.medium.com/a-new-consensus-the-tangle-multiverse-part-1-da4cb2a69772">On Tangle Voting</a> in which every message is considered a vote and each vote’s opinion is derived by looking at the opinion of its immediate parents. Because each node’s opinion is found <em>implicitly</em> by reading whichever part of the Tangle it confirms, a node can only ever vote for the heavier branch. This enforcement of honest behavior means that a meta-stable state can never persist indefinitely: as long as nodes publish transactions to the Tangle, the network will necessarily converge.</p><p>This approach is relatively lightweight, but it required total agreement on validator weights. What follows is an adjustment to this voting scheme which <em>eliminates </em>the need for total consensus on node weights by considering each vote to have a weight of one. This would seem to require the network to always operate at maximum throughput, so nodes always vote in proportion to their aMana and to guarantee that malicious nodes cannot vote arbitrarily by spamming messages in times of low traffic.</p><p>But in this approach, as long as a node always references the most recent part of the Tangle, it will be algorithmically prevented from rolling back any transaction that is more than a couple seconds old. As a result, any node who issues messages at the front of the Tangle, regardless of the rate at which it issues messages, will necessarily vote honestly and contribute to consensus — so a node’s throughput need only be limited by its aMana in times of network congestion. I believe this can be enforced through the rate control, as I will explain below, by limiting a nodes write access to the Tangle in proportion to the amount of time which has passed between its last message and the messages which honest nodes agree to be the most recent part of the Tangle.</p><p>The vote algorithm is as follows:</p><p>Every time a message is published it’s booked with a “master branch weight” integer, equal to <strong>one</strong> <strong>plus the highest branch weight booked with any of its parents</strong> (including the issuing nodes last message).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*ClhfOk7MYzgwpYH6bvNpyg.png" /><figcaption>Every message is booked with a master branch weight equal to one plus the largest weight of any of its parents</figcaption></figure><p>A node’s approval weight is measured by the number of times it “observes” the Tangle over a period of time relative to other nodes active in the network. This on-Tangle approval weight counter, which only ever advances, expresses a shared perception of the approval weight in the master branch, and the overall rate at which nodes are “observing” the Tangle.</p><p>If a conflict appears in the Tangle you can resolve it with this simple procedure:</p><ol><li>Book conflicting transactions into their respective branches and continue advancing the master branch weight counter for both transactions, and all future messages.</li><li>If a message has parents in only one branch of a conflict set, book the message into that branch.</li><li>If a message has parents in multiple branches, it inherits the opinion of whichever message has the higher master branch weight.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*AMifT_KPyay6OjNb-Y062A.png" /><figcaption>A vote inherits the opinion of the vote with the heaviest perception of the Tangle.</figcaption></figure><p>This voting process will scale to an unlimited number of conflicts because this single branch weight value can be used to vote on an unbounded set of conflicts. The voting logic of the parallel reality ledger is handled on arrival with each message, without having to track multiple branches and the opinion of each node in the network. And even without any strict agreement on the validator weights meta-stable states are ruled out as voting is always “honest.”</p><p>With this voting algorithm, a node that confirms the most recent messages of the Tangle will necessarily inherit the perception of all messages that have come before and will be algorithmically prohibited from rolling back anything that has already been confirmed. So as long as a node always confirms whatever honest nodes agree (more or less) to be the most recent part of the Tangle, a node will be free to issue messages at any rate it wants, limited only by its aMana in times of congestion.</p><p>Using the approval weight counter in combination with the rate control, you can ensure that nodes who do not continuously confirm the newest parts of the Tangle will gradually have their write access revoked and be unable to roll back a conflict:</p><p>The approval weight counter gives you a perception of a) how fast the tangle is growing and b) the amount of time passed between one message and another. If the most recent messages I have seen have an approval weight of 200, and the last message I have seen from the Blue node has an approval weight of 100, and I know the Tangle is currently growing at roughly 100 units of approval weight per second, I can limit the maximum write access of the Blue node to 1 MPS. The Blue node is free to continue confirming old messages, but the longer the Blue node only confirms old messages, the more it’s write access will be decayed as honest nodes perceive more and more approval weight building up in the Tangle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*Twk4g1n1Kb7GGoS8I4NDeA.png" /></figure><p>A node can only ever write messages to the Tangle at a speed proportional to the distance between its last message and what the network more or less agrees to be the most recent messages, ensuring that a node can never create a branch that will outgrow the master branch and roll back a transaction. But honest nodes will not have to do anything special - only confirm the most recent messages they have seen and they will be able to write to the Tangle at any rate they want, limited only by their aMana in times of congestion.</p><p>This principle, if it could be implemented in the rate control, is a essentially a way of forcing a node to prove it is in sync as it writes to the Tangle, that it shares a roughly similar perception of what is the “present.” A malicious or faulty node who only writes to older parts of the Tangle will gradually be removed from the network as the Tangle grows and its rate limit simultaneously approaches a level so low that all messages it sends will be considered spam and it will be blacklisted.</p><p>Here an active validator is one who is provably in sync with the rest of the network. Voting in this way would be 99.99% Byzantine fault tolerant, as all nodes would necessarily vote honestly, and the percentage of active validators issuing statements always approaches 100%. In addition to this high security this algorithm could never be held in a meta-stable state. Finality times would depend only on the number of messages being issued per second, rather than the cMana distribution. And in times of extremely low throughout a node can always issue empty messages to finalize a conflict faster.</p><p>Just as the branch DAG introduces a way to track conflicting perceptions of the Tangle, this master branch weight counter introduces a way to track every node’s <em>perception</em> of the conflicting perceptions in Tangle, so that consensus emerges out of a recursive agreement on every validator’s perception of every other validator’s perception of …. every other validator’s perception of the Tangle. By the addition of this one integer to each message you get Nakamoto consensus on the DAG with two additional special properties: validators can only issue honest statements which always vote for the heavier branch and the number of validators issuing statements eventually approaches 100%</p><p>The Tangle is fundamentally a medium of communication. It is both a collection of discrete statements, and single ongoing statement about its own current state. By this I mean that each message communicates an implicit second order message which says: “Everything in my past cone is the current state of the Tangle.” If I see many of these second order statements that convey different perceptions of the state of the Tangle — i.e. how much stuff is in the Tangle currently — I will always prefer whichever of sees the highest total number messages — as that is the most “recent” (in a relativistic sense) and most comprehensive view of the Tangle I could have.</p><p>What is really going in this voting mechanism is that the approval weight counter propagates a perception of this second order statement with each and every message. So when I confirm three or four parent messages, I can compare which of these has seen the most of the Tangle, inherit its perception, and add the weight of my own message. By this incredibly simple procedure of always following the most dense perception of the Tangle, the one which includes the most first order statements, the second order statement that the Tangle makes about itself, will always be honest — and this is the definition of consensus. The Tangle is a medium of communication which is always also talking about itself — and it cannot lie.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d057217adee6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On Voting on the Tangle (on the Tangle) - part 2]]></title>
            <link>https://b0rg.medium.com/on-voting-on-the-tangle-on-the-tangle-part-2-10d77043f610?source=rss-f073da41f060------2</link>
            <guid isPermaLink="false">https://medium.com/p/10d77043f610</guid>
            <dc:creator><![CDATA[b0rg]]></dc:creator>
            <pubDate>Mon, 27 Sep 2021 06:59:03 GMT</pubDate>
            <atom:updated>2021-09-30T06:19:28.971Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dW_Q6CIZkhC5O1c1sYe07g.jpeg" /><figcaption>The Tangle and its representation</figcaption></figure><p>In my <a href="https://b0rg.medium.com/on-voting-on-the-tangle-on-the-tangle-b3829d93c3b3">previous post</a> I described an approach to <a href="https://medium.com/@hans_94488/a-new-consensus-the-tangle-multiverse-part-1-da4cb2a69772">On Tangle Voting</a> where every message is considered a vote. The opinion expressed by each vote is derived by counting the opinions it has “seen” in its past cone and assigning a message to whichever branch has more approval weight according to this calculation. Because a node’s opinion is found implicitly by reading whichever part of the Tangle it confirms, a node can only ever vote for the heavier branch. This enforcement of honest behavior should mean that a meta-stable state can never persist indefinitely, as every time a node publishes a message to the Tangle it necessarily contributes to consensus.</p><p>However, the only way I could imagine implementing such an approach is with lengthy past cone walks, or by storing each message with an opinion vector that records the opinion of every other node. What follows is a variation on this idea with a much more lightweight and hopefully practical implementation that nevertheless seems to remove the need for a meta-stability breaker.</p><p>Just as before, nodes are not required to select tips in any particular way, nor are they required to publish their opinion explicitly with a “like” reference. Nodes just publish messages to the Tangle, and read consensus from the Tangle as it emerges. The additional computational overhead is a single 32-bit UInt stored locally with each message.</p><p>To understand how this would work, imagine a new message arrives with three parents, and you know the messages in the past cone of each parent contain a certain amount of approval weight voting for either branch in a conflict. Without walking the past cones of each parent message, you can never know how much these past cones overlap and therefore exactly how much approval weight the new message has “seen” in either branch.</p><p>However, you can always assume that the new message has seen <em>at a minimum </em>the heaviest branch weights seen by any of its parents. For example, message 4 has seen at least 110 approval weight voting for branch A and at least 80 for branch B (even if the real distribution might be much different).</p><p>For example: the node issuing message 4 has seen at least 110 approval weight in branch A and at least 80 in branch B.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/0*45joixyOJci35iyR" /><figcaption>The node issuing message 4 has seen at least 110 approval weight in Branch A and 80 in Branch B</figcaption></figure><p>Using this concept of a perceived “minimal branch weight” you can build a voting mechanism that follows these basic rules:</p><p>1. Every message in the future cone of a conflict set is considered a vote on the conflict set.</p><p>2. If a vote has no other votes in its past cone, it is booked into the branch of whichever conflict transaction it references directly (or the one with the lower hash if it references both). The vote is also booked with a “minimum branch weight” value, equal to the approval weight of the issuing node. (This value only needs to be recorded for the winning branch.)</p><p>For example, Node Z has voted for Branch B, with a minimal branch weight of 10, equal to the node’s own approval weight.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*I1OooJuFk5ZgVGg4E4utXA.png" /><figcaption>Messages voting for conflicting transactions directly are booked into the branch of the message they reference.</figcaption></figure><p>3. If a vote references previously cast votes, you compare the “minimum branch weight” of all its immediate parents and the previous vote of the issuing node (if it exists). The new message follows the opinion of the parent messages with the highest “minimum branch weight.”</p><p>4. A message inherits the “minimum branch weight” value from the parent message it follows (which can also be a node’s own previous vote). If the issuing node has never voted for that branch before, its own approval weight is added to the “minimum branch weight” value. (i.e. a node’s own weight is added to the “minimum branch weight” when it first casts a vote and if/when it first switches opinions to the other branch).</p><p>For example, Node Q sees that Branch B has a minimal branch weight (40) greater than Branch A (20). It’s message is booked into Branch B, and inherits the minimal branch weight from the blue message (40), plus its own weight (120).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*hSG7c36kkWqyZ_NNZGr8PA.png" /></figure><p>In this approach, any nodes who see the same messages will come to the same perception of the “minimal branch weight” assigned to a given message, and therefore of the opinions of all other nodes. Opinion formation happens “on Tangle” so whenever a node issues a message, it has no choice but to vote for the heaviest branch and advance consensus. And the minimal branch weight value is bounded by the total approval weight voting in the conflict, so eventually one branch will be the winner, or in the case of a tie, nodes will prefer the branch with the lower hash.</p><p>When one branch is winning, the only nodes who can vote for the losing branch and effectively increase its minimal branch weight are those nodes who have both a) never voted for the losing branch before and b) whose most recent vote contains a perception of the winning branch weight that is less than the heaviest published perception of the losing branch. As this list shrinks, there is a moment where the total approval weight available to vote for the losing branch is small enough that the branch weight of the losing branch can never surpass the winning branch and voting is terminated.</p><p>One odd thing about this approach is that nodes are not actually voting on “which branch is heavier” but “which branch is heavier going by whatever you can measure without doing a past cone walk.” However, the result is the same — all nodes eventually agree to follow the same branch, so the branch with the highest “minimal branch weight” ends up being the one with the most absolute approval weight when voting is complete. In effect, this voting system uses the minimum branch weight as a <em>representation</em> of each node’s unique perception the state of Tangle — an incomplete image that stands in for the real thing. Nodes vote on this representation, but in so doing the Tangle and its representation end up identical to one another.</p><p>Addendum</p><p>After some discussions with Luka, it became clear that there is at least one scenario (although extremely unlikely) in which an attacker could theoretically stall consensus, even with a very small amount of approval weight. Because the termination of the voting process depends on both a) the difference between the minimal branch weights of both branches, and b) the total approval weight available to vote for the losing branch, there could be a situation in which, through some kind of network layer manipulation or through sheer chance, that both branches end up relatively close to each other. If, for example, by the time all honest nodes have voted, Branch A has a minimal branch weight of 100, and B has one of 80, and attacker with 30 (around 23% of the total weight) can simply stop voting. Or create a situation where both branches are equal to each other, the cast votes very slowly for either side with very small voting weights. In either case, the attacker has full control on when and if the voting terminates.</p><p>However, in the situation where a node switches its vote from branch A to to branch B, if you had a way to subtract that node’s vote from branch A, you could prevent this situation from arising in the first place, and guarantee consensus, regardless of an attacker’s cMana.</p><p>For example, in the diagram below, Node X has first voted for branch A, but then approves a message which changes its opinion to branch B. You can store with this message one more integer, which reflects the approval weight that Node X withdraws from Branch A. Now Node X, and any node who confirms this message, will only be able to vote for Branch A if it can find a message that has a perception of the weight of Branch A which is greater than its current perception of Branch B <em>plus 20</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*cLWk_2R_0yAovDpA033cdQ.png" /></figure><p>The voting rules follow the same procedure as above, with the difference now that a node’s voting weight is applied to a branch every time it switches sides, and simultaneously subtracted from the branch it rejects. This can be handled with a similar voting logic which only requires consideration of the parent messages of each vote:</p><p>When a message arrives, you look at all the parents of the new message. From the branch weight perceptions of each parent, you find the highest branch weight for branch A and branch B. You also find the largest negative branch weight (in terms of absolute value) for branch A and branch B. You combine these values — subtracting from A the negative branch weight for A, and the same for branch B.</p><p>Following this calculation, the message is booked into the heavier branch, inheriting both the largest “minimal branch weight” of the winning branch, and the lowest “negative branch weight” of the losing branch. If a node has changed its opinion from its previous vote, its own weight is added to the “minimal branch weight” value.</p><p>For example, in the picture below, Node Q votes for several message with different opinions positive and negative branch weights. To find the Node Q’s opinion you sum the highest and lowest values of A and B seen by any of its parents and discover that A has a branch weight of 30, and B of 0. Node Q follows branch A, and inherits the highest branch weight for A(45), and the lowest branch weight for B (-40). Because Node Q has never voted before, its own weight is added to the branch weight for A.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fJ2IhLh2AcChfcqbiq5Hww.png" /></figure><p>With these rules, I can think of no situation in which the network does not converge because if an attacker tries to stall consensus by switching sides, they will forced to always vote for heavier and heavier parts of either branch, until they are unable to do so.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10d77043f610" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On Voting on the Tangle (on the Tangle)]]></title>
            <link>https://b0rg.medium.com/on-voting-on-the-tangle-on-the-tangle-b3829d93c3b3?source=rss-f073da41f060------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3829d93c3b3</guid>
            <dc:creator><![CDATA[b0rg]]></dc:creator>
            <pubDate>Sun, 05 Sep 2021 11:57:11 GMT</pubDate>
            <atom:updated>2021-09-27T06:43:25.595Z</atom:updated>
            <content:encoded><![CDATA[<p>On Voting on the Tangle (on the Tangle)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ShpJTMZ00qBSFVKmCefKtw.jpeg" /></figure><p>What follows is a sketch for a variation on On Tangle Voting (originally outlined <a href="https://husqy.medium.com/a-new-consensus-the-tangle-multiverse-part-1-da4cb2a69772">here</a>). For those of you who’ve been following the development of OTV, the motivation for this proposal is the simplification of tip selection and resilience against a metastability attack, possibly allowing for the removal of the dRNG from the protocol. The proposal also comes with some drawbacks, primarily that it requires a lot of past cone walks. But there may be a way to overcome these inefficiencies with the tools already provided by the parallel reality ledger state. These ideas are based on my own amateur reasoning about OTV without any formal mathematical proofs and I’d love to hear feedback and criticism from the community.</p><p>In the original description of OTV nodes use a strong reference to communicate which branch in a conflict set it prefers and a weak reference to approve valid messages that accidentally voted for the branch it dislikes. In the following approach, however there are no weak or strong references or special references of any kind — the tip selection and the voting process are entirely separated. A node simply selects whatever tips its wants and its opinion is derived from the past cone of the message it sends. This opinion is found in such a way that everyone eventually agrees on the perception of all nodes and all nodes necessarily follow the heaviest branch and achieve consensus.</p><p>To begin it first helps to think of the Tangle as a communication medium which also communicates recursively about itself. When a node issues a message it is also making a second order statement “I have seen all the messages in the past cone of my message.” Because those messages have the same property, this node is also making a third order statement “I have seen that all the nodes who issued messages in my past cone have seen all the messages in the past of their messages” and so on. Due to its unique structure the Tangle always broadcasts with each message implicit information about what each node knows about what other nodes knows about what other nodes knows about … the Tangle.</p><p>This self-reflexive property of the Tangle means that every message which references a conflict set, directly or indirectly, is also making a statement about a nodes perception of everyone else’s perception of everyone else’s perception … of the conflict. This version of OTV reaches consensus using only this information which is already available in the Tangle.</p><p>More concretely the rules of this voting process are as follows:</p><p>Every message in the future cone of a conflict set can be considered a vote which expresses the issuing nodes opinion on the conflict set (which branch it prefers). At a given moment the Tangle can contain many different messages from the same node that express conflicting opinions. It is only important that all nodes agree on the opinion expressed by an individual vote.</p><p>If a node broadcasts a vote that has no other votes in its past cone it, the vote is booked into the branch corresponding to the conflicting transaction it references directly or the branch with the lower lexicographic hash, if it references both transactions.</p><p>Otherwise the opinion expressed by a vote N is found by walking through its past cone, counting all the opinions of each node whose votes appear in its past cone. Vote N is then booked into whichever branch appears to have more approval weight, according to the votes it “sees” in its past. For this reason every vote automatically follows the heavier branch, at least according the perception of the Tangle expressed in the past cone of that vote.</p><p>If the past cone of vote N contains multiple votes from the same node A, vote N’s perception of node A’s opinion is found by walking through the combined past cones of all node A’s votes, deriving node A’s perception of the heavier branch in the same manner. For this reason nodes are free to broadcast multiple conflicting opinions because they will eventually be resolved in the same way by all nodes as the conflicting perceptions receive more confirmations.</p><p>With these simple rules, every message is booked into whichever branch it perceives to be heavier, which can be discovered in the same manner by every node: by simply counting up the votes already booked in the past cone of a nodes message. Because every node automatically follows the heaviest branch, every node eventually agrees on the perception of every other node, and all nodes eventually follow the same branch. Regardless of the way nodes select tips we are only using the implicit statements nodes are already making about their own perception of the tangle: “I have seen that these nodes have seen this conflict and perceived this to be the heaviest branch because they have seen that these nodes have seen …” and so on..</p><p>This approach has some interesting side effects. First of all it completely decouples tip selection from voting, because the “opinion” expressed in a node’s vote is derived from its own perception of the Tangle which it has published to the Tangle. There can be no dishonest voting because a node cannot “lie” about seeing a part of the Tangle, nor can it “unsee” a part of the Tangle of has already publicly claimed to see. So every nodes vote is automatically a vote for the heaviest branch no matter which tips it selects, and eventually all nodes agree on which branch is heavier.</p><p>OTV works because it recognizes that the Tangle can contain conflicting versions of the ledger state which are eventually resolved. This approach makes a subtle addition to that principle by recognizing that the Tangle can contain conflicting perceptions of nodes opinions on the conflict which will also eventually be resolved.</p><p>I believe a knock on consequence of this approach is that a metastability attack is impossible. I cannot prove this mathematically, but it seems that in a system where every node automatically follows the heavier branch consensus would be inevitable, as this is the definition of honest behavior. Furthermore an attacker can only switch branches if it can approve previously unseen messages which justify its opinion change — so an attacker trying to hold the tangle in a metastable state would be unable to switch between branches arbitrarily.</p><p>The Perceptual Branch DAG</p><p>The main drawback of this approach as I’ve described it is of course that it requires many recursive walks through many past cones, which could become very difficult. However, in the same way that the “parallel reality ledger state” is able to handle conflicting versions of the ledger state, I believe its basic tools can also be used to track different perceptions about the state of such a conflict.</p><p>On top of the regular branch DAG you could have something like a “perceptual branch DAG” which tracks nodes perceptions of the branch DAG. This sounds a bit outlandish but I think it is less cumbersome than it sounds.</p><p>Let’s say the red node casts a vote for Branch A. You would then create a new sub-branch of A called A.Red.1. This sub-branch tells you the red node voted for Branch A with message 1. Every message which approves that vote is booked into the same sub-branch, basically saying it has seen the red node voted for Branch A with message 1. New votes from other nodes will also create their own nested sub-branches of A or B, so that by looking at all the sub-branches a message is booked into, you can tell immediate which nodes it has seen voting for which branch and derive its opinion based on those votes in its past cone.</p><p>Now if the red node broadcasts a second vote that directly or indirectly approves its previous vote, you would book it into all the sub-branches of its parents, but instead of booking it into the A.Red.1 branch you would book it into a new sub-branch called A.Red.2. This way the number of sub-branches a message can belong to is bounded by the number of nodes voting on the conflict, to prevent the number of sub-branches you need to track from ballooning to infinity.</p><p>Now say a message has one parent that was booked into A.Blue.1 and another parent that was booked into B.Blue.2, inheriting two conflicting perceptions of the opinion of the blue node. To resolve this conflict you would look at blue nodes first message and the blue nodes second message and derive a new opinion for the blue node based on all the sub-branches which contain either of the blue nodes votes. The new message can now be booked into a sub-branch called A.blue.(1,2) with an updated opinion for the blue node.</p><p>Described another way, each message is just recorded with a list of the previous votes used to derive it’s opinion and that list is never longer than the number of total nodes in the network. A message can inherit this list from its parents so there are no past cone walks. And you can also quickly merge multiple votes from the same node into a new single opinion. Tracking the various perceptions of the state of the conflict in this way you would always see which branch every message belongs to, along with all the messages upon which it’s opinion is based.</p><p>Although this approach to consensus uses a slightly different way of thinking it is actually quite simple and draws on all the same core concepts of OTV. I think the simplicity of this approach also comes with increased security — as anyone who writes to the Tangle will necessarily vote for the heavier branch, and therefore contribute to consensus. Using nothing more than the Tangle, random tip selection and the parallel reality ledger state you can find consensus that already exists in the Tangle, as if consensus were not a matter of controlling the Tangle but simply listening to what it has to say.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3829d93c3b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Chirping Machine]]></title>
            <link>https://medium.com/coinmonks/the-chirping-machine-4c73269c2871?source=rss-f073da41f060------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c73269c2871</guid>
            <category><![CDATA[iota]]></category>
            <category><![CDATA[consensus]]></category>
            <category><![CDATA[dlt]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[b0rg]]></dc:creator>
            <pubDate>Sat, 08 May 2021 19:24:00 GMT</pubDate>
            <atom:updated>2021-05-13T17:03:18.198Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/994/0*-ldlm3IWjU4FOEBU.jpg" /><figcaption>Pau Klee’s Die Zwitscher-Maschine – a group of machines telling each other the truth</figcaption></figure><p>One way you could describe a distributed ledger is a network of machines which tell each other the truth.</p><p>In a distributed ledger networked nodes send messages back and forth that look this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*j2I0g-V0Jf-NNiHJilqCzw.png" /></figure><p>Nodes send and receive these truth statements, verify if they are true, and collect them into a list of true statements which we call the ledger:</p><p>This statement is true: ______ and this statement is true: _____ and this statement is true: _____ and this statement is true: _____ and this statement is true: _____ and this statement is true: _____ and this statement is true: _____ and …</p><p>The contents of these messages are usually statements about debts, like “Kendra owes Vinicius $40.” But these statements could really be anything: the sky is blue, the peacock’s tail is bright, there was a gentle rain this afternoon. In the context of a distributed ledger, it doesn’t matter if these statements are true in our (human) reality, only that they are true with respect to the reality agreed upon by the nodes and recorded in the ledger. A node can verify if a message is “true” by checking that it does not conflict with any statements already in the ledger.</p><p>For example, the two statements “All cats have six legs” and “All cats have eight legs” cannot both be true so only one should be included in a ledger. A distributed ledger must ensure that all nodes eventually agree on the exact same ledger and that the ledger does not contain any conflicting statements — a kind of distributed truth telling machine.</p><p><strong>The Matryoshka Principle</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/0*cELQoWeelql44Lkl" /><figcaption>The first Matryoshka dolls, carved by Vasily Zvyozdochkin in 1890</figcaption></figure><p>In the IOTA protocol there is a basic rule that if I want other nodes to accept my message, I have to publicly verify the truth of two or more messages I’ve received from others. So, in IOTA a message would look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*9aIu4p8FUxGPxJipZI9oUQ.png" /></figure><p>The first part of the message is a new statement which I am adding to the ledger, and the second part is are some verified messages of the same format received from other nodes. Because of this recursive property messages eventually expand into something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*Jcos29GujumEFQAX4MMlhg.png" /><figcaption>The Tangle, as seen from inside a single message</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ilFZtajKarPdFbIt.png" /><figcaption>The same Tangle, as seen from outer space</figcaption></figure><p>Because a message attests to the truth of the messages it references and the messages they reference and so on, every message ends up containing the entire history of the Tangle, at least as seen from a certain point of view, at a certain moment in time. When a node sends a message it is actually saying “This statement is true: ____ and all the messages in the history of ledger referenced by this message back to the first message ever sent are also true.” Every message in the Tangle is a direct view to the beginning of the Tangle like branching rivers that all lead back to the sea.</p><p>Of course, practically speaking, nodes cannot send around messages that contain millions or billions of nested messages. So nodes just prove they are referencing this history by including in each message the hash of the messages it references (which contain the hashes of the messages they reference, and so on). This compresses the entire history of the ledger into a very small amount of information which can be easily verified.</p><p><strong>I Promise To Pay The Bearer On Demand The Sum Of One Pound</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*x2iDJu4PCAgoVjo2.jpg" /><figcaption>One pound is a promise to pay the bearer on demand the sum of one pound.</figcaption></figure><p>When dealing with a cryptocurrency the statements in the ledger make no reference to the weather or exotic animals. They are just statements about who owes how much money to whom. In the same way that a pound (or any fiat currency) is just a promise to pay someone a pound, digital money is a promise to pay someone digital money. These promises are the statements recorded in the ledger and they look like this:</p><p>C owes D $20</p><p>The money which C owes D is itself just a reference to another message (or messages): the message containing the statement which promised the $20 to C in the first place. With this in mind, a ledger update can also be represented like this:</p><p>C owes D $20 from [message]</p><p>or</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*RFaUAHmjfsBUF2iHbafC9w.png" /></figure><p>and in the end messages start to look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*P9ODJKxczfS31qRc4V7qPg.png" /></figure><p>It should be pointed out that in the UTXO model you can promise someone a portion of the money which is owed to you, and then promise the remainder back to yourself, or combine many different promises into a new promise. But the main thing is that digital money, like real money, is just a promise to give someone money which is itself another, older promise to give someone money.</p><p>In the same way that a messages contains the entire past of the ledger, a single transaction, or UTXO update, references the entire history of the funds that it spends, something like the cumulative endorsements on the back of a check, all the way back to the first message which created all the funds in existence.</p><p><strong>The Order of Things</strong></p><p>Some interesting properties emerge in the Tangle due to the recursive nature of its messages. For instance, old parts of the ledger become extremely hard to change. A node could try to send a message that references another version of the Tangle, whose past is different from that seen by the other nodes, but this message would conflict with the perception of all the other nodes, and they would not consider the message to be true. For example: if you tried to change any of the nested images on the cover of Pink Floyd’s Ummagumma, it would be visible to anyone who had one of the hundreds of thousands of other copies of the album. How would you convince all those people that yours is the real version?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WLs7Zcy4aauJk4HK.jpg" /></figure><p>As the word “past” already suggests, another important property emerges from this simple requirement that a message validates two earlier messages: the ledger has at least a partial order of events, a sense of time. It may be impossible (or at least difficult) to determine the order of two messages which are not connected by a reference, but it is always possible to say that a message comes after any messages it verifies and before any messages which verify it. It would also be impossible to issue a new message that is already referenced by a message in the ledger.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*shfAVA1rd_5TUdF60Hd5MA.png" /><figcaption>The Tangle is partially ordered</figcaption></figure><p>These two properties of (partial) order and an immutable past are fundamental properties of any distributed ledger. They are deeply connected to one another in the sense that “time” is meaningless if the past can be arbitrarily changed, if there were no sequential relationship between events. Seen this way, a message in a distributed ledger is not just a statement about the truth, but also an <em>event</em>¹ which must be causally consistent with the reality established by the events which have preceded it in time. In the same way I cannot drink from a glass which was was just shattered on the floor, a distributed ledger prevents a double spend, and reproduces a kind of minimal expression of causality.</p><p><strong>The Double Spend</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*328mjfw2Zv67Sjuu" /><figcaption>The Mona Lisa after it was stolen</figcaption></figure><p>The story goes that when Vincenzo Peruggia stole the Mona Lisa in 1911 he brought it to a master forger Yves Chaudron who produced several perfect copies which were in turn sold to various buyers while Chaudron was paid with the original. Some have speculated that the original was lost and a group art dealers and historians, unable to agree on which of the perfectly executed copies was the original, secretly chose one and destroyed the others so that we could all carry on with our lives without the unbearable thought that the Mona Lisa is in fact a copy without an original².</p><p>With this in mind, imagine Beatrice broadcasts a ledger update like this:</p><p>Beatrice owes <strong>Cecilio</strong> $20 from [Ariadne owes Beatrice $20 from […]]</p><p>When nodes receive this update they check to see if it’s true by looking in the ledger for the message where Ariadne promised those $20 to Beatrice, and to see if Beatrice has not already promised those $20 to someone else. If both of these things are true, the message does not conflict with the reality recorded in the ledger. The statement from Beatrice can be recorded and used as a reference for future messages³.</p><p>By the time all the other nodes in the network have made this update to the ledger, Beatrice issues a new update, trying spend the same funds:</p><p>Beatrice owes <strong>Dalia</strong> $20 from [Ariadne owes Beatrice $20 from […]]</p><p>When other nodes receive this message they perform the same checks as before and see that Beatrice received funds from Ariadne. But they will also see a message that Beatrice already sent these exact funds to Cecilio. Because the new message conflicts with the reality recorded in the ledger it will be rejected.</p><p>However, in certain circumstances, it could happen that Beatrice sends both messages at almost exactly the same time and some nodes see one or the other message first. Some nodes would decide the first message is true and others the second. Each of these conflicting opinions represents a valid but mutually exclusive version of the ledger, two possible futures for the reality it records.</p><p>Although no one else was in the room when it happened, the experts who gathered to validate the famous painting were said to have taken a vote to choose which of the Mona Lisas to save from destruction. In the same way, the question of consensus in a distributed ledger is about finding a way for all the nodes in the network to agree on a single version of the ledger when presented with a conflict, to establish a shared perception of reality.</p><p><strong>Deciding whether the cat lives or dies</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*EjWKoh81r4XWTN3l.jpg" /><figcaption>Two possible realities</figcaption></figure><p>One simple way to resolve a conflict would be to ask everyone else in the network which version of the ledger they prefer and then have everyone follow the majority vote.</p><p>The first problem with with this approach, a problem for all distributed ledgers, is that someone can set up a large number of nodes and cast any number of votes to influence consensus or prevent consensus altogether — forcing the network to split into two irreconcilable realities.</p><p>A solution to the so-called Sybil attack is to require nodes prove access to a limited resource in order to cast a vote in the consensus process. For instance, in Bitcoin the miner who can prove access to a certain amount of hashing power is given permission to write to the ledger and in doing so cast its vote for the longest chain. In IOTA, someone who can prove access to a certain amount of tokens is granted a vote proportional to the amount of tokens they hold. This voting right is called <em>mana</em> and can be delegated to any node participating in the network. With mana the right to vote is expensive and it is impossible for anyone to cast an arbitrarily large number of votes.</p><p>Unlike many other distributed ledgers like Bitcoin or Ethereum which elect a single block producer to write an update to the ledger, IOTA is a leaderless protocol. Every node participating in the network, no matter the amount of voting rights it holds, can participate in the consensus process.</p><p>This leads to another problem with simply asking every node in the network for its opinion on a conflict: every node would have to send its opinion to every other node. In a small network this would be fine, but as soon as there are thousands or tens of thousands of nodes casting votes, most of the network’s bandwidth will be consumed with communicating these votes whenever a conflict arises, and nodes will be burdened with the computational cost of verifying the signatures of all the votes they receive. A leaderless protocol needs a voting mechanism that minimizes the volume and size of messages used to communicate the vote.</p><p><a href="https://arxiv.org/abs/1905.10895">Fast Probabilistic Consensus</a> is a peered reviewed leaderless consensus protocol with robust security guarantees which will be implemented in the IOTA protocol later this year. Instead of querying all nodes in the network for their opinion, nodes request opinions from a random sub-sample of nodes. In the case of a conflict, nodes repeatedly update their opinions based on the opinions they randomly select from others and eventually agree on which version of the ledger to follow. Because nodes with a lot of mana will be queried more often they can also publish their opinions directly in the tangle, further minimizing the message overhead. Although this is a highly simplified description of the FPC this voting protocol has provable security guarantees and scales with an arbitrarily large set of validators.</p><p><strong>Choose your own adventure</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wz9P_m8iMPvQbRZu" /><figcaption>Choose whichever reality you prefer</figcaption></figure><p>Another possible and slightly more experimental solution <a href="https://medium.com/@hans_94488/a-new-consensus-the-tangle-multiverse-part-1-da4cb2a69772">outlined here</a> (multiverse consensus, a.k.a. on-tangle-voting) would be to simply consider all messages themselves as votes. If I see two conflicting messages, I can vote for one or the other message by issuing new messages that references whichever of the conflicting messages I prefer — the one I saw first or the one with more votes. Because every message is a statement “this entire history of the ledger is true,” by choosing to reference one message in a conflict set a node is casting vote, weighted by its mana, on the version of the ledger-reality it prefers.</p><p>If I cast a vote for one reality and later see that most of the other nodes are voting for a different reality I can switch sides and begin issuing messages in the version of the ledger which more nodes voted for (weighted by their mana). Once 51% of the mana in the network (if it is controlled by honest nodes) converges on one side of the conflict it will become impossible for an attacker to prevent the network from achieving consensus, as long as all nodes eventually receive the same messages. The advantage of this approach is that the message overhead is zero and it is potentially very difficult to attack.</p><p>One possible attack vector would be for a malicious node to rapidly switch sides in the conflict, voting for one reality and then the other in such a way that neither reality stabilizes with over 50% of the vote — turning the Tangle into something like Schrödinger’s zombie cat, neither living nor dead. Although it’s probably extremely difficult to execute, a meta-stability attacked could theoretically be carried out by any node regardless of the amount of mana it holds, but just timing its votes exactly right.</p><p>I believe, however, there may be a simple solution to this problem based on the fundamental idea stated at the beginning of this piece that every node must verify the truth of the statements it receives from other nodes.</p><p><strong>This Statement is False</strong></p><p>When a node casts a vote for a reality in a conflict set, it is not only making a statement about the truth of the messages it references (these messages are true…), it is also making a second order statement: “This is the reality I perceive to have the most approval weight.”</p><p>In order to prevent a node from switching its opinion arbitrarily, one could use the Tangle itself to verify that a node is casting an “honest” vote — i.e. switching from the reality it perceives to have fewer votes to the one it perceives to have more votes.</p><p>If we consider the approval weight observable in the past cone of a node’s vote for a given reality as its “perceived reality weight,” we can then exclude from consensus any “dishonest” votes which express an opinion change from a heavier reality to a lighter one. So when a node updates its opinion from Reality A to Reality B the vote will only “count” (i.e the approval weight of the node will be applied to Reality B) if the node’s perceived reality weight of B is greater than its perceived reality weight of A plus its own weight.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oeYogipEX-k3kVsCVSU4mg.jpeg" /><figcaption>The blue node voted for Reality A first, and then changed its opinion by voting for Reality B. The honesty of its vote can be verified by looking at the Tangle.</figcaption></figure><p>In the above diagram, at time = 1 the Blue node must have perceived Reality A to have, at a minimum, the approval weight visible in the past cone of its first vote plus its own approval weight. The Blue node would also have to have seen that Reality B has the approval weight in the past cone of its second vote. Other nodes can easily validate the honesty of the Blue node’s opinion change by comparing these two values.</p><p>Performing this simple validation would mean that an attacker who attempts to switch sides arbitrarily would be forced to vote for increasingly heavy parts of each reality in the conflict set, and would at most, and with great difficulty, only be able to delay consensus for some period of time.</p><p>This idea only extends the protocol level principle that a node should verify the statements of other nodes, since a vote for a given reality is equivalent to the statement “This is the heavier reality.” As I’ve tried to show throughout this piece, it is as if the simple requirement that nodes “tell the truth” in their own statements and about the statements of others, leads almost inexorably to consensus as an emergent property of the network.</p><p><strong>Beyond Bitcoin</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pu2CkIu8CkA7hTpzPpQ5Jw.png" /><figcaption>A description of longest-chain-wins consensus from the Bitcoin whitepaper</figcaption></figure><p>The breakthrough of Nakamoto consensus was to design a distributed consensus protocol that scales in a permission-less network by having participants vote for the version of the ledger they prefer by simply gossiping new updates to the ledger.</p><p>However, Bitcoin was designed to have slow confirmation times in order to prevent lots of block producers from adding new blocks at the same time. If dozens of blocks were issued in parallel the network would see many different chains, competing versions of the ledger, and would never be able to agree on one longest chain. In some sense, by limiting confirmation times to enforce linear updates to the ledger, Bitcoin was designed to prevent a Tangle from emerging out of the blockchain.</p><p>Considered this way the drawback of Bitcoin was that it did not go far enough. IOTA is unique in many regards, but especially in this fact that it expands on the principles of Nakamoto consensus to build a fee-less, leaderless protocol of parallelized ledger updates, that scales with an arbitrarily large set of validators. Because all nodes collaborate in consensus mining races are eliminated and the networks computational power is used to secure the network in the most efficient and decentralized way possible.</p><p>These are some of the reasons I’m interested in this project, one of the few which tries to expand on the innovations of Bitcoin.</p><ol><li>If you think of ledger updates as events in a causal fabric then the messages which communicate them are something like <em>observation-events</em> which record an observer’s encounter with this event. The more observers that see an event, or see others seeing the event, the more the event itself becomes solidified into the causal fabric of the ledger-reality. In this sense the distinction between an event and the observation of an event seems to collapse at the most granular level of the ledger’s causal fabric. A conflict is what happens when two causally <em>possible</em> but mutually exclusive events are registered by different observers in the network. Consensus means that observers all agree to “know” one event in a conflict set, which is another way of saying that this event has “happened.” Stated by way of a question: if a ledger update is issued in the forest and no one is around to hear it, does it make a sound?</li><li>This part of the story was entirely fabricated for dramatic effect.</li><li>This is why consensus does not depend on preserving the entire history of the ledger for all time. In order to come to consensus nodes only to keep track of the messages which prove the current ledger state. Once a new state is confirmed nodes can prune old information which is not needed to detect a conflict. A distributed ledger is a truth telling machine, not an <a href="https://urbigenous.net/library/library_of_babel.html">infinite archive</a>.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c73269c2871" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coinmonks/the-chirping-machine-4c73269c2871">The Chirping Machine</a> was originally published in <a href="https://medium.com/coinmonks">Coinmonks</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>