Featured Post

15 Python Tips : How to Write Code Effectively

Image
 Here are some Python tips to keep in mind that will help you write clean, efficient, and bug-free code.     Python Tips for Effective Coding 1. Code Readability and PEP 8  Always aim for clean and readable code by following PEP 8 guidelines.  Use meaningful variable names, avoid excessively long lines (stick to 79 characters), and organize imports properly. 2. Use List Comprehensions List comprehensions are concise and often faster than regular for-loops. Example: squares = [x**2 for x in range(10)] instead of creating an empty list and appending each square value. 3. Take Advantage of Python’s Built-in Libraries  Libraries like itertools, collections, math, and datetime provide powerful functions and data structures that can simplify your code.   For example, collections.Counter can quickly count elements in a list, and itertools.chain can flatten nested lists. 4. Use enumerate Instead of Range     When you need both the index ...

What is Block-linking in Blockchain - Quick Tutorial

Satoshi Nakamoto created the first Blockchain project wished Bitcoin to be secure, anonymous and could work with no centralized intermediary. To achieve that, Nakamoto combined public-key cryptography, a distributed ledger, and a consensus algorithm.

History of Blockchain 

Nakamoto combined public-key cryptography, a distributed ledger, and a consensus algorithm. The groundwork for each component was painfully laid by people before him, such as Wei Dai, Nick Szabo, Hal Finney, and Adam Back.

The Blockchain can sometimes refer to the combination of all three components or just the distributed ledger.

Blockchain ideas
Blockchain ideas


As the name aptly describes, at the heart of the Blockchain there is a chain of blocks, each block containing read-only data that represents monetary transactions.


Every time a new block is written, you need to reference the block that immediately precedes it – so, at any given point, you can track down the chain up to the very first block created.

How blockchain design works


The Blockchain is by design a decentralized and autonomous system, and sometimes more than one block gets created. 

To keep the integrity of its ledger, a consensus mechanism is used that considers that the longest chain is always the most trustworthy (it will be mentioned later why that is the case) and nodes can only be allowed to blocks to the chain if they solve an arbitrary mathematical puzzle (also more on that later).

Quiz on blockchain

Messages or transactions are exchanged between nodes through a peer-to-peer network, and there are two types of participants: those who generate transactions and "spend coins" and those who gather and record these operations.

To incentivize the processing nodes, the system rewards them with new brand new coins. so they not only do record keeping but also "make currency."

How technology works


Because of the intended strong analogy to precious metal mining, these particular nodes are called "miners."

This can appear trivial, but keep in mind that when you send something digital – a music file, or written document or picture — you are always making copies. Moreover, although, is not a real problem with files, is a big, big problem with digital currencies.

For a digital currency to work it is crucial that once you give it to someone, the money is not in your possession anymore, and you cannot give this same money to someone else.

This does not happen with wire transfers, for instance, because the financial institutions record and share a ledger of all the money that enters and exits their systems.

However, that is a centralized solution that depends that you trust an organization always to keep their "word."

The real process

  • Every transaction made in the Bitcoin network is directed to a pending transaction list. The transaction itself is a simple message that senders sign with a cryptographic key with an amount, as well as the sender's and recipient's addresses. A node authenticates and integrates these transactions in the blockchain. 
  • It is useful to recall that every block references the block that came before. 
  • The new block has to have a hash value that equals all data it is trying to add to the chain, PLUS all data already stored in past blocks of the blockchain. Since the subsequent hashes are always dependent on the previous, that makes the blockchain tamper-proof. Remember that for anyone to change any value – even a single bit – in the already calculated block, means that he would need to update the hashes of every subsequent block.
  • This is heavily time-consuming and makes it harder to modify past blocks of Blockchain. The deeper the block down the "height," the more difficult.

How secure is it

The records on a blockchain are secured through cryptography. Network participants have their own private keys that are assigned to the transactions they make and act as a personal digital signature. If a record is altered, the signature will become invalid and the peer network will know right away that something has happened.

Early notification is crucial to preventing further damage.

Comments

Popular posts from this blog

How to Fix datetime Import Error in Python Quickly

SQL Query: 3 Methods for Calculating Cumulative SUM

Big Data: Top Cloud Computing Interview Questions (1 of 4)