Hash functions, timestamp and asymmetric cryptography, key concepts in blockchain engineering. How does a blockchain work?

 
Cómo funciona una blockchain

To understand how blockchains work, it is necessary to take into account the key concepts: hash functions, timestamps, and asymmetric cryptography.

Hash functions are a type of algorithm that allows you to create an identifying number from a piece of information. The slightest change in that portion will cause the identifying number to also change. This method serves to corroborate the integrity of a data set.

The timestamp is a computer signal that allows us to establish when a certain event occurred. Something of vital importance to know the moment in which a bitcoin transaction occurs, for example.

Asymmetric cryptography is a system that allows cryptocurrencies (or any type of information) to be transferred in encrypted form on the web, by creating two types of keys: public and private. The public ones work like an email address to which anyone can send cryptocurrencies; On the other hand, private ones are only known to the owner of that mailbox, the only one who can send cryptocurrencies from there.

The blockchain structure incorporates elements that allow the processed data to be corroborated, identified and protected.
‍How blockchains work

‍A blockchain is, in short, a system that contains, validates and stamps transactions of a certain cryptocurrency with a timestamp. Each block can hold a number of transactions, plus the hash of the previous block and a nonce. These blocks are validated in a process known as mining (which we will explain in the next chapter) and then added to the chain.

Since the blockchain is a distributed ledger, once the block is mined, all copies are updated, adding the latest block to the chain. Thus, the transactions included in the block are incorporated into the blockchain and are marked with a timestamp. If someone tries to send the same amount of cryptocurrencies twice to two different addresses, only the one that is verified first will be valid, and the others will be invalidated.

In this way, the blockchain generates a single record of all valid transactions on a given network, on which the nodes are in complete agreement. Therefore, a consensus is generated that the entire network shares.

Although blockchains emerged as a specific system to validate value transactions (Bitcoin was the first implementation of blockchain), this model can be used to store and validate any type of information, or in any case in which it is necessary to create records that all nodes in the network can accept as valid.

What is mining

Validation of operations and creation of new tokens in blockchains. The differences between proof-of-work and proof-of-stake networks.

 
Qué es el minado

Mining, broadly speaking, is the process of validating blocks on a blockchain. Those who actively participate in validating blocks, the so-called miners, have an economic incentive to do so: an amount of cryptocurrency value. That payment is the only way to create new tokens on most networks, which in turn solves the issue of taking out new units of each cryptocurrency.

A clarification: this process is closely associated with what is known as proof of work, the method chosen by Bitcoin and most of the cryptocurrencies that came after it. But it is not the only method available. Ethereum, for example, is undergoing a transformation to proof-of-stake validation. If you want to know more about the different types of testing in mining, you can review this article.

Mining fulfills several functions: it processes operations, organizes the blockchain and allows new tokens to be created.
‍Proof of work

‍In proof-of-work systems, miners compete to solve a cryptographic proof. The first to do it gets the reward, broadcasts the solution to the rest of the network, and the new block is added to each node’s copy of the chain.

This is achieved as established by the protocol of each cryptocurrency. In the case of Bitcoin, each block has a number called «nonce». Each miner uses their computing power to throw random numbers, trying to find the block hash number that matches the protocol instructions. In the case of Bitcoin, that number usually starts with a certain number of 0 numbers.

In Bitcoin there is no requirement to participate in mining: anyone can do it as long as they have the necessary equipment. This system is often criticized for the level of energy it consumes, although it proved to be very safe and reliable.

‍Proof of Stake

‍In cases of systems that use proof of stake, energy consumption would be resolved. But not everyone can participate in mining, but only those who demonstrate that they have a certain amount of tokens of the cryptocurrency implemented by the system.

This method is more efficient in the use of energy resources and the cost per transaction, but since it has not yet been tested, it still generates reluctance regarding its security and the fact that it is not as «democratic» as the proof-of-work system.

What is a node

As a distributed system, every blockchain needs participants or nodes. Differences between mining nodes and full nodes, and their role in governance.

 
Qué es un nodo

The name and concept of node refers to the architecture of any blockchain. Instead of consisting of a central server that receives information and returns it to clients (the client-server model), blockchains work with network systems where all participants (or nodes) perform some work for the network. .

The main difference between nodes is whether or not they participate in network mining. The mining nodes run complete versions of the blockchain (they have the client and the entire transaction history downloaded) and also participate in mining, providing computational power to carry out the transactions.

In addition to mining nodes, there are also full nodes that strengthen the networks and participate in their governance.

For their part, full nodes, although they have other functions, do not participate in mining. Although they serve several purposes: they maintain updated copies of the blockchain and can create wallets, so that they have full control over their cryptocurrencies.

The existence of full nodes is also a way to strengthen the network, since the more copies of the blockchain there are, the more robust the network will be. Additionally, nodes play a critical role when it comes to blockchain governance.

Blockchain management and governance

On chain and off chain systems. Differences between governance by its community, or by its developers. The importance of consensus in crypto networks.

 
Gestión y gobernanza de blockchains

Regarding forms of government, there are two large groups: on chain and off chain; a type of governance that can occur within the same blockchain, and another that operates outside of it.

On-chain governance involves complex mechanisms, such as holding a certain token that gives users the ability to make decisions about the future of that blockchain.

A good example of on-chain governance is the MakerDAO protocol, which regulates the DAI stablecoin. There, holders of the Maker token (MKR) can vote on the fate of the technology.

While off-chain governance does not have this type of government devices, decisions about changes in technology remain in the hands of those who carry out the project, such as the development group.

A clear example of off-chain governance is Bitcoin itself. Decisions about what things need to be changed for the technology to evolve (such as the number of transactions to process per second or the size of the blocks) are made by the development team.

Discussions about changes usually occur in off-chain systems in specialized forums, email chains, blogs; mechanisms outside the blockchain.

On chain, decisions are collective. Off chain, they are taken by developers. In both cases consensus is essential.
‍The importance of consensus

‍Despite the chosen management model, what any group must maintain as a guiding criterion to introduce changes and govern a certain blockchain is consensus.

And this is because an arbitrary change in the code can result in a mass exodus of users, or in a fork that ends up depreciating the value of a certain crypto asset.

That’s why consensus, like keeping the largest number of users on the same blockchain, is fundamental in any blockchain governance system.

Scroll al inicio