<?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 Paul Madsen on Medium]]></title>
        <description><![CDATA[Stories by Paul Madsen on Medium]]></description>
        <link>https://medium.com/@paul_85059?source=rss-fe55d1978e75------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QNi1vRYfudSuU2zWme4AhQ.jpeg</url>
            <title>Stories by Paul Madsen on Medium</title>
            <link>https://medium.com/@paul_85059?source=rss-fe55d1978e75------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 11:24:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@paul_85059/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[Hedera Technical Insights: Stablecoins (and other tokens) demand Stable Fees]]></title>
            <link>https://medium.com/hedera/hedera-technical-insights-stablecoins-and-other-tokens-demand-stable-fees-c698879cdba5?source=rss-fe55d1978e75------2</link>
            <guid isPermaLink="false">https://medium.com/p/c698879cdba5</guid>
            <category><![CDATA[stable-coin]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[hbar]]></category>
            <category><![CDATA[hashgraph]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Paul Madsen]]></dc:creator>
            <pubDate>Thu, 11 Feb 2021 00:00:00 GMT</pubDate>
            <atom:updated>2021-02-11T11:52:32.097Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s-Q5qWcDGBog35rVPI9mHg.png" /><figcaption><a href="https://hedera.com/blog/stablecoins-and-other-tokens-demand-stable-fees">https://hedera.com/blog/stablecoins-and-other-tokens-demand-stable-fees</a></figcaption></figure><p>Tokenization is the proposition that ownership of a variety of assets can be tracked in the shared consensus state of a Distributed Ledger Technology (DLT).</p><p>With <a href="https://www.hedera.com/token-service/">Hedera Token Service (HTS)</a>, Hedera supports the ability to issue tokens on a globally distributed public network without compromising performance. Developers define and issue tokens directly to the Hedera mainnet. Tokens inherit many of the characteristics of Hedera’s native cryptocurrency hbar, including asynchronous byzantine fault tolerant (ABFT) consensus, thousands of transactions per second, and settlement in a matter of seconds, without the risk of forking or double-spends. Also, assets tokenized using HTS can easily integrate into the Hedera ecosystem — this includes wallets, exchanges, custody solutions, and more.</p><p>As for other Hedera transaction types, clients sending transactions creating, managing, and transferring tokens will pay fees to reflect the burden that transaction places on the nodes of the Hedera mainnet.</p><p>This post examines the fee model for HTS transactions.</p><h3>Hedera Stable fees</h3><p>If a public DLT denominates their fees in that DLT’s native token, then, as the price of that token varies, so will the fee’s real cost. The issue is amplified in blockchains where a client must persuade a miner to add their transaction to a block with suitable fee inducement, effectively bidding on a spot within a block.</p><p>This fee volatility and consequent uncertainty might be acceptable, if the value being exchanged was a few high-value transactions — the volatility of the fee would perhaps be small relative to the value of the transaction itself. But many enterprise use cases require a high throughput of transactions, each with a low intrinsic value.</p><p>Hedera believes that such uncertainty in how much a transaction will cost is impractical for widespread adoption amongst enterprises, such as those that compose our Governing Council, and so designed a fee model that eliminates such uncertainty.</p><p>Clients submitting transactions to the Hedera mainnet for processing into consensus pay fees for that service. The fees serve to prevent certain attacks and to generate revenue that funds network operations, such as future node and staking rewards.</p><p>Critically, the fees are denominated in US dollars (USD), giving dapps (decentralized applications) the desired fee stability and predictability, but charged in HBAR. As the USD price of HBAR goes up, the number of hbars charged as a fee for a given transaction decreases accordingly, ensuring a stable fee.</p><p>The fee for a given transaction is calculated by all nodes based on a fee schedule created and published by Hedera via a gossiped transaction. All nodes will use the same fee schedule in effect at a given time and so stay in sync when incrementing and decrementing accounts to reflect fees.</p><p>The fee schedule changes infrequently, such as when a new transaction type (such as HTS) is added, or when a bug is identified, or when market conditions change.</p><p>The fee schedule consists of many coefficients, in units of USD per resource consumed, for each transaction and query type.</p><p>Nodes analyze the amount of bandwidth, compute, and storage that a particular transaction consumes, multiply by the appropriate coefficients from the fee schedule, and determine a fee for that transaction in USD.</p><p>In addition to the fee schedule, Hedera also publishes a file that indicates the exchange rate between USD and HBAR that the nodes should use in converting from the above USD fee to an equivalent amount of HBAR. The calculated transaction fees will consequently be charged in hbars (actually tinybars — which are hundred-millionths of an hbar) and this is the amount that is subtracted from the balance of the account paying the fee for the transaction.</p><p>The exchange rate is updated frequently, currently every hour.</p><p>When calculating the fee for a given transaction, nodes use the fee schedule to determine the fee in USD, then the current exchange rate to convert to tinybars. As the price of HBARs varies, the amount of tinybars charged for a transactions using the same amount of network resources will vary accordingly such that the equivalent USD fee stays the same.</p><p>If the price of HBAR increases, then fewer tinybars are charged. If the price of HBAR decreases, then more tinybars are charged.</p><h3>HTS Fees</h3><p>We show below the typical fees for the HTS transactions, sorted by the different categories of transactions. The fee for a specific transaction can vary above or below the typical fee, depending on the particulars of the transaction. For instance, a token transfer with multiple signatures will be more expensive than a transfer with a single signature and creating a token with multiple keys will be more expensive than creating a key with only the treasury key.</p><p><strong>Category</strong></p><p>Transaction Typical Fee (USD)</p><p><strong>Token Admin operating on Token</strong></p><p>TokenCreate 1</p><p>TokenUpdate 0.001</p><p>TokenDelete 0.001</p><p>TokenMint 0.001</p><p>TokenBurn 0.001</p><p><strong>Token Admin operating on Account</strong></p><p>TokenFreeze 0.001</p><p>TokenUnfreeze 0.001</p><p>TokenGrantKYC 0.001</p><p>TokenRevokeKYC 0.001</p><p>TokenWipe 0.001</p><p><strong>Account Owner operating on Account</strong></p><p>TokenAssociateToAccount 0.05</p><p>TokenDissociateFromAccount 0.05</p><p>TokenTransfer (via CryptoTransfer) 0.001</p><p>The <a href="https://hedera.com/fees#estimator">Hedera Fee Estimator</a> allows you to estimate how the specifics of the above transaction types will cause the price to vary from the above typical prices and to predict aggregate cost over time for a use case depending on anticipated transaction volumes for the different transactions.</p><p>Let’s consider an example:</p><ol><li>A user, Alice, wants to transfer a number of XYZ tokens from her account to that of Bob. Necessarily, the token had been previously created, and both Alice’s and Bob’s accounts have previously associated themselves to that token. Alice’s wallet creates the transaction, specifying the relevant token identifier and Bob’s account identifier</li></ol><p>2. Alice’s wallet signs the transaction with her private key and submits it to a node</p><p>3. The node:</p><p>a. Checks to see whether Alice has sufficient hbars to pay the associated fee</p><p>b. Adds Alice’s transaction to an event and gossips the event out to the rest of the network</p><p>4. The network establishes a consensus timestamp and order for the transaction</p><p>5. All nodes examine the transaction and:</p><p>a. Validate the signature as authentic</p><p>b. Determine whether the XYZ token exists at the consensus timestamp</p><p>c. Determine whether Alice’s account has sufficient XYZ tokens for the specified transfer amount at the consensus timestamp</p><p>d. Determine the fee for the transaction as above, using:</p><p>i. The particulars of the transaction, for instance, how many signatures, whether there is a memo, etc</p><p>ii. The relevant coefficients from the current fee schedule</p><p>iii. The current exchange rate</p><p>e. Determine whether Alice’s account has sufficient hbars to cover the calculated fee</p><p>6. In the consensus order, nodes update all relevant account balances appropriately:</p><p>a. Reduce Alice’s account’s hbar balance by the calculated transaction fee</p><p>b. Reduce Alice’s account’s XYZ token balance by the transfer amount</p><p>c. Increase Bob’s account’s XYZ token balance by the transfer amount</p><p>7. Create a transaction receipt and record for the transaction</p><p>The fee for the above transaction will be approximately $0.001, and this fee will be stable even as the price of hbar varies against USD.</p><p>It is possible for a single transaction to transfer amounts of multiple different tokens and hbars. Such a transaction is atomic — all transfers succeed, or none do. The fee for such a transaction is slightly higher than the typical $0.001 reflecting the small amount of additional work the nodes perform in validating and processing the transaction.</p><h3>Summary</h3><p>For tokenization to reach its potential, fees must be both small relative to the value transfer and predictable. The Hedera Token Service provides both.</p><p><em>Originally published at </em><a href="https://hedera.com/blog/stablecoins-and-other-tokens-demand-stable-fees"><em>https://hedera.com</em></a><em> on February 11, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c698879cdba5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hedera/hedera-technical-insights-stablecoins-and-other-tokens-demand-stable-fees-c698879cdba5">Hedera Technical Insights: Stablecoins (and other tokens) demand Stable Fees</a> was originally published in <a href="https://medium.com/hedera">Hedera Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hedera Technical Insights: Finality of Consensus — you can take it to the bank (or maybe you are…]]></title>
            <link>https://medium.com/hedera/finality-of-consensus-you-can-take-it-to-the-bank-db0a75593d50?source=rss-fe55d1978e75------2</link>
            <guid isPermaLink="false">https://medium.com/p/db0a75593d50</guid>
            <category><![CDATA[double-spend]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[hbar]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[hashgraph]]></category>
            <dc:creator><![CDATA[Paul Madsen]]></dc:creator>
            <pubDate>Fri, 05 Feb 2021 00:00:00 GMT</pubDate>
            <atom:updated>2021-02-05T18:43:37.978Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hedera Technical Insights: Finality of Consensus — you can take it to the bank (or maybe you are the bank?)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*REpZwYddwcwZUfviLHV5qw.png" /><figcaption><a href="https://hedera.com/blog/finality-of-consensus-you-can-take-it-to-the-bank-or-maybe-you-are-the-bank">https://hedera.com/blog/finality-of-consensus-you-can-take-it-to-the-bank-or-maybe-you-are-the-bank</a></figcaption></figure><p>For individuals, being willing to change your mind is generally seen as a good thing — it suggests flexibility and a willingness to accept new data or evidence, even if it contradicts a previously held belief.</p><p>Not so for a consensus node in a distributed ledger. Once a consensus node decides on the proposition under consideration — for it to later change its mind complicates the goal of the network as a whole agreeing on that proposition.</p><p>In blockchains, the proposition under question is generally “what block should go on the end of the chain?” Blockchains differentiate themselves by the mechanism by which this question is decided. Some blockchains simply have different nodes take turns proposing a block and, as all nodes know whose turn it is, there is no uncertainty over the decision. If the decision process is not so deterministic, it may be possible for there be two valid blocks at a moment in time, and so no immediate answer. In Proof-of-Work (PoW) chains, the miners race to complete the hash puzzle and so win the right to have their block picked as next. As it is possible for two miners to both solve the puzzle around the same time, both proposed blocks are valid candidates to be chosen to be placed at the end of the chain. With both blocks then sent out to the rest of the network by the miners that created them (eager for the associated reward), the network must reconcile the disagreement. Both blocks <em>deserve</em> to be placed at the end of the chain, but only one can be. Which to choose? The chain, until the uncertainty is resolved, has split or forked. PoW chains typically resolve the issue by waiting until another hash puzzle race is completed — the winning block will have necessarily chosen one or the other of the earlier competing blocks. Whichever earlier block was chosen by this new block is retroactively blessed and the other discarded (or orphaned). This is the so-called “longest chain” rule for resolving chain forks — participants agree to build on the longest chain if there is a choice to be made.</p><p>The two earlier candidate blocks inevitably contained different sets of transactions — as the miners that created those blocks would have had a different set of transactions waiting in their different mempools. It’s possible that a particular transaction was in one block but not the other. Consequently, it’s possible that a given transaction is in the block that is orphaned but not in the block that is part of the longer chain. If so, then that transaction won’t be processed by the network. For instance, a BTC transfer won’t be made or a smart contract call on Ethereum won’t happen. For whoever sent the transaction, sorry about that. It will still be sitting in the miner’s mempools so it will hopefully be added to a later block. But critically, if there had been any exchange of value based on the assumption that the transaction in question was going to go through because it was in a block that had satisfied the hash puzzle, then someone will be disappointed. Using the archetypical coffee shop example — if the barista served the latte based solely on the payment being added to a confirmed block, then the customer may get the latte for free if the payment transaction is orphaned and never gets into a subsequent block.</p><p>A more nefarious scenario has an attacker attempt to manipulate the above temporary uncertainty — if they can send two different transactions spending the same coin into two winning blocks, then it’s possible that they can obtain value for each payment — effectively “double-spending” the coins. As explained above, the network will eventually resolve the discrepancy and only one transaction will be deemed valid, but that will likely be little consolation to whoever gave up something of value in exchange for the transaction that was deemed invalid.</p><p>It is for this reason that PoW chains recommend that those parties who rely on a payment being successfully processed wait a certain number of blocks to be added to the chain beyond the block the transaction in question is in. In Bitcoin, the recommended best practice is to wait for a total of six confirmations before assuming that the transaction won’t be in a block that gets orphaned — or the chain to be <em>reorganized</em>. As each block takes ten minutes on average, the best practice is to wait an hour before being fully confident that a BTC transaction is “good”. Ultimately, however, it’s a personal decision. For a latte, the coffee shop might be okay with one additional block. For someone selling a house, they would likely choose to wait the full hour or more before handing over the keys.</p><p>As additional blocks are added to the chain, the chances of a transaction in an earlier block being orphaned decrease quickly. After six block confirmations, the chances of a reorganization are very small, but not zero. There is always the theoretical chance that another chain, longer than that which a miner thought was the longest, will be discovered. If so, then the rules require that everyone switch — discarding the erstwhile longest chain (and unfortunately effectively throwing away the electricity spent on its creation).</p><p>In PoW chains, miners are required to be willing to change their minds about what chain to build on, and so there is always a chance that transactions previously assumed to be “locked-in” will be retroactively thrown out. Participants must account for this uncertainty.</p><p>In the hashgraph algorithm, the proposition under question that nodes must collectively establish agreement on is “is this particular witness famous?” The hashgraph data structure connects together groupings of transactions called “events”. Certain events have a special place in that structure and are called “witnesses”. Some witnesses are even more special — they are deemed “famous”. You can think of famous witnesses as those that are deeply woven into the hashgraph — like human celebrities, everybody “knows” them. All nodes look at the same hashgraph, identify the same set of witnesses for a certain portion of the hashgraph, and use the <a href="https://docs.hedera.com/guides/core-concepts/hashgraph-consensus-algorithms/virtual-voting">same algorithm</a> to determine the famous witnesses within that set. Once the famous witnesses are determined, then it’s a straightforward process to calculate timestamps for earlier events within the hashgraph. All nodes identify the famous witnesses and perform the timestamp calculation separately, without any additional confirmations or receipts beyond the gossiped events themselves — but nevertheless come to the same conclusion.</p><p>And critically, once a node determines which witnesses are famous in a given section of the hashgraph, they won’t change their mind. If a node determines that a particular witness is <em>not</em> famous, then there is no possibility that it will receive additional information that will cause the node to reevaluate and instead determine that the same witness <em>is</em> famous. Nodes make a choice, and then stick with it. Of course, nodes don’t decide lightly, a node won’t decide on the fame of a witness until it receives sufficient evidence to support the choice — famous or not. The algorithm requires that nodes see agreement from <a href="https://hedera.com/blog/counting-votes-why-a-2-3-threshold">more than 2/3 of the network</a> before making the decision. With such a hard threshold, once a node is able to <a href="https://docs.hedera.com/guides/core-concepts/hashgraph-consensus-algorithms/virtual-voting">count enough votes</a> and decide on fame of a particular witness, then hearing from any more of the network, whether that additional information affirms the choice or otherwise, is pointless. In fact it’s more than pointless, it’s wasteful and inefficient. Once nodes reach the threshold, they move on to the next decision — determining the fame of more recent witnesses. Another voting system that has a similar threshold and so similar finality is the US electoral college — once a presidential candidate receives 270 electoral votes, they are the winner. The states keep counting beyond that, but technically they don’t need to.</p><p>The above stubborn certainty for hashgraph nodes on the fame of witnesses is called “finality” of consensus. And finality in determination of the fame of witnesses translates into finality of the consensus timestamps and order of all events within the hashgraph (not just witnesses or famous witnesses). Once an event is assigned a timestamp and place in the full order, it won’t change. It can’t change; that would require that a set of famous witnesses changed and, as we saw above, nodes will not entertain that possibility.</p><p>Without finality of consensus, you must always to a certain extent “hedge your bets” — anticipating the possibility of a transaction being rolled back. It’s complicated. With finality, things are simpler. A dapp that sends a transaction into the Hedera mainnet and receives a receipt three seconds later with the consensus timestamp for that transaction doesn’t need to ask again three seconds later. Or six seconds. Or nine seconds. The answer will never change. And, with confidence that neither the consensus timestamp nor order of a transaction will ever change, the barista (or exchange, or supply chain partner, or vaccination clinic) can be equally confident that the transaction can be processed immediately with no risk of subsequently needing to be rolled back. Finality becomes particularly important when dealing with sharding or cross-chain interoperability.</p><p>There is no equivalent risk of double-spend in hashgraph as described above for PoW. If an attacker simultaneously sends two transactions into the network that together spend more hbars than in the balance of the account — both will receive a consensus timestamp and order. One will be deemed to have occurred earlier than the other. The later transaction will be rejected by all nodes as spending hbars that the account doesn’t have. The timestamps for the two transactions won’t change, and so neither will the determination of which transaction was earlier and valid.</p><p>With hashgraph’s finality, a transaction’s timestamp, order, and validity will not change — you can take it to the bank (or maybe you are the bank?)</p><p><em>Originally published at </em><a href="https://hedera.com/blog/finality-of-consensus-you-can-take-it-to-the-bank-or-maybe-you-are-the-bank"><em>https://hedera.com</em></a><em> on February 5, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db0a75593d50" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hedera/finality-of-consensus-you-can-take-it-to-the-bank-db0a75593d50">Hedera Technical Insights: Finality of Consensus — you can take it to the bank (or maybe you are…</a> was originally published in <a href="https://medium.com/hedera">Hedera Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hedera Technical Insights:​ Maintaining a decentralized identity registry with Hedera]]></title>
            <link>https://medium.com/hedera/hedera-technical-insights-maintaining-a-decentralized-identity-registry-with-hedera-5b29f8379da0?source=rss-fe55d1978e75------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b29f8379da0</guid>
            <category><![CDATA[decentralized-identity]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[hashgraph]]></category>
            <category><![CDATA[hbar]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Paul Madsen]]></dc:creator>
            <pubDate>Mon, 24 Aug 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-08-24T22:42:12.393Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NZQS_98PDU33cibB2tLD6g.png" /><figcaption><a href="https://www.hedera.com/blog/maintaining-a-decentralized-identity-registry-with-hedera">https://www.hedera.com/blog/maintaining-a-decentralized-identity-registry-with-hedera</a></figcaption></figure><p>Verifiable Credentials (VC) and Decentralized Identifiers (DIDs) are two different but related identity standards progressing in the W3C — both of which allow for a Decentralized Ledger Technology (DLT) to provide supporting infrastructure. A VC is an attestation of a set of identity claims or attributes of a Subject, as asserted by an Issuer. The archetypical VC is a driver’s license — the Subject of the VC is the driver, and the Issuer is the DMV. It is by presenting their license to police or similar that a driver proves they passed the test and have the right to drive.</p><p>For a VC to be useful, it will generally need to identify both the Subject (the driver) and the Issuer (the DMV). The VC standard doesn’t mandate a particular format for these identifiers; for instance, they could be email addresses or some other existing format. DIDs offer one option for these identifiers with some notable characteristics. Unlike an email, a DID is <em>resolvable</em>; that is, the identifier itself, like a domain or web address, can be used to retrieve a related set of information. Upon being presented with a DID for Alice, Bob can resolve the DID into a DID Document carrying associated metadata about Alice’s identifier, most notably cryptographic keys and addresses of other endpoints connected to Alice.</p><p>VCs and DIDs, used together, enable a useful reusable authentication and authorization pattern. Below is one manifestation:</p><ol><li>Alice and Bob initiate an online engagement. Perhaps this is Alice applying for a bank account at BobBank.com, or Bob authenticating to Workforce.Alice.com at the start of a shift to receive his work assignment for the day</li><li>Both determine they need certain identity attributes of the other and indicate those requirements</li><li>Both determine which of their existing VCs satisfy the requirements of the other</li><li>Both deliver the appropriate VC (or some Presentation derived from the VC) to the other, along with a cryptographic Proof that they do indeed control the VC</li><li>Both extract the DIDs from within the VC, and resolve the DID into the DID Document metadata. How this resolution manifests depends on how and where the registry is maintained.</li><li>Both use the metadata from the DID Document in order to validate the VC of the other. Validation will consist of verifying digital signatures, both that of the Issuer on the VC and that of the Subject on the Proof</li><li>Both check that the VC of the other is still valid; that is, was not suspended or revoked since being first issued</li><li>Both, confident in the identity of the other, proceed with the engagement</li></ol><p>Other identity architectures, such as X.509 certificates or federated models, such as SAML and OpenId Connect, enable the same logical model of Alice and Bob being able to prove identity attributes to the other, but make different assumptions about details such as 1) how tightly bound are the public keys to the VCs, 2) whether the issuer is involved in run time, and 3) which party controls (for instance, can update the metadata for) a given identifier. As such, VCs and DIDs can offer a useful (in that they can offer a different combination of privacy, security, etc) additional option to existing architectures and standards.</p><p>It is in steps #5 and #7 that a DLT like Hedera can provide value to the architecture. Fundamentally, a DLT can enable a decentralized (with advantages for trust, security, censorship resistance, fault tolerance, etc) registry of the identity metadata that Alice and Bob require to be able to validate the VCs of the other. Rather than querying some single centralized store of the identity metadata, both Alice and Bob can query any one of the parties that maintain the duplicate copies of the metadata. Or Alice and Bob could even maintain a copy of the registry themselves, giving them even greater confidence that the registry is valid and up to date.</p><p>Of course, the characteristics of the consensus algorithm that underlies the DLT will impact the characteristics of any identity registry built on top. If the underlying consensus algorithm is slow, then so will be the registry. For Bob to be able to query the registry for Alice’s metadata requires that the metadata has been previously registered on the registry via the DLT. And DLTs vary widely in the throughput and latency of such <em>write</em> operations.</p><p>In order to optimize performance, Hedera’s architecture for DIDs and VCs uses the Hedera Consensus Service (HCS). The registry of identity metadata is not maintained by the mainnet nodes, but rather by the nodes of an application network (appnet). It is against the members of the appnet that DIDs are resolved and VCs have their revocation status checked. In the HCS model, the mainnet nodes only timestamp and order the messages that <em>change</em> the registry; for instance uploading a DID Document or revoking a VC. Because the mainnet nodes do not bear the burden of maintaining the registry, with the associated writes and reads from a database, they can focus solely on their more fundamental role, that of establishing consensus timestamps and order for those messages. Consequently, Hedera can support a very high throughput for the transactions that update the registry.</p><p>The registry is updated by appropriately structured HCS messages sent to the mainnet and then subsequently retrieved from a mirror node. The following message will create a new entry in the registry that contains the DID and the corresponding DID Document.</p><pre>{ &quot;mode&quot;: &quot;plain&quot;, &quot;message&quot;: { &quot;operation&quot;: &quot;create&quot;, &quot;did&quot;: &quot;did:hedera:mainnet:7Prd74ry1Uct87nZqL3ny7aR7Cg46JamVbJgk8azVgUm;hedera:mainnet:fid=0.0.123&quot;, &quot;didDocumentBase64&quot;: &quot;ewogICJAY29udGV...9tL3ZjLyIKICAgIH0KICBdCn0=&quot;, &quot;timestamp&quot;: &quot;2020-04-23T14:37:43.511Z&quot; }, &quot;signature&quot;: &quot;QNB13Y7Q9...1tzjn4w==&quot; }</pre><p>The above JSON would be sent as the contents of an HCS <em>SubmitMessage </em>transaction to a mainnet node for submission to the rest of the network and subsequent assignment of a consensus timestamp (different from the timestamp in the sample above). The transaction would be submitted to an HCS Topic, necessarily previously created on the mainnet and be assigned a place within that Topic’s order. As for other transactions, the client would pay a fee for the processing of the transaction. For an HCS message this fee is approximately $0.0001. After being assigned a consensus timestamp and order within the above Topic, the message would flow out to the mirrors — from which the members of the appnet would retrieve the message via an existing subscription. The members of the appnet would then add the DID Document from within the message to the identity registry such that the DID Document would then be available to be returned in response to any future resolution queries. From the time the HCS message is sent to the mainnet to the time a member of the appnet retrieves it from a mirror node is typically on the order of 10 seconds.</p><p>Because the identity registry is maintained on an appnet and not the mainnet, queries against the registry happen in two steps.</p><p>Below is a representative DID registered on a Hedera appnet:</p><pre>did:hedera:mainnet:7Prd74ry1Uct87nZqL3ny7aR7Cg46JamVbJgk8azVgUm;hedera:mainnet:fid=0.0.1234</pre><p>If a client were presented the above DID (for instance if the DID was provided as the Issuer of a VC), then the client would process the DID as follows:</p><ol><li>Parse the file identifier of the appnet address book as ‘0.0.1234’ from the DID</li><li>Send a HAPI <em>FileGetContents </em>query to a Hedera mainnet node specifying the above file identifier</li><li>Retrieve the JSON formatted address book for the appnet</li></ol><pre>{ &quot;appnetName&quot;: &quot;My Application Network&quot;, &quot;didTopicId&quot;: &quot;0.0.12345&quot;, &quot;vcTopicId&quot;: &quot;0.0.23456&quot;, &quot;appnetDidServers&quot;: [ &quot;https://example.com/myappnet/hedera/api&quot;, &quot;https://example2.com/myappnet/api/v1&quot;, &quot;https://example3.com/myappnet&quot; ] }</pre><p>4. Choose one of the appnet member addresses from the address book (there are 3 in this example)<br>5. Send a GET to the chosen appnet member specifying the remaining portion of the DID</p><pre>did:hedera:mainnet:7Prd74ry1Uct87nZqL3ny7aR7Cg46JamVbJgk8azVgUm</pre><p>The appnet member would do a lookup from the registry for the corresponding DID Document and return it to the client.</p><p>The client would use the metadata (such as public keys) within the returned DID Document to help in any signature validation or associated processing.</p><p>A revocation registry for VCs is maintained similarly. When a VC is first issued, a hash of that VC is submitted via an HCS message to a particular HCS Topic. As above, the members of the appnet retrieve that hash from a mirror and store it in the registry. If, in the future, a client sends that hash to an appnet node as part of a revocation check of the VC, then the appnet node returns the latest status for that hash; that is whether it is valid or otherwise. If, after that initial issuance, the Issuer determined that it was necessary to revoke or suspend the VC, then they would send another HCS message indicating that and the appnet members would update the status of the VC within the registry accordingly.</p><p><em>Originally published at </em><a href="https://www.hedera.com/blog/maintaining-a-decentralized-identity-registry-with-hedera"><em>https://www.hedera.com</em></a><em> on August 24, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b29f8379da0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hedera/hedera-technical-insights-maintaining-a-decentralized-identity-registry-with-hedera-5b29f8379da0">Hedera Technical Insights:​ Maintaining a decentralized identity registry with Hedera</a> was originally published in <a href="https://medium.com/hedera">Hedera Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hedera Technical Insights: Why is there no Slashing in Hedera’s Proof of Stake?]]></title>
            <link>https://medium.com/hedera/why-is-there-no-slashing-in-hederas-proof-of-stake-3d8a3b9593d0?source=rss-fe55d1978e75------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d8a3b9593d0</guid>
            <category><![CDATA[slashing]]></category>
            <category><![CDATA[staking]]></category>
            <category><![CDATA[hbar]]></category>
            <category><![CDATA[hashgraph]]></category>
            <category><![CDATA[proof-of-stake]]></category>
            <dc:creator><![CDATA[Paul Madsen]]></dc:creator>
            <pubDate>Tue, 07 Jul 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-07-07T18:00:24.052Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cj22YgG1LjpUgrH95nwZBQ.png" /><figcaption><a href="https://www.hedera.com/blog/why-is-there-no-slashing-in-hederas-proof-of-stake">https://www.hedera.com/blog/why-is-there-no-slashing-in-hederas-proof-of-stake</a></figcaption></figure><h3>What is Proof of Stake?</h3><p>In Proof of Stake (PoS) systems, ‘slashing’ refers to the possibility of a node determined to be breaking the rules of the protocol being punished by the loss of some or all of the stake (coins) they had put forward. To make the risk of slashing real, nodes must typically bond their stake (that is, lock it up) for some period of time. It is the bonded coins that are at risk if the node breaks the rules. Depending on the severity of the transgression, all or some of those bonded coins could be either burned or redistributed to other participants. When bonded, the coins are generally unavailable for other purposes so slashing implies both risk of loss and reduced liquidity.</p><p>While Hedera Hashgraph is a PoS system, there is no slashing nor associated bonding, and so the nodes do not confront the associated loss of liquidity. Network participants do nominate a particular account as being ‘staked’ (or proxy staked), logically asserting to the network that they wish the hbars within to be accounted for in consensus calculations (and payments), but the hbars are not locked up — they can be spent at any time.</p><p>Nor do the nodes confront the risk of those staked hbars being taken from them, that is, slashed.</p><p>Why do some PoS systems impose slashing, while others do not? How can we guarantee the security of Hedera Hashgraph without slashing, given that most (but not all) other PoS platforms appear to require it?</p><p>Fundamentally, Hedera Hashgraph makes certain guarantees with respect to the safety and liveness of the network and those guarantees are the strongest possible any distributed ledger technology (DLT) can make; slashing would not make those guarantees any stronger. Consequently, we do not require the possibility of slashing (with one exception discussed below) and its associated negatives.</p><h3>What is Slashing?</h3><p>The term ‘slashing’ comes from an early PoS system called Slasher. Vitalik Buterin used the term in a post from 2017 called ‘ <a href="https://medium.com/@VitalikButerin/minimal-slashing-conditions-20f0b500fc6c">Minimal Slashing Conditions</a>’. The post was a discussion of the proposed transition of Ethereum from Proof of Work (PoW) to PoS — specifically an issue with Proof of Stake called ‘ <a href="https://blog.ethereum.org/2014/11/25/proof-stake-learned-love-weak-subjectivity/">Nothing at Stake</a> ‘.</p><p>Unlike in PoW, where there is an actual physical cost for a miner building on competing forks, in PoS based blockchains, where stake weights the chances of a validator being allowed to propose the next block, a validator could choose to work on two competing forks without significant cost. Unlike a PoW miner, the PoS validator has nothing at stake; that is, ‘no skin the game’.</p><p>Nothing at Stake (and the need for slashing to prevent it) stems from a validator being able to choose whether to build on the longest chain, as the rules require, or ‘play two hands at once’ in hopes of profit. It is that discretion, inherent in blockchains, to follow the longest chain rule or not, which validators have, that argues for slashing — a validator <em>can </em>work on multiple forks and so must be discouraged from doing so via the risk of slashing.</p><p>The proposed slashing model for Ethereum 2.0 has different amounts of a validator’s 32 bonded ETH being slashed, the amount depending on the nature of the transgression and whether it appears to be coordinated with others. For instance, if a validator signs an invalid transaction, the minimum amount slashed will be 1 ETH, but if other validators are simultaneously acting inappropriately then all the ETH could be lost. There are less draconian punishments for a validator being offline, but, again, if a validator is offline at the same time as others so that at least 1/3 are not participating and so preventing consensus from proceeding, then the slash can be significant.</p><h3>Downsides of Slashing</h3><p>First and foremost, slashing introduces complexity into the system and complexity introduces greater scope for attack. Slashing requires another set of parameters that must (or can depending on your PoV) be tuned and so complicates analysis and proof of the system’s security. Additional complexity emerges from the necessary mechanisms for detecting the bad behavior to be slashed. Some slashing systems introduce ‘fishermen’ or ‘whistleblowers’ whose role (and business model) is to report misconduct. In order to make a report (and be eligible for the reward), the fishermen themselves may be required to bond some stake, which could be taken away if the report is spurious.</p><p>Slashing also complicate the proof of the security of the ledger. If the security is dependent on human actors and their thinking, feelings, and assessment of risk, then how can we make mathematical guarantees about that security?</p><p>As an example, Ethereum 2.0 introduces the concept of ‘economic finality’. Finality is the feature of some DLTs that, once a value has been decided for a given proposition, no subsequent event can change that. Ethereum’s ‘economic finality’ softens that guarantee, adding ‘unless a large number of people are willing to burn very large amounts of money’.</p><p>Related, slashing presumes a rational assessment of the trade-offs of an attack; that is, a rational actor will not engage in an attack unless the potential gain exceeds the risk of coins lost to slashing; however, a virus that gets installed on a node, or compromised node software, will not act so rationally, nor will it consider the best interests of whatever node it happens to be installed on. You can’t discourage an actor that doesn’t care about the consequences.</p><p>The above highlights the potential for an honest participant to be nonetheless slashed and lose funds through no fault of their own. This risk would surely discourage some of those contemplating running a node. If a node, or more generally any participant in the staking, can lose stake due to their breaking of a rule that was not their fault, then the attractiveness of acting as a node or staking is diminished.</p><p>Last but not least, if the slashing requires bonding, then there is an opportunity cost due to the loss of liquidity. By bonding, users generally lock up their coins for a defined period. Once locked up, those coins would be unavailable should there be a sudden downturn or some other investment with a greater rate of return. As an example, early nodes on Ethereum 2.0 may have their 32 ETH stake locked up for over a year.</p><h3>Hedera Hashgraph and Staking</h3><p>Slashing in PoS blockchains is a recognition that nodes have a choice on which chain to build. The rule of “longest chain” or variants stipulate how to choose from amongst candidate chains, but a node can break the rules and work on some other chain for potential advantage. Without slashing, nothing prevents a PoS node from building on multiple chains at once — the ‘Nothing at Stake’ attack. The hashgraph protocol does not provide the same opportunity for bad behaviour by such a leader because there is no leader, and so no discretion given that leader to create the next block, nor which chain to build on.</p><p>In hashgraph, nodes do not rely on other nodes making an assertion as to what should be the consensus decision on some question; for example, what is the next block. Instead they <em>calculate</em> what the other node would assert if that node were to do so. Honest votes occur as the protocol dictates and all a dishonest node can do is to try to outvote the honest nodes or otherwise skew consensus.</p><p>Critically, the votes are virtual. Even if Alice wanted to break the rules by casting a bad vote (on the fame of some witness), then it is the other honest nodes who effectively vote for Alice — and so eliminate her ability to lie. The ‘Nothing at Stake’ problem is logically a malicious block validator casting two votes (on which chain is canonical). In hashgraph, other honest nodes cast those votes on behalf of other nodes and the decision is effectively taken out of a dishonest node’s hands.</p><p>Hedera uses the stake of a node (both its own and that proxied to it by other accounts) in two ways — to weight 1) the votes of that node when voting on consensus and 2) the payments paid to the node and those accounts to incentivize their participation. Neither the node’s nor the proxying account’s stake is bonded; it can be moved at any time (though the voting and payment weights will be reduced accordingly). For the accounts proxying to a node, there is no risk of losing that proxied stake, should the node break the protocol rules. There is however one scenario where the node itself will be charged a fee should it not perform the expected validation of a transaction. Generally, it is the client (or a designated payer) that creates a transaction and submits it to a particular node for gossip to the network that pays the associated transaction fee (some of which goes to the submitting node and the rest to the Hedera treasury). A tiny fraction of that fee is the “network fee”, which covers just the cost of gossip and consensus for that transaction. The user is charged that fee, assuming they used a valid, non-empty account and properly signed the transaction. The node is responsible to make that single check: can the user afford that small fraction of the fee. If the node fails to do that check and the user’s account cannot pay, then the node must pay that small fraction of a cent. All the other nodes will have performed the small amount of work to gossip and reach consensus on the transaction and so should be compensated.</p><p>The fee did not come from any locked up or bonded HBARs, but simply from the node’s associated account. The node only needs to keep perhaps one dollar’s worth of hbars in that account. A node will be removed if its balance drops too low as it might then be unable to pay the fee. Again, any accounts proxying to the node would be unimpacted.</p><p>The above fee is arguably a slash as a node that does not follow the protocol does lose funds. But it is less a penalty than the network simply requiring that someone pay the network fee if the user can’t.</p><h3>Prevention or Punishment</h3><p>Fundamentally, the hashgraph protocol gives nodes less opportunity for breaking the rules of the protocol than in blockchains and so there is less need to punish them for such rule breaking. Punishing a crime is less desirable than preventing it in the first place. Consequently, Hedera implements neither bonding nor slashing and so does not confront the downsides of both described above.</p><p><em>Originally published at </em><a href="https://www.hedera.com/blog/why-is-there-no-slashing-in-hederas-proof-of-stake"><em>https://www.hedera.com</em></a><em> on July 7, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d8a3b9593d0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hedera/why-is-there-no-slashing-in-hederas-proof-of-stake-3d8a3b9593d0">Hedera Technical Insights: Why is there no Slashing in Hedera’s Proof of Stake?</a> was originally published in <a href="https://medium.com/hedera">Hedera Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hedera Technical Insights: Counting Votes — why a 2/3 threshold?]]></title>
            <link>https://medium.com/hedera/hedera-technical-insights-counting-votes-why-a-2-3-threshold-3ae1ac825a88?source=rss-fe55d1978e75------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ae1ac825a88</guid>
            <category><![CDATA[distributed-ledgers]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[hbar]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[hashgraph]]></category>
            <dc:creator><![CDATA[Paul Madsen]]></dc:creator>
            <pubDate>Thu, 04 Jun 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-06-04T11:14:18.527Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hedera Technical Insights: Counting Votes — why a 2/3 threshold?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fK45ce-vLka6mqiY8FSy2w.png" /><figcaption><a href="https://www.hedera.com/blog/counting-votes-why-a-2-3-threshold">https://www.hedera.com/blog/counting-votes-why-a-2-3-threshold</a></figcaption></figure><p>Nodes in a hashgraph network apply a 2/3 threshold in the virtual voting procedure — as soon as more than this fraction of consistent votes (or vote stake) are counted on the fame of a particular witness, then that election is complete. And once a set of famous witnesses are decided for a given round, then events that are ancestors of those witnesses reach consensus and the consensus timestamp and consensus order for each of those events can be calculated with complete and unequivocal certainty.</p><p>This type of threshold (and associated finality of consensus) is typical of Byzantine Fault Tolerant (BFT) consensus algorithms, in contrast to Proof of Work-based systems where, instead of finality, participants only gradually build up confidence that a transaction won’t be rolled back — this confidence coming through successive blocks being added to the chain.</p><p>In a voting-based consensus algorithm, the general pattern is that the nodes will cast, collect, and count votes on some, typically binary, proposition. Each individual node, as it collects and counts the votes of other nodes, has to know when to stop collecting and make a decision on the election.</p><p>It would be bad idea to have the nodes only stop collecting after receiving votes from every other node, as just a single node going offline would cause consensus to halt — we will come back to this idea. It would also be a bad idea to have nodes stop collecting votes after receiving only a single vote from some other node — it would be hard to interpret that as consensus.</p><p>So instead, each node will stop collecting votes once the votes they have collected have met some threshold criteria.</p><p>A hashgraph node collects (remember that the votes are virtual, no explicit ballots are being cast) the votes on the YES/NO proposition on the fame of a particular witness event in the hashgraph. When more than 2/3 of the network have voted as YES (or as many have voted NO) on the fame of a particular witness , that particular election is over and decided accordingly. Nodes then move on to the next election, fully confident that the other nodes, independently following the same procedure, will come to the same results.</p><p>So why 2/3 and not some other fraction? Couldn’t the election stop at just over 1/2? Or wouldn’t security be enhanced if the threshold were higher, for instance, 9/10?</p><p>It turns out that requiring nodes count just over 2/3 votes is the best compromise between defending against two different types of attacks.</p><h3>Safety and Liveness</h3><p>There are two broad classes of faults that a consensus algorithm must protect against — safety faults and liveness faults.</p><p>Safety is a guarantee than “nothing bad will happen, ever”. In the context of consensus, safety refers to different parts of the community being able to avoid establishing different consensus values. If an attacker is able to convince some honest nodes that the consensus is A and a different group of honest nodes that the consensus is B, then that is a safety fault. A double spend is the archetypical safety attack — the attacker creates two different realities and spends the same coin in each.</p><p>Liveness is a guarantee that “something good will happen, eventually”. In the context of consensus, liveness refers to the community being able to progress towards consensus. If an attacker is able to stop consensus from being established, then it is a liveness fault. In leader-based systems, a Distributed Denial of Service (DDoS) attack against the current leader could create a liveness fault.</p><p>Generally, defending against a safety attack makes a liveness attack easier. And vice versa.</p><p>Returning to voting, we can better defend against safety attacks by raising the vote threshold, that is, requiring nodes count more votes before deciding on an election. But raising the threshold makes a liveness attack easier because an attacker will have less difficulty stopping consensus — they need to prevent fewer nodes from participating. As an example, if the threshold were 9/10, then an attacker need only prevent 1 node (assuming there were 10 nodes in the network) from casting votes in order to stop the remaining nodes from reaching the threshold. And perhaps the attacker is one of the nodes itself and need do nothing more than turning off to remove one vote.</p><p>On the other hand, if we wish to defend against a liveness attack by lowering the vote threshold, then we make safety attacks easier. If we collect fewer votes before deciding an election, then we effectively give any dishonest nodes greater relative influence to sway the election.</p><p>So there is a tension between defending against safety and liveness attacks.</p><p>But we still haven’t answered the question of why hashgraph elections are decided after 2/3 of votes are collected.</p><p>We can justify the choice by considering a hypothetical network and determining what attacks might be possible for different vote threshold values. For each threshold value, we can consider what attacks are possible and how many dishonest nodes would be required to make those attacks feasible. In general, we want to make attacks more difficult by requiring that the attacker be able to control or influence more nodes — ideally, an attacker will require a very high fraction of the network to be dishonest.</p><p>Let’s start by assuming nodes are required to talk to more than 59% (so 60% would be sufficient) of the other nodes and collect their votes before deciding that some election is over. It’s clear that, for this threshold value, if an attacker can prevent 41% of the network from communicating, then they can stop the honest nodes from being able to reach consensus. That is, they can prevent liveness. If the attacker actually controls 41% of the nodes, then they need do nothing more than turn off their computers. If they don’t control the nodes, then an attacker can try to DDoS the honest nodes and prevent their participation in consensus in that way.</p><p>What safety attack is possible with this 59% threshold? And how many dishonest nodes are needed to pull it off?</p><p>A safety attack will have some number of dishonest nodes convince different portions of the remaining honest nodes of different consensus values, for instance, convince one half of the honest nodes that the consensus is YES, whilst the other half believe the consensus is NO. Necessarily, the dishonest nodes will vote YES when communicating with some honest nodes, and NO when communicating with the other honest nodes. There has to be enough dishonest nodes lying in this manner to allow the two groups of honest nodes to reach the required 60% . If not, then the honest nodes won’t believe the election is over. And, of course, the two groups of honest nodes can’t be allowed to talk between themselves or the attack would be apparent.</p><p>The situation is represented below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N9pVOelvA8oeXqIU3RBUig.png" /></figure><p>If ‘h’ is the fraction of honest nodes and ‘d’ the dishonest, and we assume that the honest nodes are divided equally, then we must have:</p><p>h/2 + d = 0.6</p><p>If the two sets of honest nodes are to be convinced of the dishonest node’s lies (or as h + d = 1), then:</p><p>(1-d)/2 + d = 0.6</p><p>1/2 — d/2 + d = 0.6</p><p>1/2 + d/2 = 0.6</p><p>d/2 = 0.1</p><p>d= 0.2</p><p>If there are 20% dishonest nodes, then a safety attack is possible with the choice of 59% for threshold, if the honest nodes can be partitioned as shown. The dishonest 20% lie to each honest 40% camp, allowing each 40% to reach the requisite 60% and be convinced the election is over. And, of course, each 40% believes the result of the election is different — a fork.</p><p>While the choice of 59% for the threshold provides attractive resistance to liveness attacks (taking 40% of the network offline seems a high bar) it makes a safety attack relatively easy (needing only 20% of nodes to lie).</p><p>We can repeat the exercise for other choices of the vote threshold. For instance, for a threshold of 79%, a liveness attack is possible by only 21% dishonest nodes, a safety attack possible if there were 60% dishonest nodes.</p><p>The 79% choice makes a liveness attack easier, but significantly raises the bar for a safety attack.</p><p>Thus, the higher the threshold we choose, the easier a liveness attack, but the harder a safety attack.</p><p>What is the situation if we choose the threshold of 2/3 and require nodes collect just over this, for instance 67%? It turns out for this particular threshold then both that a liveness and safety attacks are possible with 1/3 dishonest nodes.</p><p>It is for the 2/3 value of a vote threshold that we make safety and liveness attacks <em>equally </em>difficult, specifically that the attacker must control or be able to take offline 1/3 of the network.</p><p>This is the optimal value if we want to guard against both safety and liveness attacks. If we were concerned only with one or the other, then we would choose a different threshold value.</p><p>Honest nodes counting just over 2/3 of the votes is the best compromise.</p><p>It is for this reason that hashgraph nodes count just over 2/3 of virtual votes when determining the fame of witnesses (and so determining which timestamps are used in calculating a median timestamp for events).</p><p>Choosing the threshold 2/3 is the best you can do. And even that best case allows both safety and liveness attacks if there are 1/3 dishonest nodes.</p><p>Not all consensus algorithms can achieve this best case; that is, to provide both safety and liveness even when confronted with just less than 1/3 dishonest nodes.</p><p>The Swirlds’ <a href="https://www.swirlds.com/downloads/SWIRLDS-TR-2016-01.pdf">whitepaper</a> includes a proof that shows that, as long as less than 1/3 of the network are dishonest, hashgraph is Byzantine Fault Tolerant (BFT). Additionally, because the hashgraph algorithm does not make any assumptions about how long messages take to cross the network (as long as they eventually do), the protocol is completely asynchronous (ABFT).</p><p>Asynchronous BFT is truly the best a consensus algorithm can achieve — guaranteeing both safety and liveness for any amount of dishonest nodes up to 1/3 of the network.</p><p><em>Originally published at </em><a href="https://www.hedera.com/blog/counting-votes-why-a-2-3-threshold"><em>https://www.hedera.com</em></a><em> on June 4, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ae1ac825a88" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hedera/hedera-technical-insights-counting-votes-why-a-2-3-threshold-3ae1ac825a88">Hedera Technical Insights: Counting Votes — why a 2/3 threshold?</a> was originally published in <a href="https://medium.com/hedera">Hedera Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decentralized Identity on the Hedera Consensus Service | Hedera Hashgraph]]></title>
            <link>https://medium.com/hedera/decentralized-identity-on-the-hedera-consensus-service-hedera-hashgraph-25ef5103e40a?source=rss-fe55d1978e75------2</link>
            <guid isPermaLink="false">https://medium.com/p/25ef5103e40a</guid>
            <category><![CDATA[decentralized-identity]]></category>
            <category><![CDATA[distributed-ledgers]]></category>
            <category><![CDATA[hashgraph]]></category>
            <category><![CDATA[verifiable-credentials]]></category>
            <category><![CDATA[hbar]]></category>
            <dc:creator><![CDATA[Paul Madsen]]></dc:creator>
            <pubDate>Fri, 01 May 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-07-26T13:56:30.860Z</atom:updated>
            <content:encoded><![CDATA[<h3>Decentralized Identity on the Hedera Consensus Service</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ko0nEXGyFOxEkq4bYC0Nrw.jpeg" /><figcaption><a href="https://www.hedera.com/blog/decentralized-identity-on-hedera-consensus-service">https://www.hedera.com/blog/decentralized-identity-on-hedera-consensus-service</a></figcaption></figure><p>Hedera is pleased to announce the early availability of beta tools that Hedera developers can use to manage the lifecycle of <a href="https://www.w3.org/2019/did-wg/">Decentralized Identifiers</a> (DIDs) and <a href="https://www.w3.org/2017/vc/WG/">Verifiable Credentials</a> via the Hedera Consensus Service. We welcome feedback from the community on these tools.</p><h3>Decentralized Identity</h3><p>Decentralized Identity (DI) is an architecture and set of emerging standards for identity management that may use a blockchain or Distributed Ledger (DLT) within the architecture.</p><p>The fundamental criteria for the applicability of a DLT to a use case (including identity) is the opportunity to disintermediate some actor and thereby gain in efficiency, security, or cost.</p><p>However, most identity applications require 3rd parties as attribute authorities — the government of Canada must assert that I am Canadian, Hedera that I am an employee, etc — no other party is authorized to say so. So there is arguably a fundamental incompatibility between DLTs and identity in that 3rd parties play a justifiable role.</p><p>But, even if we can’t disintermediate the business/trust relationship that are fundamental to identity use cases, there may be value in disintermediating the network or messaging architecture — and so gain advantages in privacy, or resilience, or integration efficiencies.</p><p>The fundamental value of DLTs to identity applications is in enabling a loose coupling between Issuer and RP with respect to the flow of identity attributes and associated metadata.</p><p>Loose coupling means that Issuer and RP do not directly interact/message, but rather do so indirectly via transactions submitted to and queries of the DLT.</p><p>Two particular aspects of the above flow can be facilitated by a DLT — metadata discovery and revocation:</p><ul><li>Validation of credentials presumes verification of digital signatures. DLTs can play a role in facilitating retrieval of the associated public keys. Additionally, DLTs can enable discovery of associated service endpoints.</li><li>A critical aspect of credential validation is for the RP to assess whether the credential has been revoked. The credential may be long-lived, or short-lived. If short-lived, the RP can be confident that the claims within the credential are fresh and timely. If long-lived, the RP will likely need to gain some other indicator that the claims are still valid.</li></ul><h3>Scaling Decentralized Identity</h3><p>In the Decentralized Identity model, the identifiers by which actors are known may be resolvable against a DLT. When two actors engage in an online interaction that requires their identities be verified, they can both perform a lookup of the other’s identifier against a DLT on which the identity is anchored and retrieve identity metadata that will assist in subsequent validation.</p><p>Such lookups of identity metadata can be satisfied by whatever DLT node the query is sent to and so place no significant burden on the network. Consequently, the network can collectively provide a high throughput, i.e. many transactions per second or ‘tps’. But a read presumes that the necessary metadata has previously been added to the DLT with a write which, because such a transaction requires that all nodes must process it into consensus state, is generally constrained in throughput.</p><p>Many identity use cases will require that an identity be written to a DLT only once, thus enabling many subsequent reads. For instance, if a university issues a credential to a graduating student, then that issuance can be recorded once on a DLT. Whenever that student subsequently applies for a job, the HR department would query the DLT for the credential artifacts. It’s likely that even low throughput DLTs could handle the associated volume.</p><p>On the other hand, consider an application like the Internet of Things (IoT) in which each device may receive a distinct and unique identity at manufacture time — this initial identity a key aspect of subsequent assessment of the provenance and validity of the device by later applications and other devices. Each issued identity, and perhaps other moments in the thing’s lifecycle, could require a corresponding write to a DLT, which implies that the DLT be able to support that volume of transactions.</p><p>Most public DLTs are not able to natively support the sort of transaction volumes that such a use case might imply. For example, Bitcoin’s maximum throughout is less than 7 transactions per second (tps), and in its current state, the Ethereum network can process a maximum of 15 tps — these are the speed limits for all transaction types, not just those anchoring identities to the ledger.</p><h3>Hedera Consensus Service</h3><p>The Hedera Consensus Service offers one model for scaling Decentralized Identity. HCS enables a model where identities can be anchored to Hedera at very high throughput. Critically, rather than storing identity metadata (such as public keys, DID Documents, credential hashes, etc) on the Hedera mainnet nodes — these identity artifacts flow <em>through</em>, instead of <em>into</em>, Hedera and out to other computers. Consequently, HCS can avoid the bottleneck of having the nodes of the Hedera network writing to disk.</p><p>If we apply the HCS model to decentralized identity, the Hedera nodes focus exclusively on assigning a consensus timestamp and order to the transactions storing and updating identity artifacts, but the identity artifacts themselves are not persisted on the Hedera nodes, but rather on the computers of some other business network. With this storage burden removed from the Hedera nodes, they can process transactions at the native speed of the hashgraph consensus algorithm, the very fast 10-100k tps. Similarly, the business network nodes, without bearing the burden of contributing to consensus, can be optimized for fast storage and lookups of these identity artifacts.</p><h3>Standardization</h3><p>Key pieces of the DI architecture are under standardization at the <a href="https://www.w3.org/">W3C</a>. Hedera recently joined the W3C so that we can ensure that DI applications built on Hedera will be compliant with those emerging standards and where appropriate, contribute Hedera specifications into those standardization efforts.</p><p>An early preview of the Hedera HCS <a href="https://github.com/hashgraph/did-method/blob/master/did-method-specification.md">DID Method specification</a> defines how Decentralized Identifiers and their corresponding DID Documents are managed via HCS messages. Participants create, update, and delete the DID Documents via HCS messages submitted to a specific topic. Those messages (and the DID data they carry) are timestamped and ordered by the Hedera network before flowing out via the mirror network to members of a business network. It is against the business network that Relying Parties (RP) resolve DIDs into the corresponding DID Documents.</p><p>Similarly, HCS messages can be used to enable a revocation registry of Verifiable Credentials. When a Verifiable Credential (for instance, a Driver’s License issued by the DMV or a particular safety certification issued by a Technical Training School) is issued to a Subject, the hash of that credential is sent via an HCS message to be stored on a business network. When that credential is subsequently presented (for instance, in order to rent a car or to establish a technician’s qualifications for a particular maintenance job) the current status of that credential can be queried against the nodes of the business network. If the credential had been revoked, the hash would have been deleted and the query would fail.</p><h3>Java DID SDK</h3><p>We have created the open source Java DID SDK to simplify integrating the above messaging patterns for managing DIDs and Verifiable Credentials via HCS into your application.</p><p>The DID SDK abstracts away the specifics of CRUD operations for DIDs and VCs via HCS messages.</p><p>The DID SDK builds on the existing HCS features of the Hedera Java SDK to add DID and VC specific functions — like recording the issuance of a DID, or the revocation of a VC, etc.</p><p>The DID SDK is available <a href="https://github.com/hashgraph/did-sdk-java">here</a>.</p><p><em>Originally published at </em><a href="https://www.hedera.com/blog/decentralized-identity-on-hedera-consensus-service"><em>https://www.hedera.com</em></a><em> on May 1, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25ef5103e40a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hedera/decentralized-identity-on-the-hedera-consensus-service-hedera-hashgraph-25ef5103e40a">Decentralized Identity on the Hedera Consensus Service | Hedera Hashgraph</a> was originally published in <a href="https://medium.com/hedera">Hedera Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hedera Technical Insights: Hedera Hashgraph Transaction and Query Processing Model]]></title>
            <link>https://medium.com/hedera/hedera-hashgraph-transaction-and-query-processing-model-d032d09ae189?source=rss-fe55d1978e75------2</link>
            <guid isPermaLink="false">https://medium.com/p/d032d09ae189</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[hbar]]></category>
            <category><![CDATA[hashgraph]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[distributed-ledgers]]></category>
            <dc:creator><![CDATA[Paul Madsen]]></dc:creator>
            <pubDate>Tue, 28 Apr 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-05-06T13:25:38.001Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gjbWIPb6JslhONjzYf5G9A.png" /><figcaption><a href="https://www.hedera.com/blog/hedera-hashgraph-transaction-and-query-processing-model">https://www.hedera.com/blog/hedera-hashgraph-transaction-and-query-processing-model</a></figcaption></figure><p>Hedera Hashgraph is a public ledger. Nodes on the network collectively establish and maintain a consensus state for a set of application data.</p><p>Clients interact with that state through API calls sent to the nodes of the network.</p><p>To <em>write </em>to state, clients send <em>transactions </em>to a chosen node for subsequent gossip to the rest of the network, assignment of a consensus timestamp and a place in consensus order, and then application to state.</p><p>To <em>read </em>from state, clients send <em>queries </em>to a chosen node which, by looking at its local copy of state, can respond with the requested information.</p><h3>Transaction sequence</h3><p>Transactions cause the consensus state maintained by the mainnet nodes to change.</p><p>All transactions have an associated fee that reflects the burden it places on the mainnet nodes.</p><p>Below is the typical sequence for a transaction submitted to Hedera:</p><ol><li>A client constructs a transaction by:</li></ol><ul><li>Specifying the appropriate parameters, for instance, from and to which accounts hbars should be transferred, the file to be stored, etc</li><li>Specifying a node</li><li>Stipulating a maximum fee that it will pay</li><li>Applying appropriate signatures</li></ul><p>2. Client submits signed transaction to the specified mainnet node</p><p>3. The chosen mainnet node:</p><ul><li>Confirms the client can pay the transaction fee</li><li>Submits the transaction to the network</li></ul><p>4. All mainnet nodes receive the transaction via gossip</p><p>5. All mainnet nodes use the hashgraph algorithm to establish a consensus timestamp and order for that transaction</p><p>6. All mainnet nodes:</p><ul><li>Reject duplicate transactions (but still charge a small fee)</li><li>Validate transactions against relevant application rules</li><li>Apply transactions to state in the consensus order. For an hbar transfer this would mean all nodes simply incrementing the balance of the receiving account and decrementing the sender’s balance</li><li>Process the fee associated with each transaction — allocating the different portions of the transaction fee between the submitting node and the Hedera treasury</li><li>Create and store receipts and records for transactions</li></ul><p>7. To obtain confirmation of a transaction or its result, clients can:</p><ul><li>Query any node to confirm that the transaction was successfully assigned a consensus timestamp and applied to state by:<br>- Retrieving the transaction receipt (free)<br>- Retrieving the transaction record<br>- Querying the corresponding aspect of state</li><li>Retrieve from a mirror node either by:<br>- An API query<br>- gRPC subscription</li></ul><h3>Query sequence</h3><p>Queries do not require consensus processing and do not impact state.</p><p>Some queries are free, but most require that the client pay the node that responds to the query a fee for that service.</p><p>Below is the typical sequence for a query submitted to Hedera:</p><ol><li>Clients construct a query by:</li></ol><ul><li>Specifying the appropriate parameters, for instance, the account whose balance is being queried</li><li>Creating a CryptoTransfer payment transaction. This transaction will serve to compensate the node that responds to the query. Set the value of the transfer to be sufficient for the particular query</li><li>Signing the payment transaction</li><li>Embedding the payment transaction within the query</li></ul><p>2. Clients submit query to a mainnet node</p><p>3. The mainnet node will calculate the fee for the query based on its specifics, e.g. how large is the file returned, how much gas was used to run a smart contract locally, etc</p><p>4. The mainnet node will compare the calculated fee to the value of the embedded payment transaction:</p><ul><li>If the payment is less than the calculated fee, reject the transaction</li><li>If the payment is equal or greater than the calculated fee:<br>- Return the requested data<br>- Submit the payment transaction to the rest of the network (as for any transaction)</li></ul><h3>Variants and optimizations</h3><p>The above sequences for transactions and queries have certain variants and optimizations.</p><h3>State proofs</h3><p>When querying a node for some aspect of state or the status of a transaction, a client will be able to stipulate that it desires a state proof for the response be included. A state proof is a cryptographic assertion from the network as a whole as to the veracity of the response. Consequently, even if the response comes from a single particular node, the client can be confident that it does indeed accurately reflect the true Hedera state at a given moment in time.</p><p>When implemented, state proofs can be created by main or a mirror node.</p><p>Once obtained by a client, a state proof can be archived in case of future arbitration.</p><p>State proofs will impose an additional fee so clients may choose to request a state proof only occasionally.</p><p>A large component of the size of a state proof (and so the contributor to the associated fee) will be due to the address book history. An optimization is possible where, if the requesting client already has the latest address book, that address book need not be included with the returned state proof — making it smaller and cheaper.</p><h3>Consensus Service</h3><p>In the Hedera Consensus Service (HCS) model, the nodes of the mainnet do not apply the transaction to a copy of state they maintain. Instead, the transactions logically <em>flow </em>through the mainnet and, in so doing, are assigned a consensus timestamp and order in the corresponding topic. It is the nodes of some other a <em>pplication network (</em>appnet<em>) </em>that, based on those timestamps, process the transaction and apply it to their copy of appnet state with application-specific rules.</p><p>The HCS model separates the roles of calculating consensus timestamps and order from that of validating transactions and maintaining appnet state and consequently offers advantages in performance and data confidentiality.</p><h3>Choosing a node for transaction submission</h3><p>When submitting a transaction, a client can choose which node to use and so avoid malicious or slow nodes.</p><p>Unless there is some sort of relationship between a client and a particular node, a client should pick a node randomly.</p><p>A client can also protect itself from a node censoring its transactions or a node being offline by sending different versions (but with the same transaction identifier) of a transaction to multiple nodes. Even if both transactions are assigned a consensus timestamp by the network, only the first will be applied to state. The second will still have an associated fee, though smaller than the fee of the first.</p><p>If, after sending a transaction to a node and not being able to retrieve a record in some small period of time, a client could resend the transaction to another node, and keep trying until success. Even if almost 1/3 of nodes are maliciously not submitting the client’s transactions, then it would take on average x = 2/3(1) + 1/3(x+1) which gives x = 1.5 tries to succeed.</p><p>If the client maintains a list in memory of which nodes have successfully submitted its transactions in the past, or a list of those that have not, then the client can avoid malicious nodes. Such nodes will lose node fees if clients are avoiding it.</p><p>A client might occasionally try submitting to a node on the black list and thereby determine if the previous failed transaction submission was malicious or merely that the node was offline at the time.</p><h3>Querying multiple nodes</h3><p>If unsure about the honesty of a particular node, a client can choose to not query that node when asking about some aspect of state.</p><p>If unsure about the honesty of all nodes (as a general policy), a client can query multiple nodes and compare their answers.</p><p>State proofs provide an alternative mechanism by which clients can reassure themselves of the veracity of a node’s responses to queries.</p><p>Both models will have associated additional fees and a client should use those fees to determine the appropriate choice.</p><h3>Cost answer query</h3><p>To help it stipulate an appropriate value for the payment for a query, a Client can first ask a node what <em>would </em>be the cost of a particular query, if actually sent. This sort of query is free to the client.</p><h3>Subscribing to a mirror</h3><p>Mirrors are a separate network from the mainnet. Mirrors listen to the mainnet and provide value-add services that, if provided by the mainnet nodes, might impact their performance towards consensus. The fundamental role of mirrors is to facilitate retrieval and analysis of transaction history and the subsequent state.</p><p>Mirrors are separate business and will make different decisions about the services they wish to offer. For instance, a particular mirror node might choose to persist all transactions from genesis and build a business around making that history available. Another mirror might choose to store only crypto transfer transactions. A given enterprise might run its own mirror and store only transactions and state relevant to its business.</p><p>A mirror node may make its Hedera data available to external clients. It will be through the mirror that those clients would be able to examine the transaction history and corresponding state of some aspect of Hedera (whatever portion the mirror choose to support).</p><p>Mirror nodes can support a subscription mechanism by which clients can be sent any transaction records that meet certain criteria. For instance, a client could stipulate to a mirror that it wants to be notified of any and all transactions that impact a particular crypto account.</p><p>HCS appnets are a particularly important category of mirror clients. Members of an appnet will subscribe to a mirror (or perhaps multiple mirrors) to be notified of transactions submitted to a particular HCS topic.</p><p><em>Originally published at </em><a href="https://www.hedera.com/blog/hedera-hashgraph-transaction-and-query-processing-model"><em>https://www.hedera.com</em></a><em> on April 28, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d032d09ae189" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hedera/hedera-hashgraph-transaction-and-query-processing-model-d032d09ae189">Hedera Technical Insights: Hedera Hashgraph Transaction and Query Processing Model</a> was originally published in <a href="https://medium.com/hedera">Hedera Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ABFT for Correctness and Liveness]]></title>
            <link>https://medium.com/hedera/abft-for-correctness-and-liveness-hedera-hashgraph-b2d76aa36f0c?source=rss-fe55d1978e75------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2d76aa36f0c</guid>
            <category><![CDATA[distributed-ledgers]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[byzantine-fault-tolerance]]></category>
            <category><![CDATA[hashgraph]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Paul Madsen]]></dc:creator>
            <pubDate>Fri, 07 Feb 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-02-08T01:39:10.538Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yk76p_X0YmwGYsqVf0k3KA.jpeg" /><figcaption><a href="https://www.hedera.com/blog/abft-for-correctness-and-liveness">https://www.hedera.com/blog/abft-for-correctness-and-liveness</a></figcaption></figure><p>In a Distributed Ledger Technology (DLT), the <em>consensus algorithm</em> is the method by which the nodes (computers) are able to come to an agreement (consensus) on the order of a set of transactions, and potentially other information such as a timestamp for each transaction. For some consensus algorithms, it is possible to prove that they are Asynchronous Byzantine Fault Tolerant (ABFT).</p><p>For example, the hashgraph consensus algorithm <a href="https://www.hedera.com/blog/coq-proof-completed-by-carnegie-mellon-professor-confirms-hashgraph-consensus-algorithm-is-asynchronous-byzantine-fault-tolerant">has a proof</a> that it is ABFT. But what does that mean, and what are the practical implications? This blog will explore what an ABFT proof can guarantee about the correctness, finality, and liveness of a consensus algorithm.</p><h3>Correctness, finality, and liveness</h3><p><strong>Correctness </strong>refers to the ability of a network of nodes to prevent forks developing, where different nodes disagree on the value for which consensus is sought. Correctness is sometimes referred to as safety.</p><p><strong>Finality </strong>refers to a model of consensus in which, once a node determines a value for which consensus is sought, there is no chance the node will subsequently reevaluate that decision.</p><p><strong>Liveness </strong>refers to the ability of a network of nodes running a consensus algorithm being able to continue towards establishing consensus for transactions, that is the algorithm’s ability to proceed.</p><p>Correctness and liveness are not separable — it is trivial to guarantee correctness if liveness is not a requirement, and trivial to progress towards consensus if correctness is sacrificed.</p><h3>ABFT Proof</h3><p>A consensus algorithm will generally make some sort of guarantees over correctness, finality, and safety if certain conditions are true. Generally, the stronger the guarantees, and the fewer and less restrictive the conditions, the more secure the algorithm. A consensus algorithm may have a mathematical proof that makes those conditions clear, and demonstrates how the guarantees emerge.</p><p>If a consensus algorithm has an ABFT proof, then there will exist a mathematical proof that if certain conditions are true, then certain results for correctness, finality, and liveness are guaranteed.</p><p>The following is one way of writing the conditions and results for a typical ABFT proof:</p><p><strong>ABFT Conditions</strong></p><ol><li>More than 2/3 of the nodes are <em>honest </em>(non-Byzantine and non-faulty).</li><li>It is always true that any pair of honest nodes will eventually sync again.</li><li>An attacker can cause non-honest nodes to violate the protocol in arbitrary ways.</li><li>An attacker can manipulate the internet in arbitrary ways.</li></ol><p><strong>ABFT Results</strong></p><ol><li>Every honest node will eventually reach a consensus value on every transaction and that value will not change.</li><li>Every honest node reaches the same consensus value on each transaction.</li></ol><p>There are other forms of ABFT conditions, such as using stake, and requiring that more than 2/3 of the stake be owned by honest nodes. But for simplicity, we will only consider this form of ABFT here.</p><p>Condition 1 requires that more than 2/3 of the nodes are non-Byzantine, which means they follow the protocol and do not act maliciously. It also requires that they are non-faulty, which means a node can crash and be offline for a while, but it must eventually come back online and sync with the other nodes. An honest node can’t crash and stay offline forever.</p><p>Condition 2 requires that any two honest nodes will eventually sync. And then they will eventually sync again. And so on forever.</p><p>Conditions 3 and 4 simply say that an attacker can be powerful enough to completely control nodes and the internet itself, as long as the first two Conditions still hold.</p><p>Proofs of this sort also assume that secure cryptography exists. In other words, the attacker can’t break the hash algorithm or the digital signature algorithm.</p><p>Result 1 is a guarantee of finality — there is a moment in time when each node knows the consensus value with certainty, and will not thereafter reconsider that value. It’s important to note that Result 1 does not stipulate a particular time frame for honest nodes to determine a consensus value — it says only that honest nodes will <em>eventually </em>do so.</p><p>Result 2 is a guarantee of correctness — every node will reach the same conclusion.</p><p>The guarantees of results 1 and 2 only apply if the conditions are met. Of course, if all of the nodes are malicious, then they can do anything. But that would violate Condition 1, so the results would no longer be guaranteed. Similarly, if all nodes are unable to communicate with each other, then they won’t be able to come to consensus on anything. But that would violate Condition 2. So, as long as the Conditions are met, the Results are guaranteed, which give strong results for correctness and finality.</p><p>An ABFT proof makes different guarantees about liveness than the guarantees it makes for correctness or finality.</p><p>There are some broad guarantees that it makes about liveness, and other guarantees that it does <em>not </em>make about liveness. It is useful to go through a number of classes of liveness attacks, and see which are ruled out and which aren’t.</p><h3>Liveness attacks</h3><p>A liveness attack is an attempt to prevent honest nodes from reaching consensus.</p><p>In general, a liveness attack will consist of one (or a combination) of the following mechanisms:</p><ul><li>The attacker is a node, and by refusing to participate in consensus, or by sending messages that break the rules of the protocol, prevents other nodes from reaching consensus.</li><li>The attacker prevents honest nodes from participating in consensus. This could take the form of a Denial of Service against one or more honest nodes that consumes the computing resources that would otherwise be used for consensus, or otherwise corrupting the honest node’s computer such that it can’t participate in consensus.</li><li>The attacker prevents, or slows, the transmission of consensus messages between honest nodes as those messages travel over the network.</li></ul><p>One way to reason about the liveness guarantees an ABFT proof will or will not make is to consider an attacker making a claim about their ability to prevent liveness and to determine if that claim is valid or not.</p><p>We will see that an ABFT proof will allow us to refute some claims about liveness attacks, but not others.</p><p>Each claimed attack will be labelled as either FALSE or TRUE.</p><p><strong>Attack A — Byzantine nodes — FALSE CLAIM</strong></p><p>The attacker makes the following claim:</p><p><em>I control malicious nodes that are less than 1/3 of all the nodes, and can direct those nodes to prevent the other honest nodes from progressing towards consensus, either by having my nodes refusing to communicate or otherwise breaking the rules of the protocol. I can freeze the network for as long as the attack continues.</em></p><p>If this claim were true and the attack were possible, it would mean that an attacker could freeze the network’s progress towards consensus for as long as the attack continues, so the network would not be <em>live </em>during that time. And the attack could continue forever, and so freeze it forever, and prevent it from ever coming to consensus.</p><p>But the attack is impossible if there is an ABFT proof. Because the ABFT proof says that it <em>will </em>come to consensus eventually. The details of the attack don’t matter. It doesn’t matter <em>how</em> the malicious nodes are violating the protocol. No matter how clever they are, the attack will fail and so the claim is false. The ABFT proof guarantees that.</p><p>The attack doesn’t stop the honest nodes from syncing so Condition 2 is true.</p><p>Additionally, because less than 1/3 nodes are Byzantine, Condition 1 is true as well.</p><p>The ABFT proof then guarantees Result 1, which guarantees that all honest nodes will reach consensus on every transaction.</p><p>But the attacker was claiming that they could prevent the above, that is that, if the attack continued forever, the network would be frozen for all time.</p><p>Consequently the claim is refuted by the ABFT proof.</p><p><strong>Attack B — DDoS against single node — FALSE CLAIM</strong></p><p>The attacker makes the following claim:</p><p><em>I can launch a DDoS attack to shut down a single honest node at a time. While a node is being DDoSed, no other nodes can sync with it. I also control malicious nodes (less than 1/3), which know what is going on, and can help me direct the attack to repeatedly change which node is being DDoSed. I can freeze the network for as long as the attack continues.</em></p><p>This is a Distributed Denial of Service (DDoS) attack. The attacker has compromised many computers on the internet, and can use them to flood a single computer with so many packets that it shuts down for as long as the attack continues. It doesn’t matter how clever the attacker is when choosing the DDoS target. It doesn’t matter that the attacker has a malicious node as a spy to help choose that target.</p><p>The attack is still impossible. As long as every pair of honest nodes eventually syncs, and more than 2/3 of the nodes are honest nodes, then it isn’t possible for an attacker to freeze the network for as long as the attack continues. Because if it were continued forever, all four Conditions would be true, but the Results would not be true. That’s ruled out by the ABFT proof. So this form of liveness attack is declared impossible by the ABFT proof and the claim must be false.</p><p>This is particularly interesting, because the ABFT proof guarantees resilience to a Follow The Leader attack in which the attacker performs the above DDoS attack against different nodes in sequence.</p><p>Some consensus algorithms have a ‘leader’, which is one node that is treated differently with respect to contribution to consensus from the other nodes — typically for some period of time. The protocol might have the nodes take turns being leader. Or it might allow one node be the leader until it crashes, then another node is elected to become the new leader. It is possible that some protocols using leaders would be vulnerable to a liveness attack where the leader is DDoSed, and as soon as a new node becomes the leader, the DDoS attack switches to attacking the new leader. That is a Follow The Leader attack. For leader-based protocols in which the leader can be predicted, a Follow The Leader attack could freeze the entire network for as long as the attack continues, while only DDoSing a single computer at a time, and with only a single malicious node acting as a spy.</p><p>It is even possible that a protocol vulnerable to such a Follow the Leader attack could have a mathematical proof that it is BFT. But it can’t have a proof that it is ABFT because an ABFT proof would guarantee that it is safe from that attack. This is one important way in which ABFT is stronger than just BFT. A protocol with a BFT proof has guaranteed correctness, but if the proof can be upgraded to ABFT, then the correctness guarantee can be expanded to include some liveness guarantees, as well.</p><p><strong>Attack C — Dynamic Partitioning — FALSE CLAIM</strong></p><p>The attacker makes the following claim:</p><p><em>I can partition the network, where some nodes cannot sync with other nodes. Unfortunately, I am forced to constantly change the partitioning, so that any two honest nodes are occasionally in the same partition and sync with each other. I have a malicious node to act as a spy and tell me what is going on. I can freeze the network as long as the attack continues.</em></p><p>Again, this attack will fail if there is an ABFT proof.</p><p>At a given moment in time, the partition will divide the nodes — potentially into two equal halves such that neither half has the requisite 2/3 honest nodes — even though there are that many honest nodes as a whole.</p><p>But, once the partition changes, then the mix of nodes between the two halves will also change. Two nodes that were previously unable to sync will now be able to do so.</p><p>Any two honest nodes will eventually be able to sync so Condition 2 is satisfied.</p><p>If the attack were continued forever, then all of the Conditions would be satisfied, and so the ABFT proof guarantees Result 1 — which refutes the claim.</p><p><strong>Attack D — Static partitioning — TRUE CLAIM</strong></p><p>The attacker makes the following claim:</p><p><em>I can partition the network such that 1/3 of the nodes cannot sync with the other 2/3. I can freeze the network as long as the attack continues.</em></p><p>This is an attack on liveness that will succeed, even if there is an ABFT proof.</p><p>If the partition does not change, then there always be some honest nodes that are unable to sync with some other nodes during the partition. If the attack were to continue forever, then Condition 2, that any two honest nodes would eventually be able to sync, would be violated.</p><p>Consequently, the ABFT Proof cannot guarantee Result 1 and liveness can be compromised by this attack.</p><p>In fact, there is a simple math proof that shows no consensus algorithm can be secure in the case where almost 1/3 of the nodes are malicious and an attacker can partition the network. In such a case, you either have to sacrifice correctness or liveness. You can’t have both. In an ABFT algorithm, correctness will be chosen and liveness sacrificed. The network will be frozen until the partition is healed, at which point it will start reaching consensus on new transactions again.</p><p>There are many similar attacks that will also be successful on liveness. Such as:</p><p><strong>Attack E — Broad DDoS — TRUE CLAIM</strong></p><p>The attacker makes the following claim:</p><p><em>I can DoS 1/3 of the nodes and keep then offline for the duration of the attack. I can freeze the network as long as the attack continues.</em></p><p>This attack on liveness also succeeds, for the same reason as above.</p><p><strong>Attack F — Malware — TRUE CLAIM</strong></p><p>The attacker makes the following claim:</p><p><em>I know of bugs in Linux, Windows, and MacOS that allow me to shut down that computer, and every node runs on one of those operating systems, so I can shut down all the nodes. I can freeze the network as long as the attack continues.</em></p><p>Again, this succeeds for the same reason as above, even if there is an ABFT proof. And it might be better to say it this way:</p><p>This liveness Attack F succeeds because it isn’t an attack on the consensus algorithm, and the ABFT proof was only about the resilience of the consensus algorithm.</p><p><strong>Attack G — Corrupted node code — TRUE CLAIM</strong></p><p>The attacker makes the following claim:</p><p><em>I know of a bug in the code the nodes run, and control a malicious node that can send a special message to any honest node that triggers the bug and crashes the machine. And I can continue to exploit more such bugs as the software is patched. I can freeze the network as long as the attack continues.</em></p><p>Of course, this also succeeds — AFBT proof notwithstanding — because it has nothing to do with the consensus algorithm.</p><p>The best solution in the long run is to mathematically prove that the code is correct, with a computer checking the math proof. This is called <em>formal methods</em>. The first step is to formally define the algorithm itself and have a computer check that it is truly ABFT. This was done for hashgraph in Coq. The next step is to expand it so that the computer checks a proof that the implementation code matches the definition. Or have a computer write the implementation code directly from the formal definition (proof by construction). Either way, that is how formal methods can ensure correct software. This can be extended to proving the compiler is correct, the operating system is correct, and the CPU is correct. Research on formal methods is ongoing at all these layers of the stack. But it is not yet in widespread use.</p><p><strong>Attack H — Firewall — TRUE CLAIM</strong></p><p>The attacker makes the following claim:</p><p><em>I control the internet and can delete every other bit passing through each router on the internet. I can freeze the network as long as the attack continues.</em></p><p>In this case, each pair of honest nodes still manages to send an infinite number of bits to each other. But if they are using TCP/IP, it can’t handle the loss of 50% of the bits in every packet, and so they can never sync. Again, this attack on liveness succeeds, despite the ABFT proof, because Condition 2 fails.</p><p>Liveness could be regained by switching to an internet protocol that uses error correcting codes capable of handling the 50% bit loss. But again, it is best described as an attack on something other than the consensus algorithm itself, so the ABFT proof provides no guarantees on liveness here.</p><h3>Conclusion</h3><p>For a consensus algorithm, an ABFT proof makes a number of strong guarantees about correctness, finality, and liveness. Each guarantee is limited in some ways, but still broad in other ways.</p><p>An ABFT proof makes some broad guarantees about liveness — it rules out a number of liveness attacks that could succeed against some protocols that are only BFT (not ABFT). But there are limits on how much ABFT can say about liveness: it doesn’t help if 1/3 of the nodes are DDoSed or partitioned off. And it doesn’t help with attacks that prevent all the honest nodes from syncing, or that somehow shut down all those nodes. But for attacks on the consensus algorithm itself, the ABFT proof provides useful guarantees related to liveness.</p><p><em>Originally published at </em><a href="https://www.hedera.com/blog/abft-for-correctness-and-liveness"><em>https://www.hedera.com</em></a><em> on February 7, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2d76aa36f0c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hedera/abft-for-correctness-and-liveness-hedera-hashgraph-b2d76aa36f0c">ABFT for Correctness and Liveness</a> was originally published in <a href="https://medium.com/hedera">Hedera Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Hedera calculates the HBAR / USD exchange rate for SDKs and applications]]></title>
            <link>https://medium.com/hedera/how-hedera-calculates-the-hbar-usd-exchange-rate-for-sdks-and-hedera-hashgraph-7963cbf1b85d?source=rss-fe55d1978e75------2</link>
            <guid isPermaLink="false">https://medium.com/p/7963cbf1b85d</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[hashgraph]]></category>
            <category><![CDATA[hbar]]></category>
            <category><![CDATA[distributed-ledgers]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Paul Madsen]]></dc:creator>
            <pubDate>Thu, 16 Jan 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-02-10T20:50:26.196Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rk3if44Xm8g5LssW7z3UVw.jpeg" /><figcaption><a href="https://www.hedera.com/blog/how-hedera-calculates-the-hbar-usd-exchange-rate-for-sdks-and-applications">https://www.hedera.com/blog/how-hedera-calculates-the-hbar-usd-exchange-rate-for-sdks-and-applications</a></figcaption></figure><p>Having up-to-date and accurate HBAR to USD conversion values is an important aspect of network operations at Hedera. We utilize the current price of HBAR across various applications and services, including:</p><p>1. Within the <a href="https://help.hedera.com/hc/en-us/articles/360002606698">Hedera Wallet</a> for iOS or Android, you’ve likely noticed that the exchange rate for the number of HBARs to USD is displayed at the top, when you open the app or refresh your balance — this simple calculation is done from within the application itself.</p><p>2. By the network nodes, the exchange rate of HBAR is used to determine the cost of API calls (hbar prices for API calls on Hedera are calculated using the exchange rate so that the dollar equivalent of the price will change more slowly). The Exchange Rate Tool (ERT) is a Hedera hosted application that calculates and submits a new exchange rate value to the network every hour.</p><p>3. On the Hedera fee’s page, we have an <a href="https://www.hedera.com/fees#estimator">interactive calculator</a> to estimate your costs and a <a href="https://www.hedera.com/fees">table</a> which lists the most common API calls, with pricing converted from USD to HBAR based on current rates. This also utilizes the ERT calculated exchange rate.</p><p>If you’ve ever wondered how we do that conversion, look no further. This blog posting details our process for calculating the exchange rate between USD and HBAR and how it is used in the Hedera Wallet, by the network nodes, and the fee estimator.</p><h3>Why didn’t we use an existing service for the latest price?</h3><p>There exist free APIs which would allow us to pull the current exchange rate between USD &amp; HBAR automatically, such as the <a href="https://www.coingecko.com/en/api">CoinGecko API</a>. But because we’re going to need this price output used inside the calculation of fees to ensure the right costs for every API call, this would have been too centralized a solution; it might have left Hedera open and vulnerable to attack if the price output were ever manipulated by a central authority.</p><p>That is why we decided to instead query the exchanges directly and perform our own determination of an appropriate exchange rate value within the platform. Our ERT (exchange rate tool) queries the exchange rate from a number of sources and calculates a rate that is utilized across the platform. Our Hedera Wallet queries the same exchanges in order to display an equivalent USD value of the hbars in the account.</p><h3>Pulling the latest pricing from key exchanges</h3><p>The value calculated from the current exchange rate between USD &amp; HBAR is determined by querying three prominent exchanges on which HBAR trades. Both the ERT and the Hedera Wallet query the APIs for Bittrex ( <a href="https://bittrex.github.io/api/v1-1">https://bittrex.github.io/api/...</a> ), Liquid ( <a href="https://api.liquid.com/products/557">https://api.liquid.com/product...</a> ), and OKCoin ( <a href="https://www.okcoin.com/docs/en/#spot-currency">https://www.okcoin.com/docs/en...</a> ) with the output for each appearing as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G3XNihizmLtEX4jKPs8GCw.png" /></figure><p>These three exchanges are the ones that currently offer a USD-HBAR trading pair and so directly provide the desired exchange rate. Any new exchanges that offer the same pair will be added to the calculation. There are other exchanges on which HBAR lists that support other pairs, for instance USDT-HBAR. We are considering how we might include such a pair by taking a ratio of HBAR/USDT &amp; USDT/USD pairs to determine the desired exchange rate. We’re also exploring the potential for a weighted median price in the ERT, where the volume of HBAR across each exchange is factored into the calculation, in order to get a more accurate representation of the current price.</p><h3>Taking the median, not the mean, and smoothing</h3><p>Every hour, the ERT takes the three exchange rate values and calculates a median. The ERT then compares that median rate to the one from the previous midnight (CST) and rejects any variation greater than a defined value. This price smoothing prevents hourly volatility in the exchange rate of hbars from having a disproportionally strong effect on the cost in hbars of using Hedera’s network and services. Once an exchange rate is calculated, the ERT submits that value to the Hedera network for the nodes to use in calculating fees. The fee estimator uses this same exchange rate value to ensure that the fees it projects accurately track the actual fees being charged on the network. This network exchange rate value is available to dapps in transaction records.</p><p>The Hedera Wallet also queries the same three exchanges and displays it to the end user upon every refresh of their balance. Currently, the Wallet calculates the mean of those three values. Recently, we noticed that the Liquid exchange had been exposing a higher value for the USD/HBAR pair than Bittrex and OKCoin. This resulted in the calculated average to also be higher. We’ve been in communication with the Liquid team, and they have confirmed that the higher value was indeed legitimate.</p><p>We’re now in the process of changing the Wallet calculation so that both the Wallet and the ERT utilize the median of exchange values (and not the mean), to better guard against outliers.</p><p><em>Originally published at </em><a href="https://www.hedera.com/blog/how-hedera-calculates-the-hbar-usd-exchange-rate-for-sdks-and-applications"><em>https://www.hedera.com</em></a><em> on January 16, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7963cbf1b85d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hedera/how-hedera-calculates-the-hbar-usd-exchange-rate-for-sdks-and-hedera-hashgraph-7963cbf1b85d">How Hedera calculates the HBAR / USD exchange rate for SDKs and applications</a> was originally published in <a href="https://medium.com/hedera">Hedera Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hedera Technical Insights: Hierarchical Multi-Signature support in Hedera]]></title>
            <link>https://medium.com/hedera/hierarchical-multi-signature-support-in-hedera-17d3faff6607?source=rss-fe55d1978e75------2</link>
            <guid isPermaLink="false">https://medium.com/p/17d3faff6607</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[distributed-ledgers]]></category>
            <category><![CDATA[hashgraph]]></category>
            <category><![CDATA[hbar]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Paul Madsen]]></dc:creator>
            <pubDate>Sat, 11 Jan 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-01-12T13:57:26.696Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JZuFa6Rl_PotapWhov6NvA.png" /><figcaption><a href="https://www.hedera.com/blog/hierarchical-multi-signature-support-in-hedera">https://www.hedera.com/blog/hierarchical-multi-signature-support-in-hedera</a></figcaption></figure><p>Every entity (for instance, an account, a file, a smart contract) maintained in Hedera state has an associated set of public keys — it will be the corresponding private keys that must sign any transaction attempting to change that entity. Nodes will verify the signatures on a transaction against the defined key structure on the appropriate entity when processing the transaction to enforce the corresponding authorization policy. Hedera supports a flexible m-of-n and hierarchical key structure and so supports a powerful permissioning model for changes to entities in state.</p><p>The simplest model is that an entity has a single public key associated with it and so only the corresponding private key can make changes to that entity. For instance, if a cryptocurrency account had only a single public key specified when the account was created, then only transactions signed by the corresponding private key will be authorized to transfer hbars out of that account. Whoever has possession of the private key has sole control over the funds within the account (with associated risk of loss of control and access to those funds if the private key is lost, stolen, or forgotten).</p><p>Optionally, the account creator can also stipulate that the same private key be used to sign transactions that move hbars into the account — this mechanism providing protection to the account owner from receiving hbars from an illegal or inappropriate sender. An ICO might want the ability to guard against receiving hbars from an account that wasn’t KYC’d and by requiring that they sign any transaction depositing hbars into their account they would have a means to allow that check.</p><p><strong><em>Account </em></strong><em>— an entity maintained on the Hedera ledger to represent the amount of hbars a particular user owns. The public key(s) associated with the account determine the permissions for changes to the account. For example, transferring hbars in or out. Only transactions signed by the corresponding private keys will be approved by nodes when processing those transactions.</em></p><p><strong><em>Wallet </em></strong><em>— a software program that allows users to manage their accounts. For example, a wallet stores private keys used to sign transactions, provides a UI by which hbars can be spent, or attaches an identity claim to the account, query the balance of an account, etc. Wallets manage accounts through the submission of a transaction signed with the appropriate private keys to the ledger.</em></p><p>More complex key models, and so permission models, are possible. Instead of a single key being specified, multiple public keys can be specified, along with a defined threshold as to how many corresponding private keys must sign a transaction for it to be authorized. For instance, if 5 public keys are listed and the threshold is defined as 3, then a transaction would need to be signed by any 3 of the 5 associated private keys.</p><p>Furthermore, it is possible to define hierarchies of keys, in which any key in a list can itself be a list, with its own threshold. In this way, permissions of arbitrary complexity that can reflect the realities of real life and corporate structures can be defined.</p><p>Example key models and the corresponding authorizations are represented below:</p><p><strong>How It Works</strong></p><p>Unlike many other public ledgers, Hedera’s multi-sig capabilities are native to the platform and do not require a smart contract or script to enforce the m-of-n logic.</p><p>When an account (or more generally any entity) is created in the Hedera state, the desired permissions for that entity are defined through the specification of a set of public key(s) and thresholds.</p><p>When in the future a transaction requests that the account or entity be changed, the necessary signatures are coordinated and collected off-ledger. Once the necessary threshold has been achieved, the transaction is submitted to the network. When that transaction is received by the nodes, the signatures on that transaction are verified and tested against the defined permissions. If the signatures are all valid and meet the defined requirements, then the transaction will be approved and the account changed accordingly.</p><p>The same logic is applied to changes to the permissions on the account by changing the keys associated with the account. Only transactions with the required signatures will be allowed to change the keys. If the transaction is changing the keys, then the transaction must be signed by both the old key(s) as well as the new key(s). The old key must sign for security. The new key must sign as a safeguard to avoid accidentally changing to an invalid key, and then having no way to recover.</p><p><strong>Use Cases</strong></p><p>We list below representative use cases that leverage the above permissioning model.</p><p><em>LiveHashes</em><br>By default, a crypto account on Hedera is pseudonymous. If the owner of that account chooses to, then they can logically attach an identity to that account, and so associate that identity with the transactions in and out the account. For instance, if a user were to undergo a KYC check, then the verified identity could be bound to a particular account, thereby allowing other parties to know the account is that of a known and valid individual. The binding is achieved by adding a hash of the identity credential (known as a livehash) to the account via a transaction. Both parties (the authority and the owner of the account) must sign the transaction that adds the livehash, but either can individually subsequently remove that livehash from the account. If the claim is removed by the authority, then the implication is that the authority no longer believes the identity is verified. If the livehash is removed by the account owner, then the implication is that they no longer wish that account to be associated with a known identity.</p><p><em>Social Key Recovery </em><br>When Alice creates her Hedera crypto account she specifies the public keys of three of her friends Bob, Carol, and Dave along with her own. Via the key structure, she stipulates that either she herself, or two of her three friends will have authority over the account. Of course, two of her friends could collude to steal the funds in the account — her calculation is that this would be unlikely, either because they are close friends or perhaps don’t know each other. If she is less trusting, then she could specify a wider group of friends, and a higher threshold. For example, four of five.</p><p>A year later, when Alice loses her phone on which her private key was stored, and cannot remember her seed phrase, she reaches out to her friends and asks for their help in setting a new key pair for her account. She generates a new key pair, and then asks Bob, Carol, and Dave to sign a CryptoUpdate transaction that switches the new public key for the old. Carol does not respond in time but Bob and Dave do, and both apply their signature to the transaction. The wallets of the friends facilitate this shared signature collection.</p><p>Alice submits the signed transaction to Hedera, where it is placed into consensus. All nodes check that the signatures of Bob and Dave satisfy the original policy that Alice set when she created the account. As they do, nodes authorize the transaction and attach the new public key (for which Alice has the private key) to the account.</p><p>Alice buys Bob and Dave a coffee with her hbars the next time she sees her friends. She replaces Carol on the list with a more reliable friend.</p><p><em>Private Key Protection </em><br>To mitigate the risk of her private key being compromised and hbars being stolen from her retirement account, Carol stipulates that all transactions out of the account be signed by both her private key and that of her lawyer, Trent. As the account’s transactions are infrequent, Carol is willing to bear the burden of coordinating signatures when she wants to make a purchase from the account.</p><p>As the signature threshold is two of two, Trent cannot move hbars without Carol’s participation. And should Carol’s private key be hacked, even with that key the thief would be unable to access Carol’s hbars without the participation of Trent. The presumption is that the likelihood of both Carol’s and Trent’s keys being compromised at the same time is small.</p><p>Trent will not sign a transaction before certain checks. For example, compliance checks, Carol’s authentication status, etc are performed. Trent’s own key is actually itself a one of two authorization model — with one key hot and online and the other stored in a cold vault. In this way, even if the hot key is lost, then the cold key can be brought out of storage and used.</p><p>Carol pays Trent for the peace of mind from knowing that the security of her Hedera account is not solely dependent on how she protects her private key. This could be combined with social key recovery, to also handle the case of lost keys.</p><p><em>Binding Arbitration For Smart Contracts<br></em>On Hedera, when a developer deploys a smart contract (that is, submits a transaction to the network with the compiled bytecode), they have a choice to make on the contract’s subsequent mutability. The default choice is that it will have the same guarantee of immutability as on other DLT’s, specifically, that it will forever be impossible for anyone to change its bytecode.</p><p>The other choice is for the developer to deploy the smart contract with a threshold key containing several public keys of arbitrators. In that case, the arbitrators have the authorization to subsequently edit the contract code, and so to fix bugs or add features or reverse specific transactions. Once a contract’s bytecode is deployed with such a stipulation, if the designated arbitrators subsequently agree that the contract should change, then a transaction with the new contract bytecode, signed by the keys of those arbitrators, will be approved by the network, and the change will be implemented.</p><p>This smart contract arbitration model is explored in more detail in the “ <a href="https://www.hedera.com/blog/code-is-law-but-what-if-the-law-needs-to-change">Code is law, but what if the law needs to change?</a>” post.</p><p><strong>Summary</strong></p><p>Hedera enables a flexible and dynamic permissioning model for entities in consensus state via a hierarchical m-of-n transaction signature based authorization model. The ability to require multiple signatures for operations on entities in state is critical for security and usability of public ledgers. Permissions can be defined that ensure that control of entities in Hedera state can both reflect the complexity of real-world business relationships, as well as protect users from the challenges of private key protection and management.</p><p><em>Originally published at </em><a href="https://www.hedera.com/blog/hierarchical-multi-signature-support-in-hedera"><em>https://www.hedera.com</em></a><em> on January 11, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17d3faff6607" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hedera/hierarchical-multi-signature-support-in-hedera-17d3faff6607">Hedera Technical Insights: Hierarchical Multi-Signature support in Hedera</a> was originally published in <a href="https://medium.com/hedera">Hedera Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>