/Blockchain

Blockchain is a system of recording information in a way that makes it difficult or impossible to change, hack, or cheat the system. A blockchain is essentially a digital ledger of transactions that is duplicated and distributed across the entire network of computer systems. This repository is created to explore the capabilities of blockchain and related concepts.

Primary LanguagePythonMIT LicenseMIT

Blockchain

This repository is created to explore the capabilities of blockchain and related concepts.

image

1. Immutability

Immutability means something that can’t be changed or altered. This is one of the top blockchain features that help to ensure that the technology will remain as it is – a permanent, unalterable network. But how does it maintain that way? Blockchain technology works slightly different than the typical banking system. Instead of relying on centralized authorities, it ensures the blockchain features through a collection of nodes. Every node on the system has a copy of the digital ledger. To add a transaction every node needs to check its validity. If the majority thinks it’s valid, then it’s added to the ledger. This promotes transparency and makes it corruption-proof. So, without the consent from the majority of nodes, no one can add any transaction blocks to the ledger.

2. Decentralized

The network is decentralized meaning it doesn’t have any governing authority or a single person looking after the framework. Rather a group of nodes maintains the network making it decentralized. This is one of the key features of blockchain technology that works perfectly. Let me make it simpler. Blockchain puts us users in a straightforward position. As the system doesn’t require any governing authority, we can directly access it from the web and store our assets there. You can store anything starting from cryptocurrencies, important documents, contracts or other valuable digital assets. And with the help of blockchain, you’ll have direct control over them using your private key. So, you see the decentralized structure is giving the common people their power and rights back on their assets.

Why it’s So Useful?

Now let’s see how this blockchain feature is truly making changes –

Less Failure: Everything in the blockchain is fully organized, and as it doesn’t depend on human calculations it’s highly fault-tolerant. So, accidental failures of this system are not a usual output. User Control: With decentralization, users now have control over their properties. They don’t have to rely on any third party to maintain their assets. All of them can do it simultaneously by themselves. Less Prone to Breakdown: As decentralized is one of the key features of blockchain technology, it can survive any malicious attack. This is because attacking the system is more expensive for hackers and not an easy solution. So, it’s less likely to breakdown. No Third-Party: Decentralized nature of the technology makes it a system that doesn’t rely on third-party companies; No third-party, no added risk. Zero Scams: As the system runs on algorithms, there is no chance for people to scam you out of anything. No one can utilize blockchain for their personal gains. Transparency: The decentralized nature of technology creates a transparent profile of every participant. Every change on the blockchain is viewable and makes it more concrete. Authentic Nature: This nature of the system makes it a unique kind of system for every kind of person. And hackers will have a hard time cracking it.

3. Enhanced Security

As it gets rid of the need for a central authority, no one can just simply change any characteristics of the network for their benefit. Using encryption ensures another layer of security for the system. But how does it offer so much security compared to already existing techs? Well, it’s extremely secure because it offers a special disguise – Cryptography. Added with decentralization, cryptography lays another layer of protection for users. Cryptography is a rather complex mathematical algorithm that acts as a firewall for attacks. Every information on the blockchain is hashed cryptographically. In simple terms, the information on the network hides the true nature of the data. For this process, any input data gets through a mathematical algorithm that produces a different kind of value, but the length is always fixed. You could think of it as a unique identification for every data. All the blocks in the ledger come with a unique hash of its own and contain the hash of the previous block. So, changing or trying to tamper with the data will mean changing all the hash IDs. And that’s kind of impossible. You’ll have a private key to access the data but will have a public key to make transactions.

Hashing is Irreversible!

Hashing is quite complex, and it’s impossible to alter or reverse it. No one can take a public key and come up with a private key. Also, a single change in the input could lead to a completely different ID, so small changes aren’t a luxury in the system. If someone wants to corrupt the network, he/she would have to alter every data stored on every node in the network. There could be millions and millions of people, where everyone has the same copy of the ledger. Accessing and hacking millions of computers is next to impossible and costly.

4. Distributed Ledgers

Usually, a public ledger will provide every information about a transaction and the participant. It’s all out in the open, nowhere to hide. Although the case for private or federated blockchain is a bit different. But still, in those cases, many people can see what really goes on in the ledger. That’s because the ledger on the network is maintained by all other users on the system. This distributed computational power across the computers to ensure a better outcome. This is the reason it’s considered one of the blockchain essential features. The result will always be a higher efficient ledger system that can take on the traditional ones. That’s why it’s one of the best blockchain features. As it’s too hard to bypass, you won’t have to worry about hackers taking all your digital assets from you.

Why It’s One of the Blockchain Important Features?

No Malicious Changes: Distributed ledger responds really well to any suspicious activity or tamper. As no one can change the ledger and everything updates real fast, tracking what’s happening in the ledger is quite easy with all these nodes. Ownership of Verification: Here, nodes act as verifiers of the ledger. If a user wants to add a new block others would have to verify the transaction and then give the green signal. This provides the user with fair participation. No Extra Favors: No one on the network can get any special favors from the network. Everyone has to go through the usual channels and then add their blocks. It’s not like you have more power so you’ll get more privileges. Managership: To make the blockchain features work, every active node has to maintain the ledger and participate for validation. Quick Response: As I said earlier, removing the intermediates quickens the system response. Any change in the ledger is updated in minutes or even seconds!

5. Consensus

Every blockchain thrives because of the consensus algorithms. The architecture is cleverly designed, and consensus algorithms are at the core of this architecture. Every blockchain has a consensus to help the network make decisions. In simple terms, the consensus is a decision-making process for the group of nodes active on the network. Here, the nodes can come to an agreement quickly and relatively faster. When millions of nodes are validating a transaction, a consensus is absolutely necessary for a system to run smoothly. You could think of it as kind of a voting system, where the majority wins, and the minority has to support it. The consensus is responsible for the network being trustless. Nodes might not trust each other, but they can trust the algorithms that run at the core of it. That’s why every decision on the network is a winning scenario for the blockchain. It’s one of the benefits of blockchain features.

Although this repository is a basic implementation of Blockchain as a concept, it could be very handy to understand how blockchain really works and could be a starting point for exploring blockchain. I've created a scenario for distributed blockchains. The users at different nodes of a network can mine the block. In case at any node the blockchain is not consistent, it is replaced by the longest and consistent blockchain in the network. EAch block can have multiple transactions, which are only added while mining the block.

Disclaimer:

I have used Python 3.9.X and Flask for the development. I am not an expert in blockchain and new to this technology, so the repository may not be following blockchain standards or best practices as far as the code is concerned. Blockchain itself is a vast topic if you are looking to deep dive into it. It would be wise to refer this repo only for learning or POC purposes.

Courtesy and References:

https://101blockchains.com/introduction-to-blockchain-features/

https://www.udemy.com/

https://www.superdatascience.com/