current position:Home>[blockchain Apocalypse: Nakamoto collection] I: preface | working principle of bitcoin (Part I)

[blockchain Apocalypse: Nakamoto collection] I: preface | working principle of bitcoin (Part I)

2022-02-02 15:20:36 Overflow tears

  • A new series , It's mainly about learning 《 Blockchain Apocalypse : Zhongben Cong Anthology 》 To learn the basics of blockchain .

01- Preface

  • Bitcoin relies on the support of a software system , The blueprint of this software ( Source code ) Open to all , Anyone can modify it at will to meet their own needs . These groups have defined their own general network protocols , A large number of computers on the Internet are connected through this protocol , At present, bitcoin runs on these computers .
    The digital currency in this software is called bitcoin b i t c o i n bitcoin bitcoin, Initial lowercase , Referred to as B T C BTC BTC.
  • Bitcoin is both a virtual currency and a payment system , It represents a revolutionary concept . When purchasing bitcoin , The buyer only needs to provide purchase related information to complete the transaction . When paying by credit card, the buyer must provide enough personal information , And this can easily lead to information fraud , And very inconvenient .
  • In addition to the convenience of the payment system , Its supply should be determined by the software and its underlying protocols . In the end, there can only be 2100 2100 2100 Ten thousand bitcoins . The last bitcoin is expected to be 2140 2140 2140 Annual production .
  • look 2100 2100 2100 Ten thousand bitcoins are not enough 70 70 70 Billion people use , But this currency is highly divisible . At present, the minimum denomination allowed by the software is 1 e − 8 B T C 1e-8BTC 1e8BTC , This denomination is called 1 1 1 Cong . So the maximum supply of bitcoin is 2100 2100 2100 Trillion Cong .
  • Bitcoin is made up of ( Or a group of ) Created by an anonymous person named Nakamoto . When he was ( Hereinafter referred to as him ) Published the first public online forum article , Published his bitcoin paper . His new software was still in the early stages of development , Bitcoin is a small experiment in the early stage . His communication with the outside world is limited to e-mail , And it only lasted two years , Then there was no news . Bitcoin is ready to go , And began to receive widespread attention , Nakamoto withdrew from the public eye . It all began with his publication 《 The currency : A point-to-point electronic cash system 》, stay 2008.11.1 2008.11.1 2008.11.1 Release .
  • 2009 2009 2009 At the beginning of year , The founding block came out . Six days later , He released bitcoin 0.01 0.01 0.01 Version of the source code . In the early days, the value of a bitcoin changed from 10 10 10 Cents grow to 1 1 1 dollar .
  • No matter how bitcoin will eventually develop , This software has made the world accept a new concept . And many new concepts of digital currency have been extended , Like the truth coin , And Ethereum .

02- How bitcoin works

Bitcoin blockchain : Open book keeping

  • All members of the bitcoin network share a public ledger , Block chain . Add a new ledger page about every ten minutes , It contains the latest bitcoin transactions initiated by payers around the world . This huge Ledger has always been open to people running bitcoin software on the Internet .
  • In bitcoin terminology , The pages that make up the ledger become blocks , Because they're like “ Lump ” The data of . A blockchain consists of many individual blocks , The length is growing , Contains from 2009 2009 2009 year 1 1 1 All transactions that have taken place since the launch of bitcoin in June .
  • Bitcoin transaction request contains the following contents :
    1. The bitcoin address of the payer , It includes the source of funds for payment
    2. The bitcoin address of the payee
    3. The number of bitcoins to be transferred
  • Since the blockchain contains all the debit and credit history associated with the payer's bitcoin address , The miners who manage the bitcoin network can prove that the payer has enough money to pay . Everyone can view the number of bitcoins linked to the specified bitcoin address at any time .

Asymmetric encryption : Who can spend those bitcoins

  • Bitcoin uses an asymmetric encryption system ( Also known as public key encryption system ), The encryption algorithm requires a pair of keys , Each key consists of a long string of numbers or characters . A key is public , Used for decryption operation , The other is the private key , Responsible for encryption operation , vice versa .
  • The algorithm can easily create the private key and export the corresponding public key , However, the private key cannot be deduced from the corresponding public key through calculation . therefore , The public key is public , The payee can use the public key to get the transaction information , Enable bitcoin transfer to continue .
  • The software only allows the bitcoin holder's private key algorithm “ draw ” Bitcoin associated with the bitcoin address . The payee tells the payer his bitcoin address . The sender of bitcoin digitally signs the bitcoin transaction with the private key . Bitcoin transactions actually contain the corresponding public key . The system uses the public key to verify the validity of the digital signature , To confirm that the sender is indeed the private key holder . The system allows the private key holder to use bitcoin related to its bitcoin address in the public ledger , Then open the account book ( Block chain ) Use the new ledger page containing this transaction ( Block ) updated . Add the new transaction to the blockchain and announce the bitcoin network .
     Insert picture description here

Internet miners act as mints 、 Bookkeeper and system supervisor

  • Bitcoin is a distributed system , A group of voluntary computing nodes are responsible for , These miners are scattered all over the world . Bookkeeping and payment authorization can be operated by different entities .
  • Miner is the computing node responsible for the operation of bitcoin network , It is responsible for verifying the validity of the transaction , And the new block containing the latest transaction updates the blockchain regularly . Bitcoin software is run by miners on each computer , The bitcoin protocol consists of a set of rules and conventions .
  • Bitcoin networks require blockchains ( Public ledger ) Continuous updating , Add a new block ( Ledger page ). Although all the miners are producing the next block , But only one miner will be selected , The specific version blocks generated by it will be added to the blockchain . Each miner creates his own version of the next block for his own benefit , In this way, the transaction fee in the block transaction can be charged . Although bitcoin transactions are like payers 、 payee 、 Core parameters such as amount cannot be changed , But most transactions include transaction fees paid by the payer , If the block generated by a miner is selected to join the blockchain , Then the transaction fees in the block can be recorded into the miner's account . therefore , The miner will update each of these transactions , And record the transaction fee of these transactions into their bitcoin address .
  • In addition to transaction fees , Miners who are lucky enough to add blocks to the blockchain will also earn an extra sum of money “ Casting ” Bitcoin deposits . Miners create an additional deal , Add the newly minted bitcoin to your bitcoin account . This money is called block reward . 2014 2014 2014 year , The bitcoin protocol allows each new block to be allocated to miners 25 25 25 New bitcoin , This is an extra gift based on the transaction fee .
  • Because generating blocks and selecting them into the blockchain can earn new bitcoin , So miners are competing to dig . The details of the operation of this selection process will be explained later , For the time being, it can be regarded as calculating an expensive mathematical problem . It's hard to find the answer to the question , But it's easy to verify the correctness of the answer . The first miner to find the answer to the block question can announce the block to the miners of the whole network .
  • After receiving the block and the answers to its questions, the miners began to verify , Prove that the answer found in the block is correct . The way bitcoin protocol sets the difficulty of questions is to keep the average time required to find the answer at 10 10 10 About minutes . If the problem is answered, the miner in the new block has credited his account with more than the currently allowed 25 25 25 New bitcoin , Other miners will refuse to accept the block provided by the miner , And continue to find answers for your block . Each block is slightly different , So every miner is looking for different answers .
  • When a miner solves the calculation task and passes the verification , The other miners immediately accepted failure , And agreed to take the miner's block as the next block of the blockchain , Then start the next block . The next block adds the latest transaction after the generation of the previous block to its own block , Then look for the answer to the question of the new block .
  • If miners only accept their own blocks and reject others , Then there can be no consensus , The value of the whole system is destroyed , It's not good for all miners , At this time, no matter how much bitcoin miners have, it is worthless .
  • As mentioned earlier , Solving block math problems requires expensive computational tasks . This process becomes proof of the workload , This means that miners must work hard for it . To do this, we must first understand the concept of cryptography called hash function .

copyright notice
author[Overflow tears],Please bring the original link to reprint, thank you.

Random recommended