👀ONLY OPEN IF YOU WANT TO KNOW, "How transactions are confirmed, a block is mined & crypto is sent/received?"
Learn the background process of every transaction and other technical jargons
Up until now we had shallow understanding of the functioning of a blockchain. It’s time, we dive deep into the technical jargon & make everything simple. Brace yourself this letter is going to be better than any of the romantic talks we ever had. (This will be a one-sided Conversation, without her presence 😥)
A quick explanation of the key terms that will be often referred to in the explanation.
Node: It refers to every computer which is the part of the blockchain network. Every participating computer/node has a copy of the current state of the blockchain, similar to an examination hall where every student has the same copy of the question paper, with the students representing the nodes in this case.
Transaction/ID: It represents every transfer, minting of NFTs, contract deployment etc. A transaction typically includes the address of the sender and receiver, the amount, and the gas fee. A unique transaction ID is generated using hash functions for each transaction, encapsulating all the aforementioned information. On a blockchain explorer, all the information about a transaction can be viewed using its ID.
Transaction Pool: Before a transaction is confirmed, it is held in a temporary storage called a memory pool or transaction pool. When a transaction is initiated, it is broadcasted to the network and held in the transaction pool until a miner selects it for confirmation and later adds it to a block. The priority of the transaction depends on factors like gas fees and network congestion.
Mining: It refers to the process comprising,
Transaction Selection → Confirmation → Block Creation
To validate a transaction, a miner must solve complex mathematical problems, with the first solver being rewarded with the native cryptocurrency of that blockchain.Hashing: You may have wondered why transaction IDs, block IDs or even wallet addresses appear so bizarre. Well, it's because they are generated using a hash function. A hash function takes data of any size as the input and produces a fixed-length output known as a hash (a hexadecimal value). For any given data, the hash value is always unique. Hashing serves as a form of identity for the data, much like our fingerprints. A hash works like a digital fingerprint for the input information. Any change to the original data, even slight, will change the hash dramatically. This ensures the data has not been altered or tampered with.
When Raj sends 100$ worth of BTC to Rahul, this is what happens in the background.
The data of the transaction (sender, receiver, amount, gas fee, etc.) is hashed (mostly by the native crypto wallet of the sender) and a transaction ID is generated. These transactions collect in a chronological order in a transaction pool.
A miner then collects these transactions (maximum 5 at once)
Transaction Validation: The first step is to check the digital signature using cryptographic algorithms to ensure the transaction was initiated by the address owner, and verify the sender has sufficient balance to perform it.
Block Creation: After validation, the miner groups a set of transactions into a block and arranges them in a specific order. The miner also generates other block properties. A block is only valid if it has a hash value, which the miner generates by solving complex mathematical puzzles (often referred as mining).
Consensus and Reward: Once the puzzle is solved, the miner broadcasts the new block to all network nodes. The nodes check the block's validity. If a majority reach consensus, it's added to the chain. The miner receives a reward for it’s proof-of-work in the native token.
The 100$ is then deposited into Rahul's wallet. This multi-step process happens so quickly that we hardly consider understanding the background technology. But these steps make blockchain network robust.
We'll keep diving further and simplifying the technical jargon to help you swim swiftly through blockchain's ocean.
In the next letter we’ll look inside the Block of a blockchain to understand the architecture (You can drop a DM to suggest any topic or give feedback)
Todays Edition was brought to you by : Geek Jayant
See ya! Happy Learning 😊