In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
I. History of Bitcoin
Bitcoin is on fire now, with more than 7000 RMB each. In those days, 10, 000 pieces only bought a pizza coupon worth 25 US dollars. If God can give me the chance to go back to that year, I will buy it!
Bitcoin has high mining and investment value, and after we Chinese figured it out, capital poured in, and it had to be hot. Now the main mining machines in the world, computing power and Bitcoin transactions are basically concentrated in China. I have to be proud of China!
If you are a rookie, you don't know what Bitcoin has to do with mining or what it has to do with the blockchain.
This needs to start with the beginning of Bitcoin:
On October 31, 2008, a guy named Satoshi Nakamoto released Bitcoin's only white paper, "Bitcoin:A Peer-to-PeerElectronic Cash System/ Bitcoin: a peer-to-peer electronic cash system."
On January 3, 2009, Satoshi Nakamoto dug up the first 50 bitcoins on a small server in Helsinki, Finland, and recorded the headline on the front page of the Times that day: "The Times 03/Jan/2009 Chancellor on brink ofsecond bailout for banks."
On May 21, 2010, the first bitcoin deal: Florida programmer Laszlo Hanyecz bought a $25 pizza coupon with 10, 000 BTC. This is the first exchange rate for Bitcoin: $1: 0.0025.
On July 17, 2010, the first bitcoin platform was launched.
In 2011, mining equipment based on graphics cards began to appear. At the end of 2011, the exchange rate was about US $2.
The Bitcoin Fund was launched on September 27, 2012, when the price of Bitcoin was $12.46.
On November 28, 2012, Bitcoin production halved for the first time, with a bonus of 25 new coins per new block.
In March 2013, professional miners in 1max 3 have used a special ASIC mining machine for mining.
On April 10, 2013, BTC hit an all-time high of $266.
On June 27, 2013, the German conference decided that holding Bitcoin for more than one year would be tax-free, which was seen by the industry as a disguised recognition of Bitcoin's legal status, with a price of $102.24.
In October 2013, the world's first ATM that could be exchanged for bitcoin was launched in Canada.
On November 29, 2013, the trading price of Bitcoin hit an all-time high of $1242, while gold traded at $1241.98 an ounce, surpassing gold for the first time.
In February 2014, Mt.Gox, the world's largest bitcoin exchange platform, declared bankruptcy and shut down because 850000 bitcoins were stolen, causing losses to a large number of investors and causing bitcoin prices to plummet.
In March 2014, China's first ATM that could be exchanged for bitcoin was launched in Hong Kong.
In June 2014, California passed the AB-129 Act, which allows digital currencies such as bitcoin to circulate in California.
In June 2015, New York became the first state in the United States to formally regulate digital currency.
In October 2015, the European Court of Justice ruled that bitcoin transactions were exempt from VAT.
In January 2016, a seminar on digital currency was held in Beijing, and after the meeting, a notice was issued to declare or launch digital currency.
Bitcoin production halved for the second time on July 9, 2016, with a reward of 12.5 new coins per new block.
On Feb. 4, 2017, the price of bitcoin was $1008 per piece.
The real-time price of bitcoin can be found through https://blockchain.info/zh-cn/charts/market-price?timespan=all.
II. The relationship between blockchain and Bitcoin
To put it simply, a guy named Satoshi Nakamoto built an open source and powerful blockchain technology system. according to the rules of the system, he created the first block by solving mathematical problems and had the right to keep accounts for this block. this block is called Genesis block. as a reward for creation, he gets 50 bitcoins and transaction fees for the transactions contained in the blockchain system, and anyone can access the blockchain system. Everyone creates a new block by solving mathematical problems and has the right to keep accounts, which is linked to the first creation block, and then one by one to the back to form a block chain. Once someone takes the lead in solving the problem, it will broadcast to all the accessors. When the consensus has been successfully verified, the new block will be created and will have the accounting rights of the block. You can also get a reward-the transaction fee for 50 bitcoins and transactions contained in the block, but the Bitcoin award will be halved about every four years, to 12.5 now. Bitcoin can be stored and circulated among participants. the total number of Bitcoins is fixed at 21 million, which was dug up in about 2140, and the resulting network is called the Bitcoin Network.
Bitcoin is so valuable that you can get Bitcoin if you have a computer to solve difficult problems according to the rules. The road to money is bright. We don't have to watch the bullshit here, carry a notebook and dig! But! If you only have a few broken notebooks or go to sleep, it is estimated that when a meteor hits you, you may not be able to unlock one! You have to live with professional equipment, and you have to make a piece of it. Because solving a new problem requires a lot of math and requires proof of workload (POW), just like mining, these professional equipment are called mining machines (pictured below).
Professionally speaking: Bitcoin is a kind of digital currency based on cryptography and economic games, a collection of concepts and technologies based on digital currency ecosystem, and the first digital currency system tested by large-scale and long-term operation in history. It is a derivative of blockchain technology. In a narrow sense, blockchain is a kind of chained data structure in which data blocks are connected sequentially according to time order. and cryptographically guaranteed untampered and unforgettable distributed books. In a broad sense, block chain technology uses block chain data structure to verify and store data, uses distributed node consensus algorithms to generate and update data, uses cryptography to ensure the security of data transmission and access, and uses intelligent contracts composed of automated script codes. a new distributed infrastructure and computing paradigm for programming and manipulating data.
Third, the characteristics of block chain technology:
Decentralization: block data is stored on all computers that join the system, each of which can be a server.
High reliability: because it is decentralized and based on peer-to-peer networks, the service will not be interrupted as long as one computer is working properly in the blockchain network, so it is highly reliable.
Security: mainly reflected in distributed, 51% encrypted nodes, even if 49% nodes are * or downtime will not affect the operation of the network.
De-trust: all nodes in the system can trade without trust, because the operation of the database and the whole system is open and transparent, and within the rules and time range of the system, nodes can not deceive each other. Block chain is actually the product of mathematical methods to solve trust problems.
Collective maintenance: the system is jointly maintained by all the nodes with maintenance function, and all people in the system participate in the maintenance work.
Untamperable: consistently submitted data will always exist and can hardly be destroyed or modified.
Traceability: records of any period in the block chain can be traced back.
Reliable database: each node in the system has the latest complete copy of the database, and it is invalid to modify the database of a single node, because the system automatically compares and considers the same data records that appear the most times to be true.
Data transparency: the ledger is shared throughout the network, and each node can store a complete and consistent ledger of the historical transactions that occurred in the whole network.
Cryptography: Hash algorithm, asymmetric encryption, digital signature, digital certificate and other cryptography techniques are used in the block chain.
Open source code: the consensus mechanisms and rules set in the blockchain network can be verified by consistent, open source code.
New features derived from blockchain technology:
Work confirmation, digital proof: confirm the right of the work through time stamp and hashing algorithm to prove the existence, authenticity and uniqueness of a section of text, video, audio and so on.
Fourth, the classification of block chains:
Public chain: anyone is free to join and exit, such as the bitcoin network launched by Satoshi Nakamoto.
Alliance chain: join and exit need to be authorized by the alliance, such as the alliance chain initiated by a number of companies around the world.
Private chain: power is completely controlled in an organization, such as a private chain used within a company.
Fifth, the principle and structure of block and block chain:
Block: block files that record block size information, block head information, transaction counters, transaction details, etc., as the basic storage unit, record the transactions and status results that take place over a period of time, which is a consensus on the current account status.
Chain: linked by the last legal block value recorded in each block header information to form a time-ordered block chain is a log record of changes in the state of the whole system.
BlockChain: the block file recording block size information, block head information, transaction counter, transaction specific content, etc., is used as the basic storage unit, and linked by the last legal block value recorded in each block head information to form a time-ordered block chain.
Transaction: an operation that results in a change in the status of a book (block), such as the addition of a record
Block structure:
Block head structure in the block:
Blockchain, that is, chained links to blocks:
VI. Generation of new chunks in the Bitcoin network:
Create a new block and hash the block head and nonce (mining random number) (SHA256 (SHA256 (Version+HashPreBlock + Merkle_root + Timestamp + Bits + Nonce) ≤ difficulty number) to compare the resulting hash value with the target hash value (difficulty number). This can only be done by trying all the random numbers one after another until a random number that produces the desired hash value is found. The lower the target value, the harder it is to find a suitable random number. If the hash calculated by the current nonce value is less than the target hash value, the mining is successful. After success, the new block is sent to other nodes for consensus verification, and continues to propagate the block, and then start looking for the next block based on this block.
There are two types of rewards for successfully creating a new area: 1) Bitcoin rewards for creating new blocks (before the total amount is reached). 2) the transaction fee for the transactions included in the block.
A new block comes out every 10 minutes, and the size of each block is 1MB. The transaction speed of the whole network is 7 transactions per second (this is quite slow). For transaction security, each transaction needs to wait for the trusted confirmation of 6 blocks, resulting in a final confirmation time of about 1 hour (caused by the Shuanghua problem).
Mining is to test the nonce value one by one, so that the hash value (markle root) of this block is constantly changed, and the block can be created only when a value that meets the target is found. The specific steps are as follows:
VII. Development and evolution of block chain
Blockchain technology originated from the groundbreaking paper "Bitcoin: a peer-to-peer e-cash system" published by a guy under the alias Satoshi Nakamoto in 2008. At present, blockchain technology is called by many large organizations as a major breakthrough technology to completely change the business and even the mode of operation of the organization. At the same time, just like cloud computing, big data, Internet of things and other new generation information technology, blockchain technology is not a single information technology, but relying on existing technologies, to make original combinations and innovation, so as to achieve previously unrealized functions. So far, blockchain technology has gone through three stages of development, as shown in the following figure:
1) the origin of technology
P2P network: is the block chain system to connect peer-to-peer networking technology, that is, "point-to-point" or "end-to-end" network, is a kind of connection network built on the Internet. For example, P2P download technology and so on, the following picture shows a P2P network on the left and a centralized network on the right.
Encryption: block chains use asymmetrically encrypted public and private key pairs to build trust between nodes. Asymmetric encryption refers to the use of public and private keys to encrypt and decrypt data storage and transmission. The public key can be published publicly for the sender to encrypt the information to be sent, and the private key is used for the receiver to decrypt the encrypted content received. Public and private key pairs take a long time to calculate and are mainly used to encrypt less data. The commonly used asymmetric encryption algorithms are RSA and ECC.
Database technology: in the construction of block chain system, the traditional relational database and distributed key data are applicable.
Electronic cash (Ecash): also known as digital money (Digital money) or electronic money (Emoney), as a simulation of real money, involving users, merchants and centralized banks or third-party payment institutions, such as Alipay.
2) Block chain 1.0-Digital currency, which is a cryptographic currency application related to money transfer, remittance and digital payment.
On January 3, 2009, the Bitcoin network was officially launched. As a virtual currency system, the total amount of Bitcoin is limited by the network consensus protocol, and no individual or institution can modify the supply and transaction records at will. After years of successful operation of the Bitcoin network, some financial institutions have begun to realize that blockchain, the underlying technology that underpins the operation of Bitcoin, is actually an extremely ingenious distributed shared ledger and peer-to-peer value transmission technology. the potential impact on finance and even various industries may be no less than the invention of double-entry bookkeeping.
From the analysis of its essence, blockchain is a technology that can maintain a set of untampered account records among participants who do not trust each other or weak trust without intermediary participation. The technical architecture of blockchain 1.0 is shown below:
Application layer: the client mainly completes the accounting and transfer functions.
Incentive layer:
The issuance mechanism, taking the Bitcoin network as an example, currently generates a new block every 10 minutes, each of which rewards 12.5 bitcoins to miners, which is the way money is issued.
The allocation mechanism comes from transaction costs, and the participants who generate new blocks have the right to keep accounts for this block. all transactions need to pay fees to the participants who record the block. if the transaction costs of a transaction are insufficient, they will refuse to execute.
Consensus layer: POW (Proof of Work) workload proof mechanism, all nodes calculate a mathematical problem equally, and the node that gets the answer first will get the recording right of this block. The computing power of the whole network forms a firewall of block chain at the same time, which reduces the risk. Bitcoin uses the POW mechanism in the generation of Block. A Block Hash that meets the requirements is composed of N leading zeros, and the number of zeros depends on the difficulty of the network. To get a reasonable Block Hash requires a lot of trial calculation, and the calculation time depends on the hashing speed of the machine. When a node provides a reasonable Block hash value, it shows that the node has indeed gone through a large number of attempts to calculate, of course, can not get the absolute value of the number of calculations, because finding a reasonable hash is a probabilistic event. When the node has the computing power of n% of the whole network, the node has the probability of finding Block Hash.
Network layer: P2P network, also known as peer-to-peer technology, is a distributed Internet system that does not have a central server and relies on users for information. The first problem encountered in distributed systems is the guarantee of consistency. Obviously, if a distributed cluster cannot guarantee consistent processing results, then any business system built on it will not work properly. The propagation mechanism and verification mechanism are to ensure the normal and consistent work of the distributed system.
Data layer:
Digital signature: Elliptic curve digital signature algorithm (ECDSA) is a simulation of digital signature algorithm (DSA) using elliptic curve, which is the cornerstone of block chain system.
Hash (hash or hash) algorithm: it is a very basic and important technology in the field of information technology. It can map arbitrary length binary values (plaintext) to shorter fixed-length binary values (Hash values), and it is difficult to map different plaintext to the same Hash value. MD5 is a classic hash algorithm, which and SHA-1 algorithm have been proved to be insecure and applied to business scenarios.
Merkle tree (also called hash tree) is a binary tree, which consists of a root node, a set of intermediate nodes and a set of leaf nodes. The lowermost leaf node contains stored data or its hash value, each intermediate node is the hash value of its two child node content, and the root node is also composed of the hash value of its two child node content.
Asymmetric encryption: asymmetric encryption is the greatest invention in the history of modern cryptography, which can solve the problem of pre-distribution of keys needed by symmetric encryption. As the name implies, encryption keys and decryption keys are different, called public keys and private keys, respectively. The public key is generally public and accessible to everyone, while the private key is generally held by the individual and cannot be obtained by others. The advantage is that public and private keys are separated, and insecure channels can also be used. In the block chain system, the private key can be calculated from the public key, and vice versa.
Typical characteristics of blockchain 1.0 are:
Chained data block structure based on blocks: each node of the blockchain system selects the block node with accounting authority through a certain consensus mechanism. the node needs to package the hash value of the previous block of the new block, the current timestamp, the valid transactions occurring in a period of time and its Meckel tree root value into a new block and broadcast to the whole network. Because each block is linked with the previous block by means of cryptographic proof, when the block chain reaches a certain length, in order to modify the transaction content in a historical block, the transaction records and cryptographic proof of all the blocks before the block must be reconstructed, and tamper-proof is effectively realized.
Sharing the ledger for the whole network: in the blockchain network, each full-function node can store a complete and consistent ledger of the historical transactions occurred in the whole network, that is, the tampering of the ledger data of individual nodes will not affect the security of the general ledger of the whole network.
Asymmetric encryption: encryption key and decryption key are different. In a typical block chain network called public key and private key respectively, the account system is composed of public key and private key under asymmetric encryption algorithm. If there is no private key, the assets in the corresponding public key cannot be used.
Open source code: the consensus mechanisms and rules set in the blockchain network can be verified by consistent, open source code.
3) Block chain 2.0-Smart contract, which is the cornerstone of economic, market and financial applications.
The earliest related concept of blockchain is that Satoshi Nakamoto, the inventor of Bitcoin, proposed in his paper that since then, blockchain has been separated from the bitcoin network and become an underlying technology that supports distributed accounting capabilities, with the characteristics of decentralization and encryption security. As the industry began to realize the important value of blockchain technology, and used it in areas other than digital currency, such as distributed identity authentication, distributed domain name system, distributed autonomous organizations and so on. These applications are called distributed applications (DAPP). Building DAPP from scratch with the blockchain technology architecture is very difficult, but different DAPP share many of the same components. Blockchain 2.0 attempts to create a common technology platform and provide BaaS services to developers, which greatly improves the transaction speed, greatly reduces resource consumption, and supports a variety of consensus algorithms such as PoW, PoS and DPoS, which makes the development of DAPP easier.
The technical architecture of blockchain 2.0 is shown below:
Intelligent contract: a program that is event-driven, stateful, recognized by multiple parties, runs on a trusted, shared blockchain ledger, and can automatically deal with assets on the ledger according to preset conditions. The advantage of the intelligent contract is to use the program algorithm to arbitrate and execute the contract. The model is shown below.
EVM: Yi Tai Fong virtual machine, the running environment of intelligent contract in Yi Tai Fong. If you make an analogy, the intelligent contract runs more like a JAVA program, the JAVA program executes the code interpretation bytes through the JAVA virtual machine (JVM), and the Taifang intelligent contract is executed by interpreting the Ethernet virtual machine (EVM) into bytecode.
DAPP: decentralized applications, which naturally have the characteristics of decentralization and trust center. These applications change their internal data triggered by user behavior at run time, and the data and application code are recorded on the block chain. They are inherently anti-tampering.
POS: (Proof of Stake) Equity proves that the typical process is to bet on a legal block to become a new block through margin (tokens, assets, fame and other items with valuable attributes), and the return is the interest on the mortgage capital and transaction service fees. The more margin to provide proof (for example, through money transfer records), the greater the probability of obtaining bookkeeping rights. The legal bookkeeper can make a profit. PoS is an attempt to solve the problem that a lot of resources are wasted in PoW. Malicious participants will have the risk of margin forfeiture, that is, the loss of economic benefits.
DPOS: (Delegated Proof-of-Stake) authorized equity proof mechanism, a new implementation of equity proof mechanism, which can verify the transaction in seconds, and can provide better security than any existing equity proof system in a shorter time. After the time when the bitcoin network generates a block, an authorized equity certification system (DPOS) enables your transaction to be verified by 20% shareholders, while after the bitcoin network declares that the transaction is almost irreversible (6 blocks, about 1 hour), under the DPOS mechanism, your transaction has been verified by 100% shareholders through its representative.
PBFT: (Practical Byzantine Fault Tolerance) Byzantine fault-tolerant algorithm. This algorithm provides the fault tolerance of (nmurl) / 3 on the premise of ensuring the activity and security (liveness & safety).
Typical characteristics of blockchain 2.0 are as follows:
Intelligent contract: applications in blockchain systems are coded, automatically runnable business logic, usually with their own tokens and dedicated development languages.
DAPP: applications that include a user interface, including but not limited to various cryptocurrencies, such as ethernet wallets.
Virtual machine: used to execute code compiled by a smart contract. The virtual machine is Turing complete.
With the deepening of blockchain technology and application, blockchain 2.0 represented by intelligent contract and DAPP will not only support a variety of typical industry applications. Behind the operation of many forms, such as organization, company, society and so on, the shadow of this distributed cooperation mode of block chain can be seen. It can be said that the blockchain will extensively and profoundly change people's way of life. Blockchain technology may be applied to the scale coordination of human activities, and some people even boldly predict that human society may enter the era of blockchain, that is, blockchain 3.0.
VIII. Common problems of blockchain
Q: who invented the blockchain and is it safe?
A: the earliest related concept of blockchain is that Satoshi Nakamoto, the inventor of Bitcoin, proposed in his paper that since then, blockchain has been separated from the Bitcoin network and become an underlying technology that supports distributed accounting capability. it has the characteristics of decentralization and encryption security.
Q: what is the relationship between blockchain and Bitcoin?
A: Bitcoin is a digital cash (cash) application based on blockchain technology, which is used in Bitcoin distributed systems to ensure its normal operation under autonomous conditions after its launch in 2009.
Q: what is the relationship between blockchain and distributed database?
A: the two positions are completely different. Distributed database is to solve the problem of data storage in large-scale scenarios; blockchain is to provide a set of credible accounting and contract performance mechanism among multiple parties (without mutual trust).
Q: what are the types of blockchain?
Answer: according to the different participants, it can be divided into public chain, alliance chain and private chain. From a functional point of view, it can be divided into a primary block chain based on currency transactions, and a new generation block chain that supports intelligent contracts and codes on the chain.
Q: why is the Bitcoin blockchain designed to come out only every 10 minutes? can't it be faster?
A: this is mainly from a fair point of view. When a new block is calculated, it needs to be published on the global bitcoin network. Nearby miners will be the first to get the news and start counting, while distant miners will be notified later. In the worst case, it may take tens of seconds of delay. In order to make sure that the miners are all on the same starting line, the time should not be too short. But too long will lead to the "final" confirmation time of each transaction is too long, for now, about 10 minutes is a relatively appropriate compromise.
Q: why is the size of each block in the Bitcoin blockchain 1 MB, and is it not possible to be larger?
A: this is also the result of compromise. The average time interval generated by the chunk is fixed 10 minutes, which means that the throughput of the transaction can be increased, but the cost of node verification will be increased (hash processing is about 100 MB/s), and the cost of storing the entire blockchain will rise rapidly. 1MB, which means that transaction data can be recorded per second (1MB/ (10: 60) = 1.7KB), while the average transaction data size is between 0.2 and 1 KB. In fact, the community has discussed the proposal to change the size of the block many times before, but none of them was finally accepted.
Q: (in the case of the public chain) how does the blockchain ensure that no one does evil?
A: blockchain does not try to protect everyone from evil, and each participant defaults to expanding on the longest chain. When an evildoer tries to continue an illegal chain, he is actually competing with all "non-evildoers". Therefore, when more than half of those who are considered evil (and the choice should be consistent), the rule can only be broken in the sense of probability. If you fail, all the resources (such as arithmetic) will be wasted.
IX. Explanation of block chain nouns
Bitcoin: Bitcoin, digital currency technology initiated by Satoshi Nakamoto.
Blockchain: block chain, a trusted information storage and processing technology based on cryptography.
Chaincode: the code on the chain that runs the preagreed code (state machine) on the block chain.
DAO:Decentralized Autonomous Organization, a distributed autonomous organization, is a loose crowdfunding group based on blockchain and connected according to intelligent contracts.
Distributed Ledger: distributed bookkeeping, a decentralized accounting recording platform that is recognized by everyone.
DLT:Distributed Ledger Technology .
DTCC:Depository Trust and Clearing Corporation, Depositary and Clearing Corporation, the world's largest financial transaction back-office service.
EVM: Ethernet Fong virtual machine.
Fintech:Financial Technology, (information) technology related to finance.
Hash: hash algorithm in which a binary value of any length is mapped to a shorter binary value of a fixed length.
Lightning Network: lightning network, a technology that increases transaction throughput through micropayment channels out of the chain.
Nonce: a cryptographic term for a temporary value, usually a random string.
P2P: a point-to-point communication network in which all nodes have equal status and there is no centralized control mechanism.
PoW:Proof of Work, workload proof, under the premise of a certain problem to solve a SHA256 hash problem.
Smart Contract: smart contracts, contracts that run in advance on the blockchain
Sybil Attack (Witch): a small number of nodes disguise as a large number of nodes by forging or embezzling identities, thus destroying the distributed system.
SWIFT:Society for Worldwide Interbank Financial Telecommunication, the Global Banking and Financial Telecommunications Association, operates the World Financial Telegraph Network and serves banks and financial institutions.
Mining: through a violent attempt to find a string so that its hash value with a set of transaction information meets certain rules (for example, the prefix includes several zeros), the person who finds it can claim that a new block has been discovered and receives a system reward.
Miner: a person or organization involved in mining.
Mining machine: equipment specially designed for bitcoin mining, including GPU, special chip, etc.
Mining pool: team collaboration is used to focus on mining and allocate the bitcoin produced.
Market depth: untraded transactions, a measure of the market's ability to stabilize the exchange rate after large transactions.
Turing turing complete: refers to a machine or device that can be used to simulate the function of a Turing machine (the embryonic form of a modern general-purpose computer). Turing complete machines are equivalent in computability. In computability theory, when a set of rules for data operation (a set of instructions, programming languages, or cellular automata) satisfy arbitrary data in a certain order, the results can be calculated, which is called Turing complete (Turing complete).
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.