Professional Documents
Culture Documents
P
BY:
G
RAGHUDATHESH G P
Asst Professor
Dept of ECE, GMIT
SH
Davangere - 577004
Cell: +91-7411459249
Mail: datheshraghu@gmail.com
Website: raghudathesh.weebly.com
EYoutube: dathu’s class
TH
Suggested Reading:
Books:
DA
Online Courses:
1. Blockchain Architecture Design and Use Cases, NPTEL:
https://onlinecourses.nptel.ac.in/noc18_cs47/preview
Youtube Link:
https://www.youtube.com/watch?v=PPFsG92-
HiI&list=PLbRMhDVUMngfxxyVLh2t2gKDUfsOdGn56&index=1
2. Blockchain Basics by University at Buffalo & The State University of New York,
P
Coursera: https://www.coursera.org/learn/blockchain-basics/home/info
3. Blockchain A-Z™: Learn How To Build Your First Blockchain, Udemy:
G
https://www.udemy.com/build-your-blockchain-az/
SH
Quotes:
Life is what happens to us while we are busy making other plans.
Temporary people give permanent lessons.
E
Be selective with your battles - Sometimes peace is better than being right.
TH
Seeking satisfaction through accumulation increases accumulation not satisfaction.
Sometimes we're taken into troubled waters not to drown, but to be cleansed.
Nobody can go back & start a new beginning but anyone can start today & make a
DA
new ending.
U
GH
RA
P
Blockchain is a distributed database technology where chain is a continuously growing
list of records, called blocks, which are linked and secured using cryptography that
G
provides very hard to tamper, ledger records.
A Blockchain protocol operates on top of the Internet, on a P2P Network of computers
SH
that all run the protocol and hold an identical copy of the ledger of transactions, enabling
P2P value transactions without a middleman though machine consensus.
Blockchain itself a file – a shared and public ledger of transactions that records all
E
transactions from the genesis block (first block) until today.
TH
Each block typically contains a cryptographic hash of the previous block, a timestamp,
and transaction data.
Blocks are the key concept of the technology. They are small sets of transactions that
DA
have taken place within the system. Each new block stores reference of the previous
transaction by including a SHA-256 hash of the previous transaction. In this way, it
creates a „chain‟ of blocks and hence the name.
U
ledger that can record transactions between two parties efficiently and in a verifiable and
permanent way”.
The security comes from use of strong public-key cryptography, strong cryptographic
RA
Blocks are computationally difficult to create, and takes multiple specialized processors
and significant amounts of time to generate.
Since generating a block is difficult and to tamper one block, one has to tamper the
previous block and then has to follow the chain to change it completely, blockchain
technology is considered to be tamper resistant.
Miners are the ones who run powerful computers to create blocks.
The blockchain is an ingenious invention – the brainchild of a person or group of people
P
known by the pseudonym, Satoshi Nakamoto.
G
The invention of the blockchain for bitcoin made it the first digital currency without the need
of a trusted authority or central server. The bitcoin design has inspired other applications.
SH
The Concept of blockchain is shown below
E
TH
U DA
GH
RA
P
G
E SH
TH
U DA
GH
RA
Application:
P
G
SH
Figure: Application of Blockchain
Ecosystem: E
TH
URL: https://techcrunch.com/2017/10/16/mapping-the-blockchain-project-ecosystem/
U DA
GH
RA
What is Double-Spending?
Suppose that Alice wants to pay Bob 1$. If Alice and Bob use physical cash, then Alice
will not longer have the 1$ after the transaction is executed.
If Alice and Bob use digital money, then the problem gets more complicated. Digital
money is in digital form and can be easily duplicated.
If Alice sends a digital file worth 1$ to Bob by email for example, Bob cannot know for
P
sure if Alice has deleted her copy of the file. If Alice still has the 1$ digital file, then she
can choose to send the same file to Carol. This problem is called double-spending.
G
E SH
TH
U DA
GH
One way of solving the double-spending problem is to have a trusted third party (a bank
for example) between Alice, Bob and all other participants in the network.
This third party is responsible for managing a centralized ledger that keeps track of and
validates all the transactions in the network. The drawback of this solution is that for the
system to function, it requires trust in a centralized third party.
P
full copy of the blockchain.
2. Cryptographic: Cryptography is used to make sure that the sender owns the bitcoin
G
that she's trying to send, and to decide how the transactions are added to the
blockchain.
SH
3. Immutable: The blockchain can be changed in append only fashion. In other words,
transactions can only be added to the blockchain but cannot be deleted or modified.
4. Uses Proof of Work (PoW): A special type of participants in the network called
E
miners compete on searching for the solution to a cryptographic puzzle that will allow
them to add a block of transactions to Bitcoin‟s blockchain. This process is called
TH
Proof of Work and it allows the system to be secure.
U DA
GH
Step 1 (one-time effort): Create a bitcoin wallet. For a person to send or receive
bitcoins, she needs to create a bitcoin wallet. A bitcoin wallet stores 2 pieces of
information: A private key and a public key. The private key is a secret number that
allows the owner to send bitcoin to another user, or spend bitcoins on services that accept
them as payment method. The public key is a number that is needed to receive bitcoins.
The public key is also referred to as bitcoin address (not entirely true, but for simplicity
we will assume that the public key and the bitcoin address are the same). Note that the
wallet doesn‟t store the bitcoins themselves. Information about bitcoins balances are
stored on the Bitcoin‟s blockchain.
Step 2: Create a bitcoin transaction. If Alice wants to send 1 BTC to Bob, Alice needs to
connect to her bitcoin wallet using her private key, and create a transaction that contains
the amount of bitcoins she wants to send and the address where she wants to send them
(in this case Bob‟s public address).
P
Step 3: Broadcast the transaction to Bitcoin‟s network. Once Alice creates the bitcoin
transaction, she needs to broadcast this transaction to the entire Bitcoin‟s network.
G
Step 4: Confirm the transaction. A miner listening to Bitcoin‟s network authenticates the
transaction using Alice's public key, confirms that Alice has enough bitcoins in her wallet
SH
(in this case at least 1 BTC), and adds a new record to Bitcoin‟s Blockchain containing
the details of the transaction.
E
Step 5: Broadcast the blockchain change to all miners. Once the transaction is confirmed,
the miner should broadcast the blockchain change to all miners to make sure that their
TH
copies of the blockchain are all in sync.
DA
Terminologies:
1. Block:
A block is a container data structure, which brings together transactions for
U
P
G
SH
Figure: Structure of a Block
The block header is 80 bytes, whereas the average transaction is at least 250 bytes
E
and the average block contains more than 500 transactions.
TH
A complete block, with all transactions, is therefore 1,000 times larger than the
block header.
Each block in a chain is distributed across the network and are stored
DA
a. Block Header:
U
The block header consists of three sets of block metadata. Metadata is data that
GH
P
Figure: Data Structure of a BlockHeader
G
b. Block Identifiers:
SH
I. Block Header Hash:
The primary identifier of a block is its cryptographic hash, a digital
fingerprint, made by hashing the block header through the SHA256
E
algorithm. The resulting 32-byte hash is called the block hash but is more
TH
accurately the block header hash, because only the block header is used to
compute it.
E.x: 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a
DA
8ce26f is the block hash of the first bitcoin block ever created.
The block hash identifies a block uniquely and unambiguously and can
be independently derived by any node by simply hashing the block header.
U
Note that the block hash is not actually included inside the block‟s data
GH
structure, neither when the block is transmitted on the network, nor when
it is stored on a node‟s persistence storage as part of the blockchain.
Instead, the block‟s hash is computed by each node as the block is
RA
hash 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60
a8ce26f.
Each subsequent block added “on top” of that first block is one position
“higher” in the blockchain, like boxes stacked one on top of the other. The
block height on January 1, 2014, was approximately 278,000, meaning
there were 278,000 blocks stacked on top of the first block created in
January 2009.
P
The block height is also not a part of the block‟s data structure; it is not
stored within the block.
G
Each node dynamically identifies a block‟s position (height) in the
blockchain when it is received from the bitcoin network.
SH
The block height might also be stored as metadata in an indexed database
table for faster retrieval.
c. The Genesis Block:
E
The first block in the blockchain is called the genesis block and was created in
TH
2009.
It is the common ancestor of all the blocks in the blockchain, meaning that if you
DA
start at any block and follow the chain backward in time, you will eventually
arrive at the genesis block.
Every node always starts with a blockchain of at least one block because the
U
genesis block is statically encoded within the bitcoin client software, such that it
cannot be altered.
GH
Every node always “knows” the genesis block‟s hash and structure, the fixed time
it was created, and even the single transaction within. Thus, every node has the
starting point for the blockchain, a secure “root” from which to build a trusted
RA
blockchain.
See the statically encoded genesis block inside the Bitcoin Core client,
in chainparams.cpp.
The following identifier hash belongs to the genesis block:
000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
You can search for that block hash in any block explorer website, such as
blockchain.info, and you will find a page describing the contents of this block,
with a URL containing that hash:
https://blockchain.info/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
https://blockexplorer.com/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
P
G
E SH
TH
U DA
"height" : 0,
"version" : 1,
"merkleroot" :
"4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
"tx" : [
"4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"
],
"time" : 1231006505,
"nonce" : 2083236893,
"bits" : "1d00ffff",
"difficulty" : 1.00000000,
"nextblockhash" :
"00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048"
}
P
and used to extend the chain. As a node receives incoming blocks from the
network, it will validate these blocks and then link them to the existing
G
blockchain.
To establish a link, a node will examine the incoming block header and look
SH
for the “previous block hash.”
Ex: A node has 277,314 blocks in the local copy of the blockchain. The last block
the node knows about is block 277,314, with a block header hash of
E
TH
00000000000000027e7ba6fe7bad39faf3b5a83daed765f05f7d1b71a1632249
The bitcoin node then receives a new block from the network, which it parses as
follows:
DA
{
"size" : 43560,
"version" : 2,
"previousblockhash" :
U
"00000000000000027e7ba6fe7bad39faf3b5a83daed765f05f7d1b71a1632249",
"merkleroot" :
"5e049f4030e0ab2debb92378f53c0a6e09548aea083f3ab25e1d94ea1155e29d",
GH
"time" : 1388185038,
"difficulty" : 1180923195.25802612,
"nonce" : 4215469401,
"tx" : [
"257e7497fb8bc68421eb2c7b699dbab234831600e7352f0d9e6522c7cf3f6c77",
RA
"05cfd38f6ae6aa83674cc99e4d75a1458c165b7ab84725eda41d018a09176634"
]
}
Looking at this new block, the node finds the previous blockhash field, which
contains the hash of its parent block.
It is a hash known to the node, that of the last block on the chain at height
277,314. Therefore, this new block is a child of the last block on the chain and
extends the existing blockchain.
The node adds this new block to the end of the chain, making the blockchain
longer with a new height of 277,315.
Figure below shows the chain of three blocks, linked by references in the previous
blockhash field.
P
G
E SH
TH
U DA
Figure: Blocks linked in a chain, by reference to the previous block header hash
GH
e. Merkle Trees:
A merkle tree, also known as a binary hash tree, is a data structure used for
efficiently summarizing and verifying the integrity of large sets of data. Merkle
RA
used in bitcoin‟s merkle trees is SHA256 applied twice, also known as double-
SHA256.
When N data elements are hashed and summarized in a merkle tree, you can
check to see if any one data element is included in the tree with at
most 2*log2(N) calculations, making this a very efficient data structure.
The merkle tree is constructed bottom-up.
P
Merkle Tree Example:
We start with four transactions, A, B, C and D, which form the leaves of the
G
Merkle tree, as shown in Figure below.
E SH
TH
U DA
The transactions are not stored in the merkle tree; rather, their data is hashed and
the resulting hash is stored in each leaf node as HA, HB, HC, and HD:
RA
The process continues until there is only one node at the top, the node known as
the Merkle root. That 32-byte hash is stored in the block header and summarizes
all the data in all four transactions.
Because the merkle tree is a binary tree, it needs an even number of leaf nodes. If
there is an odd number of transactions to summarize, the last transaction hash will
P
be duplicated to create an even number of leaf nodes, also known as a balanced
tree. This is shown in figure below where transaction C is duplicated.
G
E SH
TH
U DA
GH
P
G
Figure: A Merkle Tree Summarizing Many Data Elements
SH
To prove that a specific transaction is included in a block, a node only needs to
produce log2(N) 32-byte hashes, constituting an authentication path or merkle
E
path connecting the specific transaction to the root of the tree.
TH
The above is especially important as the number of transactions increases,
because the base-2 logarithm of the number of transactions increases much more
DA
Ex: A node can prove that a transaction K is included in the block by producing a
merkle path that is only four 32-byte hashes long (128 bytes total). The path
GH
consists of the four hashes (noted in blue in figure below) HL, HIJ, HMNOP and
HABCDEFGH. With those four hashes provided as an authentication path, any node
can prove that HK (noted in green in the diagram) is included in the merkle root
RA
by computing four additional pair-wise hashes HKL, HIJKL, HIJKLMNOP, and the
merkle tree root (outlined in a dotted line in the diagram).
The efficiency of merkle trees becomes obvious as the scale increases. Table
below shows the amount of data that needs to be exchanged as a merkle path to
prove that a transaction is part of a block.
P
G
SH
As you can see from the table, while the block size increases rapidly, from 4 KB
with 16 transactions to a block size of 16 MB to fit 65,535 transactions, the
merkle path required to prove the inclusion of a transaction increases much more
E
slowly, from 128 bytes to only 512 bytes.
TH
With merkle trees, a node can download just the block headers (80 bytes per
block) and still be able to identify a transaction‟s inclusion in a block by
retrieving a small merkle path from a full node, without storing or transmitting the
DA
transactions spending the same amount of bitcoin more than once, known as a
double-spend.
Miners provide processing power to the bitcoin network in exchange for the
opportunity to be rewarded bitcoin.
Miners validate new transactions and record them on the global ledger. A new
block, containing transactions that occurred since the last block, is “mined” every
10 minutes, thereby adding those transactions to the blockchain.
Transactions that become part of a block and added to the blockchain are
considered “confirmed,” which allows the new owners of bitcoin to spend the
bitcoin they received in those transactions.
Miners receive two types of rewards for mining:
1. New coins created with each new block
2. Transaction fees from all the transactions included in the block.
To earn this reward, the miners compete to solve a difficult mathematical problem
P
based on a cryptographic hash algorithm. The solution to the problem, called the
G
proof of work, is included in the new block and acts as proof that the miner
expended significant computing effort. The competition to solve the proof-of-
work algorithm to earn reward and the right to record transactions on the
SH
blockchain is the basis for bitcoin‟s security model.
The process of new coin generation is called mining because the reward is
E
designed to simulate diminishing returns, just like mining for precious metals.
Bitcoin‟s money supply is created through mining, similar to how a central bank
TH
issues new money by printing bank notes. The amount of newly created bitcoin a
miner can add to a block decreases approximately every four years (or precisely
DA
until approximately the year 2140, when all bitcoin (20.99999998 million)
will have been issued.
After 2140, no new bitcoins will be issued.
RA
Bitcoin miners also earn fees from transactions. Every transaction may include a
transaction fee, in the form of a surplus of bitcoin between the transaction‟s inputs
and outputs.
The winning bitcoin miner gets to “keep the change” on the transactions included
in the winning block. Today, the fees represent 0.5% or less of a bitcoin miner‟s
income, the vast majority coming from the newly minted bitcoins. After 2140, all
bitcoin miner earnings will be in the form of transaction fees.
The word “mining” is somewhat misleading. By evoking the extraction of
precious metals, it focuses our attention on the reward for mining, the new
bitcoins in each block. Although mining is incentivized by this reward, the
primary purpose of mining is not the reward or the generation of new coins. If you
view mining only as the process by which coins are created, you are mistaking the
P
means (incentives) as a goal of the process.
G
Mining is the main process of the decentralized clearinghouse, by which
transactions are validated and cleared. Mining secures the bitcoin system and
enables the emergence of network-wide consensus without a central authority.
SH
Mining is the invention that makes bitcoin special, a decentralized security
mechanism that is the basis for peer-to-peer digital cash. The reward of
E
newly minted coins and transaction fees is an incentive scheme that aligns the
actions of miners with the security of the network, while simultaneously
TH
implementing the monetary supply.
g. Bitcoin P2P Network:
DA
nodes, and that all nodes share the burden of providing network services.
The network nodes interconnect in a mesh network with a “flat” topology. There
GH
technologies is file sharing with Napster as the pioneer and BitTorrent as the
most recent evolution of the architecture.
Bitcoin’s P2P network architecture is much more than a topology choice.
Bitcoin is a peer-to-peer digital cash system by design, and the network
architecture is both a reflection and a foundation of that core characteristic.
Decentralization of control is a core design principle and that can only be
achieved and maintained by a flat, decentralized P2P consensus network.
P
The term “bitcoin network” refers to the collection of nodes running the
G
bitcoin P2P protocol. In addition to the bitcoin P2P protocol, there are other
protocols such as Stratum, which are used for mining and lightweight or mobile
wallets.
SH
These additional protocols are provided by gateway routing servers that access the
bitcoin network using the bitcoin P2P protocol, and then extend that network to
E
nodes running other protocols.
Ex: Stratum servers connect Stratum mining nodes via the Stratum protocol to the
TH
main bitcoin network and bridge the Stratum protocol to the bitcoin P2P protocol.
We use the term “extended bitcoin network” to refer to the overall network that
DA
includes the bitcoin P2P protocol, pool-mining protocols, the Stratum protocol,
and any other related protocols connecting the components of the bitcoin system.
U
GH
RA
P
G
E SH
TH
U DA
GH
RA
Figure: The Extended Bitcoin P2P Network Showing Various Node Types, Gateways, and Protocols
P
G
E SH
TH
U DA
GH
RA
P
G
Figure: A bitcoin network node with all four functions:
SH
wallet, miner, full blockchain database, and network routing
E
TH
All nodes include the routing function to participate in the network and might
include other functionality.
All nodes validate, propagate transactions and blocks, and discover,
DA
Some nodes, called full nodes, also maintain a complete and up-to-date copy of
GH
the blockchain. Full nodes can autonomously and authoritatively verify any
transaction without external reference.
Some nodes maintain only a subset of the blockchain and verify transactions
RA
using a method called simplified payment verification, or SPV. These nodes are
known as SPV or lightweight nodes.
In the full-node example in the figure, the full-node blockchain database function
is indicated by a blue circle named “Full Blockchain.”
Mining nodes compete to create new blocks by running specialized hardware to
solve the proof-of-work algorithm. Some mining nodes are also full nodes,
maintaining a full copy of the blockchain, while others are lightweight nodes
participating in pool mining and depending on a pool server to maintain a full
node. The mining function is shown in the full node as a black circle named
“Miner.”
User wallets might be part of a full node, as is usually the case with desktop
bitcoin clients. Increasingly, many user wallets, especially those running on
resource-constrained devices such as smartphones, are SPV nodes. The wallet
P
function is shown in figure as a green circle named “Wallet”.
G
In addition to the main node types on the bitcoin P2P protocol, there are servers
and nodes running other protocols, such as specialized mining pool protocols and
lightweight client-access protocols.
SH
i. The Extended Bitcoin Network:
The main bitcoin network, running the bitcoin P2P protocol, consists of between
E
7,000 and 10,000 listening nodes running various versions of the bitcoin reference
client (Bitcoin Core)
TH
A few hundred nodes running various other implementations of the bitcoin P2P
protocol, such as BitcoinJ, Libbitcoin, and btcd.
DA
A small percentage of the nodes on the bitcoin P2P network are also mining
nodes, competing in the mining process, validating transactions, and creating new
blocks.
U
Various large companies interface with the bitcoin network by running full-node
clients based on the Bitcoin Core client, with full copies of the blockchain and a
GH
network node, but without mining or wallet functions. These nodes act as network
edge routers, allowing various other services (exchanges, wallets, block explorers,
merchant payment processing) to be built on top.
RA
The extended bitcoin network includes the network running the bitcoin P2P
protocol, described earlier, as well as nodes running specialized protocols.
Attached to the main bitcoin P2P network are a number of pool servers and
protocol gateways that connect nodes running other protocols. These other
protocol nodes are mostly pool mining node and lightweight wallet clients, which
do not carry a full copy of the blockchain.
j. Decentralized Consensus:
Blockchain the global public ledger (list) of all transactions, which everyone in the
bitcoin network accepts as the authoritative record of ownership.
But the question is how can everyone in the network agree on a single universal “truth”
about who owns what, without having to trust anyone?
All traditional payment systems depend on a trust model that has a central authority
providing a clearinghouse service, basically verifying and clearing all transactions.
P
But Bitcoin has no central authority, yet somehow every full node has a complete copy of
G
a public ledger that it can trust as the authoritative record. The blockchain is not created
by a central authority, but is assembled independently by every node in the network.
SH
Somehow, every node in the network, acting on information transmitted across insecure
network connections, can arrive at the same conclusion and assemble a copy of the same
public ledger as everyone else.
E
Satoshi Nakamoto’s main invention is the decentralized mechanism for emergent
consensus.
TH
Emergent, because consensus is not achieved explicitly - there is no election or fixed
moment when consensus occurs. Instead, consensus is an emergent artifact of the
DA
model that does not depend on central authority or trust, derive from this invention.
Bitcoin‟s decentralized consensus emerges from the interplay of four processes that occur
GH
P
called mining, and those who take part in it are known as miners.
G
These mathematical problems are hard to compute but easy to verify. Once miners solve
them, they are rewarded with the corresponding digital currency, referred to as a block
reward.
SH
As time goes by the mathematical equations become harder and harder.
The transactions in the block are then validated and the block is added to the chain.
E
The proof-of-work involves scanning for a value that when hashed, such as with
SHA-256, the hash begins with a number of zero bits. The average work required is
TH
exponential in the number of zero bits required and can be verified by executing a single
hash.
DA
cannot be changed without redoing the work. As later blocks are chained after it, the
GH
work to change the block would include redoing all the blocks after it.
RA
cost makes it unprofitable for the miner to lie. The miners need to also work on a lottery-
style system where there can only be one winner. Both of these problems are solved by
Proof-of-Work.
Scenario:
lets Hash my name “raghudatheshgp” this will yield the hash as below
75CF55F7C3362578D8793A46084608E88024553D5F20352EC05241E29D90BEDA
Let‟s say I hashed my name, but instead of just “raghudatheshgp” I added a zero
P
to the end of my name so we had “raghudatheshgp0”. The resulting hash for this
G
would be
8B428EC80C2FE0169341670EF578AAE1B5BD3358894A42A37C2D0B0A11684E05
SH
When you compare this hash to my previous hash of just “raghudatheshgp0”,
you‟ll notice the two hashes, when compared side-by-side, are totally different.
E
Now let‟s say I hash my name plus the number five. This gives me:
TH
073E12BF3EE525D02A75955ECA76E6DF4ED76B34A950E7B7B1AFC1470D74EA1F
Here is the point, well, if you were a block chain network, the network could say
DA
to miners “give me the first number appended at the end of your name that results
in a hash starting with the number 0”. So what all miners would do is hash:
U
Hash(raghudatheshgp+0) = 8B428EC80C2FE0169341670EF578AAE1B5BD3358894A42A37C2D0B0A11684E05
GH
Hash(raghudatheshgp+1) = AE348218CAA6D65AF3FA7F9A80D57F8CC1524934D90D4F5DE6001747ED6ABA54
Etc, etc…
Eventually it will hash “(raghudatheshgp5” and get the following hash that starts
RA
073E12BF3EE525D02A75955ECA76E6DF4ED76B34A950E7B7B1AFC1470D74EA1F
Miners would then respond back with the text “raghudatheshgp5” and include the
hash; the receiving computer would simply hash “raghudatheshgp5” and see if the
resulting hash matches the hash that miners is sent through.
This proves that miners has had to count from 0 to 5 to find that hash. So
effectively miners has done 5 pieces of work, but the receiving computer could
validate this with one piece of work.
Effectively miners provided proof of their work, hence they have performed
P
“Proof of Work”.
Here the number 5 which is hashed with name is called as nonce.
G
The "nonce" in a bitcoin block is a field whose value is adjusted by miners so that
the hash of the block will be less than or equal to the current target of the network.
SH
As you could probably guess, a miner could do millions of hashes per second, so
hashing a value 5 times is pretty pointless. But imagine if a network of computers
said to miners: “provide us with a valid block of transactions, provide a hash of
E
the block, plus a number that results in a hash starting with….15 zeros”.
TH
The initial hash of the block would be instant:
BlockHash = Hash(„All of the transactions in the current block‟)
then miners would grab that hash and go:
DA
Hash(BlockHash + 0)
Hash(BlockHash + 1)
Hash(BlockHash + 2)
U
Etc, etc..
To find a hash with 15 leading zeros at the start would require trillions and
GH
trillions and trillions of attempts. A slow computer would take hundreds of years
to do this, or a lot of very fast computers could go racing for several minutes
before the solution was found.
RA
All of these computers obviously will be burning through a lot of electricity. It‟s
because of this electricity cost that it‟s impractical for a miner to find a valid hash
on an invalid block of transactions. That is, a miner would be foolish to not
correctly validate a block to prove all transactions are valid and to simply skip to
hashing of that block. All other computers on the network would reject the invalid
block and the miner would not receive a reward.
One of the things that helps keep mining decentralised is that no two miners are
hashing the same block. If I was to hash “a+b”, I‟ll get a different hash than if I
hash “b+a”. Miners all receive transactions across the network in a different
order to each other; because of this plus an individual preference for fees, it
means that each miner will create a block slightly different.
Although all blocks may have been correctly validated, only one block can go
into the chain at one time. So all the miners will have to keep hashing away,
P
until they find a number that, when appended to their block hash then hashed,
returns a result with the leading number of zeros that the network has agreed to
G
accept as valid.
To keep Bitcoin‟s monetary policy on schedule, the network ensures a block takes
SH
on average 10 minutes to be mined. The network does this by adjusting the
mining difficulty every 2 weeks. So if blocks are being found too fast due to a lot
E
of new miners coming online, to prevent an unplanned inflationary rate, the
network will increase the difficulty required and miners will have to find a longer
TH
number of preceding zeros on a hash.
There is no way to know what this hash is in advance, so miners must work fast
using many fast computers. As it‟s random, the miner with the most powerful
DA
computer won‟t always win. The best way to look at this is like a lottery system,
where the user with the most tickets has a greater chance of winning but isn‟t
U
l. Transaction Lifecycle:
A transaction‟s lifecycle starts with the transaction‟s creation, also known as origination.
The transaction is then signed with one or more signatures indicating the authorization to
RA
P
check. Like a check, a transaction is an instrument that expresses the intent
G
to transfer money and is not visible to the financial system until it is
submitted for execution. Like a check, the originator of the transaction
does not have to be the one signing the transaction.
SH
Transactions can be created online or offline by anyone, even if the person
creating the transaction is not an authorized signer on the account.
E
Ex: An accounts payable clerk might process payable checks for signature
by the CEO. Similarly, an accounts payable clerk can create bitcoin
TH
transactions and then have the CEO apply digital signatures to make them
valid. Whereas a check references a specific account as the source of the
DA
the transfer of funds. Finally, the valid transaction has to reach the bitcoin
network so that it can be propagated until it reaches a miner for inclusion
in the pubic ledger (the blockchain).
RA
The senders do not need to trust the nodes they use to broadcast the
transaction, as long as they use more than one to ensure that it propagates.
The nodes don‟t need to trust the sender or establish the sender‟s
“identity.” Because the transaction is signed and contains no confidential
information, private keys, or credentials, it can be publicly broadcast using
any underlying network transport that is convenient.
Unlike credit card transactions, for example, which contain sensitive
P
information and can only be transmitted on encrypted networks, a bitcoin
transaction can be sent over any network.
G
As long as the transaction can reach a bitcoin node that will propagate it
into the bitcoin network, it doesn‟t matter how it is transported to the first
SH
node.
Bitcoin transactions can therefore be transmitted to the bitcoin network
E
over insecure networks such as WiFi, Bluetooth, NFC, Chirp, barcodes, or
by copying and pasting into a web form. In extreme cases, a bitcoin
TH
transaction could be transmitted over packet radio, satellite relay, or
shortwave using burst transmission, spread spectrum, or frequency
DA
transaction.
III. Propagating Transactions on the Bitcoin Network:
Once a bitcoin transaction is sent to any node connected to the bitcoin
RA
network, the transaction will be validated by that node. If valid, that node
will propagate it to the other nodes to which it is connected, and a success
message will be returned synchronously to the originator. If the
transaction is invalid, the node will reject it and synchronously return a
rejection message to the originator.
P
injected into any node on the network will be sent to three to four of the
neighboring nodes, each of which will send it to three to four more nodes,
G
and so on. In this way, within a few seconds a valid transaction will
propagate in an exponentially expanding ripple across the network until all
SH
connected nodes have received it.
The bitcoin network is designed to propagate transactions and blocks to all
E
nodes in an efficient and resilient manner that is resistant to attacks.
To prevent spamming, denial-of-service attacks, or other nuisance attacks
TH
against the bitcoin system, every node independently validates every
transaction before propagating it further. A malformed transaction will
DA
not get beyond one node. The rules by which transactions are
validated are explained in more detail in Independent Verification of
Transactions.
U
being locked with a specific secret that only the owner, or person who
knows the secret, can unlock. A transaction contains a number of fields, as
shown in table below
P
G
SH
V. Transaction Outputs and Inputs:
E
The fundamental building block of a bitcoin transaction is an unspent
TH
transaction output, or UTXO.
UTXO are indivisible chunks of bitcoin currency locked to a specific
owner, recorded on the blockchain, and recognized as currency units
DA
P
transaction. In other words, if you have a 20 bitcoin UTXO and want to
pay 1 bitcoin, your transaction must consume the entire 20 bitcoin UTXO
G
and produce two outputs: one paying 1 bitcoin to your desired recipient
and another paying 19 bitcoin in change back to your wallet. As a result,
SH
most bitcoin transactions will generate change.
The UTXO consumed by a transaction are called transaction inputs, and
E
the UTXO created by a transaction are called transaction outputs.
This way, chunks of bitcoin value move forward from owner to owner in a
TH
chain of transactions consuming and creating UTXO.
Transactions consume UTXO by unlocking it with the signature of the
DA
P
G
E SH
TH
Following script calls the blockchain.info API to find the UTXO related to
an address
DA
import json
U
import requests
GH
# example address
address = '1Dorian4RoXcnBv9hnQ4Y2C1an6NJ4UrjX'
# "tx_output_n": 1,
# "script":"76a9148c7e252f8d64b0b6e313985915110fcfefcf4a2d88ac",
# "value": 8000000,
# "value_hex": "7a1200",
# "confirmations":28691
# },
# ...
P
#]}
G
resp = requests.get('https://blockchain.info/unspent?active=%s' % address)
utxo_set = json.loads(resp.text)["unspent_outputs"]
SH
for utxo in utxo_set:
print "%s:%d - %ld Satoshis" % (utxo['tx_hash'], utxo['tx_output_n'],
utxo['value'])
E
TH
Running the script, we see a list of transaction IDs, a colon, the index
number of the specific unspent transaction output (UTXO), and the value
DA
$ python get-utxo.py
U
...
RA
P
UTXO and a 0.005 UTXO, using them both to add up to the desired
payment amount.
G
Following script are used for calculating how much total bitcoin will be
issued
SH
# Selects outputs from a UTXO list using a greedy algorithm.
def __repr__(self):
return "<%s:%s with %s Satoshis>" % (self.tx_hash, self.tx_index,
self.value)
RA
P
change = min_greater.value - min_value
return [min_greater], change
G
# Not found in greaters. Try several lessers instead.
# Rearrange them from biggest to smallest. We want to use the least
SH
# amount of inputs as possible.
lessers.sort(key=key_func, reverse=True)
result = []
accum = 0
for utxo in lessers: E
TH
result.append(utxo)
accum += utxo.value
if accum >= min_value:
DA
return None, 0
GH
def main():
unspent = [
RA
OutputInfo("ebadfaa92f1fd29e2fe296eda702c48bd11ffd52313e986e99ddad9084062167"
, 1, 8000000),
OutputInfo("6596fd070679de96e405d52b51b8e1d644029108ec4cbfe451454486796a1ecf"
, 0, 16050000),
OutputInfo("b2affea89ff82557c60d635a2a3137b8f88f12ecec85082f7d0a1f82ee203ac4"
, 0, 10000000),
OutputInfo("7dbc497969c7475e45d952c4a872e213fb15d45e5cd3473c386a71a1b0c136a1"
, 0, 25000000),
OutputInfo("55ea01bd7e9afd3d3ab9790199e777d62a0709cf0725e80a7350fdb22d7b8ec6"
, 17, 5470541),
P
OutputInfo("12b6a7934c1df821945ee9ee3b3326d07ca7a65fd6416ea44ce8c3db0c078c64"
, 0, 10000000),
G
OutputInfo("7f42eda67921ee92eae5f79bd37c68c9cb859b899ce70dba68c48338857b7818"
SH
, 0, 16100000),
]
if len(argv) > 1:
target = long(argv[1]) E
TH
else:
target = 55000000
DA
print "For transaction amount %d Satoshis (%f bitcoin) use: " % (target,
target/10.0**8)
print select_outputs_greedy(unspent, target)
U
if __name__ == "__main__":
GH
main()
Satoshis')
Once the UTXO is selected, the wallet then produces unlocking scripts
containing signatures for each of the UTXO, thereby making them
P
spendable by satisfying their locking script conditions. The wallet adds
these UTXO references and unlocking scripts as inputs to the
G
transaction. Table below shows the structure of a transaction input.
E SH
TH
U DA
GH
transactions:
A locking script:
A locking script is an encumbrance placed on an output, and it
specifies the conditions that must be met to spend the output in the
future.
Historically, the locking script was called a scriptPubKey, because
it usually contained a public key or bitcoin address. In most bitcoin
P
the time they contain a digital signature produced by the user‟s
wallet from his or her private key.
G
Historically, the unlocking script is called scriptSig, because it
usually contained a digital signature. In most bitcoin applications,
SH
the source code refers to the unlocking script as scriptSig.
Every bitcoin client will validate transactions by executing the locking and
E
unlocking scripts together. For each input in the transaction, the validation
software will first retrieve the UTXO referenced by the input. That UTXO
TH
contains a locking script defining the conditions required to spend it. The
validation software will then take the unlocking script contained in the input that
DA
over), the main stack (not the alternate stack) is copied and the locking script is
executed.
GH
Figure below is an example of the unlocking and locking scripts for the most
common type of bitcoin transaction (a payment to a public key hash), showing the
combined script resulting from the concatenation of the unlocking and locking
RA
P
Figure: Combining scriptSig and scriptPubKey to evaluate a transaction script
G
Smart Contracts:
A smart contract is a computer code running on top of a blockchain containing a set of
SH
rules under which the parties to that smart contract agree to interact with each other. If
and when the pre-defined rules are met, the agreement is automatically enforced.
The smart contract code facilitates, verifies, and enforces the negotiation or performance
E
of an agreement or transaction. It is the simplest form of decentralized automation.
TH
It is a mechanism involving digital assets and two or more parties, where some or all of
the parties deposit assets into the smart contract and the assets automatically get
redistributed among those parties according to a formula based on certain data, which is
DA
1. A smart contract can only be as smart as the people coding taking into account all
GH
courts and or law enforcement. However, we will probably see a fusion of legal
contracts and smart contracts emerge over the next few years as the technology
becomes more mature and widespread and legal standards are adopted.
Smart contracts radically reduce transaction costs. Auto enforceable code – whether on
the protocol level or on the application level – standardizes transaction rules, thus
reducing the transaction costs of:
reaching an agreement,
formalization, and
enforcement
The concept of a smart contract is not new. However, Blockchain seems to be the catalyst
for smart contract implementation. The most primitive form of a smart contract is a
vending machine. The rules of a transaction are programmed into a machine. Automatic
vending machines not only slashed transaction costs by making human vendors obsolete,
but they also expanded service, offering 24/7 availability instead of limited opening hours
P
of a kiosk.
G
Characteristics of a Smart Contract
Smart contracts are capable of tracking performance in real time and can bring
tremendous cost savings. Compliance and controlling happen on the fly. In order
SH
to get external information, a smart contract needs information oracles, which
feed the smart contract with external information.
Smart Contracts are
Self-verifying
E
TH
Self-executing
Tamper resistant
DA
These smart contracts are a piece of code running on top of a blockchain network, where
digital assets are controlled by that piece of code implementing arbitrary rules. They have
properties of contractual agreements but should not be confused with legal contracts. (For
RA
more information on legal question around blockchain visit our Blockchain & Law page).
P
G
SH
Figure: Block Chain and Smart Contract
Scenario:
E
TH
If A and B don‟t know and don‟t trust each other, they usually need a trusted third
party to serve as an intermediary to verify transactions and enforce them.
With smart contracts & blockchains, you don‟t need those trusted intermediaries
DA
Traditional Way:
If Alice wants to purchase a car from Bob, a series of trusted third parties are
GH
P
G
E SH
TH
Figure: Traditional Contact
Blockchain Way:
DA
Network to see if Bob is the owner of the car and if Alice has enough money to
pay Bob.
RA
P
G
E SH
TH
U DA
GH
On the Blockchain, who owns what is transparent and at the same time anonymous or
RA
pseudonymous. This means that every computer running the blockchain protocol could
check whether a certain person is the rightful owner of the car or not.
Stealing cars won‟t be as easy as today, especially once we have smart keys granting
access control verified on the blockchain, to unlock our future vehicles. As the owner of
the car, you could authorize other people to drive it (stating the public key of the
respective individual). In such cases opening the car would only be possible with a smart
key on the Blockchain.
P
G
E SH
Figure: Trust in Smart Contract
TH
Types of Smart Contracts:
Blockchain and smart contracts have the potential to disrupt many industries. Use
cases can be found in banking, insurance, energy, e-government,
DA
telecommunication, music & film industry, art world, mobility, education and
many more. Smart contract use cases range from simple to complex.
Time-stamping services like ascribe (art registry) or governmental and semi-
U
governmental registries (land titles, birth certificates, birth certificates, school and
GH
university degrees) are examples for simpler technological use cases (the
regulatory aspects might be more complex). Decentralized autonomous
organizations, on the other hand, are the most complex form of a smart contract.
RA
P
G
Figure: Smart Contract Application
SH
With blockchains and smart contracts, we can now imagine a world in which contracts
are embedded in digital code and stored in transparent, shared databases, where they are
E
protected from deletion, tampering, and revision. In this world, every agreement, every
TH
process, task, and payment would have a digital record and signature that could be
identified, validated, stored, and shared.
Intermediaries like lawyers, brokers, and bankers, and public administrators might no
DA
an operating system for what some refer to as “trustless trust”. This means that
you don‟t have to trust people and organizations, you trust code, which is open
source and provides transparent processes.
Digital Wallet:
A digital wallet, also known as e-wallet is a virtual storage of user‟s payment and
identification information for various payment systems.
Digital wallet allows people to streamline purchase process on dedicated services and can
also be used together with mobile payment systems.
A cryptocurrency wallet, is a software program that stores private and public keys and
P
interacts with various blockchains to enable the user to transact with digital currency. In
the same fashion that you need a bank account to wire money. Or a Paypal account to
G
send money. You will need a cryptocurrency wallet in order to transact with other users.
Cryptocurrency Wallet Types: There are five types of digital storage available for your
SH
use:
1. Online Wallet:
Online wallets run on the cloud. Therefore, they can be accessed from
E
multiple devices with an internet connection.
TH
Like every cloud service, online wallets are practical and convenient.
However, they are also more susceptible to theft and often require extra
layers of security.
DA
Even then, you have to be very careful about choosing the online wallet
provider, as they have an extensive scam history.
2. Mobile Wallet:
U
Mobile wallets are your phone applications. They are very handy since
GH
they can be used as a means of payment even in physical stores. All you
need to do is install an app on your phone and open an account.
In general, mobile wallets are considered to be safer than cloud wallets.
RA
The risks associated with mobile wallets are losing your assets in case
your phone breaks down or encounters a security breach.
3. Desktop wallet:
Desktop wallets is another popular choice which is also safer than online
wallets.
They are downloaded and installed on a PC or laptop and are accessible
from the installation device.
P
Various manufacturers make hardware wallets compatible with different
web interfaces. Therefore, complete characteristics depend on wallets
G
integrations.
Hardware storage is also convenient because of its ability to send and
SH
receive currencies by merely plugging them into the internet enabled
device and authorizing yourself. Therefore, hardware wallet is the most
E
expensive, but also one of the safest options.
Some hardware wallets come with features such as pin code access, 28
TH
word seed phrase, and much more.
To access funds, the user simply plugs the device into their computer and
starts transacting. It‟s that easy! Hardware wallets should hold the bulk of
DA
Paper wallets are by far the safest option to store your digital assets.
A paper wallet is a physical copy of your generated public and private
GH
Hot Wallet:
A Hot Wallet is an online software that enables users to transact with cryptocurrencies
from a single device.
This software holds onto your private and public key in storage.
The reason these wallets are called “hot” is because they are connected to the internet.
Making them and your funds susceptible to cyber attacks or theft.
Pros:
1. Free
2. Quick access to your cryptocurrency (many hot wallets are accessible via your
cell phone)
3. Easy to use, and user-friendly
P
Cons:
G
1. Hot wallets by definition are connected to the Internet which means that your
cryptocurrency is less secure (e.g. hackers, possible regulation, and other
technical vulnerabilities)
SH
Best hot wallets:
1. Electrum
Desktop Wallet
2. Exodus
3. Copay
E
TH
4. Blockchain
5. Coinbase Mobile
Mobile Wallet
DA
6. Bread
7. MyEtherWallet
8. UpHold Online Wallet
U
9. Coinpayments
GH
Cold Wallet:
A Cold Wallet is a much more secure offline wallet device.
RA
That enables users to hold a significant amount of currencies on one device, with the
highest amount of security.
These devices typically have a plethora of features that increase overall security, to keep
users minds at ease.
These wallets are called “cold” because they do not require to be connected to the
internet in order to store cryptocurrencies. It is only when the user want‟s to transact with
those currencies that the wallet needs to be connected to the internet.
Pros:
1. The most secure option
2. As it‟s completely offline this provides a greater level of safety
P
Cons:
1. Expensive to buy ($80 USD+)
G
2. Not ideal for quick or regular transactions (because I leave one of mine at home,
and another in a safe deposit box)
SH
Best Cold wallets:
1. Ledger Nano S
2. Trezor - Stores BTC, BCH, BTG, ETH, ZCash, Dash (more coming soon)
3. KeepKey
E
4. Ledger Wallet - Stores BTC, BCH, BTG, ETH, ZCash, Ripple, Dash, ARK,
TH
Stellar, (hopefully Monero coming soon) and more
U DA
Hardware Wallets
GH
Anonymity:
Bitcoin is often described as an anonymous currency because it is possible to send and
RA
In Bitcoin, your pseudonym is the address to which you receive Bitcoin. Every
transaction involving that address is stored forever in the blockchain. If your address is
ever linked to your identity, every transaction will be linked to you.
Methods to Make Bitcoin as Anonymous:
1. Bitcoin Mixing:
Bitcoin transactions are recorded on a public ledger. Anyone who traces a
public address can know the origin and/or destination. There is no protocol
P
level procedure to anonymize these bitcoins, which is why a Bitcoin
G
mixer is required to hide identity.
Bitcoin mixing is a process which tries to break the linkability or
traceability.
SH
Mixing breaks the link between bitcoin addresses by either creating
temporary addresses or by swapping coins with other addresses of the
E
same value. This makes the trail hard to follow on the blockchain.
Bitcoin mixing is also referred to as Bitcoin laundering, Bitcoin
TH
washing, or Bitcoin tumbling, and it is a paid service.
Ex: BITMIXER, Helix
DA
internet usage.
Tor nodes encrypt and route your internet traffic to random computer
GH
nodes on the Tor network before it reaches its final destination. Hence, it
becomes extremely difficult to pinpoint the IP address or system from
which the message or transaction was broadcasted.
RA
P
improve the privacy of your Bitcoin transactions. But in this case, you
have to trust the VPN service provider not to log your activities.
G
Few popular based Logless VPN Service Providers are Windscribe,
VPNArea, Mullvad, AirVPN, CoinSutra
SH
Altcoins:
Altcoins are alternative (Alt) coins which appear to be alternative to Bitcoins.
E
Bitcoin and altcoins, in general, can have many similarities like- peer to peer transaction,
TH
mining process, etc.
Various altcoins are trying to target the limitations of Bitcoins, which include its long
transaction time, lack of anonymity, expensive, difficult mining process and insufficient
DA
functionality.
The vast majority of alt coins are derived from bitcoin‟s source code, also known as
“forks.” Some are implemented “from scratch” based on the blockchain model but
U
Based on the date of announcement, the first alt coin that was a fork of bitcoin appeared
in August 2011; it was called IXCoin. IXCoin modified a few of the bitcoin parameters,
specifically accelerating the creation of currency by increasing the reward to 96 coins per
RA
block.
What distinguishes the best altcoins:
Like any other currency, the success of cryptocurrencies to is mainly dependent
upon a wide array of parameters Like community, hype and more.
Partnerships and Investments - New cryptocurrencies are increasingly
being used by companies and this has an effect on its value too.
P
so as to solve a mathematical function (a hash) so as to
G
verify a block-chain transaction.
Proof of Stake (POS): According to this method, miners
verify the block transactions based on the number of coins
SH
that they deposit (place on a stake) on the network.
As every method can have its own unique advantages and disadvantages, the negatives of
E
the proof of work protocol are listed below:
1. It uses up greater electrical power hence raising electricity costs.
TH
2. One requires a high-grade setup to successfully mine the more popular coins.
3. The mining reward reduces as more coins are released.
DA
On the other hand, the proof of stake protocol removes the above-mentioned challenges
of a POW protocol through the following features:
1. Does not consume a lot of electrical energy.
U
Inference: Altcoins that use the Proof of Stake protocol are likely to gain greater
popularity as neither do they require a high-grade setup nor do they consume a high level
of electricity.
RA
The proof of stake protocol also carries certain loopholes. For instance, if the majority of
the tokens are owned by a small group of people, then they themselves will be the
validators.
Platform:
The success of an altcoin depends on the Blockchain technology that which the
altcoin uses. Blockchains of different altcoins tend to have varying characteristics,
each of which plays a role in determining whether it would make it to the list of
the best altcoin or not. The blockchain characteristics that affects altcoins
include:
The energy required to be put in to secure Blockchain
The mining difficulty level of the Blockchain
The transaction time
The Rewards:
P
The energy required by a blockchain is a pretty important factor since it
G
determines whether the majority of the people will be able to afford to mine the
altcoin or not.
Ex: POW blockchains tend to require a pretty high amount of electricity and
SH
processing power.
Blockchains that carry a high mining difficulty level tend to be more secure and
E
hence, the greater is the price of the altcoin that is associated with it.
The time that is taken to validate a transaction on the blockchain is yet another
TH
factor that differentiates a top altcoin from a mediocre one. The best altcoin is
usually the one that has a low transaction time.
The reward that is received upon a successful transaction is yet again, another
DA
factor that determines the initial success of an altcoin. The greater the reward, the
more successful the altcoin would initially be. However, as with all blockchains
U
following the POW protocol, the amount of reward reduces as more and more
attcoins are released with time.
GH
Community:
Today millions of people are connected to Altcoin, wish has resulted in the
formation of a community around these Altcoins. This hype around new and
RA
Many altcoins have already found solutions to similar problems white much more
are trying to come up with even better ideas. The more problem solving the
altcoin is, the more it is expected to grow.
Team:
If you are interested in top altcoins or if you are trying to find the best altcoins to
invest in, one of the essential factors you need to pay attention to is the team
behind the altcoin. At first this may seem a bit strange, however, as a matter of
P
fact, the team has a lot to do with any altcoin's success in terms of the in-depth
G
understanding of the currency and the ability to manage possible issues.
Varients of Altcoins: Steem, Ardor, Ethereum,stratis, Liecoin, Carano, Monero, ICO
(Initial Coin Offering)
SH
IOTA (Next Generation Blockchain):
IOTA is a open source distributed ledger designed to record, execute transactions to
E
facilitate secure payments and communications between machines in the Internet of
TH
Things (IoT) ecosystem.
IOTA has a cryptocurrency called mIOTA.
IOTA‟s platform uses a Decentralized Acyclic Graph (DAG) instead of a blockchain
DA
Their founder David Sonstebo, Dominik Schiener, Dr Serguei Popov, and Sergy
GH
connected devices. For example, it might enable you to purchase individual grocery items
from an ecommerce site using your Internet-connected fridge
Confirmation and transaction times are faster than the blockchain, and the number of
individual transactions that the system can process simultaneously is unlimited - a distinct
advantage over the sometimes sluggish blockchain.
IOTA‟s distributed ledger, by contrast, does not consist of transactions grouped into
blocks and stored in sequential chains, but as a stream of individual transactions
entangled together as shown below
P
Figure: IOTA Tangle
G
In order to participate in this network, a participant simply needs to perform a small
amount of computational work that verifies two previous transactions. Rather than
SH
creating a hierarchy of roles and responsibilities in the network, every actor has the same
incentives and rewards.
In order to make a transaction in the Tangle, two previous transactions must be validated
E
with the reward for doing so being the validation of your own transaction by some
TH
subsequent transaction. With this 'pay-it-forward' system of validations, there is no need
to offer financial rewards. Transacting with IOTA is and will always be completely fee-
free.
DA
Without the need for monetary rewards, IOTA is not limited to transactional value
settlements. It is possible to securely store information within Tangle transactions, or
U
even spread larger amounts of information across multiple bundled or linked transactions.
This structure also enables high scalability of transactions. The more activity in „the
GH
Question Bank
1. What is double spending in digital currencies? How Block chain can overcome this.
2. Explain the following elements of block chain: Block, Genesis Block, Merkle Trees,
Mining, Miners.
3. Describe Bitcoin P2P Network.
4. Explain various types of nodes and their roles in Bitcoin P2P Network.
5. Explain Decentralized Consensus.
P
6. What is Proof of Work in block chain?
7. Explain Locking and Unlocking scripts in Bitcoin transactions.
G
8. What is a smart contract? Explain with a scenario.
9. What is a crypto currency wallet and list out various types of crypto currency wallet.
SH
10. What are Hot and Cold Wallets?
11. Write a note on: i. Altcoin, ii. IoTA
E
TH
U DA
GH
RA