• Wed. Oct 23rd, 2024

A quick guide to blockchain

Byadmin

Mar 31, 2022


There is one technology trend that could prove to be even more tectonic and enduring than cloud computing: the blockchain. While the cloud challenges how we build software and modifies how we operate businesses, blockchain technology potentially alters how we think about and process transactions themselves. Beyond serving as a foundation for cryptocurrency, blockchain could influence in a fundamental way how we propose and record agreements.The revolutionary nature of blockchain and the cryptocurrencies it enables are much touted and certainly subject to exaggeration. And yet, when contemplating how current technology developments might play into the future, it’s tough to identify another development more likely to influence the shape of things to come. Blockchain may prove to be the most significant innovation since the internet.So what is the blockchain, and why is it potentially history changing?Consensus truthBuilding distributed software systems is hard. The core of this difficulty is the data: protecting it, making it available, storing it. Although much of the difficulty stems from human beings trying to cheat the system, there is also inherent objective difficulty in overcoming failures and maintaining data consistency (for example, see the CAP theorem). Any time data is sent or retrieved (be it a post about your lunch or the balance of your bank account) it is subject to these hazards.In the case of something important, like your bank account, the traditional way to make data secure and accurate is via a trusted agent, e.g., the bank. The distributed version of banking has hitherto been a grafting of traditional practices onto the internet. The bank is trusted to persist and retrieve our financial information.The limitations of this arrangement are spelled out in the Bitcoin whitepaper that triggered the crypto tidal wave. (The foundational document in cryptocurrency, this paper by Satoshi Nakamoto summarizes the prior art and proposes the first real-world, public blockchain network.) Satoshi’s criticisms of the “inherent weaknesses of the trust based model” are pegged to the fact that “non-reversible transactions are not possible.” Put another way: Banks are required to be in the position of mediating disputes, which causes trust to spread and costs to climb. In truth, for a whitepaper that describes a full blown alternative to traditional banking, this criticism is fairly tempered. Most of us could readily find further problems: surprise fees and interacting with Byzantine corporate structures, for starters. Furthermore, the structures offer significant obstacles to participation in the financial system for disenfranchised players.The Bitcoin paper proposes an “electronic payment system based on cryptographic proof instead of trust.” Cryptographic signingThe core mechanism for such a network is cryptographic pairs used to sign transactions. Owners of electronic currency (or more generally, a digital state) sign over the currency (or state) to buyers with their public key and verify themselves with their private key. Every transaction also carries a hash of the previous transaction and the owner’s public key. You can see this structure in Diagram 1.Diagram 1. Blockchain signing IDGDouble spending and the blockchainIf all of the participants in the network operated in good faith, the chains of transactions would already be secure (i.e., the system would be safe from external direct tampering thanks to the cryptographic signing). The weakness is that owners of currency could trick the system by spending currency more than once. A buyer has no way of knowing if the currency they purchase has already been spent.To solve this problem without retreating back to a central authority is non-trivial. It requires that all participants in the network become aware of all transactions and their order of occurrence. If we could achieve that, then nodes could accept only the first instance of a transaction and discard others as fraudulent. The mechanism for achieving that is the blockchain.The central idea is that transactions are gathered into a set (a “block”) and the nodes expend work trying to achieve a difficult to calculate value (a nonce that when hashed produces a value with a certain number of leading zeroes). Every block also refers to the hash of the previous block. This setup means that transactions are accepted into blocks that are verified with computational effort, and that each new block creates a longer chain of such work. 51% attackTo fool this system, one would be required to redo all of the work of the chain, which becomes increasingly less likely as the chain grows.The name for attempting to overtake the legitimate chain of blocks is a 51% attack. The idea is that an attacker would obtain more than half of the computational power participating in the system and use it to validate false transactions. As the blockchain grows, this becomes more difficult, and even if achieved it offers limited capabilities.Aside: Storage optimizedA mind boggling fact about this tree of nodes is that the entire chain (representing a market cap that currently stands close to $1 trillion USD) is stored on every participating computer system. There is clever design at work to make this feasible. A central mechanism for this is using a Merkel Tree to allow the system to store only the root and relevant leafs in the chain.Consensus truthAs each node works away to validate its block of transactions, other nodes do the same. If a given node receives a competing block from the network, it saves that block to a competing chain and continues working on its own chain. If the node receives enough new blocks on the competing chain, it discards its work and accepts the competing chain as the truth. If the current node finishes its work before the competing chain is confirmed, the current node broadcasts its effort to the network. The other nodes behave in the same way with respect to validating that claim. In this way, the network inevitably accepts the work of the greatest number of nodes, in a sense voting for a consensus version of the truth, backed by the computational work required by the hashes.Mining and mintingThe activity of mining is much publicized, having taken on geopolitical significance. But what is it? With our understanding of the blockchain thus far, we can describe it clearly.When a node succeeds in validating its block (by obtaining a good hash and proving to the network that it is the first valid new block on the chain), it receives a new coin that it owns. This is mining. The coin serves as an incentive for the system to participate in the mining process.Security without trustThe chief achievement of the blockchain is in securing a network which runs on nodes owned by everyone. It seems counterintuitive, but the system works by making assumptions not just about cryptography, but about human behavior. That a widely distributed system controlled by (let us be frank) untrustworthy human beings should function securely is breathtaking.Once the functionality of this system was demonstrated by Bitcoin, the explosion of new digital coins has been remarkable. One noteworthy coin is Ether, created by Ethereum, a company that proposes to layer a Turing-complete computer atop a Bitcoin-like blockchain. And there are many others.In the specific case of currencies, traditional banking will certainly continue to a significant degree as is, and entrenched interests in the financial system will work to gain advantages within the crypto system. They have already moved to introduce their own coins.Perhaps the most history-altering promise of blockchain systems is that humanity may have landed upon a method for arriving at consensus for remotely connected participants. Such capability has far-ranging implications, difficult to specify in detail, but easy to predict as broad.There are of course challenges. For one, the extreme volatility of crypto markets makes it hard to predict cryptocurrency values (stablecoins have been introduced for this reason). For another, programming the blockchain is difficult. Finally, entrenched interests in financial and other industries are resistant to blockchain.Taken as a whole, blockchain technology is an astonishing innovation and fascinating space to watch as it rapidly evolves before our eyes.

Copyright © 2022 IDG Communications, Inc.



Source link