What Is Blockchain?

ClarenceCTZ

Active member
Member
Joined
1 yrs. 9 mth. 30 days
Messages
29
Reaction score
1
Wallet
0$
In case you are curious about blockchain but have no idea what exactly it is. It's blockchain, which means few simplifications are made when writing this. If you understand what blockchain technology is, then my mission will be accomplished.

What is the blockchain?
-> Blockchain = Block + Chain = listOf(block)


Here, we'll begin with an analogy involving the transfer of funds from my account to yours. It's important to note that blockchain serves numerous purposes, and one of them is facilitating money transfers.
*Imagine I initiate a financial transaction, transferring a specific sum of money from my account to yours.
*When I conduct this transaction, it's necessary to have a designated location to record all the relevant transaction details.
*This designated location is referred to as a block.

Within this block, we document essential information such as:

1. The identities of the parties involved in the money transfer.
2. The precise amount associated with the transaction.
3. Additional details, including any required signatures.

public class Block {
public String data;
public String hash;
...

}

So, the block functions as an information container, much like a check in a bank.
Additionally, each block contains a unique hash for its identification, alongside the stored information. This hash is a concept of utmost importance.

Given the multitude of transactions, numerous blocks will naturally emerge.
These blocks are interconnected to form what is known as a blockchain.

But why are these blocks interconnected, you might wonder?
The blocks are linked together to ensure the security of the information.
Connected in the sense that the hash of the current block relies on the hash of the preceding block.

Example:
Suppose we have 3 blocks, each with the following information:
  • Block 1 contains information I1 and a corresponding hash value H1.
  • Block 2 contains information I2 and a hash value H2.
  • Block 3 contains information I3 and a hash value H3.
H2 is generated by combining H1 and I2. Similarly, H3 is created through the combination of H2 and I3, and so forth.

  • H2 = someCryptoFunction(H1, I2)
  • H3 = someCryptoFunction(H2, I3)

From where does the H1 comes. To start, we need to take a default value of H0.

  • H1 = someCryptoFunction(H0, I1) where H0 is a default value.

Currently, the above blockchain is stable.
Now, let’s say someone changed the information from I2 to I2' and hash from h2 to h2' of the block2 and left the other blocks as they were earlier.
In this case, the blockchain will become unstable.

The blockchain is unstable because of the following reasons:
  • H3 = someCryptoFunction(H2', I3) is no more correct now.
  • We need to the new H3' to make H3' = someCryptoFunction(H2', I3)
  • Similarly, for H4', H5', H6', and so on.
After modification, the blockchain will become stable.
In this way, any modification requires an end-to-end modification and verification. It’s not easy to modify any data by some hack. If done with the hack, the blockchain will become unstable and we will be caught.

List<Block> blockList = new ArrayList();

We keep the blocks in a list like above so that from the position of the current block, we can find the previous block very easily by doing blocklist.get(position — 1). There are many ways to store the blocks.

Security is the main reason that is why these blocks are connected.
Now, delving deeper into the concept, what exactly is blockchain?
Blockchain is an openly shared and decentralized ledger system that stores various forms of data, primarily transactions, across all nodes within its network.
The definition above might seem complex, but let's break it down step by step for a clearer understanding.

Ledger
The ledger serves as the primary repository, housing a list of blocks.

Stores Data
Each block within the blockchain stores data, which can encompass a wide range of information. For instance, we can consider transactional data as an example of the type of information stored.

Distributed and Decentralized Ledger
In conventional systems, there is typically a central entity responsible for managing data. In contrast, blockchain operates on a network of multiple machines, ensuring a decentralized and distributed ledger. All these machines connect directly with one another and share the same ledger. Hence, blockchain is both decentralized and distributed, signifying that the ledger itself is shared with every participant in the blockchain network. Each participant possesses a copy of the entire ledger and receives updates whenever new information is added.

Shared Across All Network Nodes
Within the network, every machine (node) is interconnected. Each node holds an identical copy of the ledger, demonstrating that the ledger is shared across all nodes in the network.

How Does Blockchain Function?

Here are the steps illustrating how blockchain operates:
  1. Kyle initiates a transaction.
  2. Kyle creates the transaction details.
  3. Kyle submits the transaction to the network.
  4. A machine within the network verifies and authorizes the transaction.
  5. A new block is generated in the blockchain to record Amit's transaction.
  6. The updated blockchain is distributed to all participants in the network.
  7. The transfer is successfully completed.
Now, we have a clear understanding of what blockchain is and how it operates.
Given that blockchain is a distributed system, you might wonder about its security measures.
Blockchain employs cryptographic techniques to generate digital signatures. This involves the use of private and public keys for handling digital signatures.

- Private Key: This key can only be accessed by the individual owner.
- Public Key: All participants within the network have access to each other's public keys.

For instance, when creating a new transaction, I encrypt the information using my private key to generate a digital signature.
And then, I submit the transaction(information, public key, the digital signature which was created above) to the network for the approval.
Security is the main reason that is why these blocks are connected.
In the process, the network decrypts the digital signature using the public key provided and extracts the information from that signature.

If the original information matches with the information extracted from the signature, then it approves else it declines.
If the information does not match, there can be the following cases:
  • The original information was manipulated somewhere in-between.
  • The digital signature was generated with the private key which does not correspond to the public key provided.

This is how the network will be able to catch the manipulation. Hence, the blockchain is secure.

That’s it, enjoy :)
 
Top Bottom