BlockChainNotes SEM5
BlockChainNotes SEM5
a) What is Non-repudiation?
--> Non-repudiation is a security concept that ensures that a party cannot deny having sent
or received a message or document. It provides proof of the origin and delivery of digital
information, preventing disputes and fraud.
--> In blockchain technology, difficulty refers to the computational effort required to mine a
new block. It's adjusted to maintain a consistent block generation rate. A higher difficulty
level means more computational power is needed to solve the cryptographic puzzle,
making the network more secure.
c) In which network, each & every node itself is a client and server?
--> In a peer-to-peer (P2P) network, each node acts as both a client and a server. This
means that nodes can directly communicate with each other without relying on a central
server. P2P networks are commonly used in file sharing, decentralized applications, and
blockchain technologies.
d) What is Ether?
--> Ether is the native cryptocurrency of the Ethereum blockchain. It's used to pay for
transaction fees, execute smart contracts, and participate in decentralized applications
(dApps) built on the Ethereum platform. Ether plays a crucial role in enabling the
functionality and security of the Ethereum network.
e) What is consensus?
--> Consensus is a mechanism used in blockchain networks to ensure that all nodes agree
on the same state of the blockchain. It involves a distributed consensus algorithm, such as
Proof of Work (PoW) or Proof of Stake (PoS), to validate and add new blocks to the chain.
Consensus mechanisms are crucial for maintaining the security and integrity of blockchain
networks.
g) What is Remix?
--> An immutable ledger is a record-keeping system where data, once recorded, cannot be
altered or deleted. Blockchain technology employs immutable ledgers to create a
transparent and tamper-proof system for storing and verifying transactions. This
immutability ensures the security and integrity of the data.
--> A genesis block is the first block in a blockchain. It contains the initial state of the
blockchain and is often hardcoded into the blockchain software. It serves as the foundation
for subsequent blocks and establishes the initial trust and security of the network.
j) What is EVM?
--> EVM stands for Ethereum Virtual Machine. It's a virtual machine that executes smart
contracts on the Ethereum blockchain. It provides a sandboxed environment where
developers can write and deploy code that can interact with the blockchain and other
smart contracts. The EVM ensures the security and reliability of the Ethereum network.
--> Vitalik Buterin, a young programmer and writer, published the Ethereum white paper in
2013. This white paper outlined the vision for a decentralized platform that could execute
smart contracts and enable the creation of decentralized applications (dApps).
--> BASH :-
"eth difficulty"
This command can be used in the Ethereum console or through a web3.js library to retrieve
the current difficulty level of the Ethereum network. The difficulty level indicates the
computational effort required to mine a new block.
--> If someone loses their private key, they lose access to their Ethereum wallet and the
cryptocurrency stored in it. The funds become irretrievable, as the private key is the only
way to access and spend the cryptocurrency.
--> The National Institute of Standards and Technology (NIST) standardized the Advanced
Encryption Standard (AES) algorithm. AES is a widely used symmetric-key encryption
algorithm for secure data transmission and storage.
g) What is Nonce?
--> A nonce (number used once) is a random number used in cryptographic protocols to
ensure that a message or transaction is unique. In the context of blockchain, a nonce is a
number added to a block header to create a hash that meets a specific difficulty level.
Miners adjust the nonce to find the correct hash, which is a crucial part of the proof-of-work
consensus mechanism.
i) What is ICO?
--> Initial Coin Offering (ICO) is a crowdfunding method where companies raise funds by
issuing new cryptocurrencies. Investors buy these tokens in exchange for future access to
products or services, or for a stake in the company.
--> No one individual or entity owns a decentralized blockchain.It's collectively owned and
maintained by a network of users, ensuring transparency, security, and immutability.
--> Transaction fee in Ethereum is calculated by multiplying the gas limit (estimated
computational work) by the gas price (cost per unit of gas).
--> Plaintext is readable data, like a normal message. Ciphertext is the encrypted version of
plaintext, unreadable without a decryption key.Encryption transforms plaintext into
ciphertext, and decryption reverts it back.
c) What is FPGA?
--> FPGA (Field-Programmable Gate Array) is a type of integrated circuit that can be
reconfigured after manufacturing. It allows users to customize the circuit's functionality to
meet specific needs, making it versatile for various applications.
On?
--> In Advanced Encryption Standard (AES), the number of encryption rounds depends on
the key size used. AES supports key sizes of 128, 192, and 256 bits, with 10, 12, and 14
rounds respectively.
--> A smart contract is a self-executing contract with the terms of the agreement directly
written into code. It operates on a blockchain network, automatically verifying and
enforcing the conditions of the contract without the need for intermediaries.
--> The encryption key size in DES is 56 bits, although the key is represented as a 64-bit
number. Eight of these bits are used for parity checking, leaving 56 bits for the actual
encryption process.
g) What is ASIC?
--> Bitcoin uses the Proof-of-Work (PoW) algorithm to verify transactions. In PoW, miners
compete to solve complex cryptographic puzzles, and the first miner to solve a puzzle adds
a new block of transactions to the blockchain.
i) Which is a unique PoS cryptocurrency that is aimed at delivering
j) What is DAPP?
--> Gas is the unit of measurement for the computational effort required to execute a
transaction or smart contract on the Ethereum network.
Gas Limit is the maximum amount of gas a user is willing to spend on a transaction. It's like
setting a budget for the transaction. If the transaction requires more gas than the limit, it
fails, but the user still pays for the gas consumed up to that point.
Integer: Stores whole numbers, both signed (int) and unsigned (uint).
Fixed-Point Numbers: Represent numbers with fixed decimal places (not fully
supported yet).
Transparency: All transactions are visible to everyone on the network, promoting trust
and accountability.
Efficiency: Smart contracts automate processes, reducing the need for intermediaries
and streamlining operations.
-->
Block Cipher Converts the plain text into Stream Cipher Converts the plain text
cipher text by taking plain text’s block at a into cipher text by taking 1 bit plain text
time. at a time.
The complexity of block cipher is simple. While stream cipher is more complex.
The algorithm modes which are used in block The algorithm modes which are used in
cipher are ECB (Electronic Code Book) and stream cipher are CFB (Cipher Feedback)
CBC (Cipher Block Chaining). and OFB (Output Feedback).
Block cipher is slow as compared to a stream While stream cipher is fast in comparison
cipher. to block cipher.
Suitable for applications that require strong Suitable for applications that require
encryption, such as file storage and internet strong encryption, such as file storage
communications. and internet communications.
-->
The size of ciphertext is the same or smaller The size of ciphertext is the same or larger
than the original plaintext. than the original plaintext.
The encryption process is very fast. The encryption process is slow.
The length of key used is 128 or 256 bits The length of key used is 2048 or higher
--> Test networks are replicas of a mainnet blockchain, designed for testing and
development purposes. They allow developers to experiment with new features, smart
contracts, and applications without risking real funds or disrupting the main network.
Goerli: A widely-used testnet for testing Ethereum's latest features and upgrades.
Kovan: Another popular testnet, known for its stability and reliability.
-->
This is primarily due to the consensus mechanism required to validate and add new blocks
to the chain. This process involves multiple nodes verifying each transaction, which can be
time-consuming. Additionally, the decentralized nature of blockchains, while ensuring
security, can slow down transaction processing.
In contrast, traditional databases are centralized and can process transactions much
faster.
--> A P2P (Peer-to-Peer) crypto exchange is a platform that allows users to directly buy and
sell cryptocurrencies with each other without the need for a central intermediary. This
decentralized approach offers more flexibility, privacy, and control over transactions. Users
can set their own prices and choose their preferred payment methods, making P2P
exchanges a popular choice for many crypto traders.
d) What is BFT?
--> Byzantine Fault Tolerance (BFT) is a consensus mechanism that allows a distributed
system to function correctly even if some nodes are faulty or malicious. It ensures that the
network can reach agreement on the state of the system, regardless of the behavior of
individual nodes. BFT is crucial for the security and reliability of blockchain networks.
--> A hybrid blockchain combines the best features of both public and private blockchains.
It offers a balance between decentralization and control, allowing for both public and
private transactions. Hybrid blockchains often have a public layer for transparency and a
private layer for confidentiality, making them suitable for various applications, including
supply chain management, healthcare, and finance.
1.Creation: The contract is designed and coded, defining its rules and conditions.
4.Finalization: Once execution is complete, the results are recorded on the blockchain,
ensuring transparency and immutability.
--> Hard Fork: A significant change to a blockchain's protocol that creates a new,
incompatible chain. This split occurs when a majority of nodes agree to the new rules,
leaving the old chain behind. Hard forks can lead to the creation of new cryptocurrencies.
Soft Fork: A less disruptive change to a blockchain's protocol that is backward compatible.
Nodes running the old software can still process and validate blocks created by the new
software. Soft forks are often used to introduce new features or improve the efficiency of
the network.
c) What is PoW?
--> Proof of Work (PoW) is a consensus mechanism used in blockchain networks to verify
and secure transactions. In PoW, miners compete to solve complex cryptographic puzzles.
The first miner to solve a puzzle is rewarded with a block of newly minted cryptocurrency.
This process consumes significant computational power, making it energy-intensive.
However, it ensures the security of the network by making it extremely difficult for malicious
actors to manipulate the blockchain.
-->
Client-Server Network Peer-to-Peer Network
Client-Server Network are costlier than While Peer-to-Peer Network are less
Peer-to-Peer Network. costlier than Client-Server Network.
Client-Server Network are more stable While Peer-to-Peer Network are less
than Peer-to-Peer Network. stable if number of peer is increase.
2.Timestamp: A record of the time when the block was created. This timestamp helps
maintain the chronological order of transactions.
3.Nonce: A number that miners adjust to solve a cryptographic puzzle. This process is
essential for securing the blockchain and adding new blocks.
4.Hash: A unique cryptographic hash of the block's data, including the transactions,
timestamp, and nonce. This hash acts as a digital fingerprint for the block, ensuring its
integrity.
5.Previous Block Hash: A reference to the hash of the previous block in the chain. This
creates a chain of blocks, where each block is linked to the one before it, forming an
immutable record.
2. Blockchain: A distributed ledger that records all transactions and smart contract
executions. It ensures transparency and immutability.
3. Nodes: Computers that participate in the network. They store the blockchain, validate
transactions, and execute smart contracts.
5. Ethereum (ETH): The native cryptocurrency used to pay for transaction fees and
computational resources.
6. Accounts: Entities that hold Ether and interact with smart contracts. They can be
externally owned accounts (controlled by private keys) or contract accounts (controlled by
code).
7. Transactions: Actions that transfer value (Ether) or execute smart contract functions.
They are broadcasted to the network and included in blocks.
8. Gas and Gas Price: Gas is a unit of measurement for the computational effort required
to execute a transaction or smart contract. Gas price is the cost per unit of gas.
Software wallets: These are digital wallets installed on your computer or mobile
device. They offer flexibility but require careful security measures.
Hardware wallets: These are physical devices that store your private keys offline,
providing a high level of security.
Web wallets: These are online wallets accessible through a web browser. They are
convenient but may be less secure than other options.
When choosing a crypto wallet, consider factors like security, user-friendliness, supported
cryptocurrencies, and additional features like staking or dApp integration.
--> Miners are individuals or organizations that validate and add new blocks to a
blockchain. Their primary tasks include:
3.Securing the Network: By solving puzzles and verifying transactions, miners contribute to
the security of the blockchain network, making it resistant to attacks.
Maintaining the Blockchain: Miners store a copy of the blockchain, ensuring its
integrity and availability.
Scalability: As the number of transactions increases, blockchains can become slow and
inefficient. This limits their ability to handle large-scale applications.
Energy Consumption: Proof-of-Work consensus mechanisms, like Bitcoin's, require
significant energy consumption, raising environmental concerns.
Regulatory Uncertainty: The regulatory landscape for blockchain is still evolving, creating
uncertainty for businesses and developers.
Security Risks: While blockchain is inherently secure, it's not immune to attacks. Hackers
can exploit vulnerabilities in smart contracts or network protocols.
--> An Initial Coin Offering (ICO) is a crowdfunding method used by startups to raise funds
for their projects by issuing cryptocurrency tokens. It's similar to an Initial Public Offering
(IPO) but operates within the blockchain ecosystem.
In an ICO, a company releases a whitepaper outlining its project and the utility of its tokens.
Investors purchase these tokens in exchange for cryptocurrency like Bitcoin or Ethereum.
The funds raised can be used to develop the project, expand operations, or acquire
resources.
While ICOs offer a decentralized and innovative way to raise capital, they also carry
significant risks. Investors should conduct thorough research, assess the project's viability,
and understand the regulatory landscape before participating in an ICO.
1. Public Blockchains:
Open to everyone.
2. Private Blockchains:
Permissioned, controlled by a central authority.
3. Consortium Blockchains:
4. Hybrid Blockchains:
Soft Fork:
Hard Fork:
Used for major upgrades or to resolve significant disagreements within the community.
Forks can occur due to various reasons, including scaling issues, security concerns,
or ideological differences among developers.
--> Data Encryption Standard (DES) is a symmetric-key block cipher that was widely used
for many years. It encrypts data in 64-bit blocks, using a 56-bit key. While it was once a
standard, DES is now considered insecure due to its relatively short key length.
DES operates in multiple rounds, involving complex operations like substitution and
permutation.
Transparency: All contract terms and execution are visible on the blockchain, ensuring
transparency.
Security: Immutability of the blockchain guarantees that the contract cannot be altered
once deployed.
Trustlessness: Smart contracts operate on pre-defined rules, eliminating the need for trust
between parties.
Application Layer: This layer interacts with users and provides the services offered by the
blockchain. It includes decentralized applications (dApps) and user interfaces.
Network Layer: This layer handles the communication and consensus mechanisms
between nodes. It ensures that transactions are validated and added to the blockchain.
Consensus Layer: This layer determines the rules for validating transactions and adding
new blocks to the chain. Common consensus mechanisms include Proof of Work (PoW)
and Proof of Stake (PoS).
Data Layer: This layer stores the actual data, including transactions and smart contract
code. It ensures that the data is secure, immutable, and accessible to all nodes in the
network.
These layers work together to create a secure, transparent, and decentralized system
for recording and verifying information.
--> The Ethereum Virtual Machine (EVM) is a sandboxed environment that executes smart
contracts. It's a crucial component of the Ethereum blockchain, enabling the creation of
decentralized applications (dApps).
The EVM operates on a stack-based architecture, using a stack to store temporary data. It
also includes memory for temporary storage, storage for persistent data, and a call stack
for function calls.
When a smart contract is deployed to the Ethereum blockchain, its bytecode is executed by
the EVM. The EVM interprets the bytecode, performs calculations, and interacts with the
blockchain's state. This allows for the creation of self-executing contracts with predefined
rules and conditions.
--> SHA-256 is a cryptographic hash function that takes an input (message) of any size
and produces a fixed-size 256-bit hash value. This hash value is a unique digital
fingerprint of the input data.
Deterministic: The same input always produces the same hash output.
Collision Resistance: It's extremely difficult to find two different inputs that produce the
same hash.
Preimage Resistance: Given a hash, it's computationally infeasible to find the original input.
Uses of SHA-256:
SHA-256 is widely used in various security applications due to its robustness and
cryptographic strength.
--> A transaction is the basic unit of activity on a blockchain. It represents the transfer
of value (e.g., cryptocurrency) or the execution of a smart contract.
Structure of a Transaction:
Recipient: The address of the account receiving the value or the contract address.
Gas Price: The fee paid per unit of gas used for computation.
Gas Limit: The maximum amount of gas allowed for the transaction.
Once a transaction is created, it's broadcasted to the network of nodes. These nodes
validate the transaction and add it to a block, which is then added to the blockchain. This
process ensures the security and transparency of the transaction.