Featured Post

SQL Interview Success: Unlocking the Top 5 Frequently Asked Queries

Image
 Here are the five top commonly asked SQL queries in the interviews. These you can expect in Data Analyst, or, Data Engineer interviews. Top SQL Queries for Interviews 01. Joins The commonly asked question pertains to providing two tables, determining the number of rows that will return on various join types, and the resultant. Table1 -------- id ---- 1 1 2 3 Table2 -------- id ---- 1 3 1 NULL Output ------- Inner join --------------- 5 rows will return The result will be: =============== 1  1 1   1 1   1 1    1 3    3 02. Substring and Concat Here, we need to write an SQL query to make the upper case of the first letter and the small case of the remaining letter. Table1 ------ ename ===== raJu venKat kRIshna Solution: ========== SELECT CONCAT(UPPER(SUBSTRING(name, 1, 1)), LOWER(SUBSTRING(name, 2))) AS capitalized_name FROM Table1; 03. Case statement SQL Query ========= SELECT Code1, Code2,      CASE         WHEN Code1 = 'A' AND Code2 = 'AA' THEN "A" | "A

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

Explained Ideal Structure of Python Class

How to Check Kafka Available Brokers