The Beginning

MY FIRST WEEK AT WEB3BRIDGE
The week started off strong!- with a test. Can you imagine? Lord help us. Anyway, the test spanned a lot from the meaning of blockchain to the difference between data types in solidity. It was truly a good warm up to what was to come. What came after was a lot nonetheless it was good. Now, sit back and relax as I break down to you all that I learnt in my first week at web3bridge.
BLOCK CHAIN
Where blockchain refers to a list of records of blocks that store data that is publicly available and not controlled by a central authority. There are three different kinds of blockchain and they are the:- public, consortium and fully private blockchains.
Can anybody just wake up and add a block to the chain?
No! For a block to be added to the chain, it needs to be approved by a consensus mechanism:-a system that ensures all participants in the blockchain agree on the state of the ledger. There are different kinds of blockchain but there’s three main ones and they are:- Proof of Work, Proof of Stake, and Proof of Byzantine Authority.
Proof of Stake is a consensus mechanism whereby validators put down some cryptocurrency to make them eligible to approve on which blocks can be approved on the blockchain. It is the consensus mechanism used in Ethereum.
WHAT IS ETHEREUM?
Ethereum(otherwise referred to as the world computer) is a general-purpose blockchain. Unlike bitcoin, which serves mainly as a cryptocurrency blockchain. Ethereum provides a decentralized, peer-to-peer, and virtual environment where everyone in the world can make transactions, build decentralized applications and execute smart contracts.
Ethereum’s cryptocurrency unit is known as Ether and is stored in a place known as a wallet which is a gateway to the Ethereum system. There are different kinds of wallet. Some are mobile or desktop based, some are single-platform/single-currency, and lastly, some are custodial and non-custodial.
WHAT ARE CUSTODIAL AND NON-CUSTODIAL WALLETS?
In custodial wallets, a person third-party helps you control your wallet by holding your private keys, and in a non-custodial wallet gives you full control of your wallet as you’re the one who holds your private keys. There’s an important caveat there though, you have to be very careful with your private keys and ensure nothing happens to it, as once it’s gone, all the ETH in your wallet can never be recovered.
I’m sure you’re wondering what a private key is, I was confused to at first.
In Ethereum, there are two types of keys and they are the private keys and public keys. Ownership of ether is established through digital private keys, Ethereum addresses, and digital signatures. The digital signature and address are gotten from the private key. The private key is gotten by randomness and the public key is gotten from a mathematical equation which is K= k*G, where k is the private key and G is the generator point. Then, the address is gotten from a process known as hashing. Ethereum uses the hash function Keccak-256 and takes the public key which was gotten from the mathematical equation, hashes it and then only the last 20 bytes are taken and are used to form the Ethereum address.
This address can still be a bit long and some people may want it to be readable and short enough for others to read and this can be done through the Inter Exchange Client Address Protocol.
Why can the public key be gotten from the private key when the private key cannot be gotten from the public key?
This is because of a problem known as the discrete logarithm problem. This is a problem where one can know the numbers involved in creating an output but one cannot decipher the numbers involved in creating the output. So, this means that one can get the public key from the private key but cannot get the private key from public key.
WHAT HAPPENS WHEN I SEND ETH FROM ONE ACCOUNT TO ANOTHER?
This was perhaps my favorite part of the week as I was able to understand what goes on behind the scenes.
When I open my wallet and click on send, the transaction is signed with a digital signature which is gotten from my private key. Behind the scene, the user is actually making a request to a node using the Ethereum’s JSON-RPC API( which means Java Script Object Notation Remote Procedure Call Application Programming Interface). Also, even though I may specify 3 ETH to be sent, there is still another amount that will be added known as gas fee. Think of it like normal bank charges. This gas fee is given to the validator and the base fee is burned.
Next, this transaction is submitted to the execution client that checks if it is valid. If it is valid, the execution client adds it to the local mempool and also broadcasts it to other nodes over the execution layer’s gossip network. Then, a validator node is randomly selected to be responsible for updating to the global state of Ethereum. This node is made up of three clients:- the execution client, the consensus client and the validator client. After a chain process involving the three clients, the block is added to the local database in each node that attests to it.
THERE’S STILL A CATCH THOUGH!
The transaction can only be considered finalized if it has become part of a chain with a supermajority link between two checkpoints.
When do checkpoints occur?
Checkpoints occur at the start of each epoch( a period of time representing 32 slots, and each slot is a 12-second time window for block proposals and attestations within the Proof-Of-Stake consensus mechanism). Transactions must only occur within an epoch.
Nodes were mentioned earlier, but what do they really mean?
A node is any instance of the Ethereum Client Software that is connected to other computers also running Ethereum Software, forming a network. A node has to run two clients:- a consensus client and an execution client. Moreso, if one wants to be a validator, they must also run the validator client. To be able to do this too, they should have staked a minimum of 32 ETH.
It also has three types:- a full node, archive node and a client node.
Now, what do these clients mean?
These clients are software implementations that allow users to interact with the Ethereum network. They include:- Geth, Reth,Nethermind, Besu, Lighthouse etc.
Both the nodes and clients are the foundational powerhouse that run the Ethereum network.
CONCLUSION
From understanding the meaning of a blockchain to learning about smart contracts( self-executing digital agreements written as a computer code) to learning how attackers attack Ethereum( reorg, finality and double finality) and how Ethereum defends itself(slashing) to learning how to run a node along with a client, my first week at Web3Bridge was truly amazing, all thanks to my instructor and Ethereum’s easy to understand docs.
Subscribe to my newsletter
Read articles from Susannah Adebola directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
