0% found this document useful (0 votes)
2 views12 pages

PE3 Module2

The document provides an in-depth overview of Bitcoin and blockchain technology, covering key concepts such as double spending, transaction lifecycle, mining processes, and the importance of consensus in a decentralized network. It explains how blockchain prevents double spending through mechanisms like Proof of Work and the longest chain rule, and details the steps involved in transaction propagation and verification. Additionally, it discusses the challenges faced in transaction processing and the properties required for distributed consensus to ensure reliability and security in blockchain systems.

Uploaded by

Prrishitha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views12 pages

PE3 Module2

The document provides an in-depth overview of Bitcoin and blockchain technology, covering key concepts such as double spending, transaction lifecycle, mining processes, and the importance of consensus in a decentralized network. It explains how blockchain prevents double spending through mechanisms like Proof of Work and the longest chain rule, and details the steps involved in transaction propagation and verification. Additionally, it discusses the challenges faced in transaction processing and the properties required for distributed consensus to ensure reliability and security in blockchain systems.

Uploaded by

Prrishitha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Module 2 – Bitcoin and its Consensus-1 BlockChain Technology

Q1. Define bitcoin and explain its creation.


Q2. Explain about payment between the end users.
Q3. Define double spending. How is it handled using blockchain?
Definition of Double Spending
Double spending is the act of spending the same bitcoin multiple
times. If accepted, it would result in fraud and reduce trust in the
cryptocurrency system.

Double Spending in a Centralized System


In a centralized system, such as a bank:
 The bank maintains a central record of all transactions.
 It verifies whether the money has already been spent.
 If the funds are already used, the second transaction is rejected.
Handling Double Spending Using Blockchain
1. Broadcast of Transactions
When a Bitcoin transaction is created, its details are broadcast to all
nodes in the Bitcoin network.
2. Recording in the Blockchain
The transaction is stored in a blockchain, a continuously growing chain of
blocks that records all Bitcoin transactions. Every node maintains a copy
of this blockchain.
3. Proof of Work
A block is accepted only if it contains valid transactions and a valid
Proof of Work (PoW) generated through mining. This makes creating
fraudulent blocks computationally difficult.
4. Tamper Resistance
Each block contains the hash of the previous block. If any block is
modified, all subsequent blocks must be recomputed, making
tampering practically impossible.
Module 2 – Bitcoin and its Consensus-1 BlockChain Technology

5. Longest Chain Rule


If multiple valid chains exist, the Bitcoin network accepts only the
longest valid chain and continues extending it, ensuring all nodes agree
on the same transaction history.
6. Transaction Validation
Once a transaction is added to the blockchain, every node can verify it
using the sender's public address. If the same bitcoin is used again, the
network detects the duplicate transaction and rejects it.
Conclusion
Blockchain prevents double spending through a distributed ledger,
Proof of Work, cryptographic linking of blocks, and the longest
chain rule. These mechanisms ensure that each bitcoin can be spent
only once without relying on a central authority.

Q4. Define bitcoin anonymity. Explain bitcoin script with an example.


Q5. What is Bitcoin peer-to-peer network? And how does a node join P2P
bitcoin network.
Bitcoin Peer-to-Peer (P2P) Network
 Bitcoin operates on a decentralized P2P network where every
node is equal.
 There is no central authority controlling the network.
 Each node stores a copy of the blockchain and shares transaction
and block information with other nodes.
 This decentralized architecture makes the Bitcoin network secure,
reliable, and fault-tolerant.
How a Node Joins the Bitcoin P2P Network
1. Contact a Seed Node
A new node first contacts a seed node, which acts as an initial point of
contact for joining the network.
2. Obtain Peer Addresses
The seed node responds by providing an address list of active Bitcoin
nodes in the network.
3. Connect to Other Nodes
Using the received address list, the new node establishes connections
with several peers and becomes part of the P2P network.
Module 2 – Bitcoin and its Consensus-1 BlockChain Technology

4. Download the Latest Blockchain


The new node requests and downloads the most recent copy of the
blockchain from other nodes to synchronize its data with the network.
5. Start Participating
After synchronization, the node can broadcast and receive
transactions, validate blocks, and participate in the normal operation of
the Bitcoin network.
Conclusion
The Bitcoin P2P network is a decentralized system where nodes
communicate directly without a central authority. A new node joins the
network by contacting a seed node, obtaining peer addresses,
connecting to other nodes, downloading the latest blockchain, and then
participating in transaction and block validation.

Q6. Define transactions in a blockchain and explain its lifecycle.


Definition of a Blockchain Transaction
A transaction is a record of an activity on the blockchain, such as
transferring cryptocurrency from one user to another. Each transaction is
validated by the network before being added to the blockchain.
Transaction Lifecycle in Blockchain
The lifecycle of a blockchain transaction consists of four stages:
1. Initiation of a Transaction
Module 2 – Bitcoin and its Consensus-1 BlockChain Technology

 A user creates a transaction using a wallet or application by


specifying the recipient's address and the amount.
 The transaction is digitally signed using the sender's private key
to ensure authenticity.
 The signed transaction is then broadcast to the blockchain
network.
2. Transaction Propagation
 Nodes in the network receive the transaction and verify its format
and validity.
 Valid transactions are stored in the transaction pool (mempool)
until selected by miners.
 Each node independently checks that the transaction satisfies
network rules, such as sufficient balance.
3. Mining and Confirmation
 Miners collect valid transactions from the mempool and include
them in a new block.
 They solve a cryptographic puzzle using a consensus mechanism
such as Proof of Work (PoW) or Proof of Stake (PoS).
 Once a valid block is created, it is added to the blockchain, and the
transactions become confirmed.
4. Transaction Settlement
 After confirmation, the transaction is permanently recorded on the
blockchain.
 The ownership of the asset is updated, and the transaction cannot
be modified or reversed.
 The transaction is now considered settled and complete.
Conclusion
A blockchain transaction passes through four stages: initiation,
propagation, mining and confirmation, and settlement. This
lifecycle ensures that every transaction is securely verified, agreed upon
by the network, and permanently stored on the blockchain, providing
transparency, integrity, and security.

Q7. Explain the post transaction activities and the challenges encountered
in transaction lifecycle of a blockchain.
Module 2 – Bitcoin and its Consensus-1 BlockChain Technology

Post-Transaction Activities
1. Transaction Verification
After confirmation, the transaction can be verified by anyone using the
blockchain's public ledger. Users can check the transaction status and
details through a block explorer.
2. Monitoring and Auditing
Organizations monitor blockchain transactions for compliance, auditing,
and fraud prevention. Since blockchain records are transparent and
immutable, transaction histories can be easily tracked and verified.
3. Dispute Resolution
In case of discrepancies, such as double-spending attempts,
blockchain networks use predefined protocols or smart contracts to
resolve disputes and maintain the integrity of the system.
Challenges in the Transaction Lifecycle
1. Network Congestion
As the number of users and transactions increases, the network may
become congested, leading to slower transaction processing and
higher transaction fees.
2. Limited Throughput
Many blockchains can process only a limited number of transactions
per second (TPS). This limits their ability to support large-scale
applications and high transaction volumes.
3. Delay in Transaction Confirmation
During periods of heavy network activity, transactions may take longer to
be confirmed, causing delays for users who expect quick processing.
4. Inconsistent Confirmation Times
Different blockchain networks have different confirmation times. This
variation can create uncertainty regarding when a transaction is
considered final.
Conclusion
Post-transaction activities such as verification, monitoring, auditing,
and dispute resolution ensure the transparency and reliability of
blockchain transactions. However, challenges including network
congestion, limited throughput, confirmation delays, and
inconsistent processing times affect the efficiency and scalability of
blockchain systems.
Module 2 – Bitcoin and its Consensus-1 BlockChain Technology

Q8. What is block mining?


Q9. Differentiate between proof of work and proof of stake in blockchain.
Q10. Define block mining. Explain how block mining works.
Q11. What is the necessity of mining. Explain the role of nonce in mining
process.
Q12. Define the following:
a. Block Flooding
b. Block Propagation
a. Block Flooding
Block flooding is the process of broadcasting a newly created block
to all nodes in the blockchain network. When a miner successfully
creates a valid block, it sends the block to its neighboring nodes, which
then forward it to other nodes. This flooding process continues until every
participating node receives the new block.
b. Block Propagation
Block propagation, also referred to as block dissemination or block
distribution, is the process through which a newly created block is
transmitted from its creator node to every other participating
node in the blockchain network. Once the block reaches all nodes,
they verify its validity and update their local copy of the blockchain.
Efficient block propagation helps all nodes maintain a consistent and
synchronized blockchain.

[Block Flooding: The technique of broadcasting a newly mined block


from one node to all other nodes by repeatedly forwarding it through
neighboring peers.
Block Propagation: The overall process of distributing a newly created
block from its creator node until it reaches all participating nodes in the
blockchain network.]
Module 2 – Bitcoin and its Consensus-1 BlockChain Technology

Q13. Explain the steps involved in propagation process.


The propagation process (also called block propagation) is the
process by which a newly created block is transmitted from the miner
(creator node) to every other participating node in the blockchain
network. It ensures that all nodes receive the latest valid block and
maintain a synchronized copy of the blockchain.

Steps Involved in the Propagation Process


1. Creation of a New Block
 A miner successfully solves the Proof of Work puzzle and generates
a new valid block.
 The block contains valid transactions, the previous block hash,
Merkle root, nonce, and block hash.
2. Broadcasting the Block
 The creator node immediately broadcasts the newly generated
block to all its directly connected peer nodes.
 This is the first step in distributing the block across the blockchain
network.
3. Block Validation
 Each receiving node independently verifies the block before
accepting it.
 The node checks:
o Correct hash based on the existing blockchain.
o Validity of all transactions.
o Transaction scripts.
o Consistency with the existing blockchain.
Module 2 – Bitcoin and its Consensus-1 BlockChain Technology

o Whether the block belongs to the current longest chain.


4. Forwarding
 After successful validation, each node forwards (relays) the block to
its connected peers.
 This follows a gossip-based flooding protocol, where every
validated node continues broadcasting the block.
 As the process continues, the number of nodes receiving the block
grows exponentially (approximately by a factor of (2^n), where n is
the number of hops).
5. Confirmation
 After successful propagation and validation, all nodes add the new
block to their local copy of the blockchain.
 The transactions contained in the block are
considered confirmed and become part of the blockchain ledger.

Conc
lusion
The propagation process ensures rapid distribution of newly mined blocks,
maintains network synchronization, speeds up transaction confirmation,
prevents unnecessary forks, and improves the overall security and
consistency of the blockchain network.
Module 2 – Bitcoin and its Consensus-1 BlockChain Technology

Q14. Depict the blockchain propagation architecture and explain why


blockchain propagation is important in blockchain.
Blockchain Propagation Architecture
The blockchain propagation architecture consists of three planes:
1. Network Plane
o Responsible for communication between peer nodes.
o Distributes newly created blocks throughout the blockchain
network using the gossip protocol.
2. Consensus Plane
o Validates the received block according to the network's
consensus mechanism (e.g., Proof of Work (PoW), Proof of
Stake (PoS), Delegated Proof of Stake (DPoS),
Byzantine Fault Tolerance (BFT)).
o Ensures that all participating nodes agree on the validity of
the block.
3. Ledger Plane
o After consensus is achieved, the validated block is added to
the blockchain ledger.
o All nodes update their local copy, maintaining a synchronized
and immutable blockchain.
Diagram

Importance of Blockchain Propagation


Blockchain propagation is important because it:
1. Ensures Network Synchronization – Keeps all nodes updated
with the latest blockchain state.
Module 2 – Bitcoin and its Consensus-1 BlockChain Technology

2. Improves Transaction Confirmation Speed – Faster propagation


results in quicker transaction confirmations.
3. Prevents Forks and Maintains Chain Stability – Rapid block
distribution reduces the chances of multiple competing chains.
4. Enhances Scalability and Throughput – Efficient propagation
enables the network to process more transactions effectively.
5. Provides Security Against Double-Spending and Selfish
Mining – Quick dissemination of valid blocks makes fraudulent
activities more difficult.
Conclusion:
Blockchain propagation enables fast and reliable distribution of new
blocks, ensuring that all nodes maintain a consistent ledger while
improving the security, efficiency, and stability of the blockchain network.

Q15. Explain standard gossip-based propagation.


Q16. Define consensus. Why is it necessary? Explain it with an example.
(With reference to bitcoin)
Q17. Explain with an example to show that the difficulty in attaining
consensus in the block chain network.
Q18. Define distributed consensus. Explain the various types of faults in a
distributed system.

Distributed Consensus
Distributed consensus is the process by which all correct nodes in a
distributed or decentralized system reach a common agreement on a
single value or the current state of the system, even in the presence of
failures or malicious nodes. It is essential for reliable communication and
correct operation in distributed systems.
Types of Faults in a Distributed System
1. Crash Fault
Module 2 – Bitcoin and its Consensus-1 BlockChain Technology

 A node suddenly crashes or becomes unavailable during


communication.
 It stops sending or receiving messages, affecting the consensus
process.
2. Network (Partitioned) Fault
 Occurs when communication links fail, causing the network to split
into separate partitions.
 Nodes in different partitions cannot communicate with each other,
leading to delays in reaching consensus.
3. Byzantine Fault
 A node behaves maliciously or unpredictably.
 It may send incorrect, conflicting, or false information to different
nodes, making consensus more difficult to achieve.
Conclusion
Distributed consensus enables all participating nodes to agree on a
common state despite failures. Handling crash faults, network faults,
and Byzantine faults is essential for maintaining the reliability,
consistency, and security of distributed systems.

Q19. Explain the properties of distributed consensus.


A distributed consensus protocol must satisfy the following four
properties to ensure that all correct nodes reach a reliable agreement:
1. Termination
 Every correct node must eventually decide on a value at the end of
the consensus protocol.
 This ensures that the consensus process always completes.
2. Validity
 If all nodes propose the same value, then all correct nodes must
decide on that same value.
 This guarantees that the agreed value is valid and reflects the
nodes' proposals.
3. Integrity
 Every correct node decides at most one value.
 The decided value must have been proposed by at least one
participating node.
Module 2 – Bitcoin and its Consensus-1 BlockChain Technology

 This prevents multiple or invalid decisions.


4. Agreement
 All correct nodes must agree on the same value.
 No two correct nodes should reach different decisions, ensuring
consistency across the distributed system.
Conclusion
The four properties—Termination, Validity, Integrity, and Agreement
—ensure that distributed consensus protocols are reliable, consistent, and
capable of achieving a common decision even in distributed
environments.

Q20. Justify the correctness of distributed consensus protocol.

You might also like