Updated: Dec 30, 2021
We have Collected top Blockchain Interview and Viva Questions for Everyone. These Question can help everyone including Students who have Blockchain as Course in their Semester. We have tried to cover all the Important topics in Blockchain with brief Explanation. This all Question are from Top Websites and We have given them as References. We appreciates everyone who want to add this blog.
1. What is Blockchain technology?
The blockchain is an incorruptible digital ledger of economic transactions that can be programmed to record not just financial transactions but virtually everything of value.
2. What is Blockchain Wallet and How Does It Work?
A blockchain wallet is a piece of digital software that stores private and public keys, as well as tracks and records all transactions involving those keys on the blockchain. A blockchain wallet, in theory, does not store cryptocurrency; instead, all records belonging to these keys are stored on the blockchain on which the wallet is hosted. Blockchain wallets have public and private keys. A public key and a private key are used in a similar way in blockchain wallets. A public key is similar to an email address in that it can be shared with others. When your wallet is created, a public key is created as well, which you can share with others to obtain funds. The private key is a closely guarded secret. It’s similar to your password in that it shouldn’t be compromised, and you shouldn’t share it.
3. What Is Ethereum (ETH)?
Ethereum is an open-source software platform based on Blockchain technology that enables developers to build and deploy decentralized applications (i.e., applications that are not controlled by a single entity). You may construct a decentralized application in which the participants are the ones who make the decisions.
4. What is the difference between Bitcoin blockchain and Ethereum?
Although bitcoin and ether are both digital currencies, the ethereum blockchain differs significantly from the bitcoin blockchain. Bitcoin was created solely for the purpose of being a digital currency. whereas ethereum blockchain is a broader version of blockchain technology. And it is a distributed ledger technology that organizations are using to create new services, however, ethereum is much more stable than bitcoin.
5. What are Smart Contracts and how do they work?
A smart contract is a computer code-based agreement between two individuals. They are stored on a public ledger and cannot be modified because they run on the blockchain. A smart contract’s transactions are handled by the blockchain, which means they can be submitted automatically without the involvement of a third party. The Smart contracts are secure, transparent, third-party-free, autonomous, and accurate. Let me use an example to demonstrate how smart contracts work. If Alex decides to sell his home to Bob. Then they would pay a slew of fees to third parties such as real estate agents, banks, and attorneys, and others. However, with a smart contract, they can simply write a statement stating that if Bob pays this amount of money, he will be given ownership of the property. Hence, smart contracts can cut down the actual process and give us trustable options for transactions.
6. What Is Cryptocurrency Mining and how Bitcoin mining works?
The word “crypto mining” refers to the process of obtaining cryptocurrencies by the use of computers to solve cryptographic equations. Validating data blocks and applying transaction records to a public record (ledger) is also a part of this method. Bitcoin mining is not just the process of putting new bitcoins into circulation, but it is also an important part of the blockchain ledger’s upkeep and growth. It is carried out with the assistance of highly advanced computers that solve extremely difficult computational math problems.
7. What is a Blockchain Explorer?
A blockchain explorer is a piece of software that draws data from a blockchain using an API and a blockchain node, then uses a database to organize the data and present it to the user in a searchable format.
8. What Is Hashing in Blockchain?
The process of making an input item of any length represents an output item of a fixed length is referred to as hashing in the blockchain. Take, for example, the use of blockchain in cryptocurrencies, where transactions of varying lengths are run through a given hashing algorithm and all produce a fixed-length performance.
9. What are the different types of Blockchain?
The blockchain is classified into four types
10. What are the benefits of Blockchain Technology?
Blockchain technology has the following benefits:
Blockchain technology employs advanced security compared to other networks or record-keeping systems. Prior to being recorded, all transactions must be agreed upon. A transaction is encrypted and connected to the previous transaction after it has been authorized.
Blockchain offers transparency. As one of the major problems in the new industry is transparency. An organization may use blockchain to create a completely decentralized network that eliminates the need for a centralized authority, increasing the system’s transparency.
Blockchain helps in reducing costs. Organizations will save a lot of money by using the blockchain instead of paying third-party vendors.
Blockchain automates time-consuming processes in order to increase performance. With the aid of automation, it also eliminates human errors. As a result, blockchain increases efficiency and speed.
The blockchain allows for immediate traceability. It generates an audit trail that records an asset’s provenance at each stage of its journey which prevents fraud.
11. Name some popular Blockchain Platforms for Blockchain Applications?
The following are the list of widely-used platforms for blockchain-based applications
12. What is the difference between Blockchain and Hyperledger?
Blockchain is a technology that allows us to build decentralized systems. When we break down blockchain, the “block” refers to information stored in a digital format, while “chain” refers to the database where that information is stored.
Hyperledger is a type of blockchain platform. It’s a blockchain-based open-source network. These blockchains each have their own storage routines and consensus, as well as smart contracts, identity, and access management.
Since hyperledger is a product of the blockchain platform, they have a few in common. However, due to hyperledger’s unique features, both are different.
Mostly, blockchain is classified into public and private types. And Hyperledger is an example of private blockchain.
13. What are some of the popular Cryptocurrencies?
The most popular Cryptocurrencies are:
14. What is a ledger? What is the difference between a distributed ledger and a traditional ledger?
A ledger is a constantly growing file. It maintains a permanent record of all transactions between two parties on the blockchain network.
A distributed ledger is a database of digital data that is replicated, exchanged, and synchronized across multiple sites in a network.
Distributed ledgers, unlike traditional ledgers (think banks, governments, and accountants), provide a system of synchronized databases that have an auditable background of information that is accessible to everyone inside the network.
15. What is a 51% Attack?
A miner or a group of miners attempting to control more than 50% of a network’s hashing capacity, processing power, or hash rate is known as a 51 percent attack on a blockchain network. The attacker may prevent new transactions from taking place or being verified in this attack. They can also reverse transactions that have already been verified while in charge of the network, resulting in a double-spending problem.
16. Compare Blockchain with relational database
CriteriaBlockchainRDBMSUnit of dataBlockTableSingle point of failureDoes not existExistsCentralized controlNoYesEditing/deleting dataNot possiblePossible
17. What do you mean by blocks in Blockchain technology?
In the Blockchain, a block is simply a set of records. The term “blockchain” refers to the process of joining these lists together. For example, if a company has 100 ledger books, the total is known as Blockchain, and each ledger is referred to as a block.
18. How does a block is recognized in the Blockchain approach?
Any block in this online ledger consists primarily of a hash pointer that serves as a connection to the previous block, transaction data, and a time stamp.
19. Are there any network-specific conditions for using Blockchain technology in an organization?
No, there isn’t any such restriction on using it. However, under the worried protocols, the network must be a peer-to-peer network. It effectively validates the new block and assists businesses in keeping up with the pace in this area without relying on third-party applications.
20. Is it possible to modify the data once it is written in a block?
No, it is not possible to do that. If any customization is needed, the company simply needs to delete the details from all other blocks as well. Data must be treated with extreme caution when using this system for no other reason than this.
21. What type of records can be kept in Blockchain? Is there any restriction on the same?
In the Blockchain method, there are no limitations on the number of records that can be held. It is important to remember that record keeping is not limited to these applications.
The following are examples of the types of information that can be held on them:
Health transaction records
Managing your identity
Production of transactions
Organizational events and management tasks
Documentation is required.
22. How Does Blockchain Create Blocks?
When the block size is reached, the blockchain creates blocks automatically. Since the block is a file, the transactions are saved until the file is complete. They are linked in such a way that the most recent block is connected to the previous one. A hash value is created using a mathematical function to identify a block. It also shows any modifications made to a block.
23. Can Anyone Remove Blocks from A Blockchain?
The manner in which blocks are removed from a blockchain is entirely dependent on how they are treated. Manually removing a block is not possible. If it is destroyed, however, the blockchain may attempt to restore the database using other peers.
They can be removed after they’ve been checked to reduce the blockchain’s size since they don’t need someone to perform regular operations. It can be re-downloaded if necessary. This process is called pruning.
24. What is encryption? What is its role in Blockchain?
Encryption is a technique that is used to keep the data secure. The data is encoded to some level before being sent out of a network by the sender in this process. Only the receiver will be able to decode it. This approach is useful in Blockchain because it simply adds to the overall protection and validity of blocks, making them more stable.
25. What exactly do you know about the security of a block?
Any users on a network cannot customize a block. As a result, it offers a high degree of security. Furthermore, every block is protected by cryptography, which is yet another vote in this case. As a result, there is no need to be concerned about the protection of data in a block.
26. Why is Blockchain a trusted approach?
For a variety of purposes, blockchain can be trusted. Because of its open-source existence, the first thing that comes to mind is its compatibility with other business applications. The second factor is its safety. Since it was designed to be used for online transactions, the developers paid particular attention to keeping up with the times in terms of protection. Blockchain will help despite the type of company one owns.
27. What is Secret Sharing? Does it have any benefit in Blockchain technology?
It is completely obvious that security is extremely important in digital transactions. In Blockchain technology, secret sharing is a method of dividing secret or personal information into smaller units and sending them to network users. The original knowledge can only be merged with others if a person who has been assigned a share of the secret decides to do so. In Blockchain technology, there are a number of security benefits it can provide.
28. What are Blockchain Durability and robustness?
Bitcoin was founded in the year 2008. Since then, there has been no major damage to the Bitcoin network. For nearly 30 years, the internet has proved to be a reliable resource. It’s a track record that bodes well for the future development of blockchain technology.
In the same way, as the internet has built-in robustness, blockchain technology does as well. The blockchain can’t be managed by any single individual since it stores blocks of information that are similar across its network. There should be no single failure point in the blockchain.
29. How does Bitcoin use Blockchain?
A transaction is a value transfer that is recorded in the blockchain between Bitcoin wallets. Bitcoin wallets store a private key, also known as a seed, which is used to sign transactions and provide mathematical proof that they came from the wallet’s owner.
A blockchain has a unique identifier for each block. The hash value is used to create a unique identifier. As a result, no two block identifiers would be the same. In Blockchain, blocks can be identified by the block header hash and the block height.
35. How is a blockchain ledger different from an ordinary ledger?
The key distinction between blockchain ledger and ordinary ledger is that Blockchain is a distributed database that can be conveniently decentralized. This method has a much lower risk of error than a traditional ledger. An ordinary ledger is one that is created by hand or by human effort, while the Blockchain automates all of its processes. All you have to do now is set it up properly and according to the instructions.
36. What is Double Spending? Is it possible to double spend in a Blockchain system?
It occurs when a single digital token is used several times since the token is typically made up of a digital file that can be easily cloned. It simply causes inflation, and businesses are forced to take a significant loss. One of the main goals of Blockchain technology is to eradicate this method as much as possible.
Blockchain avoids double-spending by requiring several parties to validate a transaction before it is written to the ledger. It’s no exaggeration to claim that bitcoin’s entire structure of Blockchain, mining, proof of work, complexity, and so on exists to create this history of transactions that is computationally impractical to change.
37. Explain the significance of blind signature and how it is useful?
A blind signature is a form of digital signature in which the contents of a message are hidden (blinded) before they’re signed. As with a standard digital signature, the resulting blind signature can be publicly validated against the original, unblinded message.
Blind signatures are often used in privacy-related protocols where the signer and message author are not the same individual. Cryptographic voting systems and digital cash schemes are two examples.
38. Can you define what is an off-chain transaction?
A transaction that takes place outside of the blockchain is known as an off-chain transaction. An on-chain transaction – often referred to as simply “a transaction” – modifies the blockchain and relies on the blockchain to establish its legitimacy, while off-chain transaction records and validates the transaction using other methods.
39. when it comes to securing the transactions records, How will you handle risk management when it comes to securing the transactions records?
Risk management is essentially a method of identifying all risks and vulnerabilities to an organization’s financial records. The best thing to do with this strategy is to take the appropriate countermeasures as soon as possible.
Another option is to keep a contingency plan in mind. More methods, such as purchasing new risk management tools, may simply be considered based on the importance of knowledge. Data is most at risk from black-hat hackers.
40. What are the threats to the information you are familiar with?
In the current situation, there are numerous risks to knowledge. Many hackers have become involved and are introducing new techniques to hack information and servers that hold financial information as a result of the rise in online transactions.
Software attacks, identity theft, data extortion, and sabotage are all major threats. Trojan horses, worms, and other malicious software are also present.
41. What are the key principles in Blockchain that are helpful in eliminating the security threats that need to be followed?
To eliminate the security threats, The key Principles that are needed to follow are as follows. All these principles are fundamental and simple to apply. They are helpful in making transaction documents more valuable.
Securing testing and similar approaches
Digital workforce training
42. Can you name some of the popular consensus algorithms?
The most popular consensus algorithms are:
PBFT (Practical Byzantine Fault Tolerance)
43. What Is the Difference Between Proof-Of-Stake (Pos) And Proof-Of-Work (Pow)?
The two most popular consensus algorithms, PoW, and PoS can be differed by their operation. PoW consumes a lot of resources, while PoS does not. Other significant differences include the need for a lot of computation power in PoW versus none or very little computation power in PoS. When compared to PoW, PoS is both more cost-effective and has a quicker completion time.
44. Name the steps that are involved in the Blockchain project implementation?
There is a total of six steps involved in the blockchain project implementation process and they are:
Identifying the requirements
Consideration of screen ideas
Blockchain project production
Analysis of the Security Implementation’s Feasibility
Managing and overseeing the project
45. What is a Public Key?
The cryptographic algorithm that enables peers in a blockchain to obtain funds in their wallet uses a public key. A pair of keys is created when a public key is connected to a private key. The private-public key pair is used to ensure that the blockchain’s security is maintained. A public key is a string of alphanumeric characters that is unique to a specific node or address.
46. What is a Private Key?
A private key is an alphanumeric term that is used to encrypt and decrypt data associated with a public key. In blockchain security, It is also a component of the cryptographic algorithms. The key has been allocated to the key generator and can only be used by him. If he fails to do so, someone can gain access to the wallet’s information or data, as well as the address for which the private key is stored.
47. What Are the Drawbacks of Blockchain?
Some disadvantages of Blockchains are listed below.
Some Blockchain Solutions Use So Much Energy Because Blockchain Isn’t a Distributed Computing System
It’s difficult to incorporate and manage complex technologies.
There are also problems with scalability.
Data is unchangeable.
It can be inefficient at times because network speed and transaction costs fluctuate.
Human error has not yet been eradicated.
Not entirely secure.
That will be all in our list of intermediate Blockchain developer interview questions. Let’s move to the next section of advanced questions on Blockchain technology.
Advanced Blockchain Interview Questions
48. How Can You Stop Double Spending?
With the support of the consensus algorithm, the blockchain prevents double-spending. The consensus algorithm verifies the transaction’s authenticity before recording it in the block. As a result, it is checked by several nodes, allowing for double-spending.
However, since more than 50% of the network is owned by one entity, a 51% network attack will make any blockchain vulnerable to double-spending.
49. What is Transparent and incorruptible in blockchain?
Every ten minutes, the blockchain network checks in with itself to ensure that it is in a state of consensus. The network, which functions as a self-auditing ecosystem of digital value, reconciles any transaction that occurs in ten-minute intervals. A “block” refers to a collection of these transactions. As a result, two critical properties emerge from this they are:
Transparency data is embedded in the network as a whole, and it is available by definition. It can’t be tampered with because changing every single unit of data on the blockchain will require a massive amount of computational power to circumvent the entire network.
50. What Is Consensus Algorithm?
The method of gaining consensus on a change of data over the system or any distributed network is known as a consensus algorithm. They are widely used in blockchains because they enable the network of unknown nodes to reach consensus on the data that is being stored or shared. Proof-of-Stake (PoS) and Proof-of-Work(PoW) are the most popular consensus algorithms.
51. What Do You Think About the Future of Blockchain?
Blockchain has a bright future. It is currently in its development phase, with both technical and adoption advancements. Its applications in almost every industry speak volumes about its future. We will see a big effect on the blockchain, both industrially and in day-to-day life, as more and more investors become interested in blockchain technology. other technologies, including AI, big data, etc., can also be used in conjunction to make it more effective and practical.
52. What are the Merkle trees?
The Merkle tree is a fundamental component of blockchain technology. It’s a mathematical data structure made up of hashes of various data blocks that acts as a description of all the transactions in a block. It also enables fast and reliable content verification across a broad dataset. It also aids in the verification of data accuracy and content. Merkle is used for both Bitcoin and Ethereum. Merkle Tree is also known as Hash Tree.
53. What do you mean by Coinbase transaction?
In a block, the first transaction is a Coinbase transaction. A miner will build this unique kind of bitcoin transaction. It is used by miners to receive the block reward for their efforts, as well as any other transaction fees.
Some More HOTS Question
1. Discuss the transparency offered by blockchain in the context of intermediaries.
The blockchain is a specific implementation of a distributed ledger that inherits transparency by design. With centralized registers, we typically have to go through one or more intermediaries to ensure the transparency of a transaction and build a consensus on the current owner of an asset. However, the distributed ledger system stores all information on a distributed network that is accessible by anyone in the network.
You wouldn’t have to go to banks to transfer money or involve Uber to hail a ride service. Similarly, you don't need to involve brokers in your real-estate businesses because blockchain is a trust protocol and it'll ensure the transparency necessary to verify the ownership of the asset by the seller.
As an example, suppose a company is selling its digital tokens on the Ethereum blockchain. Etherscan is a tool that enables you to explore and search the Ethereum blockchain for transactions, addresses, tokens, prices, and other activities taking place on Ethereum.
2. What is Encryption?
In a historical context, encryption is the act of codifying a message before sending it to the receiver. This ensures that third parties may never get their hands on our private messages.
You might recall the notorious Enigma Machine, from World War II, largely used by the rivals of Democratic States to encrypt sensitive messages. And you may have seen the Imitation Game-- which starred Benedict Cumberbatch as Alan Turing-- who helped British in decrypting the Enigma code. In simple terms, encryption means to systematically convertyour message into code before sending it to the receiver.
3. What is asymmetric key encryption and how it is different from the symmetric key encryption?
To understand asymmetric key encryption, let's first take a look at what symmetric key encryption is.
Symmetric Key Encryption
With symmetric key encryption, the big idea is that you use the same key for encrypting and decrypting your code. Consider the following example where I've written an encrypted message:
Cojrgclo zloo suhscuh brx wr gucfn wkh lqwhuylhz.
I have encrypted it by shifting the original alphabet three times in the forward direction (using ‘c’ for ‘a’ and ‘z’ for ‘w’). In this case, 3 is my encryption key. Therefore, this message can be decrypted by using the same key (i.e. 3), but in the backward direction. Do that and you will get my original message:
AlgoDaily will prepare you to crack the interview.
This is the symmetric key encryption where a single key is being used for encryption and decryption. However, nowadays, cracking symmetric key encryption is rather easy. Therefore, blockchain incorporates public key cryptography via asymmetric key encryption.
Asymmetric Key Encryption
Asymmetric key encryption uses a pair of two keys: a public and a private key. A public key is available for everyone, whereas the private key is known to the owner only. This means that everyone involved in the network holds a pair of public and private keys. Their public keys will be available for everyone, but their private keys will be known to them only.
Suppose that participant A from the United States wants to do a transaction on a blockchain network with a participant Zwho is in Asia. A will send the transaction data to Z, by first encrypting it with its own private key and then encrypting it again with the public key of the Z. Following that, Z can decrypt it using their own private key and then decrypt it again using the public key of the A. This double encryption and decryption will ensure that only Z can read the data and only Acould have sent this data.
4. What is Hashing?
Hashing is the process of taking an input of arbitrary length and converting it into a hash (a modified, outputted value) of a unique and fixed length. Hash functions are used to generate the encrypted output. This process plays a vital role in maintaining the integrity of transactions and confidentiality of data in the blockchain environment.
A hashing algorithm is selected based on a certain number of features. The most important one is that a hashing function must either be collision-free, or allow for an extremely low probability of collision. Theoretically, it is rather impossible for a hashing algorithm to be absolutely collision-free. However, practically speaking, this is generally achieved by using a very large number of bits in the hash value. This is done in order to make sure that no one can derive the secret items from the hash value, and also to make sure that one hash value uniquely reprints a single data set. SHA-3, SHA-256, and Keccak-256are some of the hashing algorithms used for this purpose.
The probability of generating a single hash value for two different transactions for a 256-bit code would be 2^256 (which is an extremely low chance).
5. How is the integrity of a transaction ensured within the blockchain environment?
To ensure the integrity of a transaction in the blockchain environment, first-- the participants must be correctly identified in the distributed environment. This is done by getting the right identifying addresses of the participants. Second, it must be verified that the sender is authorized to proceed with the transaction. Finally, we need to check that the content of the transaction has not been manipulated or distorted.
Let’s see how a clever combination of public-key cryptography and hashing is used to ensure the integrity of a transaction.
Public-private Cryptography and Hashing in Action
Using a public key/private key pair, addresses are generated. A random number of 256 bits is generated as a private key, secured by a passphrase. This private key is typically run through an elliptic-curve cryptography (ECC) algorithm to generate a public key. This is what we refer to as the public-private key pair. Following that, the hashing function is finally applied to the public key in order to obtain the address.
Now that we have the address, a transaction can be initiated. The transaction data is hashed and encrypted. This is our digital signature. The receiver gets both the original data and a digitally signed, secured hash. The receiver can then decrypt and get the hash of original data to compare it with the received hash ensuring the integrity of the document. To recap:
Hash of the data fields in the transactions is identified.
After that, the hash is encrypted by the private key of the participant who initiated the transaction. Essentially, this will be the digital signature authorizing the transaction.
This hash will then be verified by others on the distributed network. A complex process is followed where the sender’s public key is used to recompute the hash of transaction in order to compare it with the hash received through digital signature. A match means the transaction is verified. Other verifications, including but not limited to the verification of account balance, timestamp and nonce are also done for a complete transaction.
5. What is a Genesis Block?
Since we know that in a blockchain-based protocol, blocks are chained together. Each block contains the transaction details and the hash of the previous block. A genesis block is the very first block of a blockchain-based protocol. Therefore, it doesn’t contain the hash of the previous block and every blockchain has its own genesis block.
6. What are the essentials of a Blockchain Protocol?
All blockchain protocols rely on digital, decentralized, and distributed ledger models where the trust comes from the network itself. The designing principles of a blockchain include:
Value as an incentive
Blockchain incorporates all of the above-mentioned principles by design. You wouldn’t need to emphasize improving the privacy or security of the blockchain, as it would have these properties innately. The trust protocol depends on the mass collaboration of people. This collaboration comes from the individual interest derived by the incentives that blockchain offers to the miners.
7. Limitations of Blockchain
Although blockchain is a revolutionary technology, it's critical that it be understood and employed carefully. The following are some of the limitations of blockchain.
It is a very technically involved and potentially confusing concept. Even developing a good grip on the basics of blockchain can be difficult. Therefore, a high level of expertise is required to correctly understand what's occuring during a transaction.
Even the slightest error while structuring the smart contract may lead to catastrophic outcomes.
It requires a huge network of users to work effectively. Furthermore, the strength of the blockchain network depends on the strengths of its nodes, incentivized by the network itself. The networks that don’t provide high incentives are not as strong as the bitcoin network.
Sometimes, immutability of transactions can be a problem.
The scalability of the network is yet another issue in the blockchain. A single transaction involving bitcoin takes around at least 10 minutes.
How Are Blocks Chained Together?
A hash value assigned to a block is used to chain them together. If the hash value is changed, this means someone is trying to spoof the data stored in the hash. The link between blocks is done by storing the hash value of the previous block. For example, block 3 will store the hash value of block 2, and so on.
Does Blockchain Let Anyone Modify the Data Once It Gets Stored? If Not, Why?
The data stored on the blockchain is protected with proper encryption using a digital signature. This makes the data written in a block as a one-time process only. It cannot be altered by any means.
What Type of Records You Can Keep in A Blockchain?
Blockchain acts as a data structure, which means that it can be used to store any form of data. Industries can make proper use of blockchain record types as they can completely take advantage of what it has to offer. The most common types of records/data that can be kept in blockchain are as follows.
How Is Blockchain Distributed Database Different from Traditional Databases?
Traditional databases work in the form of a client-server relationship. The client can modify data and uses a centralized server to store all the information. Authentication is required to gain access to the data, which makes the database administrator a powerful entity in the whole setup.
The blockchain database is completely decentralized and consists of several nodes. The nodes take part in the consensus when new data is added. It provides a complete decentralized solution. Blockchain database offers better transparency and integrity. One more difference between these two types of databases is how they read and write data. The traditional database uses CRUD, whereas blockchain uses sequential data writing.
How Does A Block Maintain the Security?
The security of the blocks is kept by connecting each block to the previous one using hash identifiers. This means that the block data cannot be changed or altered as the hash value will change. Moreover, each data stored in a block is also protected using cryptography.
The data can be unlocked by the network participant who created it in the first place. A private key is required to access the data. The transactions stored in a block are digitally signed and, hence, cannot be altered, giving the block the required integrity and transparency when needed.
What Is Double Spending?
Double spending is the process of spending the same digital currency twice without network security, noticing it. Double spending is one of the biggest problems in the market, and the financial institution takes extra caution to ensure that they prevent double-spending at any cost. It is mainly done by duping the network to think that the original amount is never spent, making it available to be used for other transactions.
How Can You Stop Double Spending?
Double spending is prevented by blockchain with the help of the consensus algorithm. The consensus algorithm ensures that the transaction is genuine and records it in the block. It is thus verified by multiple nodes making double-spending possible.
However, 51% of network attack can make any blockchain vulnerable to double spending as more than 50% of the network is controlled by one entity.
What Is Consensus Algorithm?
The consensus algorithm is the method of gaining consensus on a change of data over the system or distributed network. Consensus algorithms are heavily used in blockchains as they enable the network of unknown nodes to reach consensus on the data that is being stored or shared through the blockchain. Some of the most popular consensus algorithms include Proof-of-Stake (PoS) and Proof-of-Work(PoW).
What Are the Types of Consensus Algorithms?
There are many types of consensus algorithms or techniques out there. The most popular consensus algorithm includes
Delegated Proof-of-Stake (DPoS)
Proof-of-Elapsed Time (PoET)
Byzantine Fault Tolerance
How Does Proof-Of-Work (Pow) Consensus Algorithm Work?
Proof-of-Work (PoW) works by asking nodes to provide proof of their work by providing the necessary computation power to solve tough mathematical puzzles. The transactions are stored in blocks where block difficulty determines the difficulty of mining for miners. The miners are the special nodes that take part in providing the computational power to the blockchain. The process is known as mining.
How Does Proof-Of-Stake (Pos) Consensus Algorithm Work?
Proof-of-stake works through token staking. Rather than solving tough mathematical computational puzzles, tokens or coins are staked on nodes. These special nodes take part in the consensus process by staking from a user. The nodes always have a chance to be chosen to validate a block of the transaction. They win a reward once they validate transactions successfully.
What Is the Difference Between Proof-Of-Stake (Pos) And Proof-Of-Work (Pow)?
The difference between the two most popular consensus algorithm, PoW, and PoS, is how they operate. PoW is energy-hungry, whereas PoS isn’t. Other key differences include the need for huge computation power in PoW compared to no or less computation power in PoS. PoS is also cost-effective and offers a faster completion time when compared to PoW.
Blockchain Interview Questions: dApps, Smart Contracts, Central Bank Digital Currencies, Decentralized Finance
What Is dApp?
dApp also stands for “decentralized application” that runs on a blockchain. Smart contracts are used to automate different functionality of the dApp. As it is an application, more than one peer can participate and is not controlled by a single entity. dApps generally follow a protocol or algorithm and also require an incentive attached to its functionality. Lastly, it is completely open-source.
How Is dApp Different from A Normal App?
dApps run on a decentralized network or system, whereas apps, in general, are not designed to work in a decentralized ecosystem. dApps are the next generation apps that take advantage of blockchain and runs on it. Popular blockchain solutions that support dApps include NEO and Ethereum.
How Are dApp Different from A Smart Contract?
dApps are the decentralized app that fulfills a particular action or feature on the blockchain. It is maintained by an organization so that they can effectively automate some or complete processes. On the other hand, smart contracts are made to act as two peers under pre-defined rules using code. Unlike smart contracts, dApps can be accessed by multiple peers at any given time.
What Is Solidity?
What Are the Main Use Cases of Solidity?
The main use case of Solidity is to build smart contracts and dApps on the Ethereum blockchain. It can be used to create an open-source version of smart contracts. The smart contracts created using Solidity can be used to store data, take a particular action when a condition is met, or merely stop a particular action. Smart contracts need to be developed by humans before it is deployed on the blockchain.
Blockchain Interview Questions: Generic Questions
Can You Hack a Blockchain Network?
The blockchain is fairly secure for the most part. However, it is not completely secure. There are many different types of hacks that can be carried out by hackers. For example, Sybil attack, Routing attack, Direct Denial of Service, and so on. 51% attack is also a prominent attack that hackers can use to steal information or coins. Other vulnerabilities include how systems or platforms are implemented, which leaves it vulnerable. Decentralized Autonomous Organization (DAO) are vulnerable to attacks.
What Is Metamask?
Metamask is a web app that lets you connect with Ethereum dApps directly from your browser. This means that you don’t need to have a full Ethereum node to access dApps and its functionalities.
What Is the Lightning Network?
The lightning network is an off-chain and scalable solution to improve the working of bitcoin. It will bring instant transactions at low or no cost associated with it. Moreover, it will make bitcoin more scalable by taking the majority of the hard work off-chain. The lightning network is in active development and is already being used by many vendors.
What Do You Think About the Future of Blockchain?
The future of blockchain is bright. It is currently in its growth phase, where it is growing both technologically and in adoption. Its use-cases in almost all the different sectors speak volumes about its future. With more and more investors interested in blockchain technology, we will see a huge impact on the blockchain, both industrially and in day-to-day life. It will also be used in conjunction with other technologies, including AI, big data, etc., to make it more effective and practical.
What Is Atomic Swap?
Atomic swap enables faster transfers thanks to the use of smart contracts. It is a revolutionary technology that allows peers to exchange one cryptocurrency to another without any intermediary exchange. It is done off-chain and between two different blockchains.
Blockchain Interview Questions - Beginner Level
1. Differentiate between Blockchain and Hyperledger.
Blockchain is a decentralized technology of immutable records called blocks, which are secured using cryptography. Hyperledger is a platform or an organization that allows people to build private Blockchain.
Using Blockchain you can build public and private Blockchain whereas with Hyperledger you can only build private Blockchains.
Blockchain is divided into public, private, and consortium Blockchains and Hyperledger is a private Blockchain technology with access to Blockchain data and is limited to predefined users, configurations, and programming.
Blockchain can be used in multiple fields such as business, government, healthcare, etc. while Hyperledger is primarily used for enterprise-based solutions. Wherever we talk about public Blockchain, it refers to the usage of Blockchain on the internet, and Hyperledger-based Blockchain solutions are solutions meant for usage on the intranet, within an organization.
2. How do you explain Blockchain technology to someone who doesn't know it?
Blockchain technology is a distributed ledger, which stores transaction details in the form of immutable records or non-modifiable records (called blocks) which are secured using cryptography.
Let’s consider the example of a school where Blockchain is similar to a digital report card of a student. Say, each block contains a student record that has a label (stating the date and time) of when the record was entered. Neither the teacher nor the student will be able to modify the details of that block or the record of report cards. Also, the teacher owns a private key that allows him/her to make new records and the student owns a public key that allows him to view and access the report card at any time. So basically, the teacher owns the right to update the record while the student only has the right to view the record. This method makes the data secure.
3. What is Merkel Tree?
Merkel Tree is a data structure that is used for verifying a block. It is in the form of a binary tree containing cryptographic hashes of each block. A Merkle tree is structured similarly to a binary tree where each leaf node is a hash of a block of transactional data and each non-leaf node is a hash of its leaf node. The Merkel root or hash root is the final hash root of all the transaction hashes. It encompasses all the transactions that are underlying all the non-leaf nodes.
4. What do you mean by blocks in Blockchain technology?
Blockchain is a distributed database of immutable records called blocks, which are secured using cryptography. Refer to the video to see the various attributes of a block.
There are a previous hash, transaction details, nonce, and target hash value. A block is like a record of the transaction. Each time a block is verified, it gets recorded in chronological order in the main Blockchain. Once the data is recorded, it cannot be modified.
5. How is Blockchain distributed ledger different from a traditional ledger?
A Blockchain distributed ledger is highly transparent as compared to a traditional ledger.
Blockchain distributed ledgers are irreversible. Information registered on a distributed ledger cannot be modified whereas on a traditional ledger it is reversible.
A distributed ledger is more secure. It uses cryptography and every transaction is hashed and recorded whereas in traditional ledger security can be compromised.
In a distributed ledger, there is no central authority. It is a distributed system and the participants hold the authority to maintain the sanity of the network and are responsible for validating the transactions. Traditional ledgers are based on the concept of centralized control, which controls all transactions.
In a distributed ledger, identities are unknown and hidden whereas in traditional ledger identities of all participants have to be known before the transactions happen.
In a distributed ledger, there is no single point of failure as the data is distributed and information is shared across multiple nodes. If one node fails, the other nodes carry the same copy of the information. In comparison, traditional ledgers have a single point of failure. If a single system crashes, the entire network comes to a standstill.
In a distributed ledger, data modification or change cannot be done but for a traditional ledger, it is possible.
In a distributed ledger, validation is done by the participants in the network while in a traditional ledger, validation is done by a centralized authority.
The copy of the ledger is shared amongst participants in a distributed ledger while in a traditional ledger, a single copy is maintained in a centralized location. It is not shared amongst the participants.
6. How can you identify a block?
Every block consists of four fields -
The hash value of the previous block (thereby getting linked in a blockchain)
It contains details of several transaction data
It has a value called the nonce. The nonce is a random value which is used to vary the value of the hash in order to generate hash value less than the target
Hash of the block itself. It is the digital signature of the block and an alphanumeric value used to identify a block
The hash address is the unique identification of the block. It is a hex value of 64 characters that have both letters and digits. It is obtained by using the SHA - 256 algorithms.
Refer to the video to see how a block is structured. The hash of the previous block, transaction data, and the nonce consolidate the header of the block. They are together passed through a hashing function and then the hash value is generated.
7. What is cryptography? What is its role in Blockchain?
Blockchain uses cryptography to secure users’ identities and ensure transactions are done safely with a hash function.
Cryptography uses public and private keys in order to encrypt and decrypt data. In the Blockchain network, a public key can be shared with all the Bitcoin users but a private key (just like a password) is kept secret with the users.
Blockchain uses SHA - 256 which is secure and provides a unique hash output for every input. The basic feature of this algorithm is whatever input you pass, it will give you a standard alphanumeric output of 64 characters. It is a one-way function from which you can derive an encrypted value from the input, but not vice-versa.
8. What are the different types of Blockchain?
There are three different types of Blockchain - Public, Private, and Consortium Blockchain.
Private Blockchain ledgers are visible to users on the internet but only specific users in the organization can verify and add transactions. It’s a permissioned blockchain, although the information is available publicly, the controllers of the information are within the organization and are predetermined. Example, Blockstack.
In Consortium Blockchain, the consensus process is controlled by only specific nodes. However, ledgers are visible to all participants in the consortium Blockchain. Example, Ripple.
9. What happens when you try to deploy a file with multiple contracts?
In Blockchain, deploying a file with multiple contracts is not possible. The compiler only deploys the last contract from the uploaded file and the remaining contracts are neglected.
10. What is a Genesis Block?
The genesis block is the first block in the Blockchain which is also known as block 0
In Blockchain, it is the only block that doesn’t refer to its previous block.
It defines the parameters of the Blockchain such as,
level of difficulty,
consensus mechanism etc. to mine blocks
Blockchain Interview Questions - Intermediate Level
11. How is the hash (Block signature) generated?
The process of generating a block signature involves:
Passing transaction details through a one-way hash function i.e., SHA-256.
Running the output value through a signature algorithm (like ECDSA) with the user’s private key.
Following these steps, the encrypted hash, along with other information (such as the hashing algorithm), is called the digital signature.
12. List down some of the extensively used cryptographic algorithms.
Here are a few popular algorithms:
SHA - 256
13. What is a smart contract and list some of its applications?
Smart contracts are self-executing contracts which contain the terms and conditions of an agreement between the peers
Some of the applications are:
Transportations: Shipment of goods can be easily tracked using smart contracts
Protecting copyrighted content: Smart contracts can protect ownership rights such as music or books
Insurance: Smart contracts can identify false claims and prevent forgeries
Employment contract: Smart contracts can be helpful to facilitate wage payments
14. What is the Ethereum network and how many Ethereum networks are you familiar with?
Ethereum is a blockchain-based distributed computing platform featuring smart contract functionality that enables users to create and deploy their decentralized applications
There are three types of networks in Ethereum:
Live network (main network) - Smart contracts are deployed on the main network
Test network (like Ropsten, Kovan, Rinkeby) - Allow users to run their smart contracts with no fees before deploying it on the main network
Private network - Are those which are not connected to the main network. They run within the premises of the organization but carry the features of an Ethereum network.
15. Where do nodes run a smart contract code?
Nodes run smart contracts code on Ethereum Virtual Machine (EVM). It is a virtual machine designed to operate as a runtime environment for Ethereum-based smart contracts.
EVM is operated in a sandboxed environment (isolated from the main network). This is a perfect testing environment.
You can download the EVM, run your smart contract locally in an isolated manner and once you have tested and verified it, you can deploy it on the main network.
16. What is a Dapp and how is it different from a normal application?
A Dapp is a decentralized application which is deployed using smart contract
A Dapp has its back-end code (smart contract) which runs on a decentralized peer-to-peer network
Smart contract (backend code)
Blockchain (P2P contract)
Normal application has a back-end code which runs on a centralized server
It’s a computer software application that is hosted on a central server
Database (runs on the server)
18. What is the very first thing you must specify in a Solidity file?
It is necessary to specify the version number of Solidity at the beginning of code as it eliminates incompatibility errors that can arise while compiling with another version. This is a mandatory clause that has to be there at the top of any Solidity code you write. You also need to mention the correct version number for the code.
20. What is the nonce and how is it used in mining?
In Blockchain, mining is a process to validate transactions by solving a difficult mathematical puzzle called proof of work. Now, proof of work is the process to determine a number (nonce) along with a cryptographic hash algorithm to produce a hash value lower than a predefined target. The nonce is a random value that is used to vary the value of hash so that the final hash value meets the hash conditions.
Blockchain Interview Questions - Expert Level
21. Name the steps that are involved in the Blockchain project implementation.
Identify the problem and goal
Identify the most suitable consensus mechanism
Identify the most suitable platform
Account for implementation and deployment costs
In this stage and individual evaluates all requirements and decides a suitable blockchain platform to be implemented.
Development and implementation of a project
Designing the architecture
Designing the user interface
Building the APIs
Controlling and monitoring the project
Applying Proof of Concept (POC)
Identifying and fixing issues
22. Explain a real-life use-case where Blockchain is being used.
In supply chain management, smart contracts provide permanent transparency and validation of transactions shared by multiple supply chain partners. Check out our diagrammatic display of supply chain management using Blockchain in our video.
23. List and explain the parts of EVM memory.
The memory of an EVM is divided into three types:
Storage values are stored permanently on the Blockchain network
It is extremely expensive
Memory is a temporary modifiable storage
It can be accessed only during contract execution. Once the execution is finished, its data is lost
A stack is temporary and non-modifiable storage.
Here, when the execution completes, the content is lost.
24. What happens if the execution of a smart contract costs more than the specified gas?
Initially, your transaction will be executed, but if the execution of a smart contract costs more than the specified gas, then the miners will stop validating your contract. The Blockchain will record the transaction as failed, also the user doesn’t get a refund.
25. What does the gas usage in a transaction depend on and how is the transaction fee calculated?
Gas usage depends upon the amount of storage and set of instructions (codes) used in a smart contract. The transaction fee is calculated in Ether, which is given as:
Ether = Tx Fees = Gas Limit * Gas Price
26. What is the fork? What are some of the types of forking?
In simple terms, updating a cryptocurrency protocol or code is called forking. Fork implies that a Blockchain splits into two branches. It can happen when the participants of the network cannot come to an agreement with regards to the consensus algorithm and new rules to validate transactions.
There are three types of forking:
27. Differentiate between Proof of Work vs Proof of Stake.
Proof of Work (PoW):
In Blockchain, PoW is the process of solving a complex mathematical puzzle called mining. Here, the probability of mining a block is based upon the amount of computational work done by a miner. Miners spend a lot of computing power (with hardware) for solving the cryptographic puzzle.
Proof of Stake (PoS):
PoS is an alternative to PoW in which the Blockchain aims to achieve distributed consensus. The probability of validating a block relies upon the number of tokens you own. The more tokens you have, the more chances you get to validate a block. It was created as a solution to minimize the use of expensive resources spent in mining.
28. What is a 51% attack?
In Blockchain, a 51% attack refers to a vulnerability where an individual or group of people controls the majority of the mining power (hash rate). This allows attackers to prevent new transactions from being confirmed. Further, they can double-spend the coins. In a 51% attack, smaller cryptocurrencies are being attacked.
29. What are function modifiers in Solidity? Mention the most widely used modifiers.
In Solidity, function modifiers are used to easily modify the behavior of your smart contract functions. In simple terms, it can build additional features or apply restrictions on the function of smart contracts. The most extensively used function modifiers in solidity are:
View, which are functions that cannot modify the state of a smart contract. They are read-only functions. Refer to our video to see an example of a View function
Pure, which are functions that neither read nor write the state of a smart contract. They return the same result determined by its input values. Refer to our video to see an example of a Pure function