<?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 bingos on Medium]]></title>
        <description><![CDATA[Stories by bingos on Medium]]></description>
        <link>https://medium.com/@masked?source=rss-d051685220c3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Hzjjo4MAkLKUjxkaDSRmqw.jpeg</url>
            <title>Stories by bingos on Medium</title>
            <link>https://medium.com/@masked?source=rss-d051685220c3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 07:38:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@masked/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[Proof of Work]]></title>
            <link>https://masked.medium.com/proof-of-work-be0ca0ad8fcd?source=rss-d051685220c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/be0ca0ad8fcd</guid>
            <dc:creator><![CDATA[bingos]]></dc:creator>
            <pubDate>Tue, 28 May 2024 21:25:49 GMT</pubDate>
            <atom:updated>2024-05-28T21:25:49.845Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Proof-of-Work is the consensus algorithm used in the Bitcoin protocol. However, Proof-of-Work has been a concept in the making since the early 90s. In 1993, we were introduced to the Proof-of-Work system by Cynthia Dwork and Moni Naor. Later, we saw Adam Back’s ‘Hashcash’ (1997) use a Proof-of-Work system and utilize the SHA1 hashfunction as a way of deterring spamming efforts on things like forum boards or e-mail servers. Today, we have Bitcoin a decentralized digital cash which uses a SHA256 hash function.</em></p><p><em>My goal in this writing is to dive deeper into the Proof-of-Work system and discuss it’s incorporation of hash functions like SHA1 or SHA256 and how these concepts are being used in Bitcoin today.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/0*YOVFtQHtUjyJpvP2.jpg" /><figcaption>Cryptography Hash Functions, Tutorialspoint</figcaption></figure><h4>Hash functions</h4><p>Before diving into Proof-of-Work, it’s important to understand how hash functions work. There’s a number of different hash functions such as SHA1, SHA256, MD5*, etc. Each of these hash functions can be used for different purposes depending on what is being built with them and the desired size of the output or hash.</p><p><em>*MD5, these days, is considered insecure and isn’t a hash function regularly used anymore.</em></p><p>The SHA256 algorithm takes any input or data set and scrambles it into a fixed size of 256 bits or 32 bytes (vs. SHA1 160 bits). The scrambled output/digest received is a ‘hash’ which essentially serves as a fingerprint which can be used to verify a data set. When inputting a string of text into a hash function, the output received is seemingly random — however, the algorithm is deterministic — meaning a specific input will always result in the same output. For example, hashing the word “Hello” using SHA256 will always result in a hash of “185F8DB322…7D17648263”. Often times, mostly in the case of password storage, a ‘salt’ or an arbitrary addition to the input is added to the string of text before being hashed — this is to further increase the security of a string before hashing it (i.e. “1H2el3lo” with the salt being ‘123’). The slightest difference in an input, such as case sensitivity, will result in a completely different hash with no clear similarities.</p><p><em>You can test this out with any string of text you’d like using a simple generator such as: </em><a href="https://www.freeformatter.com/sha256-generator.html"><em>https://www.freeformatter.com/sha256-generator.html</em></a></p><p>It’s important to note that hashing an input is not necessarily a method of encryption and the hash cannot be ‘reversed’ or decrypted to find the original input. However, a hash value could be bruteforced to find the input or original string of text which results in a specific digest.</p><h4>Proof of Work</h4><p>In 1993, Cynthia Dwork and Moni Naor published a paper titled “Pricing via Processing or Combatting Junk Mail”. In this paper, they proposed a way of tackling the problem of junk e-mail from a computational standpoint without adding notable additional costs to legitimate users.</p><p>In the case of PoW systems being used in e-mail, you can compare the PoW protocol to a postage stamp used in regular mail. However, instead of purchasing a stamp to attach to your e-mail, the PoW system uses your computational power to solve a ‘challenge string’. If a spammer wanted to send hundreds of thousands of emails, it would require a substantial amount of computing power in order to provide solutions to each challenge string. Thus increasing costs and/or resources required to do so. This effectively prevents spammers from sending out e-mails on a massive scale. Similarly, PoW systems can be used to prevent DoS attacks; before being allowed access to a service, you’re often required to solve one of these challenge strings.</p><p>As an example, your computer would be presented with a challenge string, and your computer’s proof/response along with the challenge string when placed through a hash function would be required to provide a hash that begins with a specific # of 0s (i.e. a hash of “0000000000xxx…”). The prover in a PoW scheme essentially bruteforces the challenge string with numerous responses until a hash with the required # of 0s is produced. Once the required hash is produced by the prover, the actions are permitted. If you wanted to scale the difficulty of this computation, you could adjust the required number of 0s required in the beginning of the output. As you can imagine, completing these computations on a large scale would require vast amounts of computing power.</p><p>The Proof of Work system, outside of usage in blockchain technology, is useful due to it’s ability to throttle and deter bad actors from flooding a network — whether it be sending mass amounts of spam e-mail or DoS attacking a server.</p><h4>Bitcoin &amp; PoW</h4><p>In Bitcoin, we see an implementation of the PoW system to tackle the issue of double spending — An unsolved issue in today’s legacy payment networks.</p><p>Proof of Work, combined with a little game theory, incentivizes honest actors to participate in the Bitcoin network. Each time a new block is produced, miners on the network are presented with a challenge string. From there, each miner on the network bruteforces the challenge string in order to find the fitting proof string. Once a solution is found and confirmed, a transaction is allowed to be processed and broadcast to the network.</p><p>The PoW system also preserves the decentralization/peer to peer nature of a blockchain. There is no central authority which can roll back a transaction and/or force a transaction to go through. The only way this would be possible would be by obtaining 51% of the hashpower, something which is essentially unfeasible. It is in a network participant’s best interest to remain honest due to the reward structure Bitcoin provides to miners. Each time a block is mined, a block reward is given to the miner who found the solution. The difficulty to mine blocks is determined by the number of network participants. The more people attempting to solve the challenge string, the less chance an existing miner has to mine the block. This creates value in the underlying asset — as it, on average, costs more to ‘create’ a bitcoin as the total hashpower of the network increases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be0ca0ad8fcd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Coda Protocol]]></title>
            <link>https://masked.medium.com/the-coda-protocol-bbcb4b212b13?source=rss-d051685220c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbcb4b212b13</guid>
            <category><![CDATA[zksnark]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[bingos]]></dc:creator>
            <pubDate>Sun, 03 Feb 2019 05:47:01 GMT</pubDate>
            <atom:updated>2023-07-11T20:31:07.922Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mina Protocol — A Succinct Blockchain</h3><p><strong><em>Coda has rebranded to Mina as of October, 2020.</em></strong></p><p>You can consider Mina to be <strong><em>‘A wallet that fits in your pocket’.</em></strong></p><ul><li><em>The first cryptocurrency with a</em><strong><em> succinct blockchain</em></strong><em>.</em></li><li><em>Blockchain compressed from 100s of GBs (as seen in existing protocols) down to </em><strong><em>kBs in size</em></strong><em>.</em></li><li><strong><em>Scalable, secure, and decentralized</em></strong><em>.</em></li><li><em>Allows for verification of the blockchain on a </em><strong><em>mobile phone</em></strong><em>.</em></li></ul><p>Mina’s blockchain always remains a constant size — <strong><em>the size of a few tweets</em>, </strong><em>no matter how many transactions are conducted on the network</em>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FeWVGATxEB6M%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DeWVGATxEB6M&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FeWVGATxEB6M%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a0900762b54ba9aea4e10d3dec95ef43/href">https://medium.com/media/a0900762b54ba9aea4e10d3dec95ef43/href</a></iframe><p><em>In the ‘cryptosphere’, we’re often encouraged to follow the motto “Don’t trust, verify” and despite understanding the need to be an active network user, end users in blockchains today are less likely to run full nodes due to the perpetually increasing requirements to do so.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cELjxQwXYMqroQ0TgoSd1A.jpeg" /><figcaption>The growth rate of the Bitcoin blockchain in megabytes from ‘09–’18. (<a href="https://www.blockchain.com/en/charts/blocks-size?timespan=all">https://www.blockchain.com/en/charts/blocks-size?timespan=all</a>)</figcaption></figure><h3>Preface</h3><p><strong><em>Why can’t everyone be a full node? </em></strong><em>Before diving in, we should first establish an understanding of the basic setup of a typical cryptocurrency protocol — a processor, otherwise known as a miner or staker (PoW vs. PoS respectively), applies a transaction to the database. A full node then observes these transactions, to ensure they’re acting honestly. End users typically do no checking independently — instead, they delegate trust to willing network participants. </em><strong><em>Why is this?</em></strong></p><ul><li>Resource requirements &amp; complexity of running a full node discourages end users to do so.</li><li>It is intensive to run a full node on a computer, impossible on a mobile phone.</li><li>Easier to trust third parties to complete this validation.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3Nod-k_4sVhkqz13" /></figure><p>In the early stages of any particular cryptocurrency, it’s relatively easy to operate a full node, as the blockchain is small — <em>maybe a few megabytes</em>. However, as time goes on and more transactions are recorded, this grows to hundreds of gigabytes (as seen in the chart above). In turn, making it less realistic to operate a full node without a computer designated for that purpose, <strong>much less on a smart phone.</strong></p><p><strong><em>How can we be convinced of the current state of the blockchain, without seeing the entire history of that state?</em></strong></p><h3>Introduction To Mina</h3><blockquote>“[Mina] is a new cryptocurrency protocol which makes it <strong>possible for anyone to sync with the network</strong> <strong>[on any device]</strong> with full node level security while only downloading a <strong>few kilobytes of data</strong> and completing a<strong> few milliseconds</strong> of computation compared to gigabytes and gigabytes in traditional cryptocurrency protocols.”</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F4AJKUGNwzZ0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4AJKUGNwzZ0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F4AJKUGNwzZ0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/867f6117414ae9ae563c3ab1782bb01e/href">https://medium.com/media/867f6117414ae9ae563c3ab1782bb01e/href</a></iframe><p><a href="https://medium.com/u/b6d3ede7e247">O(1) Labs</a> is developing the <strong>Mina</strong> <strong>Protocol</strong> to address the issue of blockchain size by creating the first <strong>succinct</strong> or <strong>compressed blockchain</strong> —<strong><em>the size of a few tweets.</em></strong> This provides end users with a <em>low barrier to entry </em>way of validating transactions.</p><p><strong>What makes this possible?</strong></p><ul><li>Utilization of zk-SNARKs — effectively <strong>compressing blocks into a single proof or certificate.</strong></li><li><strong>End-users check this proof</strong> instead of checking the entire transaction history of a block.</li><li>Recursive composition of these SNARKs/certificates— enabling a <strong>constant sized blockchain.</strong></li></ul><p><em>zk-SNARKs are an iteration of zero-knowledge proofs — a cryptography scheme where zero knowledge is relayed to a verifier when providing them with proof of a computation.</em></p><h3>How Mina Works</h3><h4><strong>zk-SNARKs in Mina</strong></h4><p>At the core of the Mina Protocol, is the usage of <strong>zk-SNARKs </strong>which<strong> </strong>can be used to certify <strong>any computation</strong>.</p><p>zk-SNARKs function as <strong>unforgeable certificates</strong> to prove that a computation was performed correctly, without proving the entire computation. As mentioned, we can take <em>any</em> computation, <strong><em>such as verifying the transactions in a block</em></strong><em>, </em>and create a SNARK out of it. This SNARK proves the accuracy of a block’s transaction history, without having to show all of the transactions. This <strong>effectively decreases the size of a block to a single SNARK (~1kB).</strong></p><p><strong>The SNARK verifies ALL of the rules for consensus.</strong></p><p><strong>It ensures:</strong></p><ul><li><em>Transactions are signed.</em></li><li><em>They are valid.</em></li><li><em>Consensus rules (total hash power + chain strength for PoW, and the Variable Random Function/other rules for PoS).</em></li></ul><p>If the SNARK isn’t honestly generated, it’s not valid. Anyone on the network would be able to see that near instantly on something as <em>‘lite’ </em>as a <strong><em>Raspberry Pi</em></strong> or <strong>smartphone</strong>.</p><p><em>Maintaining a low resource requirement for verifying transactions in a block trustlessly is the first step to creating a sustainable &amp; scalable solution to the problem at hand.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y5qiN4mQ3dWolofS.png" /><figcaption>a SNARK processor creating a SNARK/certificate of validity for a block which could be passed on as a proof, without including all of the transactions.</figcaption></figure><blockquote><strong>A very real conversation between a Mina processor and an end user:</strong></blockquote><blockquote>“Hi verifier/end user! I created a certificate so you can easily verify the transaction history of a block. This process required a lot of computing power, so I’m rewarded for doing this. You can verify the accuracy of this proof by checking the SNARK which will only take a few milliseconds and a few kilobytes of free space. This way, you won’t have to download hundreds of gigabytes to verify the blockchain!” — SNARK Processor.</blockquote><blockquote>“Thank you SO MUCH, processor. I will verify this certificate! Since it is so small I don’t have to trust someone else to verify the blockchain for me and I can finally run a validating node &amp; wallet on something like my smartphone. Thank you! Life is so great now.” — End user.</blockquote><h4><strong>Replacing each block with a SNARK isn’t a complete solution.</strong></h4><p>Initially, it was thought that we could simply create a SNARK for each block, shrinking each block to about a kilobyte, and call it day. However, this would still result in <em>linear growth</em> over time as SNARKs pile up, albeit to a much lesser degree than existing blockchains.</p><h4><strong>How can we fix this?</strong></h4><p>Well, we know that a SNARK can be used to certify any<em> </em>computation. Creating a SNARK is a computation in itself — so <strong>what if we created a SNARK of multiple SNARKs?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oPqhLi91z1V_H2pJ.png" /><figcaption>Multiple certificates/SNARKs, each verified by an end-user.</figcaption></figure><h4>A Recursive Composition of SNARKs in Mina</h4><p>As previously mentioned, we can <strong>chain these certificates</strong> together in a recursive composition and <strong>allow the blockchain to remain a constant size</strong> of <strong>~20kB </strong>(SNARK + tail-end Merkle path).</p><p>Each time a new block is produced, a new SNARK/certificate is created. By creating a single SNARK comprised the previous certificates, you’re able to create a single “mega” SNARK in a sense, that proves the entire transaction history of the blockchain allowing you to <strong>jump from the genesis block to the current state </strong>while remaining the size of a single certificate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/0*yzdwtbQurT-RKsSa.png" /><figcaption>Multiple certificates/SNARKs placed into a single certificate/SNARK.</figcaption></figure><h4><strong>To simplify this idea, let’s say you have</strong>:</h4><ul><li><em>One certificate stating you can go from </em><strong><em>Block 0 to Block 2</em></strong><em>.</em></li><li><em>An additional certificate stating you can go from </em><strong><em>Block 2 to Block 4</em></strong><em>.</em></li></ul><p><em>You could then combine these SNARKs into one </em><strong><em>single SNARK</em></strong><em> which states you can go from </em><strong><em>Block 0 to Block 4.</em></strong></p><p><strong>The new SNARK/certificate remains ~1kB. </strong>On a greater scale, you can create a certificate for the entire transaction history of the blockchain which<strong> remains constant in size</strong> — despite the number of certificates ‘jammed’ into the most recent SNARK.</p><h4><strong>A validating node in Mina will comprise of:</strong></h4><p>A <strong>recursively composed zk-SNARK (1kB)</strong> which proves the validity the <em>entire past history of the blockchain</em> and <strong>merkle root path of the current state (20kB)</strong>; together proving the validity of a user’s balance. All of which takes only milliseconds to sync up to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Par2LpIhHQPmO0oo" /><figcaption>End-user verifying a SNARK of the current state which includes all past certificates, as well as a merkle path. All of this comes together allowing a user to validate their balance.</figcaption></figure><h3>Applications, Decentralization, and Scalability</h3><h4>Applications</h4><p>The construction of the Mina protocol allows for the blockchain to be easily <strong>accessible</strong> to end users <strong>through your browser and in applications</strong> without downloading hundreds of gigabytes and <strong>without delegating trus</strong>t.</p><p><em>Imagine an application such as a </em><strong><em>hyper-lite wallet </em></strong><em>where you aren’t required to trust that the developer is performing the verification process correctly. This validation process could be completed by the end users without requiring them to have hardware dedicated for this purpose.</em></p><p><strong><em>Any device would be able to run a validating node, </em></strong><em>including but not limited to</em><strong><em> smartphones</em></strong><em>, </em><strong><em>in browser</em></strong><em>, or on </em><strong><em>feature phones </em></strong><em>(yes, your old indestructible Nokia)</em><strong><em>.</em></strong></p><h4>Decentralization</h4><p>As mentioned, end users in today’s existing cryptocurrency protocols end up delegating trust to services such as online wallets or light clients in the case of mining. This could become problematic in the event of something like a 51% attack as the duty of verifying transactions is often concentrated in the hands of these service providers.</p><p><em>By providing network participants with an easy way to host validating nodes, </em><strong><em>decentralization is augmented</em></strong><em> as transactions would be validated by a broader range of network participants — </em><strong><em>the end users.</em></strong></p><h4>Scalability</h4><p>In terms of enhancing scalability, increasing throughput to thousands of txns/sec in existing protocols would produce an increased amount of data needed for verification. You would inevitably end up with a blockchain that grows faster than it can be verified.</p><p>However, since Mina keeps its blockchain at a constant size, you have a way of mitigating the data required to verify transactions which makes it possible to achieve a high throughput as the verification data is compressed by many orders of magnitude.</p><h3>Takeaway</h3><p>By creating a blockchain which remains at a constant size, Mina enables <strong>end users</strong> with a <strong>low barrier to entry</strong> way to verify transactions on their own.</p><ul><li><strong>No need to delegate trust</strong> to those willing to keep up with the requirements to operate a full node — as is the case in traditional blockchains.</li><li>Obtain <strong>full node level security</strong> on virtually<strong> any device</strong> by downloading a <strong>single SNARK</strong> which acts as a certificate for the <strong>entire blockchain</strong> &amp; a tail-end merkle path.</li><li><strong>Using a recursive composition of SNARKs, t</strong>he blockchain size is able to remain <strong>~20kB.</strong></li><li>Having a broad network of validating nodes <strong>increases decentralization</strong> as <strong>more end users</strong> are equipped to participate in network verification.</li></ul><h4><strong>Bonus Thought:</strong></h4><p>You can think of Mina as a blockchain compressed into a PokéBall. Instead of a cramming a Snorlax into a Pokéball, Mina compresses the blockchain into a SNARK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*W-KdFZyAk-vP8PFA" /><figcaption>From ZCon0 Presentation — Izaak Meckler — <a href="https://www.youtube.com/watch?v=qCVACpgQSjo">https://www.youtube.com/watch?v=qCVACpgQSjo</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbcb4b212b13" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>