0% found this document useful (0 votes)
3 views60 pages

Unit 2

The document discusses client-server architecture as a distributed system that separates tasks between clients and servers, allowing for efficient data access and resource management. It also explains the mining process in blockchain technology, detailing the tasks performed by miners, including transaction validation and proof of work. Additionally, the mining algorithm is outlined, emphasizing the steps required to create a new block in the Bitcoin network.

Uploaded by

tharunkumaroutai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views60 pages

Unit 2

The document discusses client-server architecture as a distributed system that separates tasks between clients and servers, allowing for efficient data access and resource management. It also explains the mining process in blockchain technology, detailing the tasks performed by miners, including transaction validation and proof of work. Additionally, the mining algorithm is outlined, emphasizing the steps required to create a new block in the Bitcoin network.

Uploaded by

tharunkumaroutai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 60

CRYPTOGRAPHY &

BLOCKCHAIN TECHNOLOGY
Dogecoin 2013
Shiba Inu 2020
Client-server Architecture
 Client-server architecture provides integration of data and services and allows clients to be isolated
from inherent complexities, such as communication protocols. The simplicity of the client-server
architecture allows clients to make requests that are routed to the appropriate server.

 The client-server model consists of three parts:


 the client: The client is the machine (workstation or PC) running the front-
end applications. It interacts with a user through the keyboard, display, and
pointing device such as a mouse. The client also refers to the client process that
runs on the client machine.
 the server: server process the requests from one or more client processes
concurrently over a network connection.
 the network: The network enables remote data access through client-server
and server-to-server communication.
Distributed system
• A distributed system is a collection of separate and independent software/hardware
components, called nodes, that are networked and work together coherently by coordinating
and communicating through message passing or events to fulfill one end goal.
Complexities of the system are hidden to the end user making the whole system appear as a
single computer to users.
The Client-server model is a distributed System

• The Client-server model is a distributed application structure that partitions task or workload
between the providers of a resource or service, called servers, and service requesters called
clients.
• In the client-server architecture, when the client computer sends a request for data to the
server through the internet, the server accepts the requested process and deliver the data
packets requested back to the client.
• Clients do not share any of their resources. Examples of Client-Server Model are Email, World
Wide Web, etc.
• In the client–server model, the server is often designed to operate as a centralized system
that serves many clients
Mining mechanism
• Mining is a process by which new blocks are added to the
blockchain.
• Blocks contain transactions that are validated via the mining
process by mining nodes on the Bitcoin network.
• Blocks, once mined and verified are added to the blockchain
which keeps the blockchain growing.
Tasks of the miners
Once a node connects to the bitcoin network, there are several tasks that a bitcoin miner performs:

1. Synching up with the network: Once a new node joins the bitcoin network, it downloads the blockchain
by requesting historical blocks from other nodes. This is mentioned here in the context of the bitcoin
miner; however, this not necessarily a task only for a miner.

2. Transaction validation: Transactions broadcasted on the network are validated by full nodes by verifying
and validating signatures and outputs.

3. Block validation: Miners and full nodes can start validating blocks received by them by evaluating them
against certain rules. This includes the verification of each transaction in the block along with verification
of the nonce value
Tasks of the miners
Once a node connects to the bitcoin network, there are several tasks that a bitcoin miner performs:
4. Create a new block: Miners propose a new block by combining transactions broadcasted on the network
after validating them.

5. Perform Proof of Work: This task is the core of the mining process and this is where miners find a valid
block by solving a computational puzzle. The block header contains a 32-bit nonce field and miners are
required to repeatedly vary the nonce until the resultant hash is less than a predetermined target.

6. Fetch reward: Once a node solves the hash puzzle (PoW), it immediately broadcasts the results, and other
nodes verify it and accept the block.
Proof of Work (PoW)
This is a proof that enough computational resources have been spent in order to build a valid block. PoW is
based on the idea that a random node is selected every time to create a new block. In this model, nodes
compete with each other in order to be selected in proportion to their computing capacity. The following
equation sums up the PoW requirement in bitcoin:

H ( N || P_hash || Tx || Tx || . . . Tx) < Target

Where,
N is a nonce,
P_hash is a hash of the previous block,
Tx represents transactions in the block,
Target is the target network difficulty value.

This means that the hash of the previously mentioned concatenated fields should be less than the target
hash value.
The mining algorithm
The mining algorithm consists of the following steps.
1. The previous block's header is retrieved from the
bitcoin network.

2. Assemble a set of transactions broadcasted on the


network into a block to be proposed.

3. Compute the double hash of the previous block's


header combined with a nonce and the newly
proposed block using the SHA-256 algorithm.

4. Check if the resultant hash is lower than the current


difficulty level (target) then PoW is solved. As a result
of successful PoW the discovered block is broadcasted
to the network and miners fetch the reward.

5. If the resultant hash is not less than the current


difficulty level (target), then repeat the process after
incrementing the nonce.

You might also like