
Bitcoin, also called “internet magic money”, had a lot of hype and has drawn a lot of attention from the public. But is blockchain the same as Bitcoin?
Blockchain is definitely here to stay. In 2021, 12 years after the creation of Bitcoin, we finally see the mass adoption of blockchains and cryptocurrencies. Many big corporations are either buying cryptocurrencies or adopting blockchain technologies.
The future is decentralized. After hundreds of years of relying on big institutions as middlemen, the internet and the blockchain are changing how people do businesses. These new technologies bring back the barter system, allowing people who don’t know each other; who are in different parts of the world; who speak different languages; who may eventually not trust each other, to trade between each other confidently in the same system.
We see two terms being used frequently and interchangeably in the blockchain space: decentralized and distributed. What are the differences?
Understanding Decentralized and Distributed systems
Blockchains such as Bitcoin could solve the monetary problem with a fixed and predictable supply of the currency.
Do we really need these intermediaries? Or can we have a transparent system that allows transferring value without trusting a middleman?
Blockchain provide:
▸Consensus
▸Provenance
▸Immutability
▸Shared
▸Replicated
▸Permissioned
▸High Security
▸Faster Dealing
▸Cost saving
▸Auditable and verifiable
Wait, are we talking about use cases again? Yes, but now let’s look at some examples of the existing blockchain use cases in the market. We will cover only a few use cases as an example because to cover all the use cases I would have to write a 2000 pages book (probably more than the Atlas Shrugged and all the Lord of the Rings combined).
Blockchains are still limited for some use cases, and they may not be suitable at all to be used as:
•Data warehousing
•Storing big files or large volumes of data
•To replace purely centralized databases
•When there’s no need for a network or for sharing data
•When there’s a need for a very high I/O (there is some latency)
•Just to look cool to investors or to the management
Transactions are secured, encrypted and protected through cryptography which may bring design constraints
·Blockchain can reduce costs
·Improves discoverability
·Improves network effects
·Automate processes
·Trusted record keeping
·Blockchain can save time and speed up transactions
·Blockchain reduces risks related to fraud, tampering and cybercrime
A consensus mechanism is the way in which a majority of the participants in the blockchain agree on a value or piece of data
Do we really need these intermediaries? Or can we have a transparent system that allows transferring value without trusting a middleman?
Blockchain can radically transform the process and make it much more efficient. In most blockchains, the technology enables parties that don’t know each other and may even have conflicting interests to transact efficiently and faithfully
A PO Financing blockchain application allows different banks to have a node participating in the network. PO data is then synchronized across all the participants allowing everyone in that PO transaction to have access to the same data, and it will allow the creation of audit trails for other banks.
Track and tracing diamonds - De Beer’s, the biggest diamond company in the world, has implemented a blockchain application - The De Beer’s TrustChain - to track and trace diamonds for authenticity and ensure that they are not “blood diamonds”. Chow Tai Fook, the jewellery company in Hong Kong, is also using blockchain. Chow Tai Fook’s T MARK are blockchain-secured diamonds with digital diamond grading reports.
Wallmart partnered with IBM to build the IBM food trust. This food safety application creates an ecosystem of producers, suppliers, manufacturers, distributors, and retailers that feed the product’s supply chain application.
As you see, blockchains have multiple use cases in the supply chain. It provides a digitally permanent, immutable, auditable, that shows the provenance of any product.
Applications such as TradeLens provide end-to-end product traceability and digitization, no matter what industry they are from.
Contour is a letter of credit application developed by a consortium of 8 banks. Its objective is to connect the 4 parties in the Letter of Credit process seamlessly: buyer, seller, issuing bank and nominated bank.
Smart Contracts enable to code events. Smart contracts are self-automated computer programs that can execute terms of a contract. They need to run in a Virtual Machine such as EVM - Ethereum Virtual Machine.
NFT’s are tokens that have fungibility, meaning that each token is unique and irreplaceable. They generally use the Ethereum ERC-721 standard that was introduced in the Ethereum network in January 2018 and revolutionized an entire industry.
Step-by-step to deploy an ERC-721 Smart Contract and mint an NFT
In simple terms, DeFi can be defined simply as an open or decentralized financial system that’s devoid of a centralized setup in which powers are in the hands of a few powerful organizations such as exchanges or banks, with the help of blockchain technology and smart contracts.
Just like any other new technology, organizations may face challenges when adopting a blockchain. These adoption barriers may be seen as constraints that need to be addressed and explored to improve the way the organization is innovating.
This is getting pretty serious now! This section will clear out any confusion related to the technology. We are going to the blockchain bottom line and look at all the blockchain components here, and you will be one step closer to become a blockchain expert! Now serious, the objective is to get some key concepts right to navigate the blockchain technology.
Although there are a few definitions for blockchain, it all comes down to one thing: blockchain is a decentralized database-like system that is very transparent to all the nodes in the network.
All the blockchain participants agree on common rules on how a block is included in the blockchain. Each blockchain may have a different consensus mechanism defining how blocks are included.
There are different blockchain types, and they have different use cases -public blockchains and private blockchains.
Side-chains are blockchains connected to the main blockchain, where assets or transactions can be carried in the side-chain and later be recorded in the main-chain.
Let's now take a look at permissioned blockchains. We have already talked about private blockchains, and although most private blockchains are also permissioned, private and permissioned are not synonyms and to keep this book accurate, it's better to make a clear distinction.
Distributed ledgers are often confused with blockchains. They can be private or public, sharing data often on a need-to-know basis among participants.
Cryptocurrencies are blockchains that, due to their nature and use case, also need a "coin". These "coins" are used not only to exchange value between users or store value, but they also have another critical functionality.
Let’s look at some of the components that make a blockchain a blockchain. In this section, we will start with addresses – i.e., what is a blockchain address, transactions and transaction fees, blocks, how are blocks formed, smart contracts and much more.
In a blockchain, addresses are unique identifiers associated with an entity, a wallet or a smart contract.
Validating nodes in a blockchain, also known as miners, need to perform some work in order to include the transactions in the blockchain.
Some blockchains like Ethereum or Hyperledger Fabric use Turing complete programming languages meaning that developers use to create smart-contracts that can do pretty much anything, from simple to more complex functions.
A block in the blockchain is usually composed of the block hash, the previous block hash, time-stamp, nonce, a Merkle root and/or a number of transactions.
A block explorer is a user interface for users to look at the blockchain. It is a tool, often a web-based app, the allows users to view and explore all the information in a blockchain, including transactions, transaction history, addresses, blocks, etc..
Block reward: the Bitcoin block reward is at the moment 6.25 BTC. This is the miners' reward as an incentive for them to contribute to the network and create blocks.
As an example, let's take a look at the coinbase transaction included in the first block ever in the Bitcoin blockchain – the genesis block!
A smart contract is a piece of a computer program that can execute a contractual agreement between two parties.
Smart contracts can pretty much execute any contractual condition or functions.
Oracles are third party sources of data that are considered trusted.
Consensus mechanism is an algorithm that defines the rules for the multiple nodes on a blockchain to agree on how the blockchain should look and what constitutes valid data in the blockchain.
Hash functions are the heart of blockchain technology. Hash functions take any input value of any size and create an output of a fixed length.
A dApp is an application that outsources part of its logic in the blockchain. dApps resource to smart contracts for some of its logic, but they are not 100% hosted and decentralized in the blockchain.
The difficulty represents how hard it is to find the hash needed to mine a new block in the blockchain in a proof of work blockchain.
Digital signatures are very hard to forge when comparing with traditional handwritten signatures.
Multi-signature is a security feature that requires signatures of multiple pre-defined entities in order to issue a transaction.
Double spending is a type of attack where the attacker attempts to duplicate a transaction.
Ethereum is the first blockchain 2.0, allowing smart contract scripting in the Turing-complete EVM – Ethereum Virtual Machine, with a programming language called Solidity.
Forks may happen because of changes in the protocol. In blockchains, updates can never be retroactive.
A 51% attack happens when a person or a group tries to gain control of the network by acquiring more than 50% of the network's computing power.
Mining is the method that is used in the blockchain to group transactions into a block, append this block to the blockchain and broadcast the new block to the network.
New lecture on how much Bitcoin miners do and mining pools
A wallet is used to store a private and public key.
Consensus mechanisms, cryptography, prime numbers, random numbers, mathematics and hashing?! Don’t worry, I promise this section will be more exciting than going to the dentist! You will learn and play around with some really cool stuff. After this chapter, you will be top 1% most blockchain knowledgeable people in the world.
Let’s look at how a block is structured in the blockchain and then, we take a deeper look at some of the block’s components.
Difficulty: the difficulty is determined by the number of zeros that the hash needs to begin with when the hashing process occurs.
Digital signatures are an important cryptographic component of blockchain transactions, where a transaction is digitally signed by the sender and verified by the receiver.
There are many different consensus algorithms, and they all have advantages, disadvantages and security trade-offs.
Bitcoin's consensus mechanism, and most first-generation blockchains. Proof of work is a leader-based consensus mechanism.
Bitcoin's consensus mechanism, and most first-generation blockchains. Proof of work is a leader-based consensus mechanism.
Bitcoin's consensus mechanism, and most first-generation blockchains. Proof of work is a leader-based consensus mechanism.
Bitcoin's consensus mechanism, and most first-generation blockchains. Proof of work is a leader-based consensus mechanism.
The mechanics and incentives of proof of state algorithms work differently.
Delegated Proof of Stake is something very similar to democracy
Proof of burn is an experimental consensus mechanism and a fascinating concept.
PBFT tries to solve the Byzantine General's problem.
Also known as PoET, this consensus is everything but poetry!
In the proof of importance consensus, nodes receive a rating according to the stake they have (i.e. the number of coins owned) plus for how long the node owned those coins.
So what is cryptography? How do we use prime numbers and random numbers and all that stuff to encrypt a message?
Prime numbers are extremely important in hashing and cryptography, so we will discuss them in this section of the course
Random numbers are also very important in cryptography.
The RSA cryptographic algorithm was created by Ron Riverest, Adi Shamir and Leonard Adlema in 1978.
The RSA cryptographic algorithm was created by Ron Riverest, Adi Shamir and Leonard Adlema in 1978.
The RSA cryptographic algorithm was created by Ron Riverest, Adi Shamir and Leonard Adlema in 1978.
SHA corresponds to several algorithms developed by the NIST – National Institute of Standards and Technology in the US.
SHA corresponds to several algorithms developed by the NIST – National Institute of Standards and Technology in the US.
If you want something done right, it’s better you do it yourself! This section is pretty much hands-on. You can do read-it-only, but it works best if you follow along by deploying your own node and play around with it. I’m sure this section will be a lot of fun!!
If Bitcoin is the new word’s bank, Ethereum is the internet. These are big claims right? Stay with me.
Let’s play around with Mr. Ethereum! For this section, we will need to use a Virtual Machine to deploy your Ethereum node.
There are two main options: to deploy an Ubuntu Virtual Machine using Oracle VM VirtualBox
Once you connect/SSH to your Ubuntu machine, run the following commands to install some packages and libraries that we will need
We are now ready to go! Now that we have installed Geth, you can take a look at the blockchain!
We are now ready to go! Now that we have installed Geth, you can take a look at the blockchain
Now that the node is running, we can connect to the Geth Javascript console and start interacting with the blockchain.
Python is a great programming language to play around with blockchain and other technologies such as Machine Learning, AI and Data Analytics
Now the reality is that this raw data is not very easy to read, but if we are looking for a specific piece of data, we can just ask for it
Create a backup of your node
Restore the node from the AMI image
Connect the node to the blockchain
Ho gas and gas limit works?
What are Unclude blocks?
How Ethereum mining works
How Ethereum mining works
How Ethereum mining works
Retrieve more data from the blockchain
Signing a transaction with ECDSA
Signing a transaction with ECDSA
Signing a transaction with ECDSA
How to create an Ethereum Address
Write an immutable message
Start mining Ethereum 101
Hope you have enjoyed this course!
**Updated August 2021**
In this course, we will discuss blockchain protocols, how blockchains are architected, the main technology components such as cryptography, hashing, applications, and the constraints and limitations of this technology.
I will help you to understand when to use blockchain, the key concepts, the industry jargon, and a lot of additional information that will help you to interact with stakeholders in any blockchain project you may get involved.
Any person with some basic IT experience will be able to follow along with this course. No matter what’s your background, after you finished this course, you will be able to get involved in any blockchain project.
We are going to take a look at why blockchain is considered so secure, what technologies are enabling blockchain, what kind of applications - financial and non-financial - can benefit from blockchain? What are the differences between Bitcoin, Ethereum, Hyperledger and Corda? How is blockchain secure, and how is data handled? How is hashing made? What’s cryptography’s role?
This course will help you to:
- Understand well the technologies behind Bitcoin and Ethereum
- Learn about the use cases
- Understand and apply shared ledgers and smart contracts to your business network
- Explore the different use cases for blockchain, including enterprise solutions NFTs and DeFi
- Deploy a Smart Contract to Mint NFTs (NEW)
- Explore the blockchain technology in-depth
- Understand Hashing, Cryptography and Digital Signatures
- Explore the blockchain architecture
- Deploy an Ethereum node
- Understand how to perform various activities in the Ethereum Blockchain using the command line interface
- Interact with the Ethereum Blockchain using Geth and Python command line
- Take it to the next level of your blockchain career
and much more!