0% found this document useful (0 votes)
38 views11 pages

BT Module 2

The document outlines the evolution of money from barter systems to Bitcoin, highlighting the transformative impact of blockchain technology. It details Bitcoin's decentralized nature, key features, and the mechanics of transactions, mining, and network operations. Additionally, it explains the roles of full nodes and SPVs, as well as the structure and function of Bitcoin wallets.

Uploaded by

akash.2211005
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)
38 views11 pages

BT Module 2

The document outlines the evolution of money from barter systems to Bitcoin, highlighting the transformative impact of blockchain technology. It details Bitcoin's decentralized nature, key features, and the mechanics of transactions, mining, and network operations. Additionally, it explains the roles of full nodes and SPVs, as well as the structure and function of Bitcoin wallets.

Uploaded by

akash.2211005
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
You are on page 1/ 11

BLOCKCHAIN AND THE EVOLUTION OF MONEY

Blockchain technology rose to prominence through Bitcoin, a decentralized cryptocurrency introduced by


the pseudonymous Satoshi Nakamoto. While the creator’s identity remains a mystery, the technology’s
revolutionary design speaks for itself. Bitcoin not only proved the robustness of blockchain but also laid the
foundation for exploring its broader applications beyond cryptocurrency.

THE HISTORY OF MONEY


1. Barter System
 Goods were exchanged directly (e.g., wheat for medicine).
 Inefficiencies arose when no mutual needs aligned (e.g., Alice needs medicine, Bob has wheat).
2. Commoditized Exchange
 Common goods like milk, salt, and sheep became mediums of value.
 Storage and portability issues persisted.
3. Metal Coins
 Precious metals like gold and silver replaced commodities.
 Easy to store and carry but vulnerable to theft.
4. Early Banking
 Temples issued receipts for deposited gold, acting as trusted intermediaries.
 These receipts evolved into early banking systems.
5. Fiat Currency
 Governments issued paper money not backed by gold or silver.
 Value relies purely on trust in governments.
6. Digital Banking Era
 Money transitioned to digital numbers in bank systems.
 Physical currency in circulation became marginal compared to digital currency.

DAWN OF BITCOIN
Bitcoin emerged as a response to the inefficiencies and limitations of centralized systems:
 Trustless Transactions: It replaces intermediaries with cryptographic proof.
 Decentralization: Transactions are validated by a distributed network, not a central authority.
 Resilience: The system combines cryptography, game theory, and computer science to withstand
cyberattacks.
By leveraging technological advancements, Bitcoin provides a new era of currency—one backed not by trust
but by computing power and consensus. Since its launch in 2009, Bitcoin has become a global phenomenon,
showcasing the transformative potential of blockchain.
BITCOIN
Bitcoin is a decentralized cryptocurrency designed for peer-to-peer transactions without relying on
centralized intermediaries such as banks. Unlike traditional currencies, Bitcoin is global, not tied to any
nation, and operates independently in the following dimensions:
 Technical: Uses blockchain technology for secure, transparent transactions.
 Logical: Built on cryptographic proof rather than trust in intermediaries.
 Political: Free from governmental or institutional control.
Key Features of Bitcoin:
 Supply Cap: A maximum of 21 million Bitcoins can ever be produced, with mining continuing until
approximately 2140.
 Divisibility: Each Bitcoin can be divided into 100,000,000 units, the smallest unit being called a
Satoshi (0.00000001 BTC).
 Decentralized Mining: Individuals with sufficient computing power can mine new Bitcoins and
validate transactions.
 Value Determinants: Influenced by trust, adoption, supply, and demand.

Working With Bitcoin


1. Bitcoin Wallets: Install a Bitcoin wallet on your laptop or mobile device to store and manage Bitcoins.
Wallets generate public keys (Bitcoin addresses) for transactions.
o Public Key: Shareable with others for receiving funds.
o Private Key: Critical for accessing funds; losing it means losing your Bitcoins.
2. Types of Wallets:
o Mobile/Browser/Desktop Wallets: Convenient but vulnerable to hacks.
o Hardware Wallets: Dedicated devices offering high security.
o Cold Wallets: Offline storage for maximum safety.
3. Backup & Security:
o Use two-factor authentication where possible.
o Keep backup mechanisms for wallet recovery.
Transactions:
 Transactions in Bitcoin are pseudonymous, not fully anonymous, and can be traced using blockchain
records.
 Reusing addresses can compromise privacy and is discouraged.
 Payments are irreversible, so wallet security is paramount.
Mining vs. Trading:
 Mining: Requires computational power to validate transactions and earn Bitcoin rewards.
 Trading: Bitcoins can be bought and sold on exchanges using fiat currencies or other
cryptocurrencies.
BITCOIN BLOCKCHAIN
The Bitcoin blockchain is a chain of blocks, each identified by its hash. Each block contains a header (with
metadata) and a body (with transactions). The hash of a block includes all its contents, and every block
references the hash of its predecessor, creating a secure chain back to the genesis block.

Data Integrity
 Any modification to a block changes its hash, which would ripple through all subsequent blocks.
 Tampering becomes impractical due to the decentralized nature of the network: hacking 51% of
nodes simultaneously is infeasible.

Forks and Orphan Blocks


 When two blocks are proposed simultaneously, a fork occurs.
 The network eventually selects the "longest chain" (the one with the most accumulated work) as the
valid chain.
 Blocks from discarded forks are known as "orphan blocks."

Block Structure
A Bitcoin block consists of several components:
Fields in the Block:

Field Size Description


Magic Number 4 bytes Fixed value indicating the start of a block.
Block Size 4 bytes Indicates the size of the block (1 MB in Bitcoin).
Block Header 80 bytes Includes metadata like previous block hash, timestamp, nonce, etc.
Transaction Counter Variable Number of transactions included in the block.
Transaction List Variable All transactions bundled into the block.

Fields in the Block Header:

Field Size Description


Version 4 bytes Indicates the protocol version used.
Previous Block Hash 32 bytes Hash of the previous block's header.
Merkle Root 32 bytes Root hash of the Merkle tree of transactions in the block.
Timestamp 4 bytes Approximate creation time of the block in Unix time format.
Difficulty Target 4 bytes The target hash value for the block to satisfy PoW.
Nonce 4 bytes A number miners adjust to find a valid hash below the target.

Merkle Trees
 Merkle trees organize transaction hashes into a binary tree structure.
 The root hash (Merkle root) ensures data integrity for all transactions in the block.
 Efficiently verifies if a transaction belongs to a block using the Merkle path, reducing computational
overhead.

BITCOIN NETWORK
 The Bitcoin network operates as a decentralized, peer-to-peer network with no central authority or
hierarchy.
 The above diagram shows how Bitcoin networks coexist on the same Internet stack.
 Nodes can join or leave the network freely, ensuring its robustness and flexibility.
 Nodes are categorized as:
o Full Nodes: Download and store the entire blockchain, perform all functions (e.g., mining,
transaction validation).
o Lightweight Nodes (SPVs): Use Simplified Payment Verification for transactions and rely
on full nodes for complete blockchain details.

Node Discovery
 When a new node joins the Bitcoin network, it uses methods like:
o DNS Seeds: Predefined DNS addresses to discover active Bitcoin nodes.
o Hardcoded IPs: A built-in list of stable nodes in Bitcoin client software.
 Nodes connect to peers through a handshake process and exchange essential information, such as
version numbers and blockchain height.

Bitcoin Transactions
 Transactions are categorized into:
o Coinbase Transactions: Newly mined coins added to a block by miners.
o Regular Transactions: Transfer of Bitcoin ownership via digital signatures.
 The transaction lives until it has been executed till the time another transaction is done out of that
UTXO. UTXO stands for Unspent Transaction Output.
o It is the amount of digital currency someone has left remaining after executing a transaction.
o When a transaction is completed, the unspent output is deposited back into the database as
input which can be used later for another transaction.
 Transactions link previous unspent outputs (UTXOs) to new outputs, ensuring no "closing balance"
but a traceable chain of ownership.
 Preventing double-spending is achieved through network-wide transaction broadcasting and
validation.

Double-Spend Scenarios
 In cases where the same input is used in multiple transactions:
o The first valid transaction received is accepted.
o Conflicting transactions are discarded once a block containing the accepted transaction is
mined.

Consensus and Block Mining


1. Transactions and UTXOs:
o Every transaction in Bitcoin consumes previous unspent transaction outputs (UTXOs) and
creates new UTXOs.
o Double-spending is prevented by ensuring all transactions are broadcast to the network and
validated against the current list of UTXOs.
2. Block Formation:
o Transactions are grouped into blocks, which are limited in size (e.g., 1MB for Bitcoin).
o Miners prioritize transactions with higher fees when forming blocks.
3. Proof of Work (PoW):
o PoW is a cryptographic puzzle miners solve to propose a valid block.
o Mining involves finding a nonce that, when hashed with the block's data, produces a hash
within a target range (determined by the network difficulty).
4. Block Rewards and Incentives:
o Miners are incentivized by transaction fees and block rewards (e.g., newly created Bitcoins).
o The block reward started at 50 BTC and halves approximately every four years, capping the
total supply at 21 million BTC.
5. Block Propagation:
o Once a block is mined, it is broadcast to the network.
o Nodes verify the block and its transactions before accepting it into their local copy of the
blockchain.
o If two blocks are mined simultaneously, nodes favor the block that is part of the longest
chain.
6. Network Latency:
o Block propagation times depend on block size and network conditions.
o Larger block sizes (e.g., Bitcoin Cash's 2MB blocks) can result in increased latency,
potentially impacting blockchain growth rates.
7. The Chain's Order and Security:
o The blockchain ensures transaction order, achieved through the chain structure and consensus
mechanism.
o Each new block references the hash of the previous block, ensuring integrity and
immutability.
BITCOIN SCRIPTS
1. Purpose:
o Facilitate transaction validation.
o Ensure that only the rightful owner can spend the Bitcoins locked in a transaction output.
2. Non-Turing Complete:
o Designed for simplicity and security.
o No loops, ensuring scripts always terminate and execute in finite time.
3. Execution:
o Scripts execute left to right.
o They run in a stack-based virtual machine during transaction validation, primarily by
miners.

Bitcoin Transactions
1. Structure:
o A transaction comprises inputs (references to previous transaction outputs) and outputs
(newly created outputs with locking conditions).
o Includes fields such as version, input/output counters, and optional lock time.
2. Key Concepts:
o UTXO (Unspent Transaction Output): The spendable output from a prior transaction.
o ScriptPubKey (Output Script): Locks the Bitcoin to the recipient's address.
o ScriptSig (Input Script): Unlocks a previous UTXO, allowing it to be spent.
3. Validation Process:
o Miners combine the ScriptSig of the current transaction with the ScriptPubKey of the
referenced transaction to form a validation script.
o This combined script executes in a stack-based virtual machine.

Remember that both the inputs and outputs of transactions are equipped with relevant scripts to make it
possible. It is only through the scripts that it can be ensured that you are the authorized user to make a
transaction and you have the necessary amount that you have received from a previous transaction. This
means that both the inputs and outputs are equally important.

SCRIPT EXECUTION
1. Components:
o Data Instructions: Push values (e.g., public keys, signatures) onto the stack.
o Opcodes: Perform operations on the stack (e.g., duplicate values, hash data, verify
signatures).
2. Common Opcodes:
o OP_DUP: Duplicates the top stack item.
o OP_HASH160: Applies SHA-256 followed by RIPEMD-160 hashing.
o OP_EQUALVERIFY: Verifies equality between the top two stack items.
o OP_CHECKSIG: Validates the signature using the public key for the given data.
3. Stack Workflow:
o Instructions are sequentially processed.
o Example for Bob spending Bitcoins:
1. Push Bob's signature and public key onto the stack.
2. Duplicate and hash the public key, matching it against the Bitcoin address.
3. Verify the signature using OP_CHECKSIG.

FULL NODES VS SPVs


Full Nodes:
 Definition: Core components of the Bitcoin network, maintaining the entire blockchain from the
genesis block to the latest block.
 Key Features:
o Download and store the entire blockchain (including all transactions).
o Validate all transactions and blocks independently without relying on external sources.
o Maintain a local copy of the blockchain, ensuring self-sufficiency.
o Extremely secure due to possession of the complete chain; adversaries face high
computational difficulty to present an alternative chain.
o Participate in network maintenance and provide data/services to SPV clients.
 Software: Multiple implementations exist, but "Bitcoin Core" is the most widely used (over 75% of
the network).
 Resources: Require significant storage and computational power to store and process the entire
blockchain and maintain the Unspent Transaction Outputs (UTXO) set.

SPVs (Simple Payment Verification Nodes):


 Definition: Lightweight clients designed to verify transactions without downloading the entire
blockchain.
 Key Features:
o Download only block headers (80 bytes each), significantly reducing data requirements.
o Verify transactions using Merkle tree proofs by linking transaction hashes to block hashes.
o Confirm transactions by ensuring blocks are part of the longest chain (requiring at least six
confirmations).
o Do not maintain the complete blockchain or validate all transactions, relying on full nodes for
additional verification.

 Mechanism:
o Use Bloom filters to query relevant transactions without revealing specific addresses or keys.
o Peers respond with a merkleblock message, including the Merkle root and path for the
transaction of interest.
 Efficiency: Require minimal storage (a few MBs for block headers) and bandwidth, making them
suitable for devices with limited resources.

BITCOIN WALLET
A Bitcoin wallet is a digital tool used to store, manage, and transact Bitcoin securely. It functions as a
repository for your private/public key pair, enabling you to send, receive, and verify Bitcoin transactions.

Key Components of a Bitcoin Wallet:


1. Private Key:
o A randomly generated bit string used to sign transactions, proving ownership of Bitcoin.
o Must be stored securely; losing it results in the permanent loss of access to associated funds.
o Generated using cryptographic algorithms like ECDSA with the secp256k1 curve.
2. Public Key:
o Derived deterministically from the private key.
o Acts as a mathematical complement to the private key, allowing others to verify your
ownership.
o Does not need to be saved separately as it can always be regenerated from the private key.
3. Bitcoin Address:
o A hashed form of the public key, generated using SHA-256 and RIPEMD-160.
o Provides obfuscation and security against direct reconstruction of the private key from the
public key.

Wallet Features:
 Store and protect the private key.
 Generate a public key and Bitcoin address for transactions.
 Retrieve and display UTXOs (Unspent Transaction Outputs).
 Sign transactions using the private key to authorize Bitcoin spending.
 Broadcast signed transactions to the Bitcoin network.

Types of Wallets:
1. Full Node Wallets:
o Connected directly to a Bitcoin full node for maximum security and privacy.
o Requires significant storage and bandwidth to maintain the entire blockchain.
2. SPV Wallets (Lightweight Wallets):
o Do not store the entire blockchain; rely on SPV mechanisms to verify transactions.
o Query full nodes for information, introducing potential privacy risks as the node becomes
aware of your public addresses.
o Example: BitcoinJ (a library for SPV-based wallet creation and interaction).
3. Third-Party Wallet Services:
o Managed by external providers, often offering user-friendly interfaces.
o Centralized services introduce risks of hacking or fraud, potentially leading to the loss of
funds.

How a Bitcoin Wallet Works:


1. Transaction Initiation:
o To send Bitcoin, the wallet identifies available UTXOs by querying a full node or network.
o UTXOs are signed with the private key to authorize the transaction.
2. Verification:
o SPV wallets use the Merkle tree to validate transactions against the blockchain.
o Ensure the block containing the transaction is part of the longest chain.
3. Broadcasting:
o The signed transaction is published to the Bitcoin network for miners to confirm and add to a
block.

You might also like