3. INTRODUCTION:
• What is a Blockchain?
• A Blockchain is a growing list of records called blocks which are
linked using cryptography.
• Each block will have :
• Transaction Data
• Nonce
• Time stamp
• Hash and Previous Hash
5. 2. NONCE:
• In Cryptography, a Nonce is a arbitrary number that may be used
once.
• It is often a random number issued in an authentication protocol
to ensure that old communication cannot be reused in reply
attacks.
6. 3. TIME STAMP:
• Why do we need TIME STAMP?
• Can hackers alter the Time stamp value?
7. 4. HASH AND PREVIOUS HASH:
• The GENESIS BLOCK will have previous hash as Zero
8. WHAT IS A HASH?
• It identifies a block and all of its contents.
• It’s always unique just as fingerprint.
9. WHY BLOCKCHAIN?
LEDGER : Collection of financial accounts is called a ledger.
There are three types of ledgers:
11. PROBLEM STATEMENT:
• If two or more transactions requesting at the same time we should
e able to find which transaction goes first.
• For example:
• If T1[AB], T2[BC], T3[CB], T4[DE] are four transactions requesting
at a same time.
• Based on their dependencies we can be able to find which transaction goes
first.
• To solve this we need to create a DAG. (Directed Acyclic Graph)
T1
T2 T3
T4
12. SOLUTION:
• Create a DAG for given transactions and draw dependency edges.
• The node with zero incoming edges goes first.
• If two or more nodes have zero incoming edges
the one with the earliest time stamp goes first.
• In this example both T1 and T4 have zero
incoming edges, so both T1 and T4 will be executed.
• Insert T1 and T4 into the transaction pool and erase the node and
its dependency lines.
T1
T2 T3
T4
13. SOLUTION:
• Now in the remaining DAG again check for node with zero
incoming edges.
• Here, T2 have zero incoming edges.
• So T2 will go next.
• Send T2 into the transaction pool and erase its node and
dependency
edges.
• And finally T3 will be executed.
T2 T3
T3
14. SOLUTION:
• After sending transactions to transaction pool, miners will check
their validation.
• For the transaction to become valid it needs at least 51% votes.
• If the transaction is valid, It will be pushed into Transaction Pool
else discarded.
• Then depending on block size the transactions are stored inside
the block.
• And the Block is added to the Blockchain.
Miners
Transaction
Pool
Block Block Chain
validation
15. CONCLUSION:
Hence, we solved transactions ordering using the concepts from
Directed Acyclic Graph(DAG) and DAG Topological Sorting
algorithm.