Learn how bitcoin works with blockchain
Cryptocurrency is the collection of concepts and technologies, users can utilize i.e. buy and use as same as traditional currencies, the main difference is that conventional currency has physical existence whereas it is virtual. It considers money as value to make trust relationships among other verified crypto users. Cryptocurrency coins don’t have coins; it contains address having hash values (SHA 256) to build chain which moves with the address to address for making transactions in virtual currency.How bitcoin digital currency works:
Bitcoin is a type of cryptocurrency comprises digital asset to record and validate transactions which are fast, secure, and borderless. The transactions take place using bitcoin is an integral part of the blockchain.
As bitcoin is virtual, user can use it unlike traditional currency, every bitcoin owner must be verified throughout the network by signing every transaction through his private keys to transfer or use cryptocurrency. The owner of bitcoin is only those who have private key.
But this does not mean that we cannot convert bitcoin into cash, we can have bitcoin exchange from btc to usd or usd to btc etc., bitcoin price may vary as per trend in cryptocurrency market where anyone can find btc rate today.Bitcoin is the combination of 04 process:
- Decentralized or borderless contacts without any involvement of centralized authority, it is through peer-to-peer networks.
- Chain of transactions or blocks, (Public transaction ledger), which moves through the address to address.
- Consensus rules, it is the general agreement between blockchain members to approve transactions.
- Proof of work, a mining process that depends on the members of the blockchain to reach a consensus by creating hash.
The main objective of implementing the process of proof of work is to eliminate the double-spending problem and the creation of a distributed trustless consensus system as per Satoshi Nakamoto white paper.
Whenever a consensus (or general agreement among all trustless and distributed nodes) finalized, a new block will be formed.
There is no need for PoW for private blockchain as every member knows each other, or we can say everyone can trust each other and not distributed.How Bitcoin Point of Sale ( PoS ) system works: Following diagram is a simple illustration of how we can pay in bitcoin for an extra virgin olive oil from a restaurant
If anyone wants to earn bitcoin or buy bitcoin, transaction is the way. It is the procedure of asking with the members of blockchain that bitcoins are being transferred from one member to another, a hash value that moves towards input to output.
An Input is where the coin value is coming from, which is off course a previous transaction output. The output from one transaction can be used as input for the new transaction. The procedure of moving inputs and outputs from address to address makes a chain of blocks (every transaction linked in a chain).This can be illustrated with the following simple diagram:
The important point is to understand that if for example, Mr. X purchased 0.8btc which means his transaction value has 0.8btc as input. Now X wants to transfer 0.5btc to another member Y, the procedure to do that X will send all 0.8btc to Y but as X wants only 0.5btc to transfer, so 0.3btc will return back to X address by Y.
Every created input or output is interlinked with the last transaction, that’s why every time complete amount will be transferred as input and then the remaining bitcoin returned back as output.
This is simply the exchange of the change value in the traditional system, that if a ball costs 5$ and you have 20$, you will pay to complete 20$ to shop keeper (as input), the shopkeeper will return you back 15$ (as output).
Transactions are simply like an accounting ledger system of credits and debits (inputs and outputs in Blockchain case). But the difference is Outputs (debits) is slightly less than output as output implied transaction fee. Merkle Tree
If we want to verify our complete blockchain ledger, we can use the Merkle root. For example, if Mr. X block has 04 transactions, Merkle root will be created on all 04 transactions by generating hashes for all 04 transactions separately. Transaction 01 hash and transaction 02 hash will again concatenate to create another hash. Similarly, the concatenated hash will be created with transaction 03 and 04 transactions as well. Now both concatenated hashes will concatenate again and another hash will be created.
The above example shows Merkle root generation with even number transactions. If the transactions are in odd numbers the one remaining hash will be duplicated to complete the concatenation process.Mining
Every transaction floods on the entire blockchain network through node-to-node for being the part of the ledger, but not Instantaneous. It is to be verified by all nodes and includes transactions in a block through mining (computation). Mining nodes validate all transactions through consensus to avoid any malware or phishing and creates a new bitcoin in each created block, every block creates 12.5 bitcoins just like the printing of new currency notes as in the central banking system.
The theory of the creation of 12.5 bitcoins with the creation of every block is based on the decentralization concept of blockchain.A banker – free bitcoin mining:
Mining can be performed as solo mining or pool mining. Solo mining is the process of completing the task without any other miner. Pool mining is the cooperation of miners to share block and obviously the rewards. For pool mining what we have to need is a computer with a good graphics card, a wallet for public SHA address, pool address with which we have to attach and start mining, and lastly a pool software.Pool miners can use the following for the proof of work(PoW) :
- Bitcoin Wallet – an example of the wallet is electrum to create a bitcoin account.
- Mining pool – an example of a mining pool is slush pool.
- Graphics card can be used a minimum of 2GB; an example of a graphic card is AMD 480X GPU.
- Pool software- an example of pool software is guiminner.
It is to be understood that one GPU (graphical processing unit) processing power is equal to 30CPU (central processing unit). Similarly, with the latest FPGA (field-programmable gate array) is 300 times faster than GPU. Nowadays we use ASIC systems for mining with mining pools.