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

分布式数据库 区块链,分布式数据库与区块链

发布时间:2023-12-21-10:57:00 来源:网络 区块链知识 区块   分布式   数据库

分布式数据库 区块链,分布式数据库与区块链

近年来,分布式数据库和区块链技术受到了越来越多的关注,它们有助于改善数据存储和计算的效率,并且可以有效地保护数据的安全。本文将介绍三个与分布式数据库和区块链技术相关的关键词:分布式账本、分布式计算和智能合约。

分布式账本是一种基于区块链技术的分布式数据库,它可以记录所有参与者之间的交易,并且可以在全网中实现实时同步。分布式账本的优势在于,它可以提供安全可靠的数据存储,同时可以支持多方共享,使用户可以访问和更新数据。此外,分布式账本还可以提供完善的审计功能,可以帮助用户更好地理解和控制数据。

分布式计算是一种分布式系统,它可以将计算任务分解成多个独立的任务,并将其分发到不同的计算节点上运行。分布式计算的优势在于,它可以有效地提高计算效率,同时可以支持大规模的数据处理。此外,分布式计算还可以提供容错性,可以帮助用户更好地处理突发事件。

智能合约是一种基于区块链技术的自动执行程序,它可以在网络中自动执行特定的交易,从而实现自动化的交易处理。智能合约的优势在于,它可以实现自动化的交易处理,可以有效地提高交易效率,同时可以提供可信的交易环境。此外,智能合约还可以提供安全性,可以有效地保护用户的数据安全。

以上就是关于分布式数据库和区块链技术的三个关键词:分布式账本、分布式计算和智能合约的介绍。它们都具有良好的安全性和可靠性,可以有效地提高数据存储和计算的效率,并且可以有效地保护数据的安全。


请查看相关英文文档

㈠ Tutorial 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. Every node is equal and stores 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 the administrator, everyone can write data into it. How can we ensure that the data is trustworthy? What should I do if it is modified by bad people? 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 regardless of the originalWhatever the initial 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 hash algorithm of the blockchain. 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, and 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), which 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, and 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 2.147 billion times without finding the Nonce, which is the current area.It is impossible for the block to calculate a hash that satisfies the condition. 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 the blockchain
Even if the blockchain is reliable, there is still an unresolved problem: if two people write data to the blockchain at the same time, that is to say, two people write data to the blockchain at the same time. Blocks join because they are 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.

㈡ Analysis of the relationship between distribution and blockchain

We have talked about the discussion of blockchain technology many times in previous articles. , and also introduced to you which programming development languages ​​​​to use to achieveRegarding the realization of blockchain insight chain technology, today we will take a look at how to analyze and understand the structure of the blockchain from a distributed perspective.

Blockchain is the underlying technology in Bitcoin and is used to implement a centerless peer-to-peer cash system. Because there is no central organization involved, Bitcoin uses blocks Organize transaction data in the form of a chain to prevent "double spending" and reach transaction consensus.

Digital assets in the traditional sense, such as game currency, are managed in a centralized manner and can only be transferred in a single system, coordinated by a centralized organization. , usually stored in a database. From a macro perspective, blockchain and database are both used to store data, but the form of data access is different.

The blockchain is essentially a distributed database that is active in different places. The idea of ​​multi-activity in different places was originally to solve the disaster recovery problem of the system. It has been a direction explored in the field of distributed databases for many years, but with little success because multi-activity in different places needs to solve the problem of data conflicts. This problem is actually Not easy to solve. However, the blockchain born in Bitcoin has realized the world's largest remote multi-active database in a completely new way. It is completely open, has no boundaries, supports tens of thousands of nodes and can join and exit at random.

The problem of data conflicts is even more prominent in the blockchain. Each node in the blockchain is a completely peer-to-peer multi-active architecture, and tens of thousands of nodes must reach an agreement. , who should the data be based on? The method used by Bitcoin is POW. Everyone calculates a puzzle. Whoever calculates it first will have the right to keep accounts. In this cycle, the account he keeps shall prevail in the next cycle. Everyone recalculates. Nodes competing for accounting rights decide which Quanlu transactions are packaged into blocks and synchronize the blocks to other nodes. Other nodes still need to verify the transactions in the block based on local data, unlike the master-slave nodes of the database. This is the consensus algorithm in the blockchain. Although POW consumes a lot of computing power, the advantage is that in the process of competing for accounting rights, POW only needs to calculate hashes in its own nodes and does not need to go through network voting for election. The cost of network communication is small, and it is suitable for consensus among large-scale nodes. Shahe Computer Training believes that POW is a complete, simple and crude method in the current public chain and can stand the test, but the problem is that the efficiency is too low.

So PoS and DPoS were developed later. Whoever has more assets will have the right to bookkeeping, or everyone will vote, but this also introduces economic problems. For example, the so-called vote-buying issue is difficult to control. In traditional distributed databases, it is not called a consensus algorithm, but a consistency algorithm, which is essentially the same thing. However, the number of nodes in a distributed database is generally very small, and the network is trustworthy. Usually the nodes are safe and reliable. We can basically trust every node. Even if it fails and does not respond, it will never respond. False response. Therefore, in traditional company distributed data, allUse Raft or Paxos protocol to do this consensus algorithm.

㈢What are the basic data foundations required for the operation of the blockchain?

Blockchain technology must rely on some specific basic conditions. These basic conditions It mainly includes five aspects: distributed storage capability, retrieval function, computing capability, container and network.
The blockchain system should meet the following distributed storage requirements: Distributed storage requires data to have a certain fault tolerance rate when synchronized across all nodes in the network, and the failure of some node ledgers should have no impact on the entire network; Distributed The ledger should have unified control over write permissions, and unauthorized nodes are not allowed to write to the ledger; the database used in the distributed ledger should support multiple relational and non-relational databases, and each node should support the use of different database technologies.

㈣Applications of blockchain

The main application scope of blockchain includes: digital currency, transaction settlement of financial assets, digital government affairs, certificate deposit and anti-counterfeiting data services and other fields. Blockchain is a database technology that links data blocks in an orderly manner. Each block is responsible for recording a file data and encrypting it to ensure that the data cannot be modified or forged.

Blockchain is essentially a distributed database system that uses cryptography technology for multi-party participation, joint maintenance, and continuous growth. It is also called a distributed shared ledger. Each page in the shared ledger is a block, and each block is filled with transaction records. The anonymity, decentralization, openness, transparency, and non-tamperability of blockchain technology make it highly favored by enterprises and has gained More extensive application attempts.

Blockchain application scope 1. Financial field

Blockchain can provide a trust mechanism and has the potential to change the financial infrastructure. Various financial assets such as equity, bonds, bills, warehouse receipts, fund shares, etc. It can be integrated into the blockchain technology system and become a digital asset on the chain, which can be stored, transferred and traded on the blockchain.

The decentralization of blockchain technology can reduce transaction costs and make financial transactions more convenient, intuitive and secure. The combination of blockchain technology and the financial industry will inevitably create more and more business models, service scenarios, business processes and financial products, thereby bringing more impact to the development of financial markets, financial institutions, financial services and financial formats. . With the improvement of blockchain technology and the combination of blockchain technology with other financial technologies, blockchain technology will gradually adapt to the application of large-scale financial scenarios.

2. Public service field

Traditional public services rely on limited data dimensions, and the information obtained may not be comprehensive enough and have a certain lag. The non-tamperable nature of the blockchain makes the digital certification on the chain highly credible. It can be used to establish new authentication mechanisms in the fields of property rights, notarization and public welfare, and improve the management level of public services.

Relevant information in the public welfare process, such as donation projects, fundraising details, fund flows, recipient feedback, etc., can be stored on the blockchain to meet the privacy protection and other related requirements of project participants.Subject to the requirements of relevant laws and regulations, public disclosure will be made conditionally to facilitate public and social supervision.

3. Information security field

Using the traceability and non-tampering characteristics of blockchain, we can ensure the authenticity of data sources and ensure the non-forgery of data. Blockchain technology will fundamentally change information Security issues of the propagation path.

Blockchain is reflected in the following three points in the field of information security:

User identity authentication protects data integrity and effectively prevents DDoS attacks

The distributed storage architecture of blockchain will make Hackers are at a loss as to what to do. Some companies have begun to develop a distributed Internet domain name system based on blockchain to eliminate the root cause of the current DNS registration shortcomings and make the network system cleaner and more transparent.

4. Internet of Things field

Blockchain + Internet of Things can allow each device on the Internet of Things to operate independently, and the information generated by the entire network can be protected through smart contracts in the blockchain.

Security: Traditional IoT devices are highly vulnerable to attacks, data loss and maintenance costs are high. Typical information security risk issues for IoT devices include low firmware versions, lack of security patches, permission loopholes, too many device network ports, and unencrypted information transmission. The blockchain's consensus mechanism for network-wide node verification, asymmetric encryption technology and distributed data storage will significantly reduce the risk of hacker attacks.

Trustability: The traditional Internet of Things is managed and controlled by a centralized cloud server. Due to the security of the device and the opacity of the centralized server, it is difficult to effectively protect user privacy data. The blockchain is a distributed account book. Each block is interconnected and has its own independent working ability, ensuring that the information on the chain will not be tampered with at will. Distributed ledgers can therefore provide trust, ownership records, transparency and communication support for the Internet of Things.

Effectiveness: Limited by cloud services and maintenance costs, the Internet of Things is difficult to achieve large-scale commercial use. The traditional Internet of Things realizes communication between things through centralized cloud servers. The disadvantage of this model is that as the number of access devices increases, the server faces more load, requiring enterprises to invest a lot of money to maintain the normal operation of the IoT system.

Blockchain technology can directly realize point-to-point transactions, omitting the labor expenditure of other intermediaries or personnel, which can effectively reduce the costs incurred by third-party services and maximize benefits.

5. Supply chain field

The supply chain consists of many participating entities, with a large amount of interaction and collaboration. Information is discretely stored in their own systems, lacking transparency. The lack of smooth information makes it difficult for various participating entities to accurately understand the real-time status and existing problems of related matters, affecting the collaborative efficiency of the supply chain. When disputes arise between parties, it is time-consuming and laborious to provide evidence and pursue accountability.

Blockchain can make data open and transparent among various entities, thereby forming a complete, smooth, and non-tamperable information flow throughout the entire supply chain. This can ensure that all entities promptly discover problems arising during the operation of the supply chain system and address them in a targeted manner.Find solutions to improve the overall efficiency of supply chain management.

6. Automotive Industry

Last year announced a partnership using blockchain to build a proof of concept to streamline the car rental process and build it into a “click, sign up, and drive” process. Future customers choose what they want The rented car enters the public ledger of the blockchain; then, sitting in the driver's seat, the customer signs the rental agreement and insurance policy, and the blockchain updates the information simultaneously. This is not an imagination, for car sales and car registration Said, this type of process may also develop into reality.

7. Stock Trading

For many years, many companies have worked to make the process of buying, selling, and trading stocks easy. Emerging Blockchain Chain startups believe that blockchain technology can make this process more secure and automated than any previous solution. At the same time, blockchain startup Chain is working with Nasdaq to enable private companies through blockchain. Equity transfer

8. Government management

Government information, project bidding and other information are open and transparent. Government work is usually subject to public attention and supervision. Since blockchain technology can ensure the transparency and immutability of information, it is very important to the government. The implementation of transparent management plays a great role. There is a certain degree of information opacity in government project bidding, and enterprises also have the risk of information leakage during the sealed bidding process. Blockchain can ensure that bidding information cannot be tampered with and can ensure the transparency of information nature, forming a common trust between competitors who do not trust each other. It can also arrange subsequent smart contracts through the blockchain to ensure the construction progress of the project and prevent the growth of corruption to a certain extent.

There are many more applications of blockchain technology. This is just a fulcrum of blockchain applications. In the future, blockchain technology will be applied everywhere

㈤ The essence of blockchain technology is What is the essence of blockchain technology

1. The essence of blockchain technology is a special distributed database.

2. First of all , the main function of the blockchain is to store user information. Any information that needs to be saved can be written to the blockchain or read from it, so it is a database.

< p> 3. 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. Every node is equal and saves 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.

㈥ What are the differences between distributed databases and blockchains

< p>Blockchain is a shared distributed database technology. Although the one-sentence introduction to blockchain is worded differently in different reports, the following four technical features are consistent.
1 . Decentralized: The left side of Figure 1 depicts the center of today’s financial system.Centralization characteristics, what is described on the right is the decentralized financial system that is being formed, which has no intermediaries, and the rights and obligations of all nodes are equal. If any node stops working, it will not affect the overall operation of the Tongdong system;
2. Trustless: All nodes in the system can conduct transactions without trust, because the operation of the database and the entire system is open and transparent, and within the rules and time range of the system, nodes cannot deceive each other;
3. Collectively Maintain: The system is jointly maintained by all nodes with maintenance functions, and everyone in the system participates in the maintenance work;
4. Reliable Database: The system Each node in the system has the latest complete database copy. Modifying the database of a single node is invalid because the system will automatically compare and consider the same data record that appears the most times to be true.
The blockchains of projects such as Bitcoin, Ethereum, and DECENT all have these characteristics.

㈦ What are the characteristics of blockchain?

According to reports, blockchain has the advantages of decentralization, trustlessness and non-tampering.

Compared to the Internet, the blockchain network conceived by Cosmos also realizes asset value transfer while exchanging information. Through the IBC cross-chain protocol, cross-chain transfer of tokens can be achieved between blockchains developed by Tendermint Core of Cosmos. For public chains generated based on the PoW consensus mechanism such as Ethereum, Pegged Zone can be used to bridge .

Source of article: Bit110.com

㈧ Getting Started with Blockchain What You Need to Know!


What is a blockchain?
Literally: a blockchain is a chain composed of small blocks that record various information, similar to what we will Bricks are stacked one after another, and they cannot be removed after being stacked. Each brick also has various information written on it, including: who stacked it, when it was stacked, what material the brick was made of, etc. You can use this information There is no way to modify it.
From a computer perspective: Blockchain is a relatively special distributed database. A distributed database stores data information on each computer separately, and the stored information is consistent. If one or two computers in Taiwan are broken, the information will not be lost, and you can still view it on other computers.
Blockchain is distributed, so it has no central point. Information is stored in all nodes that join the blockchain network, and the data of the nodes is synchronized. A node can be a server, laptop, mobile phone, etc.
What you need to know is that the data stored in these nodes are exactly the same.
Blockchain Features
Decentralization: Because it is distributed storage,Therefore, there is no central point. It can also be said that each node is a central point. Applications in life do not require third-party systems (banks, Alipay, real estate agencies, etc. are all third parties).
Openness: The system data of the blockchain is open and transparent, and everyone can participate. For example, when renting a house, you can know the previous rental information of the house and whether there have been any problems. Of course, some individuals here Private information is encrypted.
Autonomy: The blockchain adopts consensus-based specifications and protocols (such as a set of open and transparent algorithms), and then each node operates according to this specification, so that everything is done by machines and there is no human touch. Element. This changes trust in people to trust in machines, and any human intervention has no effect.
Information cannot be tampered with: If the information is stored in the blockchain, it will be saved permanently and there is no way to change it. As for the 51% attack, it is basically impossible to achieve.
Anonymity: There is no personal information on the blockchain, because it is all encrypted and is a string of letters and numbers, so your ID card information and phone number will not be resold. Phenomenon.
Block structure
A block contains two parts:
1. Block header (Head): records meta-information of the current block
2. Block body (Body): actual data
>Contains data as shown below:
How blockchain works
Let’s take transfer as an example:
Currently our transfers are centralized, and the bank is a centralized ledger. For example, there is 400 in account A There are 100 yuan in account B.
When A wants to transfer 100 yuan to B, A needs to submit a transfer application through the bank. After the bank verification is passed, 100 yuan will be deducted from A's account and 100 yuan will be added to B's account.
After calculation, the balance of account A after deducting 100 is 300 yuan, and the balance of account B after adding 100 is 200 yuan.
The steps for transferring money on the blockchain are: A wants to transfer 100 yuan to B. A will tell everyone about the transfer on the Internet, and everyone will check whether there is enough money in A's account. To complete the transfer, if the verification is passed, everyone will record this information in the blockchain on their computers, and the information recorded by everyone will be synchronized and consistent, so that A will successfully transfer 100 yuan to on B’s account. You can see that there is no bank involved.
Related questions
What is the relationship between blockchain and Bitcoin?
Bitcoin was proposed by Satoshi Nakamoto in 2009, and then the blockchain technology was refined with reference to the implementation of Bitcoin.
If Bitcoin is noodles, then blockchain is flour. Later, everyone discovered that flour can be used to make steamed buns and steamed buns in addition to noodles.
Why do I need to help you store block information?
I don’t have time to do it without profit. To put it simply, you help me store the information and I will give you the correspondingremuneration.
Key technical points that need to be understood in blockchain?
Use Hash and asymmetric encryption to ensure that data cannot be tampered with:
Hash: y = hash(x), perform a hash operation on x to obtain y , the original information x can be hidden, because you cannot calculate x through y, thus achieving anonymity.
Asymmetric encryption: The public key and the private key are a pair. If the public key is used to encrypt the data, only the corresponding private key can be used to decrypt it; if the private key is used to encrypt the data, then only It can be decrypted with the corresponding public key.
Consensus algorithm: Ensure data consistency between nodes.
Is there a sentence or two that can explain the blockchain?
Yes.
Mahjong is a traditional Chinese blockchain project. A group of four miners work together. The miner who first collides with the correct hash value of 13 numbers can obtain the accounting rights and be rewarded.

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