Blockchain Data Analytics For Dummies. Michael G. Solomon
Чтение книги онлайн.
Читать онлайн книгу Blockchain Data Analytics For Dummies - Michael G. Solomon страница 13
Comparing blockchain to something you know
One way to think of a blockchain is as a big spreadsheet that is shared among many nodes. Each row in the spreadsheet represents a transaction that records amount, from owner, and to owner columns, and sometimes contains columns with additional data. Periodically, a group of rows, called a block of rows, is added to the bottom of each copy of the spreadsheet. You can’t go back and edit any rows in the spreadsheet, but you can add new rows. That analogy is simple, but it gives you an idea of how blockchain transactions are similar to the familiar spreadsheet.
One of the first difficulties in maintaining copies of spreadsheets is how to control adding new rows and protecting existing rows from changes. A full discussion of blockchain integrity is beyond the scope of this book, but following is a high-level overview of how blockchains ensure integrity.
Using cryptography with blockchain
Blockchain technology is based on the concept of linking blocks together using a cryptographic hash. A cryptographic hash function takes any characters as input and creates a fixed-length output that represents the input. Calculating a hash value is easy, but finding the original input from the hash is extremely difficult. If the input changes at all, the hash function will calculate a different hash value.
Blockchain nodes calculate the hash value of a block and store that value in the next block on the chain. That process links the blocks and also detects changes in blocks. If any data in any block gets changed, the hash value of the block changes and makes the next block’s link (remember it was the original block’s hash value) invalid. Any change breaks the chain.
Achieving consensus among network nodes
Blockchain network nodes submit transactions, and then special nodes called miners assemble the transactions into blocks and then compete with other miners to be the first to solve a mathematical puzzle that makes a block easy to verify by all other nodes. The first miner to solve the puzzle gets a small reward for the work.
Each blockchain can define a different method its nodes use to verify blocks, but all the nodes in a specific blockchain network use the same block verification method. Methods that blockchains use to verify the validity of new blocks are called consensus algorithms. A common consensus algorithm is the Proof of Work (PoW) algorithm, which asks miners to expend energy to solve mathematical puzzles in exchange for a prize.
Regardless of the type of consensus a blockchain uses, more than 50 percent of the nodes must agree that a new submitted block is the so-called truth. When a majority agrees, all nodes add the new block to their blockchain. Through consensus and guarantees that no previous data has changed, blockchain technology ensures that all copies of the blockchain are identical and can be trusted.
Reviewing blockchain’s family tree
Blockchain technology is only a decade old, but its effect is already being felt across many types of businesses. In just a few short years, blockchain implementations have matured through three generations. Classifying blockchain development by generation helps to uncover blockchain’s short history, and where it may be headed. Note, however, that some developments overlap and others may fit in more than one category.
Introducing blockchain’s first generation
Blockchain technology was introduced with the release of Satoshi Nakamoto’s paper, “Bitcoin: A Peer-to-Peer Electronic Cash System” in 2008. The paper proposed a completely new approach to handling electronic currency. It described a structured data repository that consisted of a chain of special blocks, called a block chain. This new approach made it possible for many nodes that do not trust one another to exchange currency without relying on a central authority. Blockchain’s first-generation goals focused on managing transactions between nodes that do not trust one another. Trust, not performance, was the central issue.
Adding blockchain features in the second generation
Bitcoin did just what it was supposed to do and provided a new way to exchange value. With Bitcoin, many individuals and small business could interact directly with customers or one another without involving banks or payment processors. It didn’t take long for other blockchain implementations to emerge, each with its own cryptocurrency. As blockchain become more popular, developers and researchers started looking for other ways to use the new technology. They found that with just a few changes, blockchain technology could do far more than just trade cryptocurrency.
Just five short years after Nakamoto’s paper was released, Vitalik Buterin, the cofounder of Bitcoin Magazine, published a whitepaper that proposed the use of Ethereum, a new, more functional blockchain implementation that could do much more than just exchange cryptocurrency. Buterin had a plan for Ethereum and built a base of interest and financial support for this new generation of blockchain. The Ethereum Foundation, a Swiss non-profit organization, was founded and Buterin became the primary developer of Ethereum.
Ethereum was designed to be different than previous blockchain implementations. The two primary differences are Ethereum's smart contract and native cryptocurrency, ether. In Ethereum, you can access blockchain data only by executing a smart contract. Smart contracts provide rich functionality and blockchain data integrity, and make it possible for blockchain technology to do much more than first-generation implementations. With the release of Ethereum, blockchains could carry out a wide range of business transactions beyond just handling payments, such as automating many business decisions or even carrying out entire transactions automatically. Imagine a ridesharing app that sends an autonomous (driverless) car to transport you to your destination and then automatically transfers payment for the ride from your account into its own account — all automatically! That’s just one example of what is possible in Ethereum.
Scaling to the enterprise in blockchain’s third generation
Ethereum was an important blockchain advance toward general business acceptance. Despite blockchain's broader appeal and potential applications, the core technology still lacked many enterprise features. Most blockchain implementations assumed open access, no authentication, and a focus on trust. Enterprises rely on limiting access to sensitive information, integration with existing applications, and meeting performance goals.
Enterprise IT infrastructures can be extremely complex and cannot quickly change to accommodate radically new technology. To integrate well into an enterprise, new technology must be flexible enough to “play nice” with legacy applications and components. First- and second-generation blockchain implementations tended to be inflexible and difficult to modify. For instance, most blockchains do not make it easy to replace the consensus algorithm. Some older blockchain implementations allow you to use only the consensus algorithm that developers built into the blockchain. For example, the PoW algorithm may be popular in public blockchain implementations, but it's not a good fit for enterprise blockchains. PoW has a very high computing resource requirement to address the trustless environment, but enterprises generally have some trust among participants. When limited trust exists in an enterprise