Categories
Technology

Basics of Blockchain Development

Here is some context to better understand the technical transformation silently replacing the corporate behemoths of today.

As I am learning more about Blockchain development, I am increasingly more excited about the future of dApps (decentralized applications) and Web3.0

Ethereum – put a computer on the blockchain. Roots, States (when something changes and a corresponding hash is created)…Defines a virtual machine whose usage is metered with transaction fees. A single block on the Ethereum blockchain includes information like:

  • Time Stamp
  • List of Transactions
  • Hash
  • Parent Hash
  • Uncles
  • Miner address
  • Difficulty
  • Nonce
  • Gas Used
  • Reward

Once thing I didn’t understand at first was the Gas Fees associated with interacting with the blockchain. For instance, if I wanted to Swap (which I’ll cover later) one token for another or purchase an NFT, I would be required to pay a gas fee for my interaction with the blockchain – this can range in price, and is often quite expensive. But it’s purpose is multifaced – to incentivize miners and to ensure the network will not be spammed or taken down from a malicious agent.

It’s wild thinking about the incredible transformation that has taken place in computing since the second World War when computers were first used to help defeat the Nazi’s by decrypting codes. Another transformational development was the introduction of SQL (structured query language) by Edgar Codd, mentioned in his paper “A Relational Model of Data for Large Shared Data Banks”…and has been a widely used database language in Relational Database Management Systems (RDBMS).

Blockchain does something really incredibly by merging the relationship of databases and networks, so now where there is a network there is a database also. No more are the days where one enterprise only has one database on a singular network. First we merged the database and the network to create the blockchain, then we put computer code (software) into the shared database (the blockchain). Now everyone connected to the blockchain has the same code running the same program, when you run the program you get same data same code, thus same result. Everyone has a copy of the code, same copy of the database, we all run it at the same time. If there is a disagreement within the blockchain, we find it immediately and sort it out.

Smart Contracts are the phenomena that will take us out of the blockchain dark ages and into the Web 3.0 internet roaring 20’s.

Photo cred: Cornell University

Some definitions of fundamental concepts:

  • Ledgers: the core of accounting, regulating access to certain data. Think of balance sheets (assets, liabilities, etc.). Stored information in a database in a centralized location within a system is how data has been kept for years, but a distributed system with distributed ledgers allows each party to retrieve the most recent transactions and consent/agree that each transaction or agent is what and who they say they are.
  • Consensus Mechanisms: all parties within a distributed system must all have the same ledger/records. This vehicle incentivizes honest participation of all agents and helps preserve data consistency. There are multiple approaches to consensus mechanisms: Proof of Work, Proof of State, and more..Proof of Work: Who can find the block hash first will be rewarded, this is computationally expensive. Proof of State: Currency holders stake some currency for the chance to validate a block hash – used for managing higher transaction volume on public blockchains. Block validators are randomly selected by the network. Leased PoS: You can lease your tokens to other agents and the rewards are split amongst agent (and leasers) that validates the block hash. Delegated PoS: Balance holders elect block validators, and competition for becoming an elected block validator who are rewarded for such.

At the origin of every blockchain is a ‘genesis’ block that includes the hash of the genesis block, the network ID, nonce, difficulty, and other details included in the genesis state file (or genesis.json file) in Geth.

The difficulty determines how hard it is to find the next block in the blockchain. The greater the difficulty, the greater the number of hashes a computer has to run through in order to find a solution.

When a combination of the transactionRoot, previousBlockHash, difficulty, and nonce is found by a miner, the solution is broadcast as the next block in blockchain.

Resources mentioned in this article:

Dale Yarborough

By Dale Yarborough

I am a Software Engineer at General Motors and Appalachian State University Alum. Previously: Whole Foods Market IT, Charles Schwab