12.8 Blockchain Technology

Blockchain technology is one of the newest developments in distributed data management that uses P2P computing to securely manage a form of data known as distributed ledgers. A distributed ledger is an append-only data log that is used to record transactions, such as financial or contractual activities, that occur among the peers in a network. The fact that a blockchain uses P2P computing means that transactions can be conducted without having a third party involved. For example, payments involving the transfer of money can be conducted between two parties without the use of a bank. Data can only be added to the blockchain in a time-sequenced order. As a result, data that is already in the blockchain can never be modified, with cryptography used to guard authenticity and nonrepudiation of the transactions and to protect the integrity of the data. Each peer in the network also maintains a full copy of the blockchain.

A key aspect of blockchain technology is that it is the first truly decentralized P2P network where there is no central control involved in updating the distributed ledger. Instead, all peers in the network cooperate to achieve a consensus on the next state of the data in the blockchain. The consensus approach is necessary to ensure trust among the peers in the network, thus preventing malicious activity by its members and also preventing preference to certain peers in the network.

12.8.1 Blockchain Architecture and Functionality

Blockchain technology was initially introduced through the development of Bitcoin cryptocurrency. Cryptocurrency is a form of digital cash that can be used to pay for goods and services through online transactions. Bitcoin introduced the concept of a blockchain as a secure manner for conducting such transactions in 2008, in a paper entitled Bitcoin: A Peer-to-Peer Electronic Cash System, written by Satoshi Nakamoto. The name of the author is believed to be a pseudonym, and it is not known if it represents a single author or a group of authors. Bitcoin has since become one of the most successful forms of digital currency. More importantly, the blockchain technology introduced by Bitcoin has become an important decentralized, distributed computing platform for securely conducting and recording transactional data.

FIGURE 12.10 illustrates the structure of each block in a blockchain and the way the blocks are chained together. Each block is composed of a block header and a transaction area that contains the list of transaction data stored in the block. The block header contains the following:

  • A timestamp, indicating the time when the block was created.

  • A hash value that is derived from the transactions in the block. The hash value is referred to as the Merkle root, which is based on the concept of Merkle trees. In a Merkle tree, each leaf node contains a label that is the cryptographic hash of the data contents of the node. Each non-leaf node contains a label that is the cryptographic hash of the labels of its child nodes. A Merkle tree therefore provides a secure and efficient way to verify the contents of large tree structures. In a blockchain, the Merkle root is a way to ensure that the individual transactions in the block cannot be modified, because modification would invalidate the hash value.

  • A pointer to the previous block’s hash, which is used to chain the sequence of blocks together. The pointer also contributes to immutability of the blockchain contents because any modification of previously recorded transactions would invalidate the hash and thus break the chain of blocks.

  • A nonce, which is a number that is generated as part of a consensus algorithm that is central to creating new blocks in the blockchain.

4 blocks are shown in the diagram. The block labels are N, N plus 1, N plus 2, and so on till N plus lowercase n. Each block has a block header and Transaction data. The components of the block header are Timestamp, Block hash, previous hash, and Nonce. An arrow is drawn from the Previous has of each block to the Block hash of the preceding block.

FIGURE 12.10 Blockchain Architecture

An important aspect of a blockchain is the way in which peers in the network, also known as nodes, work together to maintain trust in the generation and recording of transactions in the distributed ledger. Trust among the nodes is created through a consensus algorithm that is used to determine which node gets to create the next block in the blockchain. There are different types of consensus algorithms, with different types of blockchains implementing the consensus algorithm that is the most appropriate for the functionality of the blockchain.

One type of consensus algorithm is known as Proof of Work (PoW). The PoW consensus algorithm is a complex mathematical problem that must be solved in a brute force manner using significant computational resources as part of a competition among the nodes for creating the next block. Nodes in the network known as miners participate in the competition and generate the nonce, n, as part of the solution. The transactions that have been accumulating for the next block are referred to as the payload, p. The goal of the miner is to search for an n value that when concatenated with p, produces a cryptographic hash that does not exceed a specific threshold, t. The first node to solve the problem gets to create the next block in the blockchain. The competition among miner nodes serves as incentive among the peers because the winning node is usually compensated for the solution. In the case of Bitcoin, for example, miner nodes are compensated through payment in bitcoins. Competition with the consensus algorithm also provides a way to encourage successful operation of the blockchain and to eliminate favoritism with respect to which node gets rewarded for creation of the next block.

FIGURE 12.11 depicts the nodes in a blockchain network. Each node has an address. In the context of cryptography, the address is the public key that is used to identify the node. Each node also maintains a copy of the blockchain, in addition to its own state and possibly a virtual machine (VM) for executing smart contracts. A smart contract provides a way of executing the business logic associated with the transactions recorded in the blockchain.

The blockchain network has 4 Nodes labeled Node 1, Node 2, Node 3, and Node 4. Each Node has an address, a State, and a V M. Each node is connected to the 3 nearby nodes.

FIGURE 12.11 Blockchain Network

Any node can initiate a transaction. As an example, a transaction in Bitcoin could be the transfer of cryptocurrency from one node to another. The initiating node digitally signs the transaction with its private key to prevent forgery. The transaction is then validated and broadcast to all other nodes in the network. Miners then start the process of finding a new block through competition with the consensus algorithm. The winning miner is compensated for solving the computational problem, the new block is created and linked back to the hash of the previous block, the transaction is executed and recorded, and the block is propagated to other nodes so that all nodes have a full copy of the ledger recorded in the blockchain.

12.8.2 Blockchain Benefits and Future Directions

A key benefit of blockchain technology is that it creates a cryptographically secure solution for providing the integrity of transactions in a decentralized environment. The consensus approach to reaching agreement among the peers of the network supports a true P2P environment, where a third party is not required to validate transactions. Because blockchains are shared by all peers in the network, trust is established by making all transactions transparent. The use of public keys to identify participants and private keys to validate transactions contributes to trust. Furthermore, the way in which transactions are hashed, with hash values used to chain blocks together, makes it difficult to modify information about transactions that have already occurred. Fault tolerance is also high because every node has a copy of the blockchain.

Although blockchain technology originated with the application of sending and receiving cryptocurrency, new applications are beginning to emerge. Ethereum is a new blockchain environment that introduced the concept of smart contracts for executing programmable business logic in the blockchain. Through smart contracts, blockchain technology creates the possibility of decentralized, P2P computing for use in distributed applications related to finance, real estate, insurance, and government, as well as other application areas. As an example from the automobile insurance industry, blockchains can potentially be used to improve the communication between all parties involved in the insurance claims process, with smart contracts encoding the logic of all activities of the claims process, from the submission of a claim to intercompany communication and payment of a client. The blockchain will record all transactions that occur among relevant parties and also help eliminate fraudulent claims.

Blockchain technology also provides promise for advancements with development of the Internet of Things (IoT). The IoT is a network of physical objects in our everyday lives (such as vehicles, home appliances, and industrial sensors) that have been enhanced with computational intelligence. Objects in the IoT can connect to the Internet, sense and react to events, collect data, and communicate with other objects over the Internet. A smart home is an example of an IoT application, where devices can manage energy and water usage, control door locks, and also detect and respond to malfunctions. Typical IoT models are based on a centralized paradigm, connecting to a cloud infrastructure to report and process data. A cloud infrastructure, however, creates the possibility of a single point of failure as well as other issues such as security, privacy, and data theft. The use of blockchain technology for an IoT smart home eliminates the dependency on a centralized server that could fail and bring down the network. Data is highly available because all devices maintain a copy of the blockchain. Devices can also be designed to communicate directly with other devices in the network as well as to service providers through the use of smart contracts. Homeowners would also have more control over the security of their data, thus building greater trust with other participants in the network that they allow to access their smart home, such as renters, home cleaners, or home maintenance workers.

As blockchains are more widely used, scalability is an area that must be addressed. The potential need for regulation to increase consumer confidence in certain types of applications is an area of concern that must be addressed to increase adoption of the technology. Lastly, the energy consumption and carbon footprint of blockchain technology is an emerging concern.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.167.209