- Foundations of Blockchain
- Koshik Raj
- 542字
- 2021-07-02 14:17:24
Bitcoin basics
Bitcoin is a collection of cryptography and decentralized consensus algorithms that enabled the creation of a complete decentralized digital currency ecosystem.
Bitcoin can be used just like conventional currencies. It can be used to buy and sell goods and services or to just transfer money to people. Bitcoin has several advantages over conventional currencies, such as lower transaction costs and the ability to transfer currency to any part of the world, because it is not controlled by any national authorities. Bitcoin is also entirely virtual, meaning there is no physical form of the currency. The value of Bitcoin is generated by transactions in Bitcoin. Anyone can transfer Bitcoin to a particular Bitcoin address using a transaction. The address of the legitimate recipient of the Bitcoin will be identified by a secret key corresponding to the address. The user can then transfer the Bitcoin to others by constructing a new transaction using the secret key. Generally, a Bitcoin address is created using the public key, and the secret key is the private key counterpart of the public key. The keys are generally stored in a software application called a wallet, but they can also be backed up and stored anywhere if we need better security.
As we know, Bitcoin is the system that paved the way for the invention of blockchain. It utilizes all the concepts we have discussed so far to build a cryptocurrency that functions in a completely decentralized peer-to-peer (P2P) system. Because of Bitcoin's completely decentralized network, there is no need for a central trusted authority, such as a bank, to act as a moderator and validate the transactions. Instead, everyone in the Bitcoin ecosystem participates in ensuring that valid transactions take place.
Bitcoin software is open source, and anyone can join the Bitcoin network by running this software on a device such as a smartphone or a computer. A lighter version of the Bitcoin software can be used on devices where the computing and storage capacity is limited. There is a special type of node called a miner, which uses processing power to verify transactions and contributes to the creation of blocks by solving a hard-cryptographic puzzle. This is a hash puzzle, more specifically called the Proof of Work consensus algorithm, which was discussed in Chapter 3, Cryptography in Blockchain. Every 10 minutes, a miner can publish a valid block, which is then propagated and validated by everyone on the Bitcoin network. The miner is rewarded in bitcoin for the computing power spent creating the block. Due to an increase in competition in mining, the difficulty of the puzzle has been adjusted so that the average block creation time remains around 10 minutes.
So, every time the miner creates a new block, new bitcoins are minted, which circulate in the Bitcoin network. There is a limit set on the total number of bitcoins that can circulate in the network, and it is hard-capped to 21 million coins.
To sum up, the following innovations helped Bitcoin to survive in a completely trustless network:
- A decentralized P2P network
- A blockchain (public ledger)
- Decentralized consensus algorithm (Proof of Work)
- Transaction validation rules
Throughout this chapter, we will try to explain how Bitcoin uses these concepts, which made its creation possible.