Do you want to know how ledger records all the transactions in a blockchain? Or how blockchain records all the transactions? If you do, then you have come to the right place. Is Blockchain the technology of the future? It has the potential to change the industrial landscape by offering a decentralized-ledger based system. The transformative aspect of what makes blockchain the talk of the town. But how do all of these ever come to question?
In this article, we will explore how blockchain works and focus specifically on how transactions work, record/store in a blockchain network.
Build your identity as a certified blockchain expert with 101 Blockchains’ Blockchain Certifications designed to provide enhanced career prospects.
Please include attribution to 101blockchains.com with this graphic. <a href='https://101blockchains.com/blockchain-infographics/'> <img src='https://101blockchains.com/wp-content/uploads/2020/07/records-all-the-transactions-in-a-blockchain-1.png' alt='records all the transactions in a blockchain='0' /> </a>
Blockchain: An Unparalleled Growth
Blockchain solutions are expected to go to 15.9 billion USD from just 1.5 billion in 2018, according to Statista. There also have been better approval rates when it comes to business decision-makers adopting blockchain. In fact, with time, there have been more industries that are now focusing on blockchain in 2019. In short, investments are increasing. With more money in the blockchain ecosystem, it is also easy to see improvements when it comes to blockchain technology. There is no doubt that blockchain has the potential to change the future and, in fact become the future of transactions.
Get familiar with the terms related to blockchain with Blockchain Basics Flashcards.
Blockchain: The Future Of Transactions
To learn how blockchain record transactions work, we first need to learn how it works. Blockchain is a chain of blocks that utilizes consensus algorithms to enable peers to make transitions without the need for a central authority.
Block is the term which we need to focus on. This is where digital information is stored and managed.
Each block consists of three parts:
- Transaction information: Blocks always store information regarding the transactions. For example, if one peer transacts with another one, then it will store the time, date, and transaction amount. It can be any information, including eCommerce transactions, message transmissions, and so on!
- Users participating in the transaction: The blocks also store information about the users who have participated in the transaction. For example, if two peers do a transaction, then the peer’s information will be stored. The choice of information about peers depends on how privacy is implemented in the blockchain network. Most of the time, the privacy of the network is managed by using digital signatures, which act as usernames without revealing their true identities.
- Uniquely store transactional information: The block also stores information to make sure that each transaction/information is unique from each other. The transactions are distinguishable in nature.
A “hash” enables the network to identify the transaction. Cryptographic algorithms are used to generate the hash value.
How Blockchain Works
Now that we have a clear understanding of what information blockchain stores, we are now ready to understand to learn how blockchain works.
A transaction takes place when one peer sends information or money to another peer. Once it does, the block is notified about the transaction. It is similar to how you do online transactions. When you buy something online, the platform and the bank are notified about it. They both store the necessary information about the transaction. Also, the blockchain network can see tens and thousands of transactions happening parallelly at any given time.
In the case of the blockchain, the transactions must be verified. This is similar to the verifications done by the eCommerce platform and bank when you make a purchase. However, there is one big difference here. The difference is that there is no centralized entity that takes care of it. To take care of the transactions, consensus method is used.
The transaction information is verified using the method. The participation of the peers is crucial for making the consensus method work. However, all peers don’t need to participate in making the consensus method to work.
In step 3, the transaction is stored in the block. This step only happens if the transaction is verified. So, if the transactions failed verification, then you will not be added to the block. This can be similar to how your transaction goes through once you verify the transaction using a one-time password. In the case of blockchain, the verification is done using consensus algorithms. Once the verification is complete, the transaction is stored in the block.
In the last step, the block now has a unique hash value. The last block’s hash value is then used to generate the unique hash value. This helps create the chain of blocks. The hash value is verified and checked against the other blocks on the chain to ensure if a block is part of the chain.
Also, the hash value is determined by the transactions that are stored in the block. This makes it the unique code that cannot be guessed or replicated through any other computational process or algorithm.
What records all the transactions in a blockchain?
To answer this question, we will introduce a new term known as “ledger.” Ledger is a computer file or a principal book that captures all the recording of transactions that takes place in a company, organization, or network. The concept of the ledger is not new. It has been there from the time when trades started. The first ledgers were found in Mesopotamia city 7000 years back, which is now known as Iraq. Fascinating right?
People kept these handy ledgers close to them so that they can know how the transactions happened. The history of ledgers is another interesting concept. Right now, there are modern ledgers and computers are now capable of recording and managing complex ledgers. Blockchain has also changed how ledgers work. With it, we now have a distributed and decentralized ledger. Also, as there is no central authority, validation is done using consensus algorithms.
What is Blockchain Ledger?
The blockchain ledger is a distributed ledger that stores and manage the transactions. Clearly, it is distributed and decentralized which makes it so interesting compared to traditional ledger systems.
As there is no central authority, the ledger is distributed in nature. In a public blockchain, every computer has a copy of the ledger. They either have the full copy of the ledger or the essential parts to make them eligible to participate in the network. The ledger is constantly changing with new transactions. So, whenever a new transaction takes place, the ledger is updated.
Some of the key features of blockchain ledger are as below:
- Decentralized technology
- Enhanced security
- Faster settlement
Start your blockchain journey Now with the Enterprise Blockchains Fundamentals
Blockchain Transaction Life Cycle
Even though we have covered this aspect in bits in our previous section, it is better to have a clear view of what’s at offer by going through the complete blockchain transaction life cycle.
Generally, a transaction lifecycle has the following six steps.
- A node in the network makes a transaction request. The node either uses a decentralized app or a wallet.
- A broadcast message is sent to the network
- Now, the computers start validating the transaction based on the validation rules(consensus algorithm) that are specific to the said blockchain network.
- The transaction now gets a unique hash value. The block adds the transaction once validated.
- The validated block is now added to the blockchain.
- The blockchain transaction is now completed.
How ledger acts in a private/permissioned network?
There are many types of blockchain networks. One of the types that we are discussing here is the permissioned network. It is a private network where the only selected participants can take part. So, if a company decides to create a permissioned network, they can invite the selected people to it. All the participants have to go through the Know Your Customer(KYC) process.
But, the most important question is weather ledger works similarly in a permissioned network?
Well, the question is partially, yes.
The only difference is the choice of people who can join the network. Another change that is common in a permissioned network is that set of pre-selected computers for the transaction validation process. By using permissioned network, businesses can utilize the speed and efficiency that it has to offer. The permissioned network allows the company to tweak the network settings according to their requirements.
How does the ledger system work in different blockchain networks?
This gave the right opportunity for others and gave rise to many interesting blockchain projects.
Let’s discuss them below and learn how they record transactions in their blockchain network.
Corda is a prime example of taking a different approach to the blockchain network. Unlike traditional blockchain networks, Corda doesn’t want to broadcast the transaction details to everyone out there.
It wants to be efficient in its approach and that’s why only the peers participating in the transaction know about the data. This approach is unique and solves the problem of duplicate data and scalability issues.
In Corda, each transaction is individual and hence there is no concept of block or ledger. There is no need to update the ledger with each change of every single transaction that is happening in the network. The peers can also plug in other essential services which can verify the transactions and make sure that it is free from any fraud.
This way businesses can truly use Corda as the distributed ledger technology. It is fast and secure. Corda is also ideal for creating real-world applications.
Want to learn the basic and advanced concepts of R3 Corda Development? Enroll Now: Beginner’s Guide to Corda Development
Ethereum is a second-generation blockchain technology that introduced the interesting concepts of smart contracts and dApps. The automation of different tasks enables companies further refine their business processes. But, does it change the way how ledger works here? Or the matter of fact, does the transactions work differently?
In the case of Ethereum, there are transaction states.
- Unknown state → In the unknown state, the transaction is not seen or processed.
- Pending → The miners do not pick the transaction as its state is pending. The Mempool stores the transactions until then. Also, the miners select the transaction with the highest gas value.
- In block → The transaction state is now set to “in block.”
- Replaced → Here, the transaction is replaced
To get a better understanding of how blockchain records are stored and executed in Ethereum, check out this detailed post.
Want to develop expertise in the Ethereum Space? Enroll Now: The Complete Ethereum Technology Course
Quorum has a very interesting approach to how transactions occur and stored in the ledger. There are multiple aspects that are beyond the scope of the article. That’s why we recommend you to read the lifecycle of a private transaction in the Quorum blockchain here: Lifecycle of a private transaction.
Caption: Quorum transaction lifecycle, Source: Quorum
It is easy to say that blockchain technology is evolving every single day. There are other projects that I didn’t mention in the post. Hyperledger, for example, is taking its own way to solve the distributed ledger technology problem for enterprises.
I hope that you learned how ledger records all the transactions in a blockchain. If you want to contribute something to the topic, then do comment using the comment section below. We are listening!
*Disclaimer: The article should not be taken as, and is not intended to provide any investment advice. Claims made in this article do not constitute investment advice and should not be taken as such. 101 Blockchains shall not be responsible for any loss sustained by any person who relies on this article. Do your own research!