Lately, a growing amount of attention has been turned to Bitcoin and Ethereum. These are based on blockchain technology. Blockchain technology is behind countless new trends such as cryptocurrency, initial coin offerings (ICOs), and non-fungible tokens (NFTs). Blockchain technology uses a fundamentally different approach than conventional core technologies, and many people lack familiarity with it. In this three-part feature, we'll look at what blockchains are, how blockchain technology works, and how blockchain technology is used in business.
Part 1 will focus on the structure and mechanisms of blockchains.
What are blockchains?
"What are blockchains?" It's a question that few people could provide a simple answer for. Bitcoin, the internet-based digital currency, has had a major impact on the world, rapidly raising the profile of blockchain, which was developed as Bitcoin's core technology.
"Blockchain" refers to the technologies and structures used in collections of data chunks called "blocks," connected and managed like a chain. Changing one item of information requires the changing of the other data in the chain, making it extremely difficult to tamper with the data. Unlike centralized systems, which are reliant on a specific management entity, the data recorded in the blockchain is distributed and stored on multiple computers while being kept synchronized. This makes it possible to prevent the blockchain as a whole from being affected by the stopping or failure of some of the computers.
Not only is blockchain used as the core technology of cryptocurrencies, but it is also increasingly being applied to fields such as content copyright management and food traceability. Only time will tell what kinds of businesses blockchain technology will be used in in the future.
Hopes are high for the use of blockchain technology in numerous fields due to the following three features.
Feature 1: Authenticity (performing processing correctly, keeping accurate records of processes, and being able to verify the correctness)
Feature 2: Availability (fault tolerance) and Byzantine fault tolerance (consensus algorithm)
Feature 3: Automatic contract execution (smart contracts)
Let's look at how blockchains work and how they provide these features.
Blockchain structure and processing
There are many types of blockchains. They can be mainly divided into public and private types. Public blockchains are open, and anyone can take part in their operation. They do not have specific administrators. Blockchains which are not public are called private blockchain which are operated by specific administrators or a consortium.
In addition to dividing them up this way, they can also be categorized by their level of fault tolerance, how consensus mechanism is formed, whether or not they are used for cryptocurrencies, and the like, so there are many different types of blockchains with many differing characteristics.
Below is an overview of structures and processes commonly used in many blockchains.
A blockchain system consists of multiple computers ("peers") connected via a network. Users issue processing requests via the network, and the blockchain executes and records those processes. A single unit of requested processing is called a "transaction," which contains a relatively small amount of arbitrary information.
Let's look at the blockchain transaction process using the example of Mr. A sending Mr. B 1,000 coins of cryptocurrency.
First, Mr. A creates a transaction: "Send 1,000 coins to Mr. B." He then digitally signs it. When Mr. A sends the transaction to the blockchain, a peer within the blockchain receives it and transfers it to its connected peers.
This causes transactions to be delivered to all peers (Fig. 1-①: Sending and transferring).
Each peer verifies the digital signature of the transaction it receives and moves 1,000 of Mr. A's coins to Mr. B (Fig. 1-②: Processing).
Each peer gathers multiple processed transactions into a new block and connects the new block to the preceding block using a "hash chain" method (Fig. 2-③: Block generation).
This sequence of processes is performed redundantly on all of the peers. If the contents are confirmed as being correct and they reach a consensus on the processing result, then "Mr. A has transferred 1,000 coins of cryptocurrency to Mr. B" will be recorded by all the peers (Fig. 2-④: Consensus).
Now let's explore how this actual processing is performed in the blockchain.
Feature 1: Ensuring authenticity using digital signatures and a hash chain
Each transaction is digitally signed. Digital signature technology is used to verify that contents have not been tampered with. In blockchains, each peer verifies the digital signature of receiving transaction to confirm that it was originally created by the signing user. That means that even if the content of the transaction is tampered with at some other peer or anywhere, the peer to which the transaction is transferred will then detect the tampering and discard the transaction. This technology and system ensure that transactions are securely transferred between peers.
Blockchains can gain wide applications by fully leveraging the potential of digital signatures. For example, these include escrow transactions that use multisig (multi-signature) technology, in which multiple digital signatures are required on a single transaction, and lightning networks, which enable faster processing of transactions involving small amounts of money(micropayments) by using off-chain transactions, where transactions are not sent immediately to the blockchain even if digitally signed.
Next, let's turn our attention to a hash chain.
Blocks are recorded in chronological order in each peer. A key point here is that the hash value of the previously recorded block is included in the content of the block currently being recorded. The hash value is a value calculated based on the contents of the block, such as its transaction data (Tx). Consider a block in the blockchain -- block n. The hash value computed using the data from block n goes into block n+1. The hash value computed using the data from "block n+1, which includes the hash value for block n" goes into the following block, block n+2. In this way, hash values connect the data in what is called a hash chain. Because of this structure, if any data already recorded in a block, for instance, partial data in block n, is rewritten (tampered with), the block's hash value will change and will no longer match the hash value contained in block n+1, and the tampering can be detected (Fig. 3).
Even if the hash value of block n held by block n+1 is further tampered with to eliminate the hash value discrepancy, this will cause the hash value of block n+1 to no longer match the value included in block n+2 (Fig. 4).
In this way, the hash chain structure causes tampering in any part of the chain to affect the whole hash values, making blockchain tampering difficult.
As this explanation makes apparent, hash value consistency is key. It might seem like tampering could be pulled off by changing a block while maintaining its consistency -- that is, creating data within the block so that the resulting hash value is the same. This, however, is extremely difficult. Hash functions are irreversible, so hash values cannot be used to reconstruct source data.
This also makes it extraordinarily hard to tamper with data recorded using hash chain technology.
Feature 2: The importance of availability and Byzantine fault tolerance
As discussed above, blockchains are made up of multiple peers. Peers are redundant, and each has the same data, so even if some peers stop, the remaining peers can continue to perform processing. This makes blockchains resilient to failures and produces a high level of availability.
In blockchains, which are decentralized systems, it is important to prevent tampering or suspicious behavior in some peers from affecting the entire system. This ability of blockchains to form a correct consensus regarding overall system records and actions is generally referred to as Byzantine fault tolerance (BFT). Various consensus algorithms have been developed to provide BFT. BFT is an extremely important property when classifying blockchains. Knowing whether or not a blockchain achieves BFT, under which conditions BFT is achieved, what it sacrifices to achieve it, etc., provides insights into the features of that blockchain and what its appropriate uses might be.
For example, Bitcoin, the most iconic public blockchain, uses proof of work (PoW) to achieve BFT. The blockchain developed by Toshiba Digital Solutions uses a majority-based consensus algorithm to achieve BFT.
* See part 2 for details regarding Toshiba's blockchain.
Feature 3: Automatic contract execution (smart contracts), a further evolution of blockchain technology
The first blockchains were specially designed for transferring cryptocurrency, but the arrival of Ethereum's smart contracts greatly broadened their horizons.
The smart contract is a system for automatically executing so-called "contracts" on blockchains. These "contracts" are actually programs recorded in the blockchain. They are called when a transaction is processed and determine the specific content of the processing that will be performed. Because of this design, smart contracts can be thought of as "contracts written in program form," and the execution of the program is equivalent to the concluding of a contract. A record of the execution of the contract is stored in the blockchain, ensuring authenticity. Because of this, in the virtual world, smart contracts are mechanisms that can be used reliably to perform automated transactions that include highly reliable contract execution and recording.
There is a growing trend of using new transactions that employ smart contracts, such as procuring funding through ICOs and buying and selling digital assets known as NFTs. Expectations are also high for the application of smart contracts to existing services.
Summary
Blockchains have many features that are effective when working with data, such as authenticity, availability, Byzantine fault tolerance, and automatic contract execution. Blockchain technology is seen as having high potential for use in businesses that create new values for digital society by leveraging these blockchain features.
In this, part 1 of the running feature, we have focused on typical blockchains and how they differ from conventional systems. In part 2, we will present the unique blockchain developed by Toshiba Digital Solutions.
Kotaro Endo
Expert
Core Technology Development Dept.
Software Systems Research and Development Center
Toshiba Digital Solutions Corporation
Since joining Toshiba, Kotaro Endo has been engaged in the development of basic software for industrial computers and the research and development of server cluster technologies. His research and development work has covered various technologies, and he is now developing technologies for use in blockchains and the SQBM+ quantum inspired optimization solutions.
- The corporate names, organization names, job titles and other names and titles appearing in this article are those as of March 2022.
>> Related articles
Running Feature: Blockchains, Driving a Paradigm Shift in Digital Society(Article list)