Blockchain, Bitcoin, and my love for Satoshi Nakamoto
Blockchain technology and Bitcoin is one the most talked-about topics in the last decade, no week has passed without news about blockchain, or bitcoin, some news was positive while others were negative but the technology has continued to grow and gained more adoption. The first successful and popularly accepted implementation of blockchain technology Bitcoin has been around for 13 years now thereabout, the bitcoin network started in 2009, and there has been continuous growth, I also believe it will still be here for many more years.
In this article, I will do my best to explain blockchain/bitcoin as simply as possible.
So What Is A Blockchain?
Blockchain is a list of validated blocks, each linking to its predecessor down to the genesis block.
A block is a grouping of transactions with a timestamp, and a hash of the previous block. The block header is hashed to produce a proof of work, thereby validating the transactions. When blocks are successfully mined and validated they are added to the blockchain by network consensus.
The genesis block is the first block used to start the blockchain.
Bitcoin’s current block height as of when I started writing this article was 722100, every block from height 722100 is linked to the previous block down to genesis block height 0.
What is Bitcoin?
Bitcoin is a deflationary virtual digital currency, popularly known as cryptocurrency, powered by a decentralized peer-to-peer system.
For blockchain core developers, the word Bitcoin means a bit more than my initial definition, it can be defined as a collection of concepts and technologies that form the basis of a digital money ecosystem.
Bitcoin is also a unit of a digital currency used to store and transfer value among bitcoin network participants.
satoshi is the smallest unit of bitcoin, 100 million satoshis(100,000,000) make one bitcoin.
Bitcoin was created by Satoshi Nakamoto, we all don’t know who Satoshi is, or who they are. Satoshi stated his reasons for creating the bitcoin project you can read them in bitcoin’s whitepaper, before the success of bitcoin they were a lot of other digital currencies that failed, Satoshi combined the concepts from so many of those failed projects, and also other cryptography materials to build bitcoin, which became the first successful digital currency.
One of the reasons why most of the previous digital currencies projects before bitcoin failed was centralization and other issues like double-spending. So Satoshi Nakamoto proposed and built a decentralized system that enables nodes(computers) to communicate with one another and validate transactions without a central authority or a single point of failure.
How does bitcoin work?
Bitcoin is powered by nodes around the world that form a peer-to-peer network without a central authority, bitcoin nodes can create, validate, and propagate transactions, add transactions to block, mine blocks, and propagate to other nodes in the network.
Bitcoin users communicate with each other using the bitcoin protocol primarily via the internet, although other transport networks can also be used. The bitcoin protocol stack, available as open-source software, can be run on a wide range of computing devices, including laptops and smartphones, making the technology easily accessible.
Bitcoin is open-source which means everyone with knowledge of how it works can make contributions to the project, and bitcoin’s peer to peer network is accessible to everyone, meaning anyone can run bitcoin nodes as long as you have the required disk space, memory, and bandwidth, transactions, addresses, and blocks are the major types of data propagated on the bitcoin peer to peer network.
Types of bitcoin nodes
- Full nodes: full nodes are the gold standard, they perform all the consensus rules, receive, validate transactions, and blocks, and also propagate them to other nodes on the network. Full nodes are also known as full validating nodes. Running a full node is the most secure and the most private way to use bitcoin, but you have to have a lot of hard disk space, memory, and internet data to run a full node.
- Pruned nodes: pruned nodes are bitcoin full nodes that don’t keep a full history of the blockchain in a bid to save disk space. they prune blocks following the prune settings by the node owner. Such nodes can be used by users who want to run a bitcoin node, but don’t have enough disk space to run a full node.
- SPV(Simple Payment Verification) nodes / Lightweight clients: SPV nodes are perfect disk space, and power-constrained devices e.g mobile devices, they download block-headers and do not download block transactions, block headers are a thousand times smaller than the full blockchain itself. SPV nodes depend on full nodes for the validation of transactions.
- Mining nodes: mining nodes, propagate, validate transactions, aggregate transactions into blocks and mine them. To successfully mine a block, the miner has to solve the bitcoin’s proof of work algorithm, after mining a block successfully they propagate the block to the rest of the network after their block is validated by the rest nodes, it will be added to the blockchain and the miner that successfully mines the block will claim the block reward.
How are bitcoins created?
Bitcoin has a limited supply of 21,000,000(twenty-one million), they will only be 21,000,000 bitcoins in existence, unlike regular currencies that have an unlimited supply.
New bitcoins are issued to a miner that successfully solves the proof of work puzzle as an incentive for his computational work used to mine a block, the incentive is called block-reward. The bitcoins issued to winning miners are at a diminishing rate, the reward is halved approximately every four years after 210,000 blocks specifically this process is popularly called bitcoin halving, bitcoin can’t be inflated by printing/mining new coins since it is finite by nature. The current block reward is 6.25BTC, the block reward will continue to be halved till the last bitcoin is mined around 2040.
What is proof of work?
Proof of work is a mathematical puzzle a miner needs to solve to successfully mine a block. A miner's system will repeatedly hash(SHA-256 hash specifically ) the block-header of a bitcoin block till it finds a value lesser than the specified value, For each repetition, the value of the nonce increments, the nonce is added to the block-header, and hashed. When a miner solves the puzzle and successfully mines a block, the block will be propagated to other nodes in the bitcoin network, other nodes can easily verify the miner actual;y solved the puzzle by adding the nonce to the block headers and hashing if it produces the same output, and the block is verified ok by consensus rules they will add the new block to their blockchain.
Bitcoin difficulty is retargeted after 2016 blocks, approximately 2 weeks to meet bitcoin’s difficulty target which is 10 minutes this process is called difficulty retargeting, which means new bitcoin blocks will be mined approximately every 10 minutes, it may take more than 10 minutes, or lesser at times 10 minutes is the difficulty target.
Bitcoin Addresses, and Keys
Bitcoin is a perfect implementation of cryptography, cryptography can be used to prove knowledge of a secret without revealing that secret (digital signature), it can also prove the authenticity of data (digital fingerprint).
Ownership of bitcoin is confirmed with digital keys, bitcoin addresses, and digital signatures. The keys are not stored on the bitcoin network but are instead created and stored by a user wallet, digital keys enable many decentralized trust and control in the bitcoin network.
Most bitcoin transactions require a valid digital signature to be included in the blockchain, which can only be generated with a secret key, anyone with a copy of that private key has control of the bitcoin.
There are two major types of keys private (secret) key and a public key, public keys as similar to a bank account number, while private keys as similar can be seen as a secret pin, or password that gives access to your account.
Privates keys are generated using random numbers, ownership, and control over the private key is the root of user control over bitcoins associated with the corresponding bitcoin address.
Bitcoin users must ensure that their private keys are kept safe, anyone on the bitcoin network who has a copy of a user’s private key can spend their bitcoins.
// Private Key ExampleSK = 5J3mBbAH58CpQ3Y5RNJpUKPE62SQ5tfcvU2JpbnkeyhfsYB1Jcn
Public keys are generated from a private key using ECDSA (Elliptic Curve Digital Signature Algorithm), ECDSA is an algorithm that hashes data in a one-way direction i.e after data is hashed using ECDSA it can’t be reversible, this ensures the safety of users private keys even if the public key is exposed, the public key can’t be reversed to produce users private keys.
// Public Key ExamplePK = 04F018792BAE7ED57D2FB57BF93081D5CFCF6F9ED3D3D7F159C2E2FFF579DC341A07CF33DA18BD734C600B96A72BBC4749D5141C90EY8AC328AE52DDFE2E505BDE// Compressed Public Key ExampleCPK = 03E028892BAD7ED5*D2FB57BF34081D5CHCF6F9E03D3D7F159C2E2FFF579DC341B
A bitcoin address is a string of digits and characters that can be shared with anyone to send you some bitcoin, there are two popular bitcoin address types P2PKH(Pay To Public Key Hash), and P2SH(Pay To Script)
P2PKH is the most common type of bitcoin address
P2PKH addresses start with 1, any bitcoin that begins with number 1 is a P2PKH address, P2PKH is derived from hashing a public key with a one-way double hash function, the public key will be hashed using SHA256, and then the SHA256 hash value will be hashed using RIPEMD160.
// Address Hash ExampleADDRESS = RIPEMD160(SHA256(k))
Then the hash result will be encoded in base58 format, base58 format is a subset of base64 encoding developed for use in bitcoin excluding some base64 characters for users' readability purposes, characters like zero(0) and alphabet O look very similar if a user wants to send bitcoins to a specific address and zero is inputted instead of alphabet O it makes the address different, the bitcoins send using that wrong address maybe be lost forever.
BASE64 = 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz// Pay To Public Key Address Example1J7mdg5rbQyUHENYdx39WVWK7fsLpEoXZy
P2SH is a kind of address that opens the door for more complex transactions e.g escrow transactions, and others on the bitcoin network, they designate the beneficiary of a bitcoin transaction as the hash of a script. Spending P2SH transactions require more than just providing one public key hash and one private key signature as proof of ownership. To spend bitcoins sent to P2SH addresses the creator of the P2SH address is required to provide the script used for creating the P2SH.
A P2SH address is created from a transaction script, which defines who can spend a transaction output. Encoding a P2SH address involves using the same double-hash function as used for the P2PKH address, but the hash function will hash the transaction script unlike P2PKH which hashes the public key, then the hash result will be encoded in base58 with a prefix of 5
// Pay To Script Hash Example3J65t1WtEk25CNmQviecrnyiWadfRhWNLy
P2SH addresses begin with number 3
The implementation of Segwit also brought to life new types of bitcoin addresses P2WPKH(Pay To Witness Public Key Hash), and P2WSH(Pay To Witness Script Hash)
A bitcoin transaction is made up of inputs, and outputs inputs should be seen as debits, while outputs are credits. Bitcoin transactions inform the bitcoin network that the owner of some bitcoin value has authorized the transfer of that value to someone else on the network, coinbase transactions are the only type of transactions that have no input, they have the first transaction added to a block which is used to pay miners their block reward. Any bitcoin transaction apart from the coinbase transaction must have one or more inputs, and also one or more outputs the transaction won’t be valid if it does not meet this requirement.
A bitcoin wallet balance is a sum of the user UTXO(Unspent Transaction Output).
Transaction inputs should be seen as debits, the input data has a digital signature Scriptsig also known as unlocking script which is used to verify if a user is authorized to spend a transaction output, the Scriptsig is a proof of ownership
Outputs are credits, output data have a digital signature ScripPubKey also known as locking script
The inputs and outputs (debits and credits) do not necessarily add up to the same amount. Instead, outputs add up should be slightly less than inputs and the difference will be a transaction fee, which is a small payment collected by the miner who includes the transaction in the ledger.
Levels of learning about bitcoin
Depending on your motive for learning bitcoin, all may want to know is how to buy, or maybe trade bitcoins and how to safeguard your private keys and bitcoins, or you want to be a Bitcoin application developer who makes bitcoin applications for others to easily make Bitcoin transactions, or you may decide to chill with the big boys like a line from a popular Nigerian song “You want to bam ba! you want to chill with the big boys”, by deep diving to become a bitcoin core/protocol developer, you can learn to be in one of these three levels:
- Learn as a basic user: To be a basic user, all you have to do is have a basic understanding of blockchain and bitcoin, where and how to buy bitcoins, how to secure your bitcoins and private keys. Storing your bitcoins in cold storage wallets is a good way to protect your bitcoins, cold storage wallets are wallets that are not connected to the internet.
- Learn to be a Bitcoin developer: Bitcoin developers build bitcoin solutions/applications they can either run their bitcoin node then use bitcoin node RPC API commands to interact with the blockchain network or third-party APIs to interact with the blockchain network
- Learn to be a Bitcoin core developer: Bitcoin core developers are bitcoin’s protocol makers who understand the technicalities behind Bitcoin, and Blockchain technology, they suggest and make improvements /upgrades for the bitcoin network. Bitcoin core developers propose improvements to the bitcoin network using BIP(Bitcoin Improvement Proposal), BIP is a design document used for introducing upgrades, features, or information to bitcoin. Understanding the technicalities behind bitcoin and blockchain is not an easy task, one has to do a lot of deliberate learning, research, and work. I am recommending Qala’s Bitcoin program if you are an African software engineer who wants to learn about bitcoin technology, and protocols you should visit the Qala website if you want to be one of the next generations of African Bitcoin and Lightning developers
Why I love Satoshi Nakamoto
As a popular saying goes “Give honor to whom honor is due.” I will like to write about Satoshi Nakamoto for a bit. Before bitcoin, other digital currencies have been created, but they failed the major reason for most of their failures was centralization, other reasons were double-spending errors, and fraudulent creators that swindled the money of users.
Most of the concepts Satoshi used for creating bitcoin were already worked on before Satoshi started working on Bitcoin, Satoshi picked up those forgotten ideas, and solved the centralization problem previous digital money before bitcoin faced by creating a trustless peer to peer network, usage of digital signatures also solved the double-spending issues, all these concepts together helped Satoshi develop the first successful digital currency.
Satoshi was not trying to scam people to enrich himself, that was not his motive for creating bitcoin, in the early stage of bitcoin early adopters said he mined lots of blocks and gained up to 1 million worth of bitcoins as block-reward, even when the value of bitcoin has risen so high. If Satoshi decides to sell his bitcoins he will be a billionaire today, but that has not happened those bitcoins have not been spent till this day, which shows he is not interested in the money, Satoshi left the bitcoin project in December 2010 after the project had started gaining success in the hands of the opensource community, bitcoin continued to be improved by the bitcoin community since Satoshi left, Some people believe stepping away from Bitcoin is one of his greatest contributions.
Satoshi is a rarity only very few people will develop such a project that has become so valuable, and not want any gain that we know of from it, his actions helped to build more trust from users, and also set a standard for bitcoin protocol developers on what is expected from them.
Although nobody knows who Satoshi Nakamoto is, or who they are he is a popular figure without a face.
Blockchain technology and Bitcoin have gained lots of appreciation from users around the world, I believe Bitcoin inclusion will continue to grow against all odds, the technology will continue to improve as more users and developers continue to gain interest in Bitcoin, and if Bitcoin fails due to some unforeseen reasons, we have a good knowledge of the technology to build something way better than what we have today, so I strongly believe Bitcoin can only get better.
Crypto Trading Bot — 19 Best FREE Crypto Trading Bots
Best crypto trading bots for Binance, Coinbase, Kucoin, and other crypto exchanges in 2022. Quadency, Bitsgap…
Best 4 Crypto Trading Signals Telegram Channels
It is tedious to find the right crypto trading signals provider. So, in this article, we will be talking about the best…
Bitsgap Review - Trading Bots Crypto Signals And Arbitrage 2022 | CoinCodeCap
This article is focused on Bitsgap review, which is an ultimate trading solution and provides trading bot, signals…
40 Best Telegram Channels For Crypto, Movies, Shows, & Lectures | CoinCodeCap
Download All Movies For Free. Ger Free Crypto Signals. Download Lectures. CoinCodeCap Classic, Netflix Movies, etc. are…
Keevo Wallet Review: Is It The Safest Hardware Wallet? 2022 | CoinCodeCap
In this Keevo Wallet review, we'd be talking about how they're changing the way we see hardware wallets. Keevo is…
5 Best Social Trading Platforms 2022 | CoinCodeCap
5 Best Social Trading Platforms Read Crypto products reviews and comparisons and learn about bitcoin trading and…
BlockFi Review : Pros, Cons And Interest Rates 2022 | CoinCodeCap
Today, we came up with a comprehensive BlockFi review, a crypto lending platform founded in 2017 and has its…
How to Buy Bitcoin in India? 7 Best Apps to Buy Bitcoin 2021 [Mobile Version]
How to buy Bitcoin India using a Mobile App
Crypto Tax Software — Top 5 Best Bitcoin Tax Calculators 
Whether you’re new to crypto or if you have been in the space for a while, you’ll need to pay taxes.