Mod 1 2 Block
Mod 1 2 Block
• Example:
○ A transaction is done
Then a new block will be created for that transaction
Then this block is added to the block chain
What is Blockchain?
• Blockchain is a special kind of digital record-keeping system.
• It’s like a notebook that’s copied and stored on many computers all over
the world.
○ Copies of the data is stored around the world
• Why it’s safe:
○ Everyone can see the same data, so no one can hide or change
anything without others noticing.
• Bitcoin is the first major example that uses blockchain.
6. If even a small detail changes, the hash changes, making it easy to spot
fraud.
○ If the hash changes then the link will be broken
By this every one can understands that the data is corrupted
7. Computers (called nodes) check and verify the transactions.
8. If most computers agree, the transaction is added to the blockchain.
9. In this way the blocks will be keep on adding
Where is Blockchain Used?
Blockchain is useful in many areas:
• Healthcare: Keeping medical records safe.
• Legal Documents: Protecting important legal papers (like wills).
• Voting: Making digital elections secure.
• Real Estate: Making property buying and selling more transparent.
• Data Sharing: Sharing information securely and efficiently.
Distributed Ledger Technology
HDFS is the storage system used by Hadoop to manage huge amounts of data
across many computers.
HDFS Components
1. NameNode (Master Node)
○ Manages metadata
Meta data means data about data (info about files like name,
location, permissions).
○ NameNode manages the DataNodes.
2. DataNodes (Worker Nodes)
○ Stores actual data in blocks (small pieces).
○ Reports to the NameNode about its status.
HDFS Architecture
1. Client: Reads and writes data from HDFS.
2. NameNode: Manages metadata and assigns DataNodes for storage.
3. DataNodes: Store actual data in blocks (default size = 128 MB).
4. Replication: Data is copied to multiple DataNodes to prevent loss
(default: 3 copies).
5. Racks: Groups of machines organized to improve performance and fault
tolerance.
3. Merkle Tree
○ A Merkle Tree is a tree where each node contains the hash of its
child nodes.
Leaf Nodes: Contain data.
Parent Nodes: Contain the hashes of child nodes.
This continues until there's only one root node at the top.
Why use a Merkle Tree?
Efficient Verification: You only need a small part of the tree to
verify data.
Used in Blockchain (like Bitcoin) to check data quickly and
securely.
Key Management
• Private Key:
○ Used to sign the message, and kept secret by the owner.
• Public Key:
○ Used by others to verify the signature. It’s open to everyone, but we
need a system to make sure it really belongs to the person we think it
does.
Verifiable Random Function (VRF)
What is a VRF?
• A Verifiable Random Function (VRF) creates a random number that
seems unpredictable to everyone, but also provides proof that the
number is valid.
○ Random Number: It looks random, but it’s actually generated in a
secure way.
○ Proof: The proof shows that the random number is valid without
revealing the private key used to generate it.
3. Consensus Mechanism:
○ How it works:
Every participant (computer) in the Bitcoin network has a copy
of the blockchain.
If someone tries to double-spend (send the same Bitcoin to two
places), the network checks the blockchain to see which
transaction is valid.
The first transaction that gets added to the blockchain is
considered the valid one, and the second attempt to double-
spend is rejected by the network.
○ Why it helps: It ensures that all transactions are agreed upon by the
whole network. Even if someone tries to trick the system, the
network will catch it and stop the double-spending.
In Simple Words:
• Bitcoin uses a network of nodes (computers) to work. Some nodes store
all data (full nodes), while others mine new Bitcoin (mining nodes), and
others help manage wallets for users.
• There’s no central control, and everyone works together to verify
transactions and secure the network. Some nodes store all the data,
while others only keep essential info to keep things fast and efficient.
07 May 2025 12:07