Want to learn Blockchain? Start Your Journey Here!
This article was published as a part of the Data Science Blogathon.
Introduction on Blockchain
In this article, we will learn about blockchain, what is blockchain, how transactions are made, and how bitcoin transactions are made. Nowadays we are hearing about many attacks on computer system security. There is no guaranteed security. This is where blockchain comes into the picture. Blockchain provides you with the highest security. In this article, we will also see what makes blockchain so secure. Nowadays blockchains are very popular.
Blockchain mainly deals with data security. Blockchain technology can be the future of data science. The handling of data can be possible using blockchain. If the quantity of data is represented by big data then we can say blockchain is the quality of that data. Blockchain ensures data integrity. When it comes to data analysis it is difficult to monitor the changes but with the help of the blockchain’s distributed nature, all changes can be monitored. On one side data science is all about utilizing the data whereas blockchain is all about providing security to it.
Let’s get started.
Blockchain is described as the collection of records linked with each other and they are strongly resistant to alteration and these are protected using cryptography. By the name itself, it suggests that blockchain is the chain of blocks that contains information. Once the data is stored inside the block it is very difficult to change it. To complete transactions without having to deal with banks, online wallets, and other third-party applications in an easier way blockchain concepts are used. Now let us see what actually block contain.
A block contains mainly three parts.
3. Hash of the previous block
Data: Based on the type of blockchain, the data that is stored in the block depends. For example, take the example of the bitcoin blockchain, here the data contains the details of the transaction including the details of the sender, receiver, and the number of bitcoins.
Hash: Hash identifies the block and the contents inside the block. Every person has a unique fingerprint. Similarly, a block has a unique hash value. Hash is unique as a fingerprint. No two blocks have the same hash. When a block is created, the hash is created that has a unique value. And hash is a unique value so any changes in the block result in a change in the value of change. Hence, it is secured.
Hash of the previous block: Every block contains the hash value of the present block and the hash value of the previous block. So if there is a change in any one block then the hash value present in that block also changes which is different from the hash value of the previous block present in the next block which makes the entire blockchain invalid.
The use of only hashing techniques does not keep the blockchains safe from tampering. Nowadays computers are faster and are able to calculate hundreds and thousands of hashes per second. So the attacker can tamper with the block and can recalculate the hashes of other blocks in seconds which makes the blockchain valid. To deal with it blockchains use something called proof-of-work.
Proof-of-work is the mechanism in the blockchain that slows down the creation of blocks. Let us take the case of bitcoins. For the bitcoins case, it takes about 10 minutes to calculate the required proof-of-work and to add a new block to the chain. This mechanism makes it harder for the attackers to make an attack with the blocks. Therefore, for a blockchain, the security comes with the combination of hashing and proof-of-work.
When the bank transactions are done, they could fail many times and the reasons may be due to technical issues from the bank side, account hacked by the attacker, daily transfer limit, or transfer charges. To solve these kinds of issues cryptocurrencies came into the picture.
Cryptocurrencies are the form of digital currency. They don’t exist. Ther are virtual currency. The fake currency problem can be avoided by using cryptocurrency. It doesn’t require any central authority and these are protected by strong and complex encryption algorithms which are very hard to tamper with. In the market, there are hundreds and thousands of cryptocurrencies and among them, BITCOIN is in the first position.
Bitcoin is a type of digital currency which is independent of the central bank where records of all the transactions are maintained. Let us understand how bitcoin transactions are made by taking one example.
Imagine there are two persons and each has 5 bitcoins. Now if a person1 sends 2 bitcoins to person2 then finally person1 has 3 bitcoins and person2 has 7 bitcoins. In this way, data is updated after every transaction. When person1 sends 2 bitcoins to person2 then the record is created in the form of a block. This block contains the details of the transaction. Record also has the number of bitcoins each has. If there are multiple persons then multiple records are created after every transaction and all these blocks are linked to each other. So it is called the blockchain. This chain of records is called a ledger and this ledger is shared among all the persons. Here hackers cannot alter the blockchain because each user has a copy of the ledger.
In the bitcoin network, there are multiple users and each user in the network has two keys. The two keys are the public key and the private key. The public key has an address that everyone in the networks knows what it is. And Private key has a unique address that only that particular user knows.
When person1 wants to send 2 bitcoins to person2 then the wallet address of the person1 is hashed with his private key and now it’s encrypted and digitally signed. Now it is becoming the public key of person 2 and now person2 can decrypt it using his private key.
Different cryptocurrencies use different hashing algorithms.
Bitcoin uses the SHA256 algorithm.
Ethereum uses the ETHASH algorithm.
Advantages of Blockchain Technology
1. This blockchain technology is accessible to anyone without any permission.
2. The data present in it is verifiable by zero-knowledge proof.
3. All the data is permanently stored.
4. Data present in it cannot be tampered with by the attacker.
5. No third parties are involved during the entire process.
Disadvantages of Blockchain Technology
1. Here size of the blocks is fixed and hence it cannot be scaled.
2. Blockchain technology is a newly evolved technology and so it cannot be trusted.
3. Lot of energy is needed for the verification of transactions
4. Adding blocks is a time taking process.
5. Some countries have banned blockchain technology.
The creation of blockchain has peaked a lot of people’s interests. This blockchain technology can be used for some applications like storing medical records, creating a digital notary, and even collecting taxes. This blockchain technology is very useful as it provides high standards of security. Overall in this article, we have seen
- Relation between Data Science and Blockchain
- Introduction to blockchain
- Bitcoin cryptocurrency, how bitcoin transactions are made
- Advantages and disadvantages of blockchain technology
The media shown in this article is not owned by Analytics Vidhya and is used at the Author’s discretion.
Leave a Reply Your email address will not be published. Required fields are marked *