What is the Ledger?

What is the Ledger?

Ledger is a key concept in cryptocurrency and is the core of blockchain technology. In this article, we will see what a distributed ledger is, what it consists of, and how it is linked to a blockchain. After this article, you will be able to answer your questions about the ledger.

What is the ledger?

The distributed ledger (Ledger) is the essence of the Blockchain technology that underlies bitcoin and many other cryptocurrencies. To understand why blockchain is the same as the distributed ledger concept, it is necessary to understand what a Blockchain is and how it works.

A block in the blockchain is similar to a page in a ledger. Each block composes certain information. On the Bitcoin Blockchain, this information is translated into financial transactions. Because the Bitcoin blockchain is transparent, you can see real-time information, transactions on the network, and the blocks it contains.

For Example, Block #513845 contains information about 1,167 transactions on the Bitcoin Blockchain. The volume of these transactions was 313.02632617 BTC. You can view this information by visiting the block page #513845 located at:

https://www.blockchain.com/es/btc/block/00000000000000000013bb96e21def9c77daa6c4c071d713b83bd45f83ed35c9

The records you will see on the page are very similar to a ledger with transaction records. Similarly, you will see it on the other block pages of the Bitcoin Blockchain, similar to a physical book.

The innovation that the Distributed Ledger brings us is how it connects the blocks of a Blockchain. In the Bitcoin blockchain, each block has a cryptographic hash. A hash is a string of data. If someone tried to change even the smallest information about a ledger transaction, the ledger would not accept the change. The cryptographic algorithm used by the Bitcoin Blockchain is called SHA-256 and was created by the United States National Security Agency.

How the hash function works

Suppose you have a data set (1, 1, 1, 564, 52, 4, 7, 5, 2, 2). A set can be very different and can be much longer than the set we just showed you. For example, in the Bitcoin Blockchain, data sets contain information about hundreds and sometimes thousands of transactions on the network. When you put the set through a crypto algorithm, you get a much shorter hash than the initial set.

Suppose now that the hash for the proposed set above is c65p. Because a data set can only have one hash, verification of submitted data is easy. If you need to make sure the data you've sent to someone is intact, all you have to do is check the hash. You would send the data next, and the party that received the data runs through the same cryptographic algorithm.

Then it only remains to compare the hashes. If the other party sends you c65p, the data has not been corrupted. Algorithms like SHA-256 return very different hashes for very similar data sets. This means that if (1, 1, 1, 564, 52, 4, 7, 5, 2, 2) returns the hash of c65p.

I would change just one digit, say, 1 into 2, and run the set (2, 1, 1, 564, 52, 4, 7, 5, 2, 2) through the same crypto algorithm.

It will then return a completely different hash, e.g., bbb34P. If you send data to someone and you have c65p as the hash and get bbb34P as the verification code, something has happened to the data you sent. Remember that the Hash function gives the Bitcoin Distributed Ledger an extremely secure profile. On the Bitcoin Blockchain, miners include Bitcoin transactions in distributed ledger blocks to create hashes.

Each next block in the chain contains a hash of the previous block. In practical terms, it contains a code that verifies all transactions on the blockchain from the start.

Note that all the blocks in the chain are connected. If any user tried to change a single digit in one of the Bitcoin blockchain transactions, the hash for the block would be completely different. Remember the previous example.

In terms of ledger analogy, it means that the pages or blocks of the ledger are reliably connected. If someone tried to change even the smallest piece of information about a ledger transaction, the ledger would not accept the change. All the transactions on it are connected through a series of hashes.

Distribution of accounting books in blockchain

The Ledger Blockchain is distributed because there is no central server that contains a copy of it. The exact copies of the general ledger are located on the computers of the network users. A computer that contains a complete copy of a blockchain is called a node. For example, you can see the number of nodes with a complete copy of the Bitcoin distributed ledger while reading the article.

To do this, go to https://bitnodes.earn.com/

Because Blockchain ledgers are distributed, each user of a distributed ledger is an integral part of that network. The more users a Blockchain has, the more secure it is. Even if a copy of the book remained, the network could clone it and restore it in the event of an attack or hack.

Importance of the ledger in cryptocurrencies

The distributed ledger of cryptocurrencies plays an essential role in functioning the same. Firstly, its distributed nature guarantees high levels of security. It is extremely unlikely that a hacker can alter the ledger of a cryptocurrency since, for this, he would have to have fifty-one percent of the entire network under his control. This kind of attack is the well-known fifty-one percent attack, a more famous weakness with a high cost of exploitation.

On the other hand, transparency and privacy are essential in the world of cryptocurrencies. The cryptocurrency ledger is built so that everything is recorded in the same one in an unalterable way. And at the same time, it isn't easy to relate that information to the users of said cryptocurrencies. It is thanks to asymmetric cryptography and the use of hash functions. The use of the two cryptographic techniques guarantees many levels of protection of our identity.

In short, the capabilities and benefits of the ledger have proven its essential role in blockchain technology and cryptocurrencies.