为广大币圈朋友提供币圈基础入门专业知识!
当前位置首页 > 区块链知识> 正文

一分钟读懂区块链,一分钟了解区块链

发布时间:2023-12-15-07:28:00 来源:网络 区块链知识 区块

一分钟读懂区块链,一分钟了解区块链

区块链是一种分布式的数据库,它将一组数据记录在一系列的公开的、被验证的、不可篡改的区块中,每个区块都包含前一个区块的数据,这种结构使得每个区块之间存在一种去中心化的信任关系,这种信任关系可以用来保护数据的完整性和安全性。

数字货币:数字货币是基于区块链技术的一种新型货币,它是一种去中心化的电子货币,它不受任何政府机构或金融机构的控制,它的价值取决于市场的需求。数字货币的发布采用了分布式记账技术,也就是区块链技术,这种技术可以保证交易的安全性、去中心化、不可篡改性等特点。

智能合约:智能合约是基于区块链技术的一种新型的合约,它是一种去中心化的、自动执行的合约,它可以实现自动执行、自动结算等功能。智能合约可以使得双方在交易过程中的所有信息都可以被保存在区块链上,这有利于提高交易的安全性和信任度。

去中心化应用:去中心化应用是基于区块链技术的一种新型的应用,它可以实现去中心化的数据存储、去中心化的计算能力和去中心化的交易机制。去中心化应用可以使得用户可以在网络上进行去中心化的数据存储、去中心化的计算能力和去中心化的交易,这有利于提高网络的安全性和信任度。


请查看相关英文文档

❶ Blockchain Principles

Blockchain is a technology, but it is not a single technology, but the result of the integration of multiple technologies, including cryptography Science, mathematics, economics, network science, etc. You can think of it as a distributed shared accounting technology, or as a database, but this database is jointly maintained by all nodes on the chain, and each node has a ledger, because all nodes The ledgers are consistent, different nodes can trust each other, and there is no doubt about the data, so everyone says that the blockchain has technically achieved trust. For detailed professional technology, you can consult some professional technology companies. For example: Jinbo Technology, which focuses on developing blockchain-related products, has a professional R&D team and complete after-sales service. You can call for consultation.

❷ Briefly explain what blockchain is

Blockchain is a term in the field of information technology. In essence, it is a shared database, and the data or information stored in it has the characteristics of "unforgeable", "full traces left", "traceable", "open and transparent" and "collectively maintained". Based on these characteristics, blockchain technology has laid a solid foundation of "trust" and created a reliable "cooperation" mechanism, which has broad application prospects.

On January 10, 2019, the Cyberspace Administration of China issued the "Blockchain Information Service Management Regulations". On October 24, 2019, during the 18th collective study session of the Political Bureau of the CPC Central Committee, General Secretary Xi Jinping emphasized, “use blockchain as an important breakthrough for independent innovation of core technologies” and “accelerate the development of blockchain technology and industrial innovation.” . "Blockchain" has entered the public eye and become the focus of society.

On December 2, 2019, the word was selected into the top ten buzzwords of 2019 by "Biwenqiezi".

(2) Extended reading to understand the blockchain in one minute:

Blockchain financial applications:

Since 2016 , major financial giants have also caught wind of this and launched blockchain innovation projects one after another to explore the possibility of applying blockchain technology in various financial scenarios. In particular, Puyin Group took the lead in pioneering the “blockchain+” standard digital currency.

The standard digital currency is an asset that has been identified, evaluated, confirmed, insured, etc. by a third-party organization and written into the blockchain through rigorous digital algorithms to form a standard correspondence between the asset and the digital currency. relationship, called a standard digital currency.

In order to realize the great leap forward development of blockchain finance, in order to promote the new development of China’s economy, accelerate the circulation of global assets, and realize the dream of rejuvenation that generations of people have been striving for, Puyin Group will Puyin Blockchain Finance Guiyang Strategy Release Ceremony was held in Guizhou on the 9th;

At the meeting, the digital circulation of assets through blockchain, the blockchain financial transaction model, and the relationship between blockchain services and blockchain services will be discussed. The application of social public industries will be discussed. This conference will mark the beginning of the practical application of blockchain finance and mark theAiming at the reform and development of a new financial ecosystem.

❸ A beginner’s guide to investing in digital currency (blockchain), just read this article

Compared with other investment methods, the entry threshold for blockchain and digital currency investment is relatively high, and there are many Friends all want to invest in digital currencies but don’t know where to start or what to learn. Although 51coins has updated a lot of relevant knowledge in the "Beginners Playing Coin" section, it is not systematic enough

This time we will systematically organize the information related to blockchain and digital currency investment. In summary, let everyone understand and invest in digital currency faster and more conveniently

1. Understand the blockchain and digital currency

No matter what you invest in, you must understand it. The same goes for blockchain and digital currencies. There are many introductions about blockchain on the Internet, some are too profound, and some are not comprehensive enough. I personally think the video "100 Questions on Blockchain" produced by Huobi is better

100 videos , all of which are blockchain-related knowledge, including: the birth of Bitcoin, operating principles, blockchain FAQs, mining, wallet introduction, etc., and are all in the form of animated videos, making it easier for everyone to understand. Although the explanation is not detailed enough, it can give you a preliminary understanding of digital currency and blockchain

2. Choose a trading platform

After understanding digital currency, you can try to use the trading platform Purchase a small amount of digital currency and experience the process. The purchase and sale of digital currencies must be completed through a trading platform, which is equivalent to a stock exchange in the stock market. It is recommended to choose a large trading platform for the trading platform, which has a comprehensive range of currencies, convenient transactions, and guaranteed fund security

The following three platforms are recommended: Binance, Huobi, and OKEX (ranked in no particular order)

< p> 3. Choose a wallet

If digital currency is compared to cash, a wallet is equivalent to a bank card, used to store digital currency. There are many types of wallets, and the most commonly used ones now are mobile APP wallets (light wallets). Wallets are also divided into types. Different similar digital currencies cannot be transferred to the same wallet. For example, if imtoken is an Ethereum wallet, it can only store Ethereum and tokens issued based on Ethereum, but not other currencies

< p> There are also wallets that claim to support all digital currencies, but most of these wallets are not yet complete.

Of course, after we buy digital currency, we don’t need to deposit it into the wallet, but directly put it in the exchange account, which can save the handling fee and not be so troublesome. Large exchanges such as Huobi and OKEX are relatively It is safe. I personally basically put digital currencies on exchanges

4. Determine the investment plan

Before investing in digital currencies, we must first determine our investment plan and plan to invest. How much money, how much loss you can accept, what is the expected return, and how long the investment time frame is, determine it before investing. digital goodsCoin is a high-risk, high-yield investment product. In the novice stage, you can invest the spare money that will not affect your life. There is no limit on the amount of investment, and the minimum investment is a few hundred yuan.

Wait until you truly understand the market before adding more money. The amount of investment is large, but you must also remember that the investment amount should be controlled within your own tolerance

5. Choose the investment currency

After selecting the trading platform and confirming the investment plan, you can purchase digital numbers currency, so which one should we buy among so many digital currencies? When buying coins for the first time, it is recommended to choose mainstream coins. You can choose a few coins that you like among the top 20 in the market or recognized value coins

Find out what these coins are for and whether they are available. What is the actual value, what news has recently affected the currency price trend, etc.

Understand these issues before buying, and be sure to pay attention to the purchase price before buying

6. Common tools, Website

1. Non-small account: You can view information related to each currency and exchange, including currency price, historical price, increase and decrease, circulation volume, ranking and other information

2 , AICoin: The function is similar to that of non-small accounts. The K-line of aicoin is very convenient and easy to use. It is the first choice for watching K-line charts

3. Coin World: Real-time updates of news and information related to various blockchains and digital currencies

4. Golden Finance: A relatively comprehensive blockchain media platform, including news, news, quotes, celebrity columns, etc.

7. Learn more relevant knowledge

< p> With the above 6 points as a basis, even if we have initially learned about digital currency investment, we still need to learn more knowledge if we want to truly make money by investing in digital currencies. The two most important points are to deepen the understanding of blockchain and technical analysis (K line)

These two are too broad and cannot be learned overnight, so I will not introduce them, K You can find a lot of online knowledge online. As we invest longer, understand more currencies, and come into contact with more related matters, we will gradually deepen our understanding of blockchain.

❹ Understand what blockchain is You can understand by these 9 questions

What is blockchain? You can understand by understanding these 9 questions
What is blockchain? What can blockchain do? How to make money with blockchain? I believe that many netizens are confused when faced with this new term. So how can we better understand blockchain and make this new technology available to us? The author has collected nine very common questions from the Internet. I hope that after reading this article, you will have a clearer understanding of blockchain.

Nearly omnipotent blockchain technology
Simply put, blockchain is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithms. Its core is distributed data, and the result is "decentralization." Blockchain technology canIt can be applied to many scenarios in our lives. Next, let’s take a look at the analysis of blockchain technology!
1. Technology is a double-edged sword. While you are still using your mobile phone to play games, others are already using their mobile phones to make money every month! I want to try Jiaerwu Wuyi Wuba Lingyi Lacquer to make your mobile phone no longer a toy!
Just like nuclear energy is a physical technology, blockchain is an underlying technology at a technical level.
Nuclear energy can be used as an atomic bomb or as a nuclear power generator. Similarly, blockchain can be used to manage industries and life elements, which may make society more stable, or it may be used by bad guys as the fastest way to commit crimes. .
2. Talking about technical value apart from the application level is muddying the waters
As the underlying technology, blockchain has its application level and negotiation method. Currently, some people talk about blockchain in terms of business models, some in terms of hardware, and some people talk about blockchain in terms of power distribution. It is gradually becoming clear in the market that blockchain is used in the design of technology combinations and business models, from hardware to software to business model to financial design and many other aspects. But not every blockchain can issue coins, and not every blockchain should issue coins.
3. Technology is decentralized, but the application is not necessarily
Blockchain technology is decentralized, but it can be decentralized or not in upper-layer applications. If it is applied to things, industries and projects that cannot be decentralized, it is not decentralized; if it is applied to things where everyone can participate universally and have equal authority, then it can be decentralized.
Including coins on the blockchain, if a country adopts legal digital currency, the coins on the blockchain can also be centralized. The blockchain that supports the operation of Bitcoin is decentralized, but the alliance chain usually has one or more enterprises as the core control alliance, which becomes centralization.
Technology itself and what kind of business and political ecology the technology can support are completely different things.
4. What kind of people use what kind of tools
As a powerful tool, blockchain is powerful not only because of technology, but also because many talented people have invested in it. field, causing the energy of this technology to be amplified. As for whether the power of blockchain benefits society or cuts leeks? It is possible to make the world more turbulent or to make society more harmonious and beautiful.
On the positive side, more kind-hearted people will come in and reach more consensus, and there will be more legislation, restrictions and norms at the national level, which will ultimately allow us to use this technology to give more people opportunities; on the negative side, In other words, it is possible that more greedy and unethical people will come in to divide the wealth, and it is even possible that people in some countries and regions will use this new technology to commit crimes and terrorism.
5. Blockchain promotes the globalization of civilians
Under the blockchain, the global connection space is closer. The 6-degree space will become 5 degrees or even 4 degrees in the future. Blockchain can inspire The growth of various communities. The globalization of interest groups will become inevitable, and the world of the futureThere will be various international communities and summits.
6. Blockchain facilitates co-creation
For example, in the past, the connection between international singers and ordinary people had to go through several barriers, including record companies, agents, sales channels, etc. In the blockchain era, international singers publish their songs under blockchain technology. Everyone has the possibility to become a partner of an international singer, write songs for the international singer, or purchase Tokens to obtain dividend rights from distribution proceeds, etc., and enjoy records. Proceeds from distribution and downloads.
7. Trust will become convenient and low-cost
The combined effect of artificial intelligence, big data and blockchain can resolve disputes at the factual level. The tamper-proof nature of the blockchain allows hundreds or even tens of thousands of machines to maintain the same data and encrypt it. Basic facts will be trustworthy. On this basis, the corresponding contracted and authorized information cannot be changed. Replace manual systems with machines, breaking the loopholes in manual operations, the possibility of cheating and even corruption, so that everyone's information can be confirmed to be authentic and trustworthy.
On this basis, if the trust level of the business system is good, trust between people will be enhanced in the process of implementing the designed system.
8. Interaction leads to creativity, and creativity generates income
Blockchain is a comprehensive ledger. Some exchanges are just ideas and creativity at the moment, but they may be the starting point of a certain cause or even industry in the future. In the previous accounting system, there may not be value. However, under blockchain technology, values ​​that are not yet seen can be recorded. If this leads to products, creative people can benefit. Various human activities may be valuable, creative, and worthy of recording.
Extended from this, a better application of blockchain can record creative related models, introduction of business opportunities, etc., and put valuable things in an ecosystem. Blockchain can create new ones. A cooperative approach.
9. There will be more legal supporting facilities in the future
The world of blockchain is not a disorderly world. Technology will be used by people, and people are rational.
Records can resolve various factual disputes, and can also cause more issues such as authorization rights, patent and creative copyright management, and many other issues. In the future, there will be more legal supporting systems to not only standardize and manage service consumption and life, but also to avoid related risks and problems, and to avoid and combat crime

❺ Blockchain technology concept

< p> Blockchain technology concept

Blockchain technology concept. Nowadays, blockchain has become an area of ​​concern to most people. Many companies have already studied the technology in depth, but there are still people who are concerned about it. It is not very well understood. Below I will share an article with relevant information about the concept of blockchain technology.

Blockchain technology concept 1

Basic concepts and working principles of blockchain

1. Basic concepts

Blockchain is a distributed data storage, point-to-point transmission, sharingnew application models of computer technologies such as identification mechanisms and encryption algorithms. The so-called consensus mechanism is a mathematical algorithm that establishes trust and obtains rights and interests between different nodes in the blockchain system.

Blockchain is an important concept of Bitcoin. It is essentially a decentralized database and serves as the underlying technology of Bitcoin. The blockchain is a series of data blocks generated using cryptographic methods. Each data block contains information about a Bitcoin network transaction, which is used to verify the validity of the information, prevent counterfeiting, and generate the next block.

In a narrow sense, blockchain is a chained data structure that combines data blocks in a sequential manner in chronological order, and is cryptographically guaranteed to be non-tamperable and non-tamperable. Fake distributed ledger.

Broadly speaking, blockchain technology uses block chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, and uses cryptography to ensure data transmission and access. It is a new distributed infrastructure and computing method that uses smart contracts composed of automated script codes to program and operate data securely.

2. Working principle

The blockchain system consists of data layer, network layer, consensus layer, incentive layer, contract layer and application layer. Among them, the data layer encapsulates the underlying data blocks and related basic data and basic algorithms such as data encryption and timestamps; the network layer includes distributed networking mechanisms, data dissemination mechanisms, and data verification mechanisms; the consensus layer mainly encapsulates network nodes Various consensus algorithms; the incentive layer integrates economic factors into the blockchain technology system, mainly including the issuance mechanism and distribution mechanism of economic incentives; the contract layer mainly encapsulates various scripts, algorithms and smart contracts, and is the core of the blockchain The basis of programmable features; the application layer encapsulates various application scenarios and cases of the blockchain. In this model, the chain block structure based on timestamps, the consensus mechanism of distributed nodes, economic incentives based on consensus computing power, and flexible programmable smart contracts are the most representative innovations of blockchain technology.

Blockchain mainly solves the trust and security issues of transactions, so it proposes four technological innovations to address this issue:

1. Distributed The ledger means that transaction accounting is completed by multiple nodes distributed in different places, and each node records a complete account, so they can all participate in supervising the legality of the transaction and can also jointly testify for it.

Different from traditional distributed storage, the uniqueness of blockchain distributed storage is mainly reflected in two aspects: First, each node of the blockchain stores complete data according to the block chain structure. For data, traditional distributed storage generally divides the data into multiple parts for storage according to certain rules. Second, the storage of each node in the blockchain is independent and has equal status. It relies on the consensus mechanism to ensure the consistency of storage, while traditional distributed storage generally usesThe central node synchronizes data to other backup nodes. [8]

No node can record ledger data independently, thus avoiding the possibility of a single bookkeeper being controlled or bribed to record false accounts. Also because there are enough accounting nodes, theoretically speaking, the accounts will not be lost unless all nodes are destroyed, thereby ensuring the security of the accounting data.

2. Asymmetric encryption and authorization technology. Transaction information stored on the blockchain is public, but account identity information is highly encrypted and can only be accessed with authorization from the data owner. , thus ensuring data security and personal privacy.

3. The consensus mechanism is how all accounting nodes reach a consensus to determine the validity of a record. This is both a means of identification and a means of preventing tampering. Blockchain proposes four different consensus mechanisms, which are suitable for different application scenarios and strike a balance between efficiency and security.

The consensus mechanism of the blockchain has the characteristics of "the minority obeys the majority" and "everyone is equal". "The minority obeys the majority" does not entirely refer to the number of nodes, but can also be the computing power and the number of shares. Or other characteristic quantities that the computer can compare. "Everyone is equal" means that when a node meets the conditions, all nodes have the right to give priority to the consensus result, which will be directly recognized by other nodes and may eventually become the final consensus result. Taking Bitcoin as an example, it uses proof of work. Only when more than 51% of the accounting nodes in the entire network are controlled, it is possible to forge a non-existent record. When there are enough nodes joining the blockchain, this is basically impossible, thus eliminating the possibility of fraud.

4. Smart contracts. Smart contracts are based on these trustworthy and non-tamperable data. Some predefined rules and terms can be automatically executed. Take insurance as an example. If everyone's information, including medical information and risk occurrence information, is true and trustworthy, it will be easy to implement automated claims settlement in some standardized insurance products.

3. Others

The Internet exchanges information, and the blockchain exchanges value. Human history and the history of the Internet can be understood in eight words: if they are divided for a long time, they must be combined. For a long time, they must be combined. In the era of long-term separation, all network information is scattered on the Internet. It is very difficult for everyone to mine information. At this time, platforms such as Google and Facebook will appear. , the only thing it does is recombine all our information. In the Internet era, what the monopoly giants reorganize is information, rather than generating their own information. The information generated is entirely our own. Once the information is reorganized, a new monopoly giant will emerge, so it will be an era of long-lasting separation. Now, due to the emergence of blockchain technology, it has entered an era of integration and division. It is a new multi-centralization. After the new multi-centralization, new value will be generated. These data will be in our own hands, and personal data will generate value. It belongs to oneself, this is thisThe most exciting era of the times.

What is the value of blockchain? A low-cost mechanism to establish trust, establish data rights, and resolve data property rights.

At present, blockchain technology continues to develop, including the current development of single chains to multi-chains, and the technology can be further expanded. I think there may still be disruptions in the future, especially in transactions and other aspects. , especially many disruptive scenarios for existing industries.

The essence of blockchain is to establish trusted information exchange on untrustworthy networks.

One Belt, One Road + One Chain. The bigger thing about blockchain is not to create trust, but to allow trust to be transmitted losslessly, reducing the friction cost of society as a whole, thereby improving the overall efficiency.

Now the blockchain itself is still in its initial stage, so it includes the information transmission and encryption of the blockchain. Quantum encryption and other encryption appear in this process, which actually attacks the encryption algorithm used by the blockchain itself. This phenomenon also occurs from time to time. Including blockchain is also a recognition of assets, a recognition of digital assets, but now many of us use cryptographic algorithms, or as the key for us to decrypt, but if you forget the password, it is very likely that your current assets will be lost. If you lose them, you won't be able to get back your original assets. Therefore, there are still some hidden dangers in asset management, including information transmission and some security aspects. Of course, from a technical perspective, the processing speed of our blockchain itself, or its scalability, is because from the perspective of the working mechanism, the entire ledger must be copied to all participants, so in the blockchain Its operational efficiency and scalability are still relatively limited. We feel that these still need further development in terms of technology.

The underlying technologies of the blockchain platform also form blockchain wallets, blockchain browsers, node elections, mining machines, mining pools, development components, development modules, technical communities and project communities. and a series of ecosystems. The perfection of these ecosystems directly determines the efficiency and effectiveness of the underlying platform of the blockchain.

4. Mundell’s Impossible Triangle

It is impossible to achieve the ultimate in decentralization, efficiency, and security at the same time.

Blockchain technology concept 2

The essence of blockchain is a distributed accounting technology, as opposed to centralized accounting technology, which is widely used in our current lives. exist. Blockchain is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.

Blockchain is an important concept of Bitcoin. It is essentially a decentralized database. At the same time, as the underlying technology of Bitcoin, it is a series of related cryptographic methods. Each data block contains a batch of Bitcoin network transaction information, which is used to verify the validity and anti-counterfeiting of the information and generate the next block.

In a narrow sense, blockchain is a chain data structure that combines data blocks in a sequential manner in chronological order, and is cryptographically guaranteed to be non-tamperable and non-forgeable. Distributed ledger.

Broadly speaking, blockchain technology uses block chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, and uses cryptography to ensure data transmission and access. It is a new distributed infrastructure and computing method that uses smart contracts composed of automated script codes to program and operate data securely.

The popular understanding of blockchain technology is: connecting the front, back, left and right blocks of "things" into a chain using one technology, but each block The original data of the block cannot be tampered with. It is a "linked module" technology in the field of Internet of Things that allows participants to trust. The application of blockchain technology is inseparable from the Internet and the Internet of Things. It is based on the integration and interaction of the two, but allows participants to remain independent, decentralized, and work together. With this set of value chain co-construction and sharing, technology.

Characteristics of blockchain: decentralization, openness, autonomy, information cannot be tampered with, and anonymity.

Blockchain is a network that can deliver value. The demand for a network that can deliver value is an important reason for the emergence of blockchain technology. Blockchain emerged driven by the need to protect information with ownership or other value. Through public and private key cryptography, distributed storage and other technical means, the blockchain ensures on the one hand the efficient transmission of valuable information, and on the other hand ensures that this information will not be easily copied and tampered with during the transmission process.

Understand the connotation of blockchain from the inevitability of its birth. Blockchain is a distributed accounting technology that solves the shortcomings of centralized accounting and solves the problem of distributed consistency. It is also The connected Internet is upgraded to a value network that ensures the safe and efficient transmission of valuable information.

Blockchain Technology Concept 3

Blockchain: Blockchain is like a globally unique account book, or database, which records the history of all transactions in the network.

Ethereum Virtual Machine (EVM): It allows you to write more powerful programs on Ethereum and script programs on Bitcoin. It is also sometimes used to refer to the Ethereum blockchain, which is responsible for executing smart contracts and everything.

Node: You can run a node to read and write to the Ethereum blockchain, that is, using the Ethereum Virtual Machine. Full nodes require downloading the entire blockchain. Light nodes are still under development.

Miner: Mining, that is, the node that processes blocks on the blockchain. You can see some of the currently active Ethereum miners on this page: stats.ethdev.com.

Proof of Work: Miners are always competing to solve some mathematical problem. The first one to figure out the answer (calculateNext block) will be rewarded with Ether. All nodes then update their own blockchain. All miners who want to figure out the next block have an incentive to stay in sync with other nodes and maintain the same blockchain, so the entire network can always reach consensus. (Note: Ethereum is planning to move to a proof-of-stake system (POS) without miners, but that is beyond the scope of this article.)

Ethereum: Abbreviation ETH. A true digital currency that you can buy and use. Here is a chart from one of the exchanges where Ethereum can be traded. At the time of writing, 1 Ether is worth 65 cents.

Gas: Executing programs and saving data on Ethereum consumes a certain amount of Ethereum. Gas is converted from Ethereum. This mechanism is used to ensure efficiency.

DApp: The Ethereum community calls applications based on smart contracts decentralized applications (Decentralized App). The goal of DApp is (or should be) to have a friendly interface for your smart contracts, plus some extras, such as IPFS, a decentralized network that can store and read data, not from the Ethereum team but in a similar spirit ). DApp can run on a centralized server that can interact with Ethereum nodes, or it can run on any Ethereum equal node. (Take a minute to think about this: Unlike ordinary websites, DApps cannot run on ordinary servers. They need to submit transactions to the blockchain and read important data from the blockchain rather than a centralized database. Compared to typical users When logging into the system, the user may be represented as a wallet address and other user data is stored locally. Many things will be structured differently from current web applications.)

Ethereum client, smart contract language

p>

Writing and deploying smart contracts does not require you to run an Ethereum node. Browser-based IDEs and APIs are listed below. But if you are just learning, you should still run an Ethereum node to understand the basic components, and running a node is not difficult.

Clients available for running Ethereum nodes

Ethereum has many client implementations in different languages, that is, multiple methods of interacting with the Ethereum network. , including C++, Go, Python, Java, Haskell, etc. Why do we need so many implementations? Different implementations can meet different needs. For example, the goal of Haskell implementation is to be mathematically verifiable, to make Ethereum more secure, and to enrich the entire ecosystem.

At the time of writing this article, I am using the client geth (go-ethereum) implemented in the Go language. At other times, I also use a tool called testrpc, which uses the Python client pyethereum. BackExamples will use these tools.

About mining: Mining is fun, a bit like caring for your houseplant, but also a way to learn about the entire system. Although the current price of Ethereum may not even cover the electricity bill, who knows in the future. People are creating many cool DApps that may make Ethereum more and more popular.

Interactive console: Once the client is running, you can synchronize the blockchain, create a wallet, and send and receive Ethereum. One way to use geth is through the Javascript console. In addition, you can use cURL-like commands to interact with the client through JSON RPC. The goal of this article is to take you through the process of DApp development, so I won’t go into details about this. But we should remember that these command line tools are useful for debugging, configuring nodes, and using wallets.

Running the node on the test network: If you run the geth client on the official network, it will take quite a while to download the entire blockchain and synchronize with the network. You can determine if synchronization has occurred by comparing the last block number printed in the node logs with the latest block listed on stats.ethdev.com. ) Another problem is that running smart contracts on the official network requires real Ethereum. Running the node on the test network does not have this problem. At this time, there is no need to synchronize the entire blockchain. Just create your own private chain, which saves time for development.

Testrpc: Use geth to create a test network. Another faster way to create a test network is to use testrpc. Testrpc can help you create a bunch of test accounts with funds at startup. It also runs faster and is therefore better suited for development and testing. You can start with testrpc, and then as the contract slowly takes shape, move to the test network created by geth - the startup method is very simple, you only need to specify a networkid: geth --networkid "12345". Here is the code repository for testrpc, we will talk about it again below.

Next, let’s talk about the available programming languages, and then we can start the real programming. Solidity is the programming language used to write smart contracts.

There are several languages ​​to choose from for writing smart contracts: Solidity, which is somewhat similar to Javascript, has a file extension of .sol. Serpent, which is similar to Python, has a file name ending in .se. There is also a Lisp-like LLL. Serpent has been popular for a while, but now the most popular and stable one is Solidity, so just use Solidity. I heard you like Python? Use Solidity.

solc compiler: Use Solidity to write smart contractsAfter the appointment, you need to use solc to compile. It is a component from a C++ client implementation. Again, different implementations complement each other. Here is how to install it. If you don't want to install solc, you can also use a browser-based compiler, such as Solidity real-time compiler or Cosmo. The programming sections below will assume you have solc installed.

web3.js API. After the Solidity contract is compiled and sent to the network, you can use Ethereum's web3.js JavaScript API to call it and build web applications that can interact with it.

❻ How to introduce the blockchain in 3 minutes in a simple and easy-to-understand manner, and what its commercial value will be in the future

There is a real joke, an engineer from Ant Financial, he wrote I submitted a blind date resume, and the job description in it was "code farmer", but no one clicked it for a long time. Later, he changed his work experience to "blockchain" and received 381 love letters at once.


From workers in high-tech industries to square dancing aunties, it seems that everyone is participating in the blockchain carnival. So what exactly is the seemingly mysterious blockchain? After reading the following content, you will have completed the journey from beginner to beginner.


1. What is blockchain?


To put it bluntly, the blockchain is "everyone keeps accounts together." Any database needs a big housekeeper to be responsible for "accounting" (maintaining the system and entering data). But after using blockchain technology, the concept of this "central steward" disappears, and each of us can participate in accounting. So the question is, whose record will ultimately prevail? Of course, it is the person who completes the work well and quickly. A system that strictly adheres to fairness will select this person based on the algorithm, write the contents of his records into the ledger, and send the contents of the ledger during this period to everyone in the system. of others to perform backups.


2. What is so powerful about blockchain technology?


Any new thing must have unique advantages if it wants to develop rapidly, and the same is true for blockchain technology. First of all, blockchain technology ensures the security of the system. In the absence of a central steward, everyone is a defender of the home, which means that destroying some nodes has no impact on the system at all. Second, the recording process cannot be cheated. Everyone in the blockchain system has the same ledger, and the entire process is open and transparent. The system will refer to the majority opinion to determine the final result, and the individualIt is difficult for a person to hack into so many computers at the same time, and just modifying one's own results does not make any sense. Who would do such a thankless task? Third, and most importantly, the blockchain completely abandons the existence of "credit intermediaries". Credit intermediaries are the platforms we must pass through when transferring money, such as traditional banks. Now any two strangers can directly complete mutual trust transfers, and the efficiency has been improved not only a little!



3. What is the use of blockchain technology? ?


As mentioned above, the main advantages of blockchain are that it does not require intermediary participation, the process is efficient and transparent, the cost is very low, and the data is highly secure. That is to say, any industry that has needs in these three aspects can use blockchain technology. Here are a few examples:


In the banking industry, the use of blockchain technology is equivalent to updating a digital, secure and tamper-proof General ledger books. In fact, Swiss bank UBS and Barclays Bank in the UK have already begun experiments, hoping to use it as a way to accelerate back-end system functions and clearing and settlement capabilities. Some institutions in the banking industry claim that blockchain may reduce middleman costs by 20 billion.


In terms of car rental, blockchain also has great potential. A future customer selects the car they want to lease, entering it into the blockchain's public ledger; then, sitting in the driver's seat, the customer signs the lease agreement and insurance policy, while the blockchain updates the information simultaneously. This is a foreseeable future for car sales and car registrations.


In terms of medical and health care, blockchain technology allows hospitals, patients and all parties in the medical benefit chain to share data in the blockchain network, and Don’t worry about data security and integrity. This means more accurate diagnosis, more effective treatment, and an improvement in the health system’s overall ability to deliver cost-effective care.


Blockchain is not cold-blooded. It has been implemented in applications that are closely related to our lives. For example, the application of Ant blockchain ranges from public welfare, to mutual insurance, to traceability of product authenticity, to traceability of rental housing.


In 2018, blockchain will "return to the world."

Blockchain, do you really understand it? Since it says three minutes, let’s give a simple answer.

1. What is blockchain;

2. What are the benefits of blockchain;

3. What is the use of blockchain;

4. Blockchain technology and existing problems;

Let’s first look at the first question: What is blockchain? Blockchain

Let’s look at it literally. Blockchain is called Blockchain in English. This is a very good word. The English name is well chosen and the Chinese translation is also very beautiful.

1. What is a "block"?

You can think of it as a record, or anything, which forms such a record during the production stage. This thing can be any physical or virtual object in the Internet of Everything.

For example, if you generate a Bitcoin, which is a thing, it actually corresponds to a block. This block is a record of what it is.

When you produce a bottle of medicine in the future, a block is actually generated when this bottle of medicine is produced. When it leaves the factory, it needs to be recorded once, and this corresponds to it one-to-one.

This is the first dimension.

To make it easier to understand, for example, each of us is born with a unique identifier, which is our DNA. All species in the world have different DNA. Every individual's DNA is different.

Your parents can name you Zhang San, Li Si, Wang Wu. These names can be repeated, just like a bottle of medicine, whether it is aspirin or penicillin, these can also be repeated. famous. However, human DNA is different. Even if you have identical brothers and sisters, your DNA is different, so this is your unique identifier. And once your DNA is formed, it cannot be changed. This is a benefit of the blockchain.

2. What is a "chain"? The chain is actually a process. You can think of it as a transaction process. After this bottle of medicine leaves the factory, it enters the warehouse from the workshop and passes through a certain door, and it will record the process.

Of course, this requires automatic computer recording, and the cost of human recording is too high. Then, packing is a process, and transportation to the cargo transfer station is another process. Then it is loaded into a car and transported to the wholesale station, which is the next process.

Every step of the process is recorded. It is a process to go from the wholesale station to the store, it is another process for the people in the store to receive this batch of medicines and put them on the shelves, and it is still a process for you to buy them. Finally, when the whole process is connected, you will have a way to track the entire process of this bottle of medicine and know its authenticity, because once this bottle of medicine is produced, it will be bound to the blockchain, as well as to people and people. The same is true for DNA binding, which cannot be changed, but it can be seen and tested.

The doctor can also determine whether this person is you by testing DNA. So in terms of nature, if we virtualize it, it is actually a smart contract. You sign with one of your clientsA buying and selling relationship has been established. Once this happens, it cannot be changed. Next, everyone can only implement it. This implementation process is the same as the tracking of drugs I just talked about.

Second question: What are the benefits of blockchain?

1. Mathematically speaking, it is very beautiful. It changes from the past that you had to own something before you could know its properties to that you don’t own it, but you can ask questions Learned many details about it.

Mathematically speaking, this is a perfect asymmetric situation. You can tell whether it's true or false, but you can't change it.

2. Theoretically speaking, blockchain is very safe. For example, if you participate in the process of a bottle of medicine, others cannot see this information. That is to say When you buy this bottle of medicine, you can know where it comes from, but others cannot.

For the same reason, for example, if we sign a contract, others can verify the contract. If you go to a bank for a loan, he can ask you the amount.

However, he cannot obtain this contract, and he cannot steal this contract from your computer.

Blockchain also has some very interesting properties. For example, a block chain can be divided into two at will, or several can be combined into one, etc.

3. Blockchain is transparent, which means that everyone abides by this algorithm and there is no special agreement in private. So, if you believe in this algorithm, it means you believe in me and believe that I didn't do anything fishy. I will not secretly do anything in the contract to make you suffer losses.

This is a beautiful place theoretically and mathematically.

In the third block, let’s take a look at the uses of blockchain

1. Bitcoin is a cryptocurrency, and the Ethereum currency that everyone uses now is also a cryptocurrency. Of course, you can make another one based on it, either Zhang three coins or Li four coins. As for whether it can replace the currency of the future, this is doubtful.

2. Financing, we used to divide financing into three stages: the first stage is to get a loan from the bank. If you want to open a restaurant, you need to mortgage something. The second stage is that you issue some stocks and I sell 10% of the stocks, so that I can obtain part of the funds.

The third stage is actually crowdfunding. For example, if I want to write a book, it may cost 50,000 yuan for the publishing house to publish it. If any of you can give me 50 yuan at the beginning, I will use it in the future. Once the book is written, give everyone a copy. You will get the book, and of course I will publish it. But there is a problem. For example, I sell this book for 100 yuan and you get it for 50 yuan. What if my book sells very well, assuming I sell 100,000 copies, but you don’t seem to benefit from me? what to do?

Is there a fairer one?A way to measure each person's contribution? One way is to issue a cryptocurrency (ICO). When the business we do becomes bigger in the future, you can benefit from it.

3. Smart contract, for example, sign a contract. In the future, the smart contract can become like this. All the nodes in the middle are determined when the contract is signed, such as building or decorating a house for you. , your payment must be given to me at any stage of the decoration. If you accept it, no problem, the payment will be automatically given to me.

You can even sign with my supplier, which means that as soon as my money arrives in my account, I will give it to my supplier immediately. This will eliminate many triangular debt problems in the future, including the problem of arrears to migrant workers.

Blockchain can also be used for property registration, car registration, etc. Of course, another great use is gambling. In fact, gambling is the most willing to adopt new technologies because it is closely related to money.

After talking about the benefits of blockchain, let’s take a look at the technology and existing problems of blockchain.

Today’s blockchain is basically the second generation and the first generation. It is the Bitcoin generation. It has many problems. It is not a platform, but is actually a specific application.

The second generation is represented by Ethereum. It is a platform on which you can issue your own coins, and it removes the concept of mining machines, so its transaction costs will be much lower. . The reason why ICOs are everywhere today is because with Ethereum, you can issue coins. Unlike in the past with Bitcoin, you had to completely copy its formula and copy it again. Today you are on Ethereum. , it is easy to issue your own currency, just like you can easily make your App on the Android operating system today.

There are three problems with Bitcoin transactions

1. The transaction delay is very long. I asked people who specialize in Bitcoin transactions and the delivery time ranges from two hours to two hours. Days wait, so it is very inconvenient for you to use it to launder money. After the RMB is converted into US dollars, it may fall by 20% in two days, and you will lose 20% of your money.

2. It cannot be distributed. Like Bitcoin, the early people took away a lot of its shares, so how to distribute it in the future is also a problem. No one knows clearly, so it is difficult to use it as a currency. a currency. Because if it really becomes a currency that everyone uses, it will be equivalent to the first few people taking away a large part of the world's property.

3. Transaction costs are high. For example, a cup of coffee at Starbucks in the United States costs $2.50 on average. You usually pay money at the counter, and the transaction time is only one minute. If you want to use Bitcoin, you have to wait two hours before you can get your coffee, and the transaction costs are extremely high, the electricity bill alone is $20. In other words, if you pay $2.50 for coffee, the transaction cost of electricity is $20, so thisThis thing is unrealistic.

Blockchain has high risks. This risk is not only a technical risk, but also a policy risk. In fact, this is also an opportunity. Whoever solves this problem will get the opportunity. Its transaction costs are also very high, so whoever can develop new underlying technologies and reduce this transaction cost will make a lot of profits in the future.

Some people say it is the next generation of the Internet. I don’t agree with this, but it will definitely be a supplement to the Internet. Some people say whether it can subvert the central bank, but this is not certain, because there is no reason why the central bank or these big banks cannot do this themselves, so those who expect it to subvert the central bank may be too happy too early.

Perhaps in the end it was these large financial institutions in the past that used the blockchain to update themselves.

Talk in the vernacular and get useful information!

Literally, blockchain is blocks and chains, and some relationship between them. It is essentially a distributed accounting method and a network database system that cannot be tampered with.

The current development directions include digital currency, payment, smart contracts, defi finance, web3 and so on. It is still in the initial stage of development and is a back-end technology. Most projects are still speculating and financing.

Today’s Afghanistan may best prove the value of Bitcoin, and there is no problem with value storage

Blockchain is not just a technology, it is a way of trust transfer, value The way it is delivered may have huge potential in the future.

Keywords: block, chain, database, ledger, Afghanistan, currency speculation, value, technology, market

First, what is a blockchain? Blocks and chains are an accounting method and a form of network data storage.

Literally speaking, blockchain refers to blocks and chains. This block actually records the transaction records of the entire network, or the execution result data of smart contracts, etc.

Every once in a while, the entire network will produce a block. This block records all transfer data, and the blocks need to be connected by some kind of "chain".

This chain is an encryption algorithm. Some information of the previous block is used to calculate and obtain certain information of the next block. They are linked together. The latter block can trace back to the previous block and needs to be modified. The next block must modify the previous block, all the way to the first block. Regarding the details of these issues, I have written many articles before. If you are interested, you can go back and take a look.

Blockchain is actually an accounting method, or a database storage method. Please pay attention to what I say below. The whole process is the operating mechanism of blockchain.

Each node in the entire network has the same status and runs the same program. This program is used to collect all transaction records and data records that occurred on the entire network within a period of time.Encapsulation and packaging. Then broadcast it to the entire network

Let’s take Bitcoin as an example. Once this packaging and encapsulation is completed, you can obtain the right to produce the block. A certain amount of Bitcoin can be issued every time a block is produced. Since the nodes in the entire network run the same program, there is no center to control everyone. Therefore, the currency issued is irrevocable and cannot be changed.

How to decide who has the right to make a block? This requires the use of the so-called consensus mechanism, which is to establish a rule and use who produces the block as the benchmark to solve the problem of network consistency. The mainstream consensus mechanisms include POW mechanism and POS mechanism. Proof of work and proof of stake. Proof of work, who does more work, and proof of equity, who stakes more assets

Pow means that everyone calculates a difficult mathematical problem together, whoever calculates it Whoever comes out has the right to produce the block. Pos means that everyone takes out their family assets as mortgage, and whoever mortgages more. It is possible to be selected as a block producing node.

The essence of this approach is that you have to pay a certain price and receive a certificate of investment, which essentially builds a kind of trust.

When all these tasks are completed, a block can be produced, and the block will be connected to the previous block one by one. This is the entire block sequence. Note that the entire blockchain world will produce many blocks, connected to one chain after another, but everyone will only recognize the longest chain, and short chains will be discarded.

To put it simply, each network node uses a program to package transactions within a period of time, and then connects the transaction blocks one after another and saves them in each node, but an encryption algorithm will be used in the process. Ensure that node information is not leaked, ensure that user information is encrypted, and ensure that the information in the block is not hacked or tampered with.


Second, the block The current development of the chain, various projects and significance, at this stage are more about currency speculation, and there is no problem with value storage.

Blockchain has been developing for twelve or three years since the Bitcoin white paper in 2008. It has also experienced various evolutions and developments.

For example, now it has gone from being able to issue currency in a distributed way to now having huge functional expansion. The landmark event is the birth of the Ethereum smart contract.

I have explained many times that a smart contract is an automated contract signed by two or three parties. It will be automatically executed as long as the conditions are met. It is essentially a program with infinite possibilities and the judge in the blockchain world. Various functions can be input into the program, and the program exists. Blockchain has become rich and colorful.

The current blockchain applications mainly include the following aspects, smart contracts, payments, cross-chain assets, oracles, defi, web3 storage, etc. I will briefly mention them.Let’s talk about its commercial applications with two examples.

For example, defi applications are quite popular on Ethereum now. Defi is decentralized finance. Abbreviation for decentralized finance.

What does it probably mean? It is to move all financial-related businesses in real life, such as mortgages, insurances, and loans, onto the blockchain.

This field is very popular now, and the reason is simple. It is very suitable for blockchain. As I said, a smart contract on the blockchain is a contract. If the contract conditions are met, execution can be automatically triggered.

In the past, it might have been very troublesome for you to go to the bank to apply for a loan. You had to sign various signatures and verify them, and the bank might not be open on weekends and nights

But with blockchain The network operates 24 hours a day. If you want to run various assets on it and do various mortgage transactions, you only need to click and there is a software terminal.

Of course, the real assets will be frozen in the process and mapped to virtual assets. After the transaction is completed, they will be exchanged for real assets. Cross-chain technology and oracle technology may also be used in this process, which I have written in detail in other articles.

It roughly means cutting off banks through decentralization, and direct point-to-point transactions. The security of transactions is guaranteed by blockchain technology, code and cryptography.

There is also the current web3 storage class. For example, the leading project fil. His vision is to take out all the scattered hard drives. Break all the data and information that need to be stored on the network into small pieces

and then distribute them to the entire network. When we want to use network data in the future, we no longer need large network database or server. In this way, Internet giants cannot charge high service fees. There is no way to maintain a monopoly.

If you want to obtain stored information, just take a taxi online like dd. You pay for a taxi, so that information on the Internet can flow freely. Costs will drop significantly.

Of course, these visions are grand and huge, and the current blockchain development is still in its early stages. There are still some technical difficulties to be overcome and some underlying systems to be established, but there is no problem in this direction.

The original digital asset projects like Bitcoin have now been proven to be very safe. Just like this situation in Afghanistan, the first thing that comes to my mind is Bitcoin. He is the first violent and unplunderable asset.

Your house may be occupied and blown up, and your gold may be robbed. And if you have Bitcoin, it's much easier. He can't snatch this thing away, because the mnemonic phrase and private key are in your mind, and he doesn't even know whether you have this thing in your mind. If you want to pass it on to your child, just ask him to memorize the key and mnemonic phrase.

It is precisely because we are now in a stage of financing and bubbles that all the news you see on the Internet is still speculation.

Also, this thing is a back-end technology. For example, Guangdong Province already has blockchain invoices. For example, there are already some blockchain apps for judicial certification, but for the front-end For you, you can't feel it. There is an extra string of hash codes on the invoice, can you tell the difference?

This is why when it comes to blockchain now, everyone is speculating on coins, but in fact it has certain applications and future technical logic.

Third, it is essentially a mechanism of trust, a method of value transmission, and an exploration of social governance methods.

What is the essential value of blockchain? The most important thing is that it is a way of credit transfer. Because there is enough credit, real-life assets and property values ​​can be spread on the Internet in the form of information codes.

Mainly in these aspects.

First, before Bitcoin, people did not know how to protect a piece of information, because information on the Internet can actually be copied. Bitcoin solves the problem of uniqueness of information assets. With scarcity, there is value in transactions and storage.

The second is decentralization and disintermediation. We used to do everything. All require some kind of intermediary. For example, when you borrow money, a bank acts as an intermediary, and when you buy a house, various institutions and real estate agencies act as intermediaries.

You cannot buy or sell directly. Because you don't have enough credit. We usually come to find a third party, but the third party is usually made up of people and may also do evil.

For example, the master who could whip five lightning whips a while ago. If he calls you all kinds of names at the beginning, you may be frightened. You won't know he is a liar until he is punched and lying straight there. This is human credit, which is unreliable

Blockchain ensures credit through code, cryptography, and consensus mechanisms. We no longer need a powerful third party. Note that this third party will often become a monopoly boss.

The third is to reduce the cost of coordination, communication and entry barriers.

If we want to become richer, we need to trade in the market. Transactions require coordination and division of labor. Essentially, the companies and organizations we work for are intermediaries.

You have to integrate your resources through this kind of intermediary, transform your labor force, your brainpower, and your ingenuity into final products and sell them on the market.

The smart contract technology of blockchain technology can break up these contracts in a decentralized manner. People in the market can combine freely to establish a new type of organization that is completely transparent and cannot tamper with the rules, which is a blockchain autonomous organization. The future of this kind of organization could beIt may be more promising than ordinary joint-stock companies.

You can join or quit an organization at will, and the trust between you and others has been resolved. You can cooperate with others and sign smart contracts to complete joint collaboration and complete a certain product. We no longer have to worry about some big capitalist taking advantage of everyone and getting the bulk of the profits.

So the Bitcoin blockchain is essentially a big social experiment, through the consensus mechanism, the decentralized decision-making method, and the distributed signing of smart contracts. Gradually and completely change the original appearance of our society. Restore the original ideal of market economy, peer-to-peer, direct transactions between people.

To summarize. Blockchain is a block of information connected together through an encryption algorithm. It is essentially an accounting method and a network data structure

Through decentralization, you can do finance, storage, and decentralize many things, but now it is still very In the initial stage, most projects are still in the stage of speculation, financing and concept development.

The value storage capability of the blockchain has been proven to be problem-free, very safe, and cannot be plundered by violence.

The essence of blockchain solves the problem of credit intermediary, and at the same time can reduce the cost for people to work together, lower the threshold for enterprise entry, improve social efficiency, make social transactions larger, and allow We are richer.

I recommend the book linked below, it is easy to understand. Like You Pump tells the history of the birth of blockchain, the underlying technical logic of blockchain, and some mainstream projects. Learn some knowledge about blockchain, feel more at ease, and no longer worry about whether it is a scam.

❼ Tutorials for getting started with blockchain


However, there are very few simple and easy-to-understand introductory articles. What exactly blockchain is and what makes it special is rarely explained.
Next, I will try to write a best-understood blockchain tutorial. After all, it is not difficult. The core concept is very simple and can be explained clearly in a few sentences. I hope that after reading this article, you will not only understand the blockchain, but also understand what mining is, why mining is getting more and more difficult, and other issues.
It should be noted that I am not an expert in this area. Although I have been paying attention to it for a long time, my detailed understanding of blockchain started at the beginning of this year. You are welcome to correct any errors or inaccuracies in the article.
1. The essence of blockchain
What is blockchain? In a word, it is a special distributed database.
First of all, the main function of blockchain is to store information. Any information that needs to be saved can be written to the blockchain and read from it, so it is a database.
Secondly, anyone can set up a server, join the blockchain network, and become a node. In the world of blockchain, there is no central node. Each nodeAll points are equal and save the entire database. You can write/read data to any node, because all nodes will eventually be synchronized to ensure that the blockchain is consistent.
2. The biggest features of blockchain
Distributed databases are not a new invention, and there have been such products on the market for a long time. However, blockchain has a revolutionary feature.
Blockchain has no administrator, it is completely centerless. Other databases have administrators, but blockchain does not. If one wanted to add auditing to the blockchain, it would not be possible because it is designed to prevent the emergence of a central authority.
It is precisely because it is unmanageable that blockchain can be uncontrollable. Otherwise, once big companies and large groups control the management, they will control the entire platform, and other users will have to take orders from them.
However, without an administrator, everyone can write data into it. How can we ensure that the data is trustworthy? What if it is modified by a bad person? Please read on, this is the wonderful thing about blockchain place.
3. Block
Blockchain is composed of blocks. Blocks are much like database records. Every time data is written, a block is created.
Each block contains two parts.
Head: records the characteristic values ​​of the current block
Body: actual data
The block header contains multiple characteristic values ​​of the current block.
Generation time
Hash of the actual data (i.e. block body)
Hash of the previous block
...
Here, you need to understand what a hash is , which is necessary to understand blockchain.
The so-called hashing means that the computer can calculate a characteristic value of the same length for any content. The hash length of the blockchain is 256 bits, which means that no matter what the original content is, a 256-bit binary number will be calculated in the end. And it can be guaranteed that as long as the original content is different, the corresponding hash must be different.
For example, the hash of the string 123 is (hexadecimal), which is 256 bits when converted to binary, and only 123 can get this hash. (Theoretically, it is possible for other strings to get this hash, but the probability is extremely low and can be approximated as impossible.)
Therefore, there are two important inferences.
Corollary 1: The hash of each block is different, and the block can be identified by the hash.
Corollary 2: If the content of the block changes, its hash will definitely change.
4. The non-modifiable nature of Hash
Blocks and hashes have a one-to-one correspondence, and the hash of each block is calculated based on the block header (Head). That is to say, the characteristic values ​​​​of the block header are connected together in order to form a very long string, and then the hash is calculated on this string.
Hash = SHA256 (block header)
The above is the calculation formula of block hash, SHA256 is the blockchainhash algorithm. Note that this formula only contains the block header and not the block body. In other words, the hash is uniquely determined by the block header.
As mentioned before, the block header contains a lot of content, including the hash of the current block body. , and the hash of the previous block. This means that if the content of the current block body changes, or the hash of the previous block changes, it will definitely cause the hash of the current block to change.
This point has great significance for blockchain. If someone modifies a block, the hash of the block changes. In order for subsequent blocks to still be connected to it (because the next block contains the hash of the previous block), the person must modify all subsequent blocks in sequence, otherwise the modified block will be removed from the blockchain . Due to the reasons mentioned later, hash calculation is very time-consuming, and it is almost impossible to modify multiple blocks in a short period of time, unless someone controls more than 51% of the computing power of the entire network.
It is through this linkage mechanism that the blockchain ensures its own reliability. Once the data is written, it cannot be tampered with. This is just like history, what happened happened, and it can’t be changed from now on.
Each block is connected to the previous block, which is where the name blockchain comes from.
5. Mining
Since synchronization between nodes must be ensured, the adding speed of new blocks cannot be too fast. Just imagine, you have just synchronized a block and are preparing to generate the next block based on it, but at this time, another node generates a new block, and you have to give up half of the calculations and synchronize again. Because each block can only be followed by one block, you can only generate the next block after the latest block. So, you have no choice but to sync as soon as you hear the signal.
So, the inventor of the blockchain, Satoshi Nakamoto (this is a pseudonym, his true identity is still unknown), deliberately made it difficult to add new blocks. His design is that on average, the entire network can generate a new block every 10 minutes, which is only six per hour.
This output speed is not achieved through commands, but by deliberately setting up massive calculations. In other words, only through an extremely large amount of calculations can the effective hash of the current block be obtained and the new block added to the blockchain. Because the amount of calculation is too large, it cannot be done quickly.
This process is called mining, because the difficulty of calculating a valid hash is like finding a grain of sand that meets the conditions among the sand in the world. The machine that calculates hashes is called a mining machine, and the person who operates the mining machine is called a miner.
6. Difficulty coefficient
After reading this, you may have a question. People say that mining is difficult, but isn’t mining just about using a computer to calculate a hash? This is the strength of computers. How could it be? It becomes very difficult, why can’t it be calculated?
It turns out that not just any hash can be used, only hashes that meet the conditions will be accepted by the blockchain. This condition is particularly harsh, causing most hashes to fail to meet the requirements and must be recalculated.
It turns out that the block header contains a difficulty coefficient (difficulty), this value determines the difficulty of calculating the hash. For example, the difficulty coefficient of the 100,000th block is 14484.16236122.
The blockchain protocol stipulates that the target value (target) can be obtained by dividing the difficulty coefficient by a constant. Obviously, the greater the difficulty coefficient, the smaller the target value.
The validity of the hash is closely related to the target value. Only hashes smaller than the target value are valid, otherwise the hash is invalid and must be recalculated. Since the target value is very small, the chance that the hash is smaller than this value is extremely slim. It may be calculated 1 billion times before it is considered a hit. This is the fundamental reason why mining is so slow.
As mentioned earlier, the hash of the current block is uniquely determined by the block header. If the hash of the same block needs to be calculated repeatedly, it means that the block header must keep changing, otherwise it is impossible to calculate different hashes. All feature values ​​in the block header are fixed. In order to make the block header change, Satoshi Nakamoto deliberately added a random item called Nonce.
Nonce is a random value. The role of the miner is actually to guess the value of Nonce so that the hash of the block header can be smaller than the target value so that it can be written to the blockchain. Nonce is very difficult to guess. At present, we can only use trial and error one by one through exhaustive methods. According to the protocol, Nonce is a 32-bit binary value, which can reach a maximum of 2.147 billion. The Nonce value of the 100,000th block is 274148111. It can be understood that the miner started from 0 and calculated 274 million times before obtaining a valid Nonce value so that the calculated hash can meet the conditions.
If you are lucky, you may find Nonce in a while. If you are unlucky, you may have calculated it 2.147 billion times without finding the Nonce, that is, it is impossible to calculate a hash that meets the conditions for the current block body. At this time, the protocol allows miners to change the block body and start a new calculation.
7. Dynamic adjustment of difficulty coefficient
As mentioned in the previous section, mining is random, and there is no guarantee that a block will be produced in exactly ten minutes. Sometimes it can be calculated in one minute, and sometimes it may take several hours. No result. Overall, with the improvement of hardware equipment and the increase in the number of mining machines, the computing speed will definitely become faster and faster.
In order to keep the output rate constant at ten minutes, Satoshi Nakamoto also designed a dynamic adjustment mechanism for the difficulty coefficient. He stipulated that the difficulty factor should be adjusted every two weeks (2016 blocks). If the average block generation speed in these two weeks is 9 minutes, it means that it is 10% faster than the legal speed, so the next difficulty factor will be increased by 10%; if the average block generation speed is 11 minutes, it means It is 10% slower than the legal speed, so the difficulty factor of the next step must be lowered by 10%.
The difficulty coefficient is adjusted higher and higher (the target value is getting smaller and smaller), which makes mining more and more difficult.
8. Forks of Blockchain
Even if the blockchain is reliable, there is still an unresolved problem: ifTwo people write data to the blockchain at the same time, that is to say, two blocks are added at the same time, because they are both connected to the previous block, forming a fork. Which block should be adopted at this time?
The current rule is that new nodes always adopt the longest blockchain. If there is a fork in the blockchain, it will look at which branch is behind the fork to reach 6 new blocks first (called six confirmations). Based on a block calculation of 10 minutes, it can be confirmed in one hour.
Since the generation speed of new blocks is determined by computing power, this rule means that the branch with the most computing power is the authentic blockchain.
9. Summary
Blockchain, as an unmanaged distributed database, has been running for 8 years since 2009 without major problems. This proves it works.
However, in order to ensure the reliability of data, blockchain also has its own price. The first is efficiency. You have to wait at least ten minutes to write data to the blockchain. All nodes synchronize the data, which requires more time. The second is energy consumption. The generation of blocks requires miners to perform countless meaningless calculations. This is Very energy consuming.
Therefore, the applicable scenarios of blockchain are actually very limited.
There is no management authority that all members trust
The written data does not require real-time use
The benefits of mining can make up for its own costs
If the above conditions cannot be met, then the traditional database is Better solution.
Currently, the largest application scenario (and possibly the only application scenario) of blockchain is the cryptocurrency represented by Bitcoin.

❽ What is blockchain and where can you learn it

Definition of blockchain

In a narrow sense, blockchain is a A chained data structure that sequentially connects data blocks, and is cryptographically guaranteed to be an untamperable and unforgeable distributed ledger.

Broadly speaking, blockchain technology uses block chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, and uses cryptography to ensure Security of data transmission and access, a new distributed infrastructure and computing method that uses smart contracts composed of automated script codes to program and operate data.

There are many channels to learn about blockchain

① You can buy some blockchain-related books and learn some blockchain-related knowledge in your spare time. I can also take notes and look up relevant information

②Watch some blockchain videos on the Internet. The content is easy to understand and comes with relevant examples, which is also very good. a way of learning.

③You can participate in some offline blockchain learning and exchange meetings, or participate in some training courses, and teachers will specifically answer your questions.

To sum up

All roads lead to Rome, and there are many channels for learning blockchain.The one that suits you is the best

❾ How does the blockchain work?

What kind of technology is the recently popular blockchain technology? Blockchain technology is considered to be the brightest star in financial technology, and it may continue to develop in the future. It has many characteristics, including the distribution of data and the trust of data. Degree and collective consensus mechanism, the most important ones are openness, transparency, anonymity and privacy, which are very distinctive features. Based on the data in these blockchains, we can derive some basic information about contemporary society.

Blockchain technology is such a secure and scientific database. It can be simply understood as an authoritative database. The basic contents in it are all true and have been verified and reviewed by others. In terms of financial technology, it will be very easy to find some desired data, which is very good for people doing business.

博客主人唯心底涂
男,单身,无聊上班族,闲着没事喜欢研究股票,无时无刻分享股票入门基础知识,资深技术宅。
  • 38590 文章总数
  • 3637394访问次数
  • 3087建站天数