Home Crypto Journey Into Web3

Journey Into Web3

0
Journey Into Web3

[ad_1]

Photo by Jonathan Borba on Unsplash

About a week ago, I started into a new tech journey of the Web3 space and I must say it’s been a very interesting one. The more I work and make more research on it, the more intrigued I am about the entire concept. In this article I intend on writing about the experience so far, what I’ve learnt and what I’ve worked on as well. Lego 🤩

A quick history…

Since a huge part of Web3 revolves around Etheruem and the Ethereum network, the first thing I read about was the reason why Ethereum came about. To talk about Ethereum, we must first talk about Bitcoin itself. Bitcoin is the first of what we’ll like to call a digital money and was invented by an anonymous Satoshi Nakamoto who released the Bitcoin white paper in October 31 2008. In the white paper he described a system to allow peer to peer payments without a financial intermediary (like a bank).

One of the key characteristics of the bitcoin network was the Idea of a blockchain. The Bitcoin blockchain is basically a tool to store a list of monetary transactions between different people. The issue with bitcoin however was that it was used just for sending of money between different people.

After a little while, people began to see that they can take some concepts from the Bitcoin technology and apply it to not only handle the transfer of currency but other types of exchanges as well. One of those who felt strongly about this was Vitalik Buterin who authored his own white paper in the late 2013. He envisioned using the technology to create sub cryptocurrencies, domain name registrations and gambling applications amongst many others. So his ideal world was beyond using blockchain to transfer money but creating much more robust and advanced applications.

In Vitalik’s white paper, he went to discuss an important part of the Ethereum network, something called a Smart Contract. A Smart contract is a piece of code that lives in the Ethereum blockchain and these contracts are the absolute core of what Ethereum is. The Ethereum system went online on July 30th of 2015.

Ethereum networks are formed by one or more nodes where each node is a machine running an Ethereum client. Each node can contain a full copy of the blockchain and also anyone can run a node.

Further away from history lessons…

I saw that I could use and test Ethereum with a tool called Metamask, so I went on to create my own Metamask account and I was given some 12 words phrases called Mnemonics. The account Mnemonics can be used to generate different accounts in your Metamask account. I know you’re probably confused about the fact that an account is being created inside an account and I was too, but the simple way to think about it is that the different accounts that are created by your Mnemonics are just different wallets (for example savings wallet, investment wallet, housing wallet, etc) then your Metamask account is what you use to access those different wallets.

I saw that we have the testnet and the mainnet. The mainnet is the main Ethereum network itself used for transferring actual ether while the testnets are used for testing purposes. There are a few testnets, but I connected to the Sepolia testnet then received 0.5 ether into my first wallet by following a blog I saw.

I went on to learn about what a transaction is. A transaction is basically an object which contains a bunch of information about the actual transaction that occurred on the blockchain. Some of the fields on the transaction object are nonce, to, value, gasPrice, startGas/gasLimit, etc. The transaction object also includes some cryptographic pieces of data that can be used to generate the senders account address, generated from the sender’s private key.

I saw that when a transaction is made to the Ethereum network, it is sent to a single node in the network which then communicates with the other nodes in the network. Since there are other people making a transactions as the same time to a particular node, the node assembles all these transactions into a single block and runs some validation logic which takes about 30–15 seconds (averagely) to complete.

The validation logic that’s being run is what we like to call mining. So the node runs some calculations on the block through a process called mining. The mining process is involves finding some number called the nonce that satisfies some cryptographic conditions. This process is very computationally expensive and takes time to find hence the delay in transactions of about 15–30 seconds.

The time it takes to calculate the block is what we call the block time, where a node is charged to find an ideal number called the nonce that meets the cryptographic requirements. The Ethereum network adjusts the requirements for finding the nonce based on how long it takes to find the previous block hash.

Example for block hashing.

In the image above, let’s say the target block time is 15 and for the first block, the Ethereum network requires a node to find a number less than 1000 and let’s say that takes about 20 seconds to find. In the next block, the network increases the number to 10,000 since it took way too long to get the right number that satisfies the cryptographic hashing condition of the initial block. Supposed this now takes 5 seconds, then the number is gradually reduced again for the next block and the process continues.

After my blockchain and Ethereum research, I moved on the writing my first smart contracts using a language called solidity and that is another adventure on its own so I’ll have to leave that for my next article.

Alright then, although there’s a lot more about the Ethereum network and the blockchain I’ve learnt about, I’ll just keep it real simple for now. In my next article I’ll be writing about what I’ve learnt about solidity.

I hope you enjoyed this one, and I’ll see you in the next.

[ad_2]

Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here