Professional Documents
Culture Documents
Seminar Report
On
“Bitcoin using Block Chain Technology”
Bachelor of Technology
in
Computer Science and Engineering
By
BHAVANI J
Reg No: 172U1A0520
Department of
Computer Science and Engineering
www.gist.edu.in
CERTIFICATE
This is to certify that seminar report entitled “Bitcoin using Block Chain
Technology” is submitted by Bhavani J (Reg No: 172U1A0520)
in the partial fulfillment of requirements for the award of degree of
Bachelor of Technology
in
Computer Science and Engineering
1. Abstract 1
2. 1.Introduction 2
3. 2.Bitcoin 4
2.1 A Block in Block Chain 6
2.2 Block Header 7
4. 3. Bitcoin Mining 9
3.1Double SHA-256 10
3.2Bitcoin Transaction 12
5. 4.Different types of Crypto currencies 15
6. 5.Advantages 18
7. 6.Disadvantages 20
8. 7.Conclusion 21
9. 8.References 22
3. 3 Bitcoin Mining 9
Abstract
Bitcoin is a completely decentralized, peer to peer permission-less cryptocurrency
developed by NAKAMOTO, SATOSHI. Technology behind Bitcoin is Block Chain
Technology. A Block Chain is a open distributed ledger that can record transactions
between two parties, efficiently (fast and scalable), verifiable (everyone can check
and validate the info) in a permanent way. The Block in Bitcoin includes digitally
signed and encrypted transactions verified by peers, cryptography security algorithms,
Block header which contains (previous block hash, mining statistics used to construct
the block and Merkle tree root). Mining statistics provides the mechanism to generate
Hash value that is complicated enough to make the Block chain Tamper Proof. This
task is performed by the Miner. They generate Nonce value that ensures difficulty on
the generated Hash value. The algorithm used to generate Hash value is Double
SHA256. The basic paradigms of Bitcoin are : “ Distributed Ledger, Tamper Proof
Architecture, Permission less environment based on Challenge Response Scenario,
The Economy of Revenue Model ”.
1. Introduction
A Block Chain is an open distributed ledger that can record transactions between two
parties efficiently and in a verifiable and permanent way. A blockchain is
essentially a digital ledger of transactions that is duplicated and distributed
across the entire network of computer systems on the blockchain. Each block
in the chain contains a number of transactions, and every time a new
transaction occurs on the blockchain, a record of that transaction is added to
every participant’s ledger. The decentralized database managed by multiple
participants is known as Distributed Ledger Technology (DLT).Blockchain is
a type of DLT in which transactions are recorded with an immutable
cryptographic signature called a Hash.
blocks, that hold sets of information. Blocks have certain storage capacities and, when
filled, are chained onto the previously filled block, forming a chain of data known as
the “blockchain.” All new information that follows that freshly added block is
compiled into a newly formed block that will then also be added to the chain once
filled.
A database structures its data into tables whereas a blockchain, like its name
implies, structures its data into chunks (blocks) that are chained together. This makes
it so that all blockchains are databases but not all databases are blockchains. This
system also inherently makes an irreversible timeline of data when implemented in a
decentralized nature. When a block is filled it is set in stone and becomes a part of this
timeline. Each block in the chain is given an exact timestamp when it is added to the
chain.
Blockchain technology accounts for the issues of security and trust in several
ways. First, new blocks are always stored linearly and chronologically. That is, they
are always added to the “end” of the blockchain. If you take a look at Bitcoin’s
blockchain, you’ll see that each block has a position on the chain, called a “height.”
As of November 2020, the block’s height had reached 656,197 blocks so far.
2. BITCOIN
Bitcoin is a digital currency created in January 2009. It follows the ideas set
out in a whitepaper by the mysterious and pseudonymous Satoshi Nakamoto. The
identity of the person or persons who created the technology is still a mystery. Bitcoin
offers the promise of lower transaction fees than traditional online payment
mechanisms and, unlike government-issued currencies, it is operated by a
decentralized authority.
Bitcoin is a type of cryptocurrency. There is no physical bitcoin, only balances
kept on a public ledger that everyone has transparent access to. All bitcoin
transactions are verified by a massive amount of computing power. Bitcoin is not
issued or backed by any banks or governments, nor is an individual bitcoin valuable
as a commodity. Despite it not being legal tender in most parts of the world, bitcoin is
very popular and has triggered the launch of hundreds of other cryptocurrencies,
collectively referred to as altcoins. Bitcoin is commonly abbreviated as "BTC."
The bitcoin system is a collection of computers (also referred to as "nodes" or
"miners") that all run bitcoin's code and store its blockchain. Metaphorically, a
blockchain can be thought of as a collection of blocks. In each block is a collection of
transactions. Because all the computers running the blockchain have the same list of
blocks and transactions, and can transparently see these new blocks being filled with
new bitcoin transactions, no one can cheat the system.
Anyone—whether they run a bitcoin "node" or not—can see these transactions
occurring in real-time. To achieve a nefarious act, a bad actor would need to operate
51% of the computing power that makes up bitcoin. Bitcoin has around 10,000 nodes,
as of June 2021, and this number is growing, making such an attack quite unlikely.But
if an attack were to happen, bitcoin miners—the people who take part in the bitcoin
network with their computers—would likely fork to a new blockchain, making the
effort the bad actor put forth to achieve the attack a waste.Balances of bitcoin tokens
are kept using public and private "keys," which are long strings of numbers and letters
linked through the mathematical encryption algorithm that was used to create them.
The public key (comparable to a bank account number) serves as the address
published to the world and to which others may send bitcoin.The private key
(comparable to an ATM PIN) is meant to be a guarded secret and only used to
authorize bitcoin transmissions. Bitcoin keys should not be confused with a bitcoin
wallet, which is a physical or digital device that facilitates the trading of bitcoin and
allows users to track ownership of coins. The term "wallet" is a bit misleading, as
bitcoin's decentralized nature means it is never stored "in" a wallet, but rather
decentrally on a blockchain.
In this way, bitcoin and other cryptocurrencies operate differently from fiat
currency; in centralized banking systems, the currency is released at a rate matching
the growth in goods; this system is intended to maintain price stability. A
decentralized system, like bitcoin, sets the release rate ahead of time and according to
an algorithm.
A block can be thought of like a link in a chain. It possesses parts or all of the
records of the transactions that preceded it.the blockchain network is comprised of
millions of blocks that are in a constant state of flux.A block is virtually impossible to
hack. If it was possible, it would have the same effect as a bank robber reaching over
the counter and not only taking money but all the bank's records as well.Bitcoin
miners can solve complex mathematical equations, and are awarded BTC, or bitcoins,
for their effort in finding the solutions.
A block represents the ‘present’ and contains information about its past and
future. Each time a block is completed it becomes part of the past and gives way to a
new block in the blockchain. The completed block is a permanent record of
transactions in the past and the new transactions are recorded in the current one.This
way, the whole system works in a cycle and data gets permanently stored. Each block
comprises records of some or all recent transactions, and a reference to the block that
preceded it which, along with Bitcoin's peer-to-peer verification system, makes it
virtually impossible for a user to tamper with previously recorded transaction data.
single transaction confirmation that a bank ATM prints out after you use the machine.
Within the blockchain network, the individual blocks build a 'ledger' much like an
ATM or bank would record your transactions.Blockchain though, records the chain
across all their users instead of one. This is similar to a bank, but the blockchain offers
an increased level of privacy versus normal banking institutions.
The blocks get layered—one on top of the other, with the first block being the
foundation—and they grow in height until the end of the blockchain is reached and
the sequence is complete. The first block in the chain is also known as the “genesis
block.” The layers and deep history of each sequence is one of the things that makes
Bitcoin so secure. As a part of a standard mining exercise, a block header is hashed
repeatedly by miners by altering the nonce value. Through this exercise, they attempt
to create a proof of work, which helps miners get rewarded for their contributions to
keep the blockchain system running smoothly and efficiently.
The block header contains three sets of block metadata. It is an 80-byte long string,
and it is comprised of the 4-byte long Bitcoin version number, 32-byte previous block
hash, 32-byte long Merkle root, 4-byte long timestamp of the block, 4-byte
long difficulty target for the block, and the 4-byte long nonce used by miners.
3. BITCOIN MINING
Bitcoin mining is the process by which new bitcoins are entered into circulation, but it
is also a critical component of the maintenance and development of the blockchain
ledger. It is performed using very sophisticated computers that solve extremely
complex computational math problems.
Cryptocurrency mining is painstaking, costly, and only sporadically rewarding.
Nonetheless, mining has a magnetic appeal for many investors interested in
cryptocurrency because of the fact that miners are rewarded for their work with crypto
tokens.
By mining, you can earn cryptocurrency without having to put down money
for it.Bitcoin miners receive Bitcoin as a reward for completing "blocks" of verified
transactions, which are added to the blockchain.Mining rewards are paid to the miner
who discovers a solution to a complex hashing puzzle first, and the probability that a
participant will be the one to discover the solution is related to the portion of the total
mining power on the network.You need either a GPU (graphics processing unit) or an
application-specific integrated circuit (ASIC) in order to set up a mining rig.
The Bitcoin reward that miners receive is an incentive that motivates people to
assist in the primary purpose of mining: to legitimize and monitor Bitcoin transactions,
ensuring their validity. Because these responsibilities are spread among many users all
over the world, Bitcoin is a "decentralized" cryptocurrency, or one that does not rely
on any central authority like a central bank or government to oversee its regulation.
Miners are getting paid for their work as auditors. They are doing the work of
verifying the legitimacy of Bitcoin transactions. This convention is meant to keep
Bitcoin users honest and was conceived by Bitcoin's founder, Satoshi Nakamoto. By
verifying transactions, miners are helping to prevent the "double-
spending problem."
In Bitcoin mining, the double SHA-256 algorithm is used to compute the hash value
of the bitcoin block header, which is a 1024-bit message. The use of double SHA-256
protects against the length extension attack . Technically, SHA-256 consists of a
message expander (ME) and a message compressor (MC). During the SHA-256
operation, the ME expands the 512-bit input message into 64 chunks of 32-bit data.
The MC compresses these 64 32-bit data chunks into a 256-bit hashed output.
Fig. 3.1 shows the overview architecture of double SHA-256 applied for Bitcoin
mining. The input to the double SHA-256 process is a 1024-bit message, which
includes a 32-bit version, a 256-bit hash of the previous block, a 256-bit hash of the
Merkle root, a 32-bit timestamp, a 32-bit target, a 32-bit nonce, and 384 bits of
padding. The 1024-bit message is split into two 512-bit message parts; then SHA-
2561 calculates a hash value of the first 512-bit message, and SHA-2562 computes a
hash value of the final 512-bit message. Due to the double SHA-256 requirement, the
256-bit hash output from SHA-2562 must be compressed into the final 256-bithash
by using SHA-2563 . In the Bitcoin mining process, the final 256-bit hash output from
SHA-2563 is compared to the target value. If the final hash is smaller than the target
value, the valid 32-bit nonce is specified, and a new Bitcoin block is successfully
created. Otherwise, the 32-bit nonce is increased by one and the double SHA-256
circuit recomputes to find a new hash value. This process is repeated until the 256-bit
hash of SHA-2563 meets the target requirement.
Computation inside all three blocks (SHA-2561, SHA-2562, and SHA-2563) follows
the SHA-256 algorithm, which has two processes: a message expander (ME) and a
message compressor (MC).
A transaction doesn’t simply move some bitcoin from one address to another address.
A Bitcoin transaction moves bitcoins between one or more inputs and outputs. Each
input is a transaction and address supplying bitcoins. Each output is an address
receiving bitcoin, along with the amount of bitcoin going to that address.
From the Fig 3.2.2, shows a sample transaction “C”. In this transaction, .005 BTC is
taken from an address in Transaction A, and .003 BTC is taken from an address in
Transaction B. For the outputs, .003 BTC are directed to the first address and .004
BTC are directed to the second address. The leftover .001 BTC goes to the miner of
the block as a fee. Each input used must be entirely spent in a transaction. If an address
received 100 bitcoins in a transaction and you just want to spend 1 bitcoin, the
transaction must spend all 100. The solution is to use a second output for change,
which returns the 99 leftover bitcoins back to you.
Transactions can also include fees. If there are any bitcoins left over after
adding up the inputs and subtracting the outputs, the remainder is a fee paid to the
miner. The fee isn’t strictly required, but transactions without a fee will be a low
priority for miners and may not be processed for days or maybe discarded entirely. A
typical fee for a transaction is 0.0002 bitcoins (about 20 cents), so fees are low but not
trivial.
STEPS INVOLVED IN TRANSACTIONS:
1. Transaction creation and signing :
Anyone can create a transaction with 3 necessary components. The Input,
Amount and Output. For example, let´s say that Bob and Alice are exchanging bitcoin
for dollars. As Bob sends the bitcoin to Alice, Alice needs to send her bitcoin address
(public) and Bob creates the transaction and sign it with his private key.
2. Broadcasting :
Once the transaction is created, it is sent to the closest node on the bitcoin
network. Note: The transaction does not need to be sent right after the creation. It
could be sent a long time after the creation (just need to be sure that you have enough
bitcoins in the wallet when you decide to send it).
3. Propagation and verification :
Once the transaction arrives at the closest node, then it is propagated into the
network and verified. After it successfully passes verification it goes and sits inside the
“Memory pool” and patiently waits until a miner picks it up to include it in the next
block.
4. Validation :
Once the transaction is on the Memory pool, then the miners pick up the
transactions (First those who pays more transaction fee) and group them in blocks. As
on May 2017, each block has a maximum size limit of 1 MB (change in this limit is
under discussion by the community) and contains around 2.000 to 3000 transactions,
depending on the size of each transaction. Then, by using the Proof-of-Work
Consensus Algorithm, the network agrees on the valid block, and consequently the
transactions, on average every 10 minutes.
contracts and decentralized applications to be built and run without any downtime,
fraud, control, or interference from a third party. The goal behind Ethereum is to
create a decentralized suite of financial products that anyone in the world can freely
access, regardless of nationality, ethnicity, or faith. This aspect makes the
implications for those in some countries more compelling, as those without state
infrastructure and state identifications can get access to bank accounts, loans,
insurance, or a variety of other financial products.
Litecoin (LTC) :
Litecoin, launched in 2011, was among the first cryptocurrencies to follow in
the footsteps of Bitcoin and has often been referred to as “silver to Bitcoin’s gold.” It
was created by Charlie Lee, an MIT graduate and former Google engineer. Litecoin is
based on an open-source global payment network that is not controlled by any central
authority and uses “scrypt” as a proof of work, which can be decoded with the help of
consumer-grade CPUs. Although Litecoin is like Bitcoin in many ways, it has a faster
block generation rate and hence offers a faster transaction confirmation time. Other
than developers, there are a growing number of merchants that accept Litecoin. As of
January 2021, Litecoin has a market capitalization of $10.1 billion and a per-token
value of $153.88, making it the sixth-largest cryptocurrency in the world.
Cardano (ADA) :
Cardano is an “Ouroboros proof-of-stake” cryptocurrency that was created
with a research-based approach by engineers, mathematicians, and cryptography
experts. The project was cofounded by Charles Hoskinson, one of the five initial
founding members of Ethereum. After having some disagreements with the direction
Ethereum was taking, he left and later helped to create Cardano.
Polkadot (DOT) :
Polkadot is a unique proof-of-stake cryptocurrency that is aimed at delivering
interoperability among other blockchains. Its protocol is designed to connect
permissioned and permission-less blockchains, as well as oracles, to allow systems to
work together under one roof.
Stellar (XLM) :
Stellar is an open blockchain network designed to provide enterprise solutions
by connecting financial institutions for the purpose of large transactions. Huge
transactions between banks and investment firms—typically taking several days,
involving a number of intermediaries, and costing a good deal of money—can now be
done nearly instantaneously with no intermediaries and cost little to nothing for those
making the transaction.
Chainlink :
Chainlink is a decentralized oracle network that bridges the gap between smart
contracts, like the ones on Ethereum, and data outside of it. Blockchains themselves
do not have the ability to connect to outside applications in a trusted manner.
Chainlink’s decentralized oracles allow smart contracts to communicate with outside
data so that the contracts can be executed based on data that Ethereum itself cannot
connect to.
Tether (USDT) :
Tether was one of the first and most popular of a group of so-
called stablecoins, cryptocurrencies that aim to peg their market value to a currency or
other external reference point to reduce volatility. Because most digital currencies,
even major ones like Bitcoin, have experienced frequent periods of dramatic volatility,
Tether and other stablecoins attempt to smooth out price fluctuations to attract users
who may otherwise be cautious. Tether’s price is tied directly to the price of the U.S.
dollar. The system allows users to more easily make transfers from other
cryptocurrencies back to U.S. dollars in a more timely manner than actually
converting to normal currency.
Monero (XMR) :
Monero is a secure, private, and untraceable currency. This open-source
cryptocurrency was launched in April 2014 and soon garnered great interest among
the cryptography community and enthusiasts. The development of this cryptocurrency
is completely donation-based and community-driven. Monero has been launched with
a strong focus on decentralization and scalability, and it enables complete privacy by
using a special technique called “ring signatures.”
5. ADVANTAGES
Accuracy of the Chain
Transactions on the blockchain network are approved by a network of thousands of
computers. This removes almost all human involvement in the verification process,
resulting in less human error and an accurate record of information. Even if a
computer on the network were to make a computational mistake, the error would only
be made to one copy of the blockchain. In order for that error to spread to the rest of
the blockchain, it would need to be made by at least 51% of the network’s
computers—a near impossibility for a large and growing network the size of Bitcoin’s.
Cost Reductions
Typically, consumers pay a bank to verify a transaction, a notary to sign a document,
or a minister to perform a marriage. Blockchain eliminates the need for third-party
verification and, with it, their associated costs. Business owners incur a small fee
whenever they accept payments using credit cards, for example, because banks and
payment processing companies have to process those transactions. Bitcoin, on the
other hand, does not have a central authority and has limited transaction fees.
Decentralization
Blockchain does not store any of its information in a central location. Instead, the
blockchain is copied and spread across a network of computers. Whenever a new
block is added to the blockchain, every computer on the network updates its
blockchain to reflect the change. By spreading that information across a network,
rather than storing it in one central database, blockchain becomes more difficult to
tamper with. If a copy of the blockchain fell into the hands of a hacker, only a single
copy of the information, rather than the entire network, would be compromised.
Efficient Transactions
Transactions placed through a central authority can take up to a few days to settle. If
you attempt to deposit a check on Friday evening, for example, you may not actually
see funds in your account until Monday morning. Whereas financial institutions
operate during business hours, five days a week, blockchain is working 24 hours a day,
seven days a week, and 365 days a year. Transactions can be completed in as little as
ten minutes and can be considered secure after just a few hours. This is particularly
useful for cross-border trades, which usually take much longer because of time-zone
issues and the fact that all parties must confirm payment processing.
Private Transactions
Many blockchain networks operate as public databases, meaning that anyone with an
internet connection can view a list of the network’s transaction history. Although
users can access details about transactions, they cannot access identifying information
blockchain networks like bitcoin are anonymous, when in fact they are only
confidential.
Secure Transactions
Once a transaction is recorded, its authenticity must be verified by the blockchain
network. Thousands of computers on the blockchain rush to confirm that the details of
the purchase are correct. After a computer has validated the transaction, it is added to
the blockchain block. Each block on the blockchain contains its own unique hash,
along with the unique hash of the block before it. When the information on a block is
edited in any way, that block’s hash code changes—however, the hash code on the
block after it would not. This discrepancy makes it extremely difficult for information
on the blockchain to be changed without notice.
Transparency
Most blockchains are entirely open-source software. This means that anyone and
everyone can view its code. This gives auditors the ability to review cryptocurrencies
like Bitcoin for security. This also means that there is no real authority on who
controls Bitcoin’s code or how it is edited. Because of this, anyone can suggest
changes or upgrades to the system. If a majority of the network users agree that the
new version of the code with the upgrade is sound and worthwhile then Bitcoin can be
updated.
6. DISADVANTAGES
Technology Cost
Although blockchain can save users money on transaction fees, the technology is far
from free. The “proof of work” system that bitcoin uses to validate transactions, for
example, consumes vast amounts of computational power. Assuming electricity costs
of $0.03~$0.05 per kilowatt-hour, mining costs exclusive of hardware expenses are
about $5,000~$7,000 per coin.
Despite the costs of mining bitcoin, users continue to drive up their electricity bills in
order to validate transactions on the blockchain. That’s because when miners add a
block to the bitcoin blockchain, they are rewarded with enough bitcoin to make their
time and energy worthwhile. When it comes to blockchains that do not use
cryptocurrency, however, miners will need to be paid or otherwise incentivized to
validate transactions.
Speed Inefficiency
Bitcoin is a perfect case study for the possible inefficiencies of blockchain. Bitcoin’s
“proof of work” system takes about ten minutes to add a new block to the blockchain.
At that rate, it’s estimated that the blockchain network can only manage about seven
transactions per second (TPS). Although other cryptocurrencies such as Ethereum
perform better than bitcoin, they are still limited by blockchain. Legacy brand Visa,
for context, can process 24,000 TPS.
7. CONCLUSION
8. REFERENCES
https://www.investopedia.com/tech/forget-bitcoin-blockchain-future/
https://www.investopedia.com/news/how-bitcoin-works/
Bitcoin Fundamentals: Step by step explanation of a peer-to-peer Bitcoin
transaction.
Double SHA-256 Hardware Architecture with Compact Message Expander for
Bitcoin Mining.