Blockchain Technology
Blockchain Technology
Bitcoin
• A digital currency to address the complexities, vulnerabilities,
inefficiencies, and costs of current transaction systems.
Bitcoin and blockchain are not the same. Blockchain provides the means to
record and store bitcoin transactions, but blockchain has many uses beyond
bitcoin. Bitcoin is only the first use case for blockchain
Selling Bitcoins – straight forward Few key
steps to be considered
1) Choose a platform – decide where you want to sell a bitcoin.
(Cryptocurrency exchanges, peer-to-peer platforms, bitcoin ATM’s,
brokerage services)
2) Set up an account – create an account and verify your identity (providing
personal information & documents)
3) Transfer Bitcoin to a platform – correct address & double check the fees.
4) Create a sell order – platform sell order or market sell order.
5) Confirm the transaction
6) Withdraw the funds
7) Tax implications
Pseudonymity in Cryptocurrencies
Steps:- Diagram
1.Senders Wallet – Initiates the
transaction using the Bitcoin wallet.
Creating a
*pair of cryptographic keys – Public Transactions
key (Your bitcoin key) & Private key
2.Input-output :- I/p – refers to the
source of the Bitcoins (previous
transactions) & o/p destination. 1.Senders 2.Input-
output
3.Amount
Wallet
3.Amount:- amount of Bitcoin to be
sent.
2.Signing the Transactions
1.Private key – Your wallet signs
the transaction with your private 2.Signing the
key. Transactions
2.Broadcasting – Once signed, the
transaction is broadcast to the
Bitcoin network, where it is picked
up by the nodes.
1.Private key 2.Broadcasting
3.Verification by nodes
1.Validation – Nodes in the
network validate the transaction 3.Verification
by checking if the inputs are valid. by Nodes
“Double-spending” check.
2.Unconfirmed Transaction pool -
After validation, the transaction
enters a pool of unconfirmed 1.Validation
2.Unconfirmed
transactions, waiting to be picked Transaction pool
up by miners.
4.Mining and Confirmation
1.Mining - Miners select transactions from
the unconfirmed pool and include them in a 4.Mining and
new block. To add the block to the Confirmation
blockchain, miners must solve a complex
cryptographic puzzle (Proof of Work).
Recipient’s Wallet
6.Fees
Transaction Fees: Most
transactions include a fee paid to 6.Fees
the miners for processing the
transaction. Higher fees can lead
to faster confirmations.
Transaction Fees
Parameters that invalidate the transactions
1.”Double 4. Incorrect or
2.Insufficient 3.Invalid
Spending” Malformed
Funds Signature
attempt Transaction 5.Insufficient
Transaction
Fees
1)”Double Spending” Attempt
a)Outline:- The same Bitcoin is attempted to be spent in two different
transactions.
b)What Happens:- If they detect a double-spending attempt, they will
reject one or both transactions.
c)Result:- The invalid transaction does not get confirmed, and it
remains in the unconfirmed transaction pool.
2) Insufficient Funds
a)Outline:- The sender tries to send more Bitcoin than they actually
own.
b)What Happens:- Nodes verify the inputs of the transaction by
checking the sender’s balance against the amount they are trying to
send. If there aren’t enough funds, the transaction is rejected.
c)Result:- The transaction is never confirmed and will not be added to
the blockchain.
3) Invalid Signature
a)Outline:- The transaction is not correctly signed with the sender's
private key.
b)What Happens:- The Bitcoin network uses cryptographic algorithms
to verify the signature against the public key. If the signature is invalid,
the transaction fails validation.
c)Result:-The transaction is rejected, and the funds remain in the
sender's wallet.
4) Incorrect or Malformed Transaction
a)Outline:- The transaction is incorrectly formatted, missing required
fields, or contains incorrect data.
b)What Happens:- Nodes will perform various checks on the
transaction format, including ensuring all necessary data is present and
correctly structured. If the transaction is malformed, it will be rejected.
c)Result:-The transaction does not enter the unconfirmed transaction
pool.
Scripting Language Commands in Bitcoin
Bitcoin uses a unique scripting language, called Bitcoin Script.
It is a stack-based in which a Bitcoin transaction can be spent.
Bitcoin Script language is not Turing-complete. (Totally limited in its
capabilities to prevent complex loops or operations that could cause
security issues or infinite loops.)
Various Roles you can play in Bitcoin
Ecosystem
Roles in Bitcoin Ecosystem
5.Bitcoin Node
Operator
6.Bitcoin
7. Bitcoin 8. Bitcoin
wallet
Advocate Security 9. Bitcoin
Developer
Expert Researcher
1.Bitcoin Miner
• Role: Miners validate transactions and secure the Bitcoin network by
solving complex cryptographic puzzles. In return, they receive block
rewards and transaction fees.
• Skills/Tools Needed: Understanding of blockchain technology, access
to mining hardware (ASICs), and knowledge of mining software.
2.Bitcoin Developer
• Role: Developers contribute to the Bitcoin Core codebase, create
Bitcoin wallets, develop decentralized applications (dApps).
• Skills/Tools Needed: Proficiency in programming languages like C++,
Python, or Rust; understanding of Bitcoin's protocol.
3.Bitcoin Trader
• Role: Traders buy and sell Bitcoin on various exchanges to profit from
price fluctuations. They may engage in day trading, swing trading, or
long-term investing.
• Skills/Tools Needed: Knowledge of financial markets, technical
analysis, trading platforms, and risk management.
4.Bitcoin Educator
• Role: Educators and content creators produce educational material,
tutorials, and analysis on Bitcoin, helping newcomers understand the
technology and its implications.
• Skills/Tools Needed: Strong understanding of Bitcoin, ability to
explain complex topics, content creation skills (writing, video
production), and social media presence.
5. Bitcoin Node Operator
• Role: Node operators run a full Bitcoin node, which helps to
propagate transactions and blocks across the network, contributing to
its decentralization and security.
• Skills/Tools Needed: Basic understanding of Bitcoin, ability to set up
and maintain a node (using Bitcoin Core or similar software), and
sufficient hardware and bandwidth.
6.Bitcoin Wallet Developer
• Role: Wallet developers create software that allows users to securely
store, send, and receive Bitcoin. This includes mobile, desktop, and
hardware wallets.
• Skills/Tools Needed: Software development skills, understanding of
Bitcoin's key management and security protocols, and UI/UX design
knowledge.
7. Bitcoin Advocate
• Role: Advocates and organizers promote Bitcoin adoption through
meetups, conferences, online communities, and educational
outreach, often focusing on the principles of decentralization and
financial sovereignty.
• Skills/Tools Needed: Communication skills, passion for Bitcoin,
organizational skills, and networking.
8. Bitcoin Security Expert
• Role: Security experts focus on securing Bitcoin wallets, exchanges,
and infrastructure against hacks, scams, and other vulnerabilities.
• Skills/Tools Needed: Cybersecurity knowledge, cryptographic
expertise, understanding of Bitcoin's security model, and experience
with penetration testing.
9. Bitcoin Researcher
• Role: Researchers explore the theoretical and practical aspects of
Bitcoin, including its economic impact, technical improvements, and
potential vulnerabilities.
• Skills/Tools Needed: Analytical skills, familiarity with academic
research methods, knowledge of Bitcoin's protocol, and
understanding of cryptoeconomics.
Bitcoin Script
• Bitcoin Script is crucial to the Bitcoin protocol, enabling users to set
conditions for spending funds in transactions.
• Serves as the scripting language behind Bitcoin transactions, allowing
users to define the conditions under which funds can be spent.
• It uses a Last-In-First-Out (LIFO) stack-based structure, making the
language efficient for conditional spending.
• Inspired by the Forth language, Bitcoin Script is minimalistic and
efficient, using opcodes to perform stack operations.
• Designed to be Turing incomplete, it enhances security by preventing
the execution of malicious or infinite loops.
• Two fundamental components in the Bitcoin Script universe are :
• ScriptSig and scriptPubKey: In every Bitcoin transaction, scriptSig
provides spending evidence, while scriptPubKey sets the conditions
for spending.
Name Functions
OP_DUP Duplicates top item on the stack
OP_EQUALVERIFY Returns true if inputs are equal, false (marks transaction invalid)
otherwise
OP_CHECKSIG Checks that the input signature is valid using input public key for
the hash of the current transaction
OP_CHECKMULTISIG Checks that t signatures on the transaction are valid from t (out of
n) of the specified public keys
Bitcoin script execution example
✓
<pubKeyHash?>
<pubKey>
<pubKeyHash>
<pubKey>
<sig>
true