Professional Documents
Culture Documents
Unit I BCT 1
Unit I BCT 1
UNIT-I
Basics of Blockchain
Appearing on the 4.0 technology market in the past few years, Blockchain
technology is emerging with great developments in daily activities in many areas
of socio-economic life and gradually becoming a new trend in the global
technology and investment market. This technology has the potential to bring
efficiency not only in terms of information but also to help improve operating
systems in many organizations/enterprises. Vietnam is no exception to this trend.
Therefore, it is very necessary to learn about Blockchain, especially the young
generation in Vietnam.
Normally, a Blockchain platform are formed by 5 components, including:
• 1. Distributed Ledger
• 2. Peer-to-peer network – P2P
• 3. Consensus Mechanism
• 4. Cryptography
• 5. Virtual Machine
1. Distributed Ledger
Definition
An electronic ledger is essentially a database containing all transactions that are
constantly updated. It is composed of multiple blocks (each containing at least one
transaction) and these blocks are linked together into a chain using cryptography.
In other words, the following block will contain the cryptographic identifiers of the
previous block. So, if any block in the past has a problem, it will affect all the
blocks at the back of the chain.
Highlights
Definition
A Peer-to-peer network (P2P) is a decentralized model to communicate between
many participants also known as peer nodes without any central servers or
dependence on any other nodes. A P2P network allows each party to act as both a
client and a server. This means that after the network is formed, all participants
own a copy of the ledger. From there it can be used to share and store files without
the help of an Intermediary.
Highlights
• On a Blockchain network, each node flexibly participates in the role of a client and a
server of other nodes to jointly provide and control data
• Decentralizing database and management rights eliminates the intermediary in
traditional models, which allows members to directly exchange information with each
other
• All records of data are copied by all nodes to ensure the continuity of the system
operation and limit single point failures (SPOF) and denial of service (DoS)
• Improving availability for both data and methods of validating helps the system to
avoid information loss or inability to verify.
Classification
3. Consensus Mechanism
Definition
The consensus mechanism prescribes sets of rules so that nodes participating in the
peer-to-peer network can work in sync and agree on which transactions are
legitimate and able to be added to the blockchain. The consensus mechanism is
used to determine the actual state of the blockchain.
Highlights
• Ensure the entire system is fault tolerant to achieve the desired agreement of a single
data value or a single network status
• Create a way for all participants to maintain the safety and security of the Blockchain
network.
• Prevent double-spending on the Blockchain for cryptocurrency transactions on the
Blockchain platform.
Classification
Each type of Blockchain will have a different consensus mechanism. Currently,
there are two types of consensus mechanisms most commonly used
4. Cryptography
Definition
This component ensures the security, integrity and verification of the information
in the ledger or the information transmitted between the nodes. By building on a
foundation of mathematics (especially probability theory) along with knowledge of
game theory, cryptography has come up with encryption methods that are
impossible to break.
Classification
There are two main types of encryption methods:
Relevant Techniques
5. Virtual Machine
Definition
A virtual machine is a program that simulates a computer system. It has a CPU,
memory and virtual storage. Basically, a virtual machine works like a physical
computer, it can be used to store data, run application programs, and exist to jointly
operate a Blockchain network with other virtual machines.
Extension
It can be seen that the knowledge of Blockchain technology is extremely vast.
Therefore, to be able to effectively implement the necessary Blockchain
applications/solutions, organizations/enterprises in Vietnam need to have a deep
understanding of Blockchain technology and application potential to be able to
catch up with the most developing trends of the world technology market, get
closer to Blockchain technology projects and researches in Vietnam.
Types of Blockchain
By using blockchain we can track orders and payments from end to end.
Advantage using blockchain :
Improve Speed.
Smart contracts
The owner cannot access the private key again if they forget or lose it.
In healthcare management.
NFT marketplace.
Internet of Things
Permissionless Blockchain
Characteristics:
Advantages:
Disadvantages:
Permissioned Blockchain
These are the closed network only a set of groups are allowed to validate
transactions or data in a given blockchain network. These are used in the network
where high privacy and security are required.
Characteristics:
Another feature is the lack of anatomy as only a limited number of users are
allowed.
Advantages:
Disadvantages:
Not truly decentralized as it requires permission
Anytime owner and operator can change the rules as per their need.
Types of Blockchain
Public Blockchain.
Private Blockchain.
Hybrid Blockchain.
Consortium Blockchain.
Types of Blockchain
1. Public Blockchain
As the name is public this blockchain is open to the public, which means it is not
owned by anyone.
Anyone having internet and a computer with good hardware can participate in this
public blockchain.
All the computer in the network hold the copy of other nodes or block present in
the network
Advantages:
Trustable: There are algorithms to detect no fraud. Participants need not worry
about the other nodes in the network
Secure: This blockchain is large in size as it is open to the public. In a large size,
there is greater distribution of records
Disadvantages:
Processing: The rate of the transaction process is very slow, due to its large size.
Verification of each node is a very time-consuming process.
Use Cases: Public Blockchain is secured with proof of work or proof of stake they
can be used to displace traditional financial systems. The more advanced side of
this blockchain is the smart contract that enabled this blockchain to support
decentralization. Examples of public blockchain are Bitcoin, Ethereum.
2. Private Blockchain
These blockchains are not as decentralized as the public blockchain only selected
nodes can participate in the process, making it more secure than the others.
Advantages:
Speed: The rate of the transaction is high, due to its small size. Verification of each
node is less time-consuming.
Scalability: We can modify the scalability. The size of the network can be decided
manually.
Privacy: It has increased the level of privacy for confidentiality reasons as the
businesses required.
Balanced: It is more balanced as only some user has the access to the transaction
which improves the performance of the network.
Disadvantages:
Centralized- Trust building is one of the main disadvantages due to its central
nature. Organizations can use this for malpractices.
Count- Since there are few nodes if nodes go offline the entire system of
blockchain can be endangered.
Use Cases: With proper security and maintenance, this blockchain is a great asset
to secure information without exposing it to the public eye. Therefore companies
use them for internal auditing, voting, and asset management. An example of
private blockchains is Hyperledger, Corda.
3. Hybrid Blockchain
It is the mixed content of the private and public blockchain, where some part is
controlled by some organization and other makes are made visible as a public
blockchain.
Even a primary entity owns a hybrid blockchain it cannot alter the transaction
Advantages:
Ecosystem: Most advantageous thing about this blockchain is its hybrid nature. It
cannot be hacked as 51% of users don’t have access to the network
Cost: Transactions are cheap as only a few nodes verify the transaction. All the
nodes don’t carry the verification hence less computational cost.
Operations: It can choose the participants in the blockchain and decide which
transaction can be made public.
Disadvantages:
Transparency: There is a possibility that someone can hide information from the
user. If someone wants to get access through a hybrid blockchain it depends on the
organization whether they will give or not.
Ecosystem: Due to its closed ecosystem this blockchain lacks the incentives for
network participation.
Use Case: It provides a greater solution to the health care industry, government,
real estate, and financial companies. It provides a remedy where data is to be
accessed publicly but needs to be shielded privately. Examples of Hybrid
Blockchain are Ripple network and XRP token.
4. Consortium Blockchain
It is a creative approach that solves the needs of the organization. This blockchain
validates the transaction and also initiates or receives transactions.
Advantages:
Speed: A limited number of users make verification fast. The high speed makes
this more usable for organizations.
Authority: Multiple organizations can take part and make it decentralized at every
level. Decentralized authority, makes it more secure.
Privacy: The information of the checked blocks is unknown to the public view. but
any member belonging to the blockchain can access it.
Disadvantages:
Approval: All the members approve the protocol making it less flexible. Since one
or more organizations are involved there can be differences in the vision of
interest.
Use Cases: It has high potential in businesses, banks, and other payment
processors. Food tracking of the organizations frequently collaborates with their
sectors making it a federated solution ideal for their use. Examples of consortium
Blockchain are Tendermint and Multichain.
CRYPTOPRIMITIVES:
The hash function takes the input of variable lengths and returns outputs of fixed
lengths. In cryptographic hash functions, the transactions are taken as inputs and
the hash algorithm gives an output of a fixed size.
The below diagram shows how hashes work.
The blockchain has a number of different uses for hash functions. Some of the
most common uses of the hash function in blockchain are:
• Merkle Tree: This uses hash functions to make sure that it is infeasible to
find two Merkle trees with the same root hash. This helps to protect the
integrity of the block header by storing the root hash within the block header
and thus protecting the integrity of the transactions.
• Proof of Work Consensus: This algorithm defines a valid block as the one
whose block header has a hash value less than the threshold value.
• Digital signatures: Hash functions are the vital part of digital signatures that
ensures data integrity and are used for authentication for blockchain
transactions.
• The chain of blocks: Each block header in a block in the blockchain contains
the hash of the previous block header. This ensures that it is not possible to
change even a single block in a blockchain without being detected. As
modifying one block requires generating new versions of every following
block, thus increasing the difficulty.
Thus, it can be concluded hash functions are a vital part of the blockchain
technology used to protect the integrity and immutability of the data stored on the
blockchain.
Digital Signature
Digital signatures are often used to implement electronic signatures, a broader term
that refers to any electronic data that carries the intent of a signature, but not all
electronic signatures use digital signatures. Digital signatures employ asymmetric
cryptography. Asymmetric cryptography, also known as public key cryptography
(PKI), uses public and private keys to encrypt and decrypt data. The keys are
simply large numbers that have been paired together but are not identical
(asymmetric). One key in the pair can be shared with everyone; it is called
the public key. The other key in the pair is kept secret; it is called the private key.
Either of the keys can be used to encrypt a message; the opposite key from the one
used to encrypt the message is used for decryption.In many instances they provide a
layer of validation and security to messages sent through a non-secure channel.
Digital signatures are equivalent to traditional handwritten signatures in many
respects, but properly implemented digital signatures are more difficult to forge
than the handwritten type.
Let’s dive into this concept from blockchain perspective with the help of an
example:
Public key cryptography is a cryptographic system where you have 2 keys — public
key (Pu) and a private key(Pr). You give out your public key to the entire world
and keep the private key to yourself. e.g. Your Ethereum address is a public key and
your private key is stored either in your browser / mobile / hardware wallet.
Consider public key like an bank account number, for someone to send you money
(Ether), they just need to know your public (account) address. However, only you
can access the funds in your account because you are the only one who knows your
private key, say similar to your bank account password.
Public key cryptography has algorithms that let you encrypt, decrypt, sign and
verify messages using your pair of keys. Let’s explore how these steps flows with
an example
1. Signing the message with private key: To create a digital signature, signing
software (such as an email program) creates a one-way hash of the electronic
data to be signed. The private key is then used to encrypt the hash. The
encrypted hash — along with other information, such as the hashing algorithm
— is the digital signature. The reason for encrypting the hash instead of the
entire message or document is that a hash function can convert an arbitrary
input into a fixed length value, which is usually much shorter. This saves time
since hashing is much faster than signing.
2. Verifying the message with public key: This would involve two steps,
generate hash of the message and signature decryption. By using the signer’s
public key, the hash could be de-crypted. If this de-crypted hash matches a
second computed hash of the same data, it proves that the data hasn’t changed
since it was signed. If the two hashes don’t match, the data has either been
tampered with in some way (integrity) or the signature was created with a
private key that doesn’t correspond to the public key presented by the signer
(authentication)
(To develop basic understanding of how digital signatures work in cryptography, it
is highly recommended to learn more in detail — Cryptography & Digital
Signatures.)
Practical Applications:
• Digital Signatures are used in software programs, such as browsers, which need
to establish a secure connection over an insecure network like the internet.
Users and systems need to be certain that a public key is authentic, that it
belongs to the person or entity claimed and that it has not been tampered with
or replaced by a malicious third party.
• Digital Signatures can be used for B2B communications & transactions, that
can validate the source & can be sent to only intended party without any
middlemen
· Signatures with efficient protocols — are signature schemes that facilitate efficient
cryptographic protocols such as zero-knowledge proofs or secure computation.
Each node in the network verifies the submitted transaction and then makes an
informed decision asking the whole network to add it. And that’s how the use of
digital signing network participants can authorize the transaction and account.
Blockchain Merkle Trees
A hash tree is also known as Merkle Tree. It is a tree in which each leaf node is
labeled with the hash value of a data block and each non-leaf node is labeled with
the hash value of its child nodes labels.
What is a Cryptographic Hash?
• From the above picture, it is clear that even the slightest change in an alphabet
in the input sentence can drastically change the hash obtained. Therefore
hashes can be used to verify integrity.
• Consider there is a text file with important data. Pass the contents of the text
file into a hash function and then store the hash in the phone. A hacker
manages to open the text file and changes the data.
• Now when you open the file again, you can compute the hash again and
compare this hash with the one stored previously on the phone.
• It will be clearly evident that the two hashes do not match and hence the file
has been tampered with.
A regular pointer stores the memory address of data. With this pointer, the data
can be accessed easily. On the other hand, a hash pointer is a pointer to where
data is stored and with the pointer, the cryptographic hash of the data is also
stored. So a hash pointer points to the data and also allows us to verify the data. A
hash pointer can be used to build all kinds of data structures such as blockchain
and Merkle tree.
Blockchain Structure
Block Structure
1. Block header: The header data contains metadata of the block, i.e information
about the block itself. The contents of the block header include-
• Hash of the previous block header.
• Hash of the current block.
• Timestamp.
• Cryptographic nonce.
• Merkle root.
2. Merkle tree: A Merkle tree is a binary tree formed by hash pointers, and
named after its creator, Ralph Merkle.
• As mentioned earlier, each block is supposed to hold a certain number of
transactions. Now the question arises, how to store these transactions within a
block? One approach can be to form a hash pointer-based linked list of
transactions and store this complete linked list in a block. However, when we
put this approach into perspective, it does not seem practical to store a huge
list of hundreds of transactions. What if there is a need to find whether a
particular transaction belongs to a block? Then we will have to traverse the
blocks one by one and within each block traverse the linked list of
transactions.
• This is a huge overhead and can reduce the efficiency of the blockchain. Now,
this is where the Merkle tree comes into the picture. Merkle tree is a per-block
tree of all the transactions that are included in the block. It allows us to have a
hash/digest of all transactions and provides proof of membership in a time-
efficient manner.
• So to recap, the blockchain is a hash-based linked list of blocks, where each
block consists of a header and transactions. The transactions are arranged in a
tree-like fashion, known as the Merkle tree.
Each block comprises of block header + Merkle tree
• A Merkle tree is constructed from the leaf nodes level all the way up to the
Merkle root level by grouping nodes in pairs and calculating the hash of each
pair of nodes in that particular level. This hash value is propagated to the next
level. This is a bottom-to-up type of construction where the hash values are
flowing from down to up direction.
• Hence, by comparing the Merkle tree structure to a regular binary tree data
structure, one can observe that Merkle trees are actually inverted down.
Binary tree direction vs Merkle tree direction
Example: Consider a block having 4 transactions- T1, T2, T3, T4. These four
transactions have to be stored in the Merkle tree and this is done by the following
steps-
Step 1: The hash of each transaction is computed.
H1 = Hash(T1).
Step 2: The hashes computed are stored in leaf nodes of the Merkle tree.
Step 3: Now non-leaf nodes will be formed. In order to form these nodes, leaf
nodes will be paired together from left to right, and the hash of these pairs will be
calculated. Firstly hash of H1 and H2 will be computed to form H12. Similarly,
H34 is computed. Values H12 and H34 are parent nodes of H1, H2, and H3, H4
respectively. These are non-leaf nodes.
H12 = Hash(H1 + H2)
H34 = Hash(H3 + H4)
Step 4: Finally H1234 is computed by pairing H12 and H34. H1234 is the only
hash remaining. This means we have reached the root node and therefore H1234
is the Merkle root.
H1234 = Hash(H12 + H34)
Merkle tree works by hashing child nodes again and again till only one hash
remains.
Key Points:
• In order to check whether the transaction has tampered with the tree, there is
only a need to remember the root of the tree.
• One can access the transactions by traversing through the hash pointers and if
any content has been changed in the transaction, this will reflect on the hash
stored in the parent node, which in turn would affect the hash in the upper-
level node and so on until the root is reached.
• Hence the root of the Merkle tree has also changed. So Merkle root which is
stored in the block header makes transactions tamper-proof and validates the
integrity of data.
• With the help of the Merkle root, the Merkle tree helps in eliminating
duplicate or false transactions in a block.
• It generates a digital fingerprint of all transactions in a block and the Merkle
root in the header is further protected by the hash of the block header stored in
the next block.
Why Merkle Trees are Important For Blockchain?
• In a centralized network, data can be accessed from one single copy. This
means that nodes do not have to take the responsibility of storing their own
copies of data and data can be retrieved quickly.
• However, the situation is not so simple in a distributed system.
• Let us consider a scenario where blockchain does not have Merkle trees. In
this case, every node in the network will have to keep a record of every single
transaction that has occurred because there is no central copy of the
information.
• This means that a huge amount of information will have to be stored on every
node and every node will have its own copy of the ledger. If a node wants to
validate a past transaction, requests will have to be sent to all nodes,
requesting their copy of the ledger. Then the user will have to compare its own
copy with the copies obtained from several nodes.
• Any mismatch could compromise the security of the blockchain. Further on,
such verification requests will require huge amounts of data to be sent over the
network, and the computer performing this verification will need a lot of
processing power for comparing different versions of ledgers.
• Without the Merkle tree, the data itself has to be transferred all over the
network for verification.
• Merkle trees allow comparison and verification of transactions with viable
computational power and bandwidth. Only a small amount of information
needs to be sent, hence compensating for the huge volumes of ledger data that
had to be exchanged previously.
Merkle trees use a one-way hash function extensively and this hashing separates
the proof of data from data itself
Proof of Membership
Merkle tree.
If there are n nodes in the tree then only log(n) nodes need to be examined. Hence
even if there are a large number of nodes in the Merkle tree, proof of membership
can be computed in a relatively short time.
Merkle Proofs
Blockchain Structure
Blockchain is a Distributed Ledger Technology. It is a distributed and
decentralized database and it is secured ever as compared to other technologies.
1. Public Blockchain:
A public blockchain is a concept where anyone is free to join and take part in the
core activities of the blockchain network. Anyone can read, write, and audit the
ongoing activities on a public blockchain network, which helps to achieve the self-
determining, decentralized nature often authorized when blockchain is discussed.
Data on a public blockchain is secure as it is not possible to modify once they are
validated.
The public blockchain is fully decentralized, it has access and control over the
ledger, and its data is not restricted to persons, is always available and the central
authority manages all the blocks in the chain. There is publicly running all
operations. Due to no one handling it singly then there is no need to get permission
to access the public blockchain. Anyone can set his/her own node or block in the
network/ chain.
After a node or a block settled in the chain of the blocks, all the blocks are
connected like peer-to-peer connections. If someone tries to attack the block then it
forms a copy of that data and it is accessible only by the original author of the
block.
Advantages:
1. A public network operates on an actuate scheme that encourages new
persons to join and keep the network better.
2. There is no agreement in the public blockchain.
3. This means that a public blockchain network is immutable.
4. It has Rapid transactions.
Disadvantages:
1. Public blockchain can be costly in some manner.
2. The person need not give identity, that’s why there is a possibility of
corruption of the block if it is in under attack.
3. Processing speed is sometimes slow.
4. It has Integration issues.
2. Private Blockchain
3. Consortium Blockchain
A consortium blockchain is a concept where it is permissioned by the government
and a group of organizations, not by one person like a private blockchain.
Consortium blockchains are more decentralized than private blockchains, due to
being more decentralized it increases the privacy and security of the blocks. Those
like private blockchains connected with government organizations’ blocks
network.
Consortium blockchains is lies between public and private blockchains. They are
designed by organizations and no one person outside of the organizations can gain
access. In Consortium blockchains all companies in between organizations
collaborate equally. They do not give access from outside of the organizations/
consortium network.
Advantages:
1. Consortium blockchain providers will always try to give the fastest output
as compared to public blockchains.
2. It is scalable.
3. A consortium blockchain is low transaction costs.
Disadvantages:
1. A consortium blockchain is unstable in relationships.
2. Consortium blockchain lacks an economic model.
3. It has flexibility issues.
1. Node: Nodes are network participants and their devices permit them to
keep track of the distributed ledger and serve as communication hubs in
various network tasks. A block broadcasts all the network nodes when a
miner looks to add a new block in transactions to the blockchain.
2. Transactions: A transaction refers to a contract or agreement and
transfers of assets between parties. The asset is typically cash or property.
The network of computers in blockchain stores the transactional data as
copy with the storage typically referred to as a digital ledger.
3. Block: A block in a blockchain network is similar to a link in a chain. In
the field of cryptocurrency, blocks are like records that store transactions
like a record book, and those are encrypted into a hash tree. There are a
huge number of transactions occurring every day in the world. It is
important for the users to keep track of those transactions, and they do it
with the help of a block structure. The block structure of the blockchain is
mentioned in the very first diagram in this article.
4. Chain: Chain is the concept where all the blocks are connected with the
help of a chain in the whole blockchain structure in the world. And those
blocks are connected with the help of the previous block hash and it
indicates a chaining structure.
5. Miners: Blockchain mining is a process that validates every step in the
transactions while operating all cryptocurrencies. People involved in this
mining they called miners. Blockchain mining is a process to validate each
step in the transactions while operating cryptocurrencies.
6. Consensus: A consensus is a fault-tolerant mechanism that is used in
computer and blockchain systems to achieve the necessary agreement on a
single state of the network among distributed processes or multi-agent
systems, such as with cryptocurrencies. It is useful in record keeping and
other things.
There are different kinds of consensus mechanism algorithms, each of which
works on different principles:
• Proof of Work (PoW): Proof of Work required a stakeholder node to prove
that the work is done and submitted by them certifying them to receive the
right to add new transactions in the blockchain.
• Proof of Stake (PoS): The proof of Stake is also a common consensus
algorithm that evolved as a low-cost low-energy-consuming, low-energy-
consuming alternative for the PoW algorithm. For providing the
responsibilities the public ledger provides by the virtual currency token
like Bitcoin and Ethereum.
• Proof of Capacity (PoC): Proof of Capacity (PoC) allow sharing of
memory space of the nodes in the blockchain network.
• Proof of Elapsed Time (PoET): It encrypts the passage of time
cryptographically to reach an agreement without expending many
resources.
Below are some of the differences between blockchain architecture and database:
Blockchain
Parameter Architecture Database
s
decentralized because
there is no single point
of failure and there is
no central authority to
control the blockchain.
Blockchain is
immutable technology
and we cannot change The database is a fully mutable
it back or we cannot go technology, The data can be edited in the
Mutability back. database.
Blockchain Consensus
In the previous section, we got to know about the consensus. What does this term
mean? The set of rules by which a blockchain network operates and validates the
information of blocks is known as ‘consensus’.
When at least 51% of nodes agree on something, the decision is validated on behalf
of the whole of the blockchain. This 51% rule may result in threats even. The most
common threat to a blockchain is the 51% attack, where more than half of the
nodes are concentrated in one entity. This paves the way for the entity to change
consensus rules as it sees fit, which could lead to a monopoly.
Blockchain Proof of Work
For a block to be confirmed as valid, miners are required to generate two hashes: a
hash of all the transactions in the block and one proving that they have expended
the energy required to generate the block by solving a special cryptographic puzzle
with a pre-set level of difficulty. The difficulty of solving the puzzle can be
automatically adjusted in Proof of Work systems to create a consistent time period
for blocks that are to be added to the blockchain.
In summary, a miner creates a block of valid transactions. Further, the miner runs a
Proof of Work algorithm on it to find a valid hash. When a valid block is
generated, the block is added to the blockchain, and the miner receives network
fees and the newly created cryptocurrency.
Blockchain Protocols
As blockchains are being rolled out at an exponential rate for everything from
cross-border financial transactions to supply chain management, the lack of
scalability has remained a constant issue since the genesis of blockchains. As more
computers join the P2P network, the efficiency of the whole blockchain ecosystem
typically deteriorates.
So, hope this is good enough to understand how Blockchain works. Now, check
out the best tutorial to learn Blockchain by Intellipaat and earn your certification
with a Blockchain course. Further check the most frequently asked Blockchain
interview questions and answers.
Bit Coin Structure
What is bitcoin?
Simply put, bitcoin is a digital currency. No bills to print or coins to mint. It's
decentralized -- there's no government, institution (like a bank) or other authority
that controls it. Owners are anonymous; instead of using names, tax IDs or social
security numbers, bitcoin connects buyers and sellers through encryption keys.
And it isn't issued from the top down like traditional currency; rather, bitcoin is
"mined" by powerful computers connected to the internet.
When a new hash is generated, it's placed at the end of the blockchain, which is
then publicly updated and propagated. For their trouble, the miner currently gets
12.5 bitcoins, which, in February 2018, was worth roughly $100,000. Note that the
amount of awarded bitcoins decreases over time.
Ultimately, the value of a bitcoin is determined by what people will pay for it. In
this way, there's a similarity to how stocks are priced.
Bitcoin has made Satoshi Nakamoto a billionaire many times over, at least on
paper. It's minted plenty of millionaires among the technological pioneers,
investors and early bitcoin miners. The Winklevoss twins, who parlayed a $65
million Facebook payout into a venture capital fund that made early investments in
bitcoin, are now well-known billionaires, according to Fortune.
Bitcoin has been the hottest thing in the world of finance for the last several years.
If you still don’t know how to use this digital currency and want to find out who
accepts Bitcoin these days, you are on the right page. In this short article, we are
going to give you some basic advice on how to start using Bitcoin in no time.
Before being able to pay with Bitcoin, you must find a wallet where you can store
your digital currency. This will serve as your Bitcoin bank account through which
you can store, pay, and receive money. There are many free crypto wallets on the
web, and they all work well on both desktop and mobile devices. Just make an
account using your personal details, and you’re good to go.
2. Buy Bitcoin
After your wallet is set up, comes the time for you to buy some bitcoins. You can
do this through one of the many cryptocurrency exchange services. Do your
research and get the best possible price for bitcoin at the moment.You can buy
bitcoins using your credit card or a bank account. Just provide the exchange
service with your bitcoin wallet address and the transaction will be completed in
minutes.
If an online merchant has the option of Bitcoin payments, you just need to copy
their Bitcoin address and paste it into a designated field on your wallet. Type in the
right amount of bitcoins into the payment box and click ‘send’. Just make sure that
you always type in the exact amount as displayed in the payment window. The
transaction should be completed in a couple of seconds.You’ll be happy to know
that Bitcoin is accepted by most of the top stores and services online. If you need a
list of some of the best companies that are Bitcoin-friendly today,
Bitcoin Transaction
Double Spending
➢ The first case is making duplicates of the same bitcoin and sending it to
multiple users.
➢ The second case is performing the transaction and reversing the already sent
transaction after getting the service.
You go to Restaurants and order a cappuccino worth $5. You pay in cash. The
service provider at Restaurants instantly confirmed that you have paid, and you
received your coffee in exchange for the money. Now is it possible to spend the
same $5 somewhere else to make another purchase? The answer is NO. But what if
the answer is YES? It means the same person can use the same cash more than one
times. This type of problem is known as Double Spending Problem.
In a physical currency, the double-spending problem can never arise. But in digital
cash-like bitcoin, the double-spending problem can arise. Hence, bitcoin
transactions have a possibility of being copied and rebroadcasted. It opens up the
possibility that the same BTC could be spent twice by its owner.
Let us suppose you have 1 BTC and try to spend it twice. You made the 1 BTC
transaction to Alice. Again, you sign and send the same 1 BTC transaction to Bob.
Both transactions go into the pool of unconfirmed transactions where many
unconfirmed transactions are stored already. The unconfirmed transactions are
transactions which do not pick by anyone. Now, whichever transaction first got
confirmations and was verified by miners, will be valid. Another transaction which
could not get enough confirmations will be pulled out from the network. In this
example, transaction T1 is valid, and Alice will receive the bitcoin.
What happened if both the transactions are taken simultaneously by the miners?
Suppose two different miners will pick both transactions at the same time and start
creating a block. Now, when the block is confirmed, both Alice and Bob will wait
for confirmation on their transaction. Whichever transaction first got confirmations
will be validated first, and another transaction will be pulled out from the network.
Now suppose if both Alice and Bob received the first confirmation at the same
time, then there is a race will be started between Alice and Bob. So, whichever
transaction gets the maximum number of confirmations from the network will be
included in the blockchain, and the other one will be discarded.
Contents
Anatomy of a Block
Bitcoin Halving
Bitcoin Forks
The Bitcoin network maintains a distributed public ledger that records the
ownership of all bitcoin, the native digital asset token of the network. New
transactions are grouped together into “blocks” and added sequentially to the
network’s ongoing chain of blocks — hence the term “blockchain.” The Bitcoin
blockchain contains every block since inception, stretching all the way back to the
first block known as the “Genesis Block.”
Identical copies of the blockchain are hosted on computers around the world that
run the Bitcoin software. These computers are called "nodes." This design ensures
that no single entity is in control of the blockchain or protocol that governs it.
Bitcoin's distributed nature makes it decentralized and resistant to being controlled
(or shut down) by any government or central authority. Theoretically, all nodes
that maintain a complete copy of the blockchain — known as "full nodes" —
would need to be destroyed in order to erase the Bitcoin blockchain. No small task
as there are even full nodes floating above the earth in space!
Nodes known as “miners” serve the purpose of validating Bitcoin transactions and
securing the blockchain ledger. In the traditional banking system, when you send
money from your bank account to another bank account, the banks act as trusted
intermediaries, deducting funds from one account and adding them to another.
With Bitcoin, centralized intermediaries are replaced by a trustless network of
miners. We’ll explain how this works shortly.
In contrast, full nodes contain an entire copy of the blockchain in real time. They
download every block of transactions that has ever happened on the network since
the Genesis Block — not just the most recent ones. As long as the full blockchain
exists on at least one full node, there will be a record of all bitcoin and bitcoin
transactions throughout history.
Finally, there are the nodes called miners who write blocks of new transactions to
the blockchain and, in doing so, mint new bitcoin.
The puzzle requires a miner to create a new block by taking all of the network’s
new and unconfirmed transactions, as well as information from the previous block
(i.e., its “block header”), and “hash” them using the SHA-256 algorithm. Hashing
is a process whereby a specific input (in this case, recent transaction data and the
block header) is entered into an algorithm to generate a specific output. A Miner
must take this input and guess a number called a “nonce” that when entered
together into SHA-256, will generate an output that satisfies the output threshold
set by the Bitcoin protocol. Mining boils down to guessing nonces as quickly as
possible. If a miner hits the specified output threshold, she will broadcast her new
block (which includes her nonce) to other miners on the network so that they can
hash it themselves and verify her solution. If a majority of miners — 51% or more
— reach consensus on her solution, she will be allowed to add her new block to the
blockchain and receive the block reward. And then the race begins all over again.
Here’s the important part: if any of the transaction data is altered by even the
smallest amount (say a “satoshi,” which is 0.00000001 BTC), the hash output will
change. As a result, a majority of miners will fail to reach consensus around any
nonce that solves the puzzle using tampered transaction data. This prevents a
dishonest miner from winning and encourages miners to act scrupulously with their
precious computational resources.
Bitcoin mining is an elegant design that serves the dual purpose of validating
transactions and minting new bitcoin. But there’s more...because mining requires
computer processing power (i.e, energy), there is a real cost to minting bitcoin,
which gives it digital scarcity. This mimics real world gold production inasmuch as
they both require energy to mine. But unlike Bitcoin, gold mining does not serve to
validate (and process) transactions. Bitcoin mining does both, and that’s a beautiful
thing.
Anatomy of a Block
Each Bitcoin block is limited in size to one megabyte of data. For “Segregated
Witness” (SegWit) blocks, transaction data is limited to one megabyte, whereas
signature data (aka witness) is segregated and limited to three megabytes. This
keeps the block size at one megabyte while increasing block space for transaction
data.
A Block header:
Version number
Hash of the previous block header
Hash of the root of Merkle tree of all the transactions in the current block
Timestamp
Difficulty target of the current block (meaning how difficult the target hash will be
to find)
Nonce
Version number
Transaction inputs
Transaction outputs
Bitcoin Halving
Bitcoin has a deterministic supply schedule that caps the total supply of bitcoin at
21 million bitcoin (or BTC). As discussed above, new bitcoin are minted when a
miner wins the block reward. The block reward amount is “halved” every 210,000
blocks, which happens approximately every four years. Bitcoin’s halving schedule
is as follows:
The next halving will occur in early 2024, when the block reward halves to 3.125
BTC. As the block reward continues to halve, it will eventually approach zero —
approximately in the year 2140. In other words, after 2140, no new bitcoin will
ever be minted and the block reward will consist solely of transaction fees charged
by miners when bitcoin is sent on the network.
The fixed and predetermined supply schedule of bitcoin gives it “hard money,”
store of value properties and is why many people consider it “digital gold” or “gold
2.0.”
Bitcoin Forks
A fork occurs when an existing blockchain splits into two different blockchains.
This happens when an update is made to a protocol that not all of the nodes adopt.
There are two types of forks that blockchains can experience; a soft fork, whereby
old nodes and new nodes are able to read both blockchains (compatible); and a
hard fork, whereby old nodes cannot read the new blockchain and vice versa
(incompatible). Hard forks result in two separate blockchains with distinct native
digital asset tokens that are separate and apart from each other.
When updates are made to the Bitcoin protocol, individual nodes must determine if
they will upgrade and accept the new changes or not. If a constituent of nodes
within the network refuses to adopt the changes, then a hard fork results. Bitcoin
has experienced several forks of both kinds, including the Bitcoin Cash hard fork
that occurred at block 661,647, the last common block between Bitcoin and
Bitcoin Cash. The Bitcoin Cash fork emanated from a disagreement in the Bitcoin
community around block size. Bitcoin Cash adopted a block size of eight
megabytes to increase transaction throughput, whereas Bitcoin kept a block size of
one megabyte to foster greater node participation and ensure decentralization.
CREATE A CRYPTOCURRENCY :
• Crypto currencies are digital currencies that work just like their traditional counterparts: People
use them to make purchases or to receive funds from sales of goods or services.
• The difference between crypto currencies and traditional ones is that, in order for crypto
currencies to work, an online network must facilitate and verify all transactions.
• Establish APIs.
• Create a suitable interface.
• The first step in creating a crypto currency is obvious but essential: Developers (the term used
for crypto currency creators) must find a compelling use for their proposed digital currency.
Traditional and crypto currencies can serve many purposes:
• Transfer of money
• Data verification
• Select a Block chain Platform : All crypto currencies are anchored by a block chain platform. This
ensures that every transaction is recorded and distributed across the block chain, creating a
system of accountability. This approach makes it impossible for outside parties to hack, trick, or
change the digital ledger.
• Platforms vary depending on the consensus mechanism used. At its core, a block chain is a kind
of digital ledger that permanently lists every crypto currency transaction. However: not all
transactions are considered. Some, for example, might be fraudulent. Therefore, a screening
process is required. In the world of blockchains, that’s what a consensus mechanism provides.
Prepare the Nodes : Once you’ve selected a blockchain, the nodes that work in the blockchain must be
created. Nodes are, usually, fast computers that connect to a blockchain network to verify and process
transactions. Nodes keep the currency running while recording and sharing the data that eventually gets
added to the digital ledger.
1. Determining who has access to nodes. Some ledgers are publicly accessible; others remain
private.
2. Determining where nodes are hosted. A cloud network can host a node, but local nodes may be
preferred in order to provide on-premise support for computers that act as nodes.
3. Choosing which operating system is ideal. An open-source operating system like Ubuntu or
Fedora is usually preferred, as developers can reconfigure the OS to their cryptocurrencies’
unique needs.
4. Deciding what hardware is required. Components like processors, RAM, GPUs, and hard drives
are important considerations because nodes require faster hardware so that they can process
more transactions in less time.
When it comes to sharing data, block chains don’t all operate the same way. Digital architecture is a lot
like building architecture: It must not only consider design but also how everything fits together to work
best. Consider these three prominent block chain architecture formats :
1. Centralized — One central node on the block chain receives information from multiple other
nodes.
3. Establish APIs
4. The application programming interface (or API) is an interface linking to a blockchain node or a
client network. For example, an API can interface between the currency exchange and an
application that collects data about that currency. APIs can work for many purposes in the world
of cryptocurrencies, but the most common include trading currencies, providing data security,
and obtaining currency analysis.
5. Developers may find many blockchain API solutions, including Bitcore, Factom, and Infura
Ethereum APIs.
7. Developers who wish to make it easy for others to interact with their cryptocurrency must
consider the user interface (UI) and user experience (UX). The easier the UI and UX, the more
likely it is that consumers and miners will be able to easily configure their settings and manage
their investments. Interfaces require a server and database to work, plus someone should be
ready to program a website or program that allows someone to review and configure data.
8.
10. Considering the legal aspects of creating a new currency prior to beginning is both wise and
necessary. Developers must:
11. Set up a legal entity, such as an LLC or Corporation.
12. Acquire a license from their local governments.
13. Register with certified groups that are devoted to stopping money laundering and other harmful
activities, such as the Financial Crimes Enforcement Network in the United States.