What is a transaction in blockchain and how does it take place?
What is the first thing that comes to your mind when you hear the word blockchain? Undoubtedly, many people refer to digital currencies or cryptocurrencies in their answer. Virtual money or digital currency has become very popular in the world in recent years and during these years we have seen that some digital currencies such as Bitcoin have been able to strongly influence the market of these currencies and play a decisive role. to perform The basic technology in digital currencies is Blockchain, and users operate in this market through transactions in Blockchain. Although Blockchain technology is used in other fields as well, in this article we are going to discuss the concept of Blockchain and how transactions are carried out in Blockchain.
To better understand this article, we suggest the article What is blockchain? read the
What is blockchain technology?
Blockchain is actually a distributed database that can store data digitally. Unlike old databases where data was stored in the form of tables, in Blockchain all data is stored in blocks that are connected in a chain and form the blockchain structure.
In Blockchain, each block has a fixed storage capacity and when this capacity is completed, it is connected to the previous block in the chain. In this situation, the new information that comes after the last added block is collected in a new block and added to the chain after reaching the maximum storage capacity. The blockchain network is shared between the nodes of the computer network and thus each node has a copy of the Blockchain or the transactions made in it.
What is meant by transaction in blockchain?
A transaction is actually a contract, agreement, transfer or exchange of property between two or more parties. This asset can be cash, digital currency or anything else. Therefore, the transaction in the blockchain is the transfer of data and information across the network of computers in the blockchain network. Networked computer networks store transaction data as a copy with a storage space commonly known as a digital ledger.
This process is to form a shared and secure digital office of networks peer to peer (P2P) uses. This digital ledger is a decentralized ledger of transactions without the involvement of a third party, where only users in the network can verify the transactions in it. While the blockchain network can record and store many different types of information, it is commonly used broadly as a digital ledger for transactions.
An example of a transaction in the blockchain
In the context of digital currencies, imagine that person A wants to transfer ten BTC (Bitcoins) to person B. Blockchain transaction usually includes the following information that is stored in each block in the blockchain:
- Transaction information: such as date, time, amount paid, location, etc.
- Data and information about participants in the blockchain transaction or username.
- A block’s specific data or hash, a unique code that distinguishes one block from another.
The network has three main and key elements. These elements include cryptographic keys, P2P network and computer network (nodes) to store and record transactions. Encryption key, an authority Digital identity recognition It is unique and secure, used to manage and authorize transactions. After integration with a P2P network, digital signatures are used by users on the network to reach consensus on transactions.
When a deal or transaction is authorized in the Blockchain, a mathematical verification license verifies it and makes a transaction between two connected parties in the network successful. In addition to financial transactions, blockchains Ability to maintain legal contracts, product inventories, transaction details of other assets They also have vehicles, property, etc.

Transaction steps in blockchain
Before a transaction in the blockchain becomes part of the network, it must go through several steps. One of the important aspects in this technology How to authorize and verify transactions Is. The process of transactions in Blockchain includes the following steps:
1. Create a new transaction
2. Transferring a transaction to a global network of peer-to-peer computers
3. A peer-to-peer network of computers to validate transactions
4. Grouping of verified legal transactions into blocks
5. Linking blocks together to create a long history of all transactions
6. Complete the transaction
The basics of a blockchain transaction
One of the most important principles and features in the topic of examining transactions in the blockchain, Transaction security Is. There are several aspects of this technology and network that can help make every transaction on the blockchain more secure. In the following, we will get to know each of these important and main aspects.
Hash encryption
Hash rate and hash encryption, which mainly includes the SHA256 algorithm, in the network in order to ensure Data and information security is used. This algorithm transmits details and information about each transaction as encrypted (hash encryption) information that is added to the blockchain verification post. Thanks to the use of this algorithm, hacking hash encryption becomes practically impossible and its security is ensured in the best way.
Authentication and authorization
Transactions in the blockchain are authenticated using cryptographic keys. These keys are basically a string of data and information that identify the Blockchain user and access their account in the system. Private keys and public keys are the two main cryptographic keys in blockchain that ensure a successful and secure transaction between two parties. Using these two keys, a user on Blockchain can create a secure digital identity to control and facilitate transactions.

mining
In this technology, mining is the process in which transactions are added to the distributed digital ledger of existing transactions (or blockchain). Although the name mining is tied to Bitcoin, it is also used in other digital currencies that use Blockchain. In mining, a hash is created from a transaction block and can protect the integrity of the entire blockchain without the need for a central system or organization such as a bank or regulatory body.
Proof of Work
The decision to add or create a transaction in the public blockchain is made through consensus, in this process, the majority of users (nodes) in the network must verify the validity of a transaction and agree to do it. To do this, the nodes or computers connected to the network must solve a complex mathematical puzzle and equation, known as the proof-of-work problem, in order to add a block to the chain in the blockchain. The process of solving a mathematical problem is called proof-of-work, and the individuals and nodes that do it are known as miners, who are rewarded for confirming transactions on the network.
Proof of stake (Proof of Stack)
Proof of Stake is a consensus protocol for validating and creating new blocks in the blockchain. This process is done when users have stake in Blockchain. In fact, cryptocurrency owners offer their assets and shares as collateral to have a chance to verify transactions on the network. The proof-of-stake mechanism has high computational power and saves significant resources.

How is the transaction process in blockchain?
Carrying out a transaction in the blockchain is done as follows according to the principles mentioned in it:
Create an address
The first thing to do to connect to the blockchain network is to create an address. Each user’s address consists of two parts General address And Private address Is formed. A private address is an address that must be in the possession of the user and is considered to be their signature. If someone has access to a user’s private address, they can easily do anything with the account, including stealing digital assets.
encryption
A user’s request for a transaction in the blockchain along with its signature (address or private key) is registered and sent on the network, and the authenticity of this request, whether it is a request to transfer digital currency or send a simple text, is verified through the address or public key. All tasks and requests are encoded in the Blockchain and become a series of meaningless letters and numbers that can only be recognized by the network.
Request verification, decryption and reward
Considering that every request is encrypted in the blockchain network, decoding these requests is not an easy task and requires complex calculations. These calculations are done by miners who are rewarded for doing these calculations and for the decryption they do. Of course, this reward system depends on the type of blockchain operation, which is done as Proof of Work (POW) or as Proof of Stake (POS).
Prevent duplicate hashing
If the data of a transaction is the same in the blockchain, Nance is used to prevent the creation of a duplicate hash. A nonce is a random value added to transaction data. After the nonce is added, a new hash is created, which prevents the creation of identical hashes.
Block chain formation
In the network, each block is dependent on its previous block. If someone wants to make a change in the blocks, it will disrupt the connection between the blocks, which the network members will notice, and if more than 51% of the nodes do not approve it, the changes will not be applied.
Efficiency, accuracy and security are the characteristics of transactions in blockchain
The new and revolutionary blockchain technology has made news with its practical applications in various sectors. One of the most common and well-known areas of blockchain use is the digital currency market. Using blockchain to make financial transactions is cost-effective and fast, and it allows investors and property owners to have more control over their assets without the intervention of a person or entity. One of the most important features of a blockchain system is efficiency, accuracy and security.
What is the transaction record in the blockchain and how is it done? The first time in the blog Valx. appeared.