Blockchain is a data storage technology first used in October 2008, coinciding with the emergence of the first cryptocurrency, Bitcoin. While its primary application remains in cryptocurrencies, it’s gradually expanding into other sectors like financial transactions, customer identification, and cybersecurity, due to its ability to provide maximum data protection.
Essentially, the blockchain is a database that stores key information fields. For instance, in the context of cryptocurrencies, it records transaction details: who transferred assets, to whom, when, and the amount.
This description is somewhat simplified and serves as a familiar, easy-to-understand example. In reality, the structure and functioning of a blockchain differ significantly from those of a standard database. Moreover, data protection has become increasingly important. These aspects are among the most intriguing features of blockchain technology.
Blockchain technology is founded on two key features:
Immutability of Records: Unlike a normal database where fields can be altered (like changing the name of a property owner in a registry), records in a blockchain cannot be changed once they are part of the chain.
Decentralized Data Storage and Processing: In contrast to a centralized system like a bank, which might have a server with a database managed by a group of employees, blockchain has neither a central server nor a single “manager” – no individual or company can unilaterally make changes.
The actual operation of the blockchain is organized as follows:
Transaction Creation: A user initiates a transaction, such as paying with cryptocurrency in an online store. The transaction specifies the asset’s previous owner, its volume, and the new owner.
lock Formation: The transaction details are compiled into a block.
Verification of Block Information: For instance, it’s verified whether the user’s account holds sufficient funds at the time of purchase.
Appending to the Blockchain: After successful verification, the block containing the transactions is attached to the end of the blockchain, and the transaction is deemed complete.
Once in the block, the data can no longer be altered. The chain records the entire history of transactions, making it possible to trace an asset’s ownership from one user to another. The inability to change blocks once they are part of the chain means data cannot be deleted, and consequently, transactions cannot be reversed after completion.
Data security in blockchain technology is achieved through the incorporation of additional data in each block, particularly its own hash and the hash of the preceding block. A hash is a code algorithmically generated from the data within the block, serving as a means to verify data integrity. In simple terms, if a hash comparison between one block and the hash noted in the following block reveals a discrepancy, the data is deemed corrupted.
Security relies not only on hashing but also on encryption, which obscures the specifics of the data in each block. Two types of encryption keys are employed – the public key, associated with assets and openly stored in the blockchain, and the private key, used for transaction signing. More details about keys will be provided in future discussions.
Already on this simplified example of blockchain technology, it becomes clear that processing all data requires huge capacities. They are provided by a group of users called miners. Miners use their own computers connected to the Internet for mining.
During mining, hundreds of thousands of individual PCs using a single program turn into a full-fledged supercomputer or rather, into a distributed computing network, on which the entire technology is built. Transaction verification, block creation and addition and other operations are performed using distributed computing.
Another important function of the distributed computing network is blockchain storage. It is necessary to prevent changes in the database and check hashes stored in blocks. As mentioned above, if the hashes do not match, the data will be considered invalid. In addition, creating and storing multiple copies of the block chain is useful in other situations.
Let’s have a look at a couple of examples:
In the house of one of the miners, the Internet is turned off, respectively, a copy of the blockchain on his computer instantly loses relevance, since during the period of his absence from the network, thousands of new transactions and hundreds of blocks may appear in the chain. At the same time, when returning online, the system will automatically compare the relevance of the copy stored on this computer and copy the current version of the database so that it can continue to participate in mining. Due to the fact that the network includes thousands of individual computers, disabling a single machine and even a dozen or hundreds of miners will not have any consequences for the entire system. Actually, thanks to this approach, the blockchain used for bitcoin has not stopped functioning since its launch.
A hacker hacks a copy of the blockchain on his PC and changes the amount that goes to his wallet, increasing it several times. When you connect to the network, this data will be checked and compared with several other copies. For them to be considered correct, a similar amount must be indicated in most of all copies of the blockchain stored on the network. Accordingly, changes in just one of them will be considered as a copy corruption, error and will be automatically eliminated; the amount will not be transferred to the attacker’s account.
And the last interesting point or rather, the question related to the work of the blockchain: why do miners constantly keep their computers turned on, if this leads to higher energy bills and wear of the equipment itself? Why do they continue to participate in the system? For providing computing power and processing information, they receive a reward – a cryptocurrency that uses the blockchain they support. Actually, because of this, the word mining usually means getting cryptocurrency using a computer.
It is generated by the system itself, but in order to earn in this way, you need extremely powerful equipment, in particular, a video card of one of the latest models. That is why mining on a regular office PC or laptop is almost meaningless – the cost of electricity will be more than the final reward generated by the system. In most cases, if you want to get a cryptocurrency, it is much easier, faster and more profitable to just buy it, without spending time, resources and funds on building a suitable computer and mining.