0% found this document useful (0 votes)
15 views3 pages

BLOCKCHAIN

The document summarizes key differences between centralized and decentralized ledgers, and outlines challenges addressed by blockchain technology. It then describes how blockchain works, including how hash functions secure blocks in the chain and how proof-of-work and proof-of-stake achieve consensus. The main challenges of security, ordering transactions, and immutability are addressed through public-key cryptography, time-stamping blocks, and making altering past transactions computationally infeasible.

Uploaded by

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

BLOCKCHAIN

The document summarizes key differences between centralized and decentralized ledgers, and outlines challenges addressed by blockchain technology. It then describes how blockchain works, including how hash functions secure blocks in the chain and how proof-of-work and proof-of-stake achieve consensus. The main challenges of security, ordering transactions, and immutability are addressed through public-key cryptography, time-stamping blocks, and making altering past transactions computationally infeasible.

Uploaded by

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

Digital Centralized Ledger  weaknesses:

• Data could be modified, and governmental authorities could force it


• A hacker could break into the database
• The IT system of a bank may fail and lost recorded data
• Bank run

BLOCKCHAIN  is a distributed ledger with each block containing number of transactions:


• Each node of the network owns a copy of the ledger  When a node validates new t.
ransaction  update to the rest of the network  latency = delay in updating
• No central authority who certify data
• Multiple decentralized copies of the ledger
• Unchangeable

Hash function  takes data as input and return a random string as output of standard length 
Bitcoin uses the SHA-256 hash function

Properties of a good hash function:


• Avalanche  small change in input led to completely different output
• Efficiency  the output is returned fast
• Non-invertibility  is extremely difficult get the input knowing the output

Block hash  unique identifier for the block  is the output of the hash function applied to :
• Previous block hash  b t-1
• Content of the block  B t
• Nonce of the block  n

Proof of Work (POW)

Each block needs to be solved by a node to be accepted in the blockchain  the miner is rewarded
and updates the blockchain  to solve a block a miner need to find the Nonce (n) random string
which once is hashed with H [ n; Bt ; b t-1 ] return a block hash with a target (or less) leading zero

The number of leading zero


•is updated every 2 weeks e chosen with an expected new solved block every 10 minutes
• is proportional to the total available computational power (total hash rate)

POW achieves decentralized consensus and appear to be secure (never breached nowadays).
However requires huge computational power and energy  61 TWh per year
3 Main challenges:

1) Security identification of users

Solution  Public-key (Bitcoin use Elliptic curve digital signature algorithm)  everybody
know because used to verify transaction

Private-key 256-bit number  string of 64 characters from A-F or 0-9  known only by
the owner of the wallet.

2) Time ordering of transactions and double spending problem

Solution  Competition among miners to solve blocks as fast as possible

Mempool  contain all pending transactions that miners randomly pick

Timestamp  Once the miner solves the block a timestamp is assigned to the solved block

3) Immutability of transaction history

Immutability is obtained by linking blocks together  changing a single transaction


registered ‘’tot’’ blocks ago requires re-solving the ‘’tot’’ block

Longest-chain Rule  Nodes accept only the longest available blockchain  if a past
transaction is changed is unlikely that the new chain becomes longer than original one 
required that the re-solving block is faster than all the miners together mining new block

Example of Fraud

Aldo plan to get a product from an online shop without paying

1) Produce a valid block with the transaction to the shop and send it to network
2) At the same time produce another valid block where he send the coin to himself, but in
a private chain
3) Start validating new block in the private chain where it is the transaction with himself
4) Get the product from the shop because at the same time there is a public blockchain
where there is a valid transaction to the shop  the shop once has seen the ‘’valid’’
transaction sent the product
5) Then he update the network with his private chain
6) If longer than the public chain the network accepts the one where is the fraud
transaction  so the shop recognize the transaction and at the same time the same
amount of money is in his wallet
51% Attack  However he does not have enough computational power to solve block
faster than the rest of the network  the longest chain is the real one containing no
payment  But He has more computational power than the network  the fraud
transaction chain becomes longer than the public with the valid one  and he update
the fraud chain to network once he received the product to the shop

Collusion between mining pools to make 51% of total hash rate ??

Otherwise he could send the private chain to other nodes who could contribute to
extend the chain  but in this way the one which survive is the block without a valid
transaction so the shop cannot find anywhere the payment

Proof of Stake (POS)

Is not the first node who solved the block that update the blockchain but the node who
validate is elected pseudo-randomly  the election is based on :

• the stake size of the node


• a random extraction

Larger the stake  higher the probability to be selected

The locked coins staked can be released after a period of time if the node behaved
honestly, otherwise it lost its stake

51%  if the node hold more than 50% of the coin supply  but it require an huge
amount of money to build this stake and if the system lose credibility the value of this
huge stake would be lost

Epoch –> group of 32 blocks

32 nodes  Proposers
Some nodes  Validators

If proposers produce 2 different block in one epoch  create a Fork  Heaviest chain
rule  the valid chain is the one with more attestations

You might also like