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

区块链技术如何破解,区块链技术如何破解数据库

发布时间:2023-12-10-18:02:00 来源:网络 区块链知识 区块   技术

区块链技术如何破解,区块链技术如何破解数据库

区块链技术在近几年来发展迅速,它的应用越来越广泛,也拓展了传统的数据库技术。本文将介绍区块链技术如何破解数据库拓展的三个关键词:去中心化、强大的安全性和实时性。

1.去中心化

去中心化是区块链技术的一个核心特点,它是指没有中心化的组织或系统,每个节点都是平等的,没有主导的权力,每个节点都可以查看和修改数据。由于没有中心化的组织,所有的数据都可以安全地保存在各个节点上,从而保证数据的安全性,并且数据可以随时被查询和修改,这样就可以解决传统数据库技术在安全性和实时性方面的问题。

2.强大的安全性

区块链技术的安全性比传统数据库技术更强,因为它使用了密码学和分布式账本技术来保护数据。每一笔交易都会被加密,并且每一个节点都会收到这笔交易的副本,这样就可以防止攻击者篡改数据。此外,区块链技术还可以使用智能合约来实现自动执行,从而更好地保护数据的安全性。

3.实时性

实时性是区块链技术的另一个优势,它可以实现数据的实时更新,从而解决传统数据库技术在实时性方面的问题。在区块链网络中,每个节点都可以查看和修改数据,所有的节点都会收到每一笔交易的副本,从而保证数据的实时更新。此外,区块链技术还可以使用智能合约来实现自动执行,从而更好地保证数据的实时性。

总之,区块链技术可以有效地破解数据库拓展,它的去中心化、强大的安全性和实时性特点使其成为一种可靠的数据库技术。


请查看相关英文文档

㈠ The answer to the currency circle: Cryptocurrency worth 4 billion yuan was stolen. How did hackers operate?

Hackers exploited a vulnerability in the blockchain data collaboration platform Poly Network Conducted an attack and successfully stole the 4 billion cryptocurrency and transferred it to other accounts. Currently, the entire platform is working intensively to catch these hackers, because once these currencies flow into the currency market, it will definitely cause extraordinary consequences to the market. Big damage can even affect the fluctuations of the entire market. Then the currency circle will cause a certain price drop.

Summary: The emergence of virtual currency undoubtedly provides a way for people's finance to develop, but this development path is bound to be full of risks and hardships, especially now The governments of various countries do not recognize this currency, resulting in this currency having no legitimacy at all. Therefore, when we choose to invest in this currency, we must keep our eyes open and decide whether to invest after careful consideration.

㈡ What are the core blockchain technologies of blockchain technology?


What is the hottest Internet topic at the moment? You don’t need to tell me what the editor is saying, it is the blockchain. Blockchain technology, but many friends have only heard of this technology and do not have much in-depth understanding of it. So what are the blockchain technologies? Below we will bring you an introduction to the core technology of blockchain for your reference.
What are the core elements of blockchain technology?
Blockchain technology, which can be a public ledger (visible by anyone) or a permissioned network (visible only by those authorized), solves supply chain challenges , because it is an immutable record that is shared among network participants and updated in real time.
Blockchain technology----data layer: designing the data structure of the ledger
Core technology 1. Block + chain:
Technically speaking, block is a data structure that records transactions. Reflects the flow of funds for a transaction. The blocks of transactions that have been reached in the system are connected together to form a main chain, and all nodes participating in the calculation record the main chain or part of the main chain.
Each block consists of a block header and a block body. The block body is only responsible for recording all transaction information in the previous period, mainly including the number of transactions and transaction details; the block header encapsulates the current version number, previous A block address, timestamp (recording the time when the block was generated, accurate to the second), random number (recording the value of decrypting the answer to the math question related to the block), the target hash value of the current block, and the Merkle number Root value and other information. From a structural point of view, most functions of the blockchain are implemented by the block header.
Core technology 2. Hash function:
The hash function can convert data of any length into a set of fixed-length codes through the Hash algorithm. The principle is based on a cryptographic one-way hash function. This kind of function is easy to verify, but difficult to crack. Usually the industry uses the method y=hash(x)Indicates that the hash function implements operations on x to calculate a hash value y.
Commonly used hash algorithms include MD5, SHA-1, SHA-256, SHA-384 and SHA-512, etc. Taking the SHA256 algorithm as an example, inputting any string of data into SHA256 will result in a 256-bit Hash value (hash value). Its characteristics: the same data input will get the same result. As long as the input data changes slightly (for example, a 1 becomes a 0), a completely different result will be obtained, and the result cannot be predicted in advance. Forward calculation (calculating the corresponding Hash value from the data) is very easy. Reverse calculation (cracking) is extremely difficult and is considered impossible under current technological conditions.
Core technology 3. Merkle tree:
Merkle tree is a hash binary tree, which can be used to quickly verify the integrity of large-scale data. In the blockchain network, the Merkle tree is used to summarize all transaction information in a block, and ultimately generates a unified hash value of all transaction information in the block. Any change in transaction information in the block will cause Merkle tree changes.
Core technology 4. Asymmetric encryption algorithm:
Asymmetric encryption algorithm is a key secret method that requires two keys: public key and private key. The public key and the private key are a pair. If the public key is used to encrypt data, only the corresponding private key can be used to decrypt it, thereby obtaining the corresponding data value; if the private key is used to sign the data, then only the corresponding public key can be used to sign the data. In order to verify the signature, the sender of the verification information is the holder of the private key.
Because encryption and decryption use two different keys, this algorithm is called an asymmetric encryption algorithm, while symmetric encryption uses the same key in the encryption and decryption processes.
Blockchain technology----network layer: realize the decentralization of accounting nodes
Core technology 5. P2P network:
P2P network (peer-to-peer network), also known as point-to-point technology, is no Central server, Internet system that relies on user groups to exchange information. Unlike a centralized network system with a central server, each client in a peer-to-peer network acts as both a node and a server. Domestic Xunlei software uses P2P technology. The P2P network has the characteristics of decentralization and robustness.
Blockchain technology----Consensus layer: allocate the task load of accounting nodes
Core technology 6. Consensus mechanism:
Consensus mechanism is how to reach consensus among all accounting nodes to identify The validity of a record is both a means of identification and a means of preventing tampering. There are currently four main types of consensus mechanisms: PoW, PoS, DPoS and distributed consensus algorithms.
PoW (Proof of Work, proof of work): PoW mechanism, which is like Bitcoin’s mining mechanism, miners package existing transactions that have not been recorded by the network into a block, and then continue to traverse and try to find a random number , so that the new block plus randomThe hash value of the machine meets certain difficulty conditions. Finding a random number that meets the conditions is equivalent to determining the latest block of the blockchain, and is also equivalent to obtaining the current round of accounting rights of the blockchain. Miners broadcast blocks that meet the mining difficulty conditions in the Yuanfu network. After verifying that the block meets the mining difficulty conditions and that the transaction data in the block meets the protocol specifications, other nodes in the entire network will each Blocks are linked to their own version of the blockchain, thereby forming a network-wide consensus on the current network state.
PoS (ProofofStake, Proof of Stake): PoS mechanism requires nodes to provide proof of a certain number of tokens to obtain a distributed consensus mechanism for competing for blockchain accounting rights. If you rely solely on the token balance to determine the bookkeeper, you will inevitably make the rich win, which will lead to the centralization of bookkeeping rights and reduce the fairness of the consensus. Therefore, different PoS mechanisms use different methods to increase the amount of money based on the proof of equity. The randomness of accounting rights avoids centralization. For example, in the PeerCoin PoS mechanism, the Bitcoin with the longest chain age has a greater chance of obtaining accounting rights. NXT and Blackcoin use a formula to predict the next accounting node. The more tokens you own, the greater the probability of being selected as an accounting node. In the future, Ethereum will also switch from the current PoW mechanism to a PoS mechanism. Judging from the information currently available, Ethereum's PoS mechanism will use nodes to place bets on the next block. The winner of the bet will receive an additional Ethereum currency award. Those who do not win will be deducted Ether coins to reach consensus on the next block.
DPoS (DelegatedProof-Of-Stake, share authorization certificate): DPoS is easy to understand and is similar to the modern corporate board of directors system. The DPoS mechanism adopted by BitShares is that shareholders vote to select a certain number of witnesses. Each witness has two seconds of authority to generate blocks in order. If the witness cannot generate a block within the given time slice, The block generation authority is given to the witness corresponding to the next time slice. Shareholders can replace these witnesses at any time by voting. This design of DPoS makes the generation of blocks faster and more energy-saving.
Distributed Consistency Algorithm: Distributed Consistency Algorithm is based on traditional distributed consistency technology. Among them are Byzantine fault-tolerant algorithms that solve the Byzantine Generals problem, such as PBFT (Byzantine fault-tolerant algorithm). In addition, distributed consensus algorithms (Pasox, Raft) that solve non-Byzantine problems are not explained in this article. This type of algorithm is currently a commonly used consensus mechanism in alliance chain and private chain scenarios.
Taken together, POW is suitable for public chains. If you build a private chain, it is more suitable to use POS because there is no trust problem in verification nodes; and because there are untrustworthy local nodes in the alliance chain, it is more suitable to use DPOS.
Blockchain technology----Incentive layer: Develop a "salary system" for accounting nodes
Core technology 7. Issuance mechanism and incentive mechanism:
Take Bitcoin as an example.Bitcoins are initially rewarded by the system to miners who create new blocks, and this reward is halved approximately every four years. At the beginning, miners were rewarded with 50 Bitcoins for each new block recorded, and this reward is halved approximately every four years. By analogy, by around AD 2140, newly created blocks will no longer receive rewards from the system. By then, the total number of Bitcoins will be approximately 21 million. This is the total number of Bitcoins, so it will not increase indefinitely.
Another source of incentives is transaction fees. When there are no system rewards for newly created blocks, the miners' income will change from system rewards to transaction fees. For example, when you transfer, you can specify 1% of it as a handling fee to be paid to the miner who records the block. If the output value of a transaction is less than the input value, the difference is the transaction fee, which will be added to the incentive for that block. As long as a given amount of electronic currency has entered circulation, the incentive mechanism can gradually be converted to rely entirely on transaction fees, so there is no need to issue new currency.
Blockchain technology----Contract layer: giving the ledger programmable features
Core technology 8. Smart contract:
Smart contract is a set of programmed rules and logic that respond to scenarios. Implemented by decentralized, trusted shared script code deployed on the blockchain. Usually, after the smart contract is signed by all parties, it is attached to the blockchain data in the form of program code, and is recorded in a specific block of the blockchain after being propagated through the P2P network and verified by nodes. Smart contracts encapsulate a number of predefined states and transition rules, scenarios that trigger contract execution, response actions under specific scenarios, etc. The blockchain can monitor the status of smart contracts in real time, and activate and execute the contract by checking external data sources and confirming that specific trigger conditions are met.
The above is what blockchain technologies the editor has brought to you? All content of the introduction to the core technology of blockchain.

㈢ Easy-to-understand explanation of blockchain

The popular explanation of blockchain technology is as follows:

To put it simply: blockchain is the use of a package of existing A new generation of network system formed using advanced network technology. This network system has a new structure, a new mechanism, and unprecedented new value. Five major technologies or innovations are specifically used: encryption technology, P2P network technology, distributed storage technology, consensus mechanism, and smart contracts.

Essentially: it is a shared database, and the data or information stored in it is "unforgeable", "full-process traces", "traceable", "open and transparent" and "collectively maintained" ” and other characteristics. Based on these characteristics, blockchain technology has laid a solid foundation for "trust-based sales" and created a reliable "cooperation" mechanism. Yunchun has broad application prospects.

2. Openness.

In addition to encrypting the private information of all parties to the transaction, the blockchain data is open to everyone and provides a flexible script code system. The entire system information is highly transparent and within the rules specified by the system. Nodes cannot deceive each other.

3.autonomy.

Consensus technology, smart contracts.

㈣ Blockchain, how to solve the financing difficulties of small and medium-sized enterprises

In recent years, companies arrears with wages and bosses run away have become commonplace in the news, "Jiangnan" Jokes about "tannery" also appear on social media from time to time. These "news" that are no longer new remind everyone repeatedly that the old problems of corporate financing for many years have become "new" dilemmas that have been unresolved for a long time. Everyone is thinking about the future. There is no way to solve the problem. With the development of financial technology, maybe blockchain is bringing new ideas to this old problem?

Economic Perspective View the World WeChat Public Account [Jianghan Vision Observation] ID: jianghanview

㈤ The cryptographic technology of blockchain is

< p>Cryptography technology is the core of blockchain technology. The cryptographic technology of blockchain includes digital signature algorithm and hash algorithm.
Digital Signature Algorithm
Digital signature algorithm is a subset of the digital signature standard, representing a specific public key algorithm used only for digital signatures. The key is run on the message hash generated by SHA-1: to verify a signature, the hash of the message is recalculated, the signature is decrypted using the public key and the results are compared. The abbreviation is DSA.

Digital signature is a special form of electronic signature. So far, at least more than 20 countries have passed laws recognizing electronic signatures, including the European Union and the United States. my country's electronic signature law was adopted at the 11th meeting of the Standing Committee of the 10th National People's Congress on August 28, 2004. . A digital signature is defined in the ISO 7498-2 standard as: “Some data appended to a data unit, or a cryptographic transformation made to the data unit, which allows the recipient of the data unit to confirm the source and origin of the data unit. The integrity of the data unit and protects the data from forgery by a person (e.g. the recipient)”. The digital signature mechanism provides an identification method to solve problems such as forgery, denial, impersonation and tampering. It uses data encryption technology and data transformation technology to enable both parties to send and receive data to meet two conditions: the receiver can identify what the sender claims. Identity; the sender cannot later deny that it sent the data.
Digital signature is an important branch of cryptography theory. It is proposed to sign electronic documents to replace handwritten signatures on traditional paper documents, so it must have 5 characteristics.
(1) The signature is credible.
(2) The signature cannot be forged.
(3) Signatures are not reusable.
(4) Signed documents are immutable.
(5) The signature is non-repudiation.
Hash algorithm
Hash is to convert input of any length (also called pre-mapping, pre-image) intoThrough the hash algorithm, it is converted into a fixed-length output, which is the hash value. This transformation is a compressed mapping in which the space of hash values ​​is usually much smaller than the space of inputs. Different inputs may hash to the same output, but the input values ​​cannot be deduced in reverse. Simply put, it is a function that compresses a message of any length into a message digest of a fixed length.
Hash algorithm is a one-way cryptographic system, that is, it is an irreversible mapping from plaintext to ciphertext, with only encryption process and no decryption process. At the same time, the hash function can change an input of any length to obtain a fixed-length output. The one-way characteristics of the hash function and the fixed length of the output data allow it to generate messages or data.
Represented by the Bitcoin blockchain, secondary hashing is used many times in the workload proof and key encoding process, such as SHA (SHA256(k)) or RIPEMD160 (SHA256(K)). This The advantage of this method is that it increases the workload or increases the difficulty of cracking if the protocol is not clear.
Represented by the Bitcoin blockchain, the two main hash functions used are:
1. SHA-256, mainly used to complete PoW (proof of work) calculations;
2.RIPEMD160, mainly used to generate Bitcoin addresses. As shown in Figure 1 below, the process of generating an address from a public key for Bitcoin.

㈥ Optimize the business environment and decrypt the technical principles of blockchain evidence storage and verification



Blockchain evidence

Certification and verification


The principle of electronic data certification technology, in short, is to save certain electronic data. To prove the existence of the electronic data at a certain point in time. The blockchain certificate storage method is to perform a hash value operation on the original data, and then upload the resulting hash value summary to the blockchain for encryption and storage, without uploading the original data itself.



The original data is still stored locally and may be modified. How does the judge confirm that the evidence submitted by the parties is consistent with the original data? Is the data consistent and not tampered with? Is it possible that the data on the chain can be tampered with?


This starts with the technical principles of blockchain certificate storage.



Encrypted storage

Blockchain evidence does not store the electronic data itself , but willThe hash value corresponding to the electronic data is stored in the blockchain, also known as the hash value on the chain. The hash algorithm is a one-way encryption function that is difficult to decipher under the current technical conditions. Any original data (and its completely equivalent copy) has and only corresponds to one hash value, and the hash value is therefore called "Data fingerprint". Any modification to the original data will cause its hash value to change, making it impossible to pass subsequent verification and comparison.


Multi-node distributed storage

The blockchain uses "distributed ledger" technology, that is, in a distributed ledger with multiple nodes In the system, each node saves and updates data independently, and there is no central organization that maintains each node. Each node confirms data updates through a consensus mechanism, thereby ensuring that the data on the chain is not tampered with.


For example:

There is a village where the village accountant originally kept accounts, and the village chief kept the books (centralized accounting). However, the accountant and the village chief colluded to make false accounts for personal gain, leaving the villagers helpless. After adopting distributed ledger technology (decentralization), it is changed to a public ledger. The whole village has one ledger. Every time an account occurs in the village, it must be broadcast to the whole village, and the villagers will then include the account in their own account. in the ledger.

If more than 51% of the villagers confirm that the account is valid and reach a consensus based on the principle of the minority obeying the majority, the account will be included in the public ledger, and the entire village will add the account to the public account book. Go to the account book you keep.

If the account is false, it cannot be confirmed by the consensus of the whole village and will be invalidated. The public ledger is based on the consistent version in the hands of the majority of villagers.


Chained data structure

The data unit on the blockchain is a "block". In addition to recording general data, the latter block , and also wraps the hash value of the previous block, which is transmitted in this way and interlocked to form a "chain", and the electronic data is stored in the blockchain with time records and is sequential, which makes any block unable to be Modify independently, and as time passes, the difficulty and cost of modifying data on the chain also increase linearly.



Focus on cases

This technology was applied to our hospital’s first "block In the case of "Chain Evidence Verification".

After the bank and the lender sign an electronic contract, the banking business system uses the hash calculation program provided by the blockchain certificate deposit platform to automatically hash the electronic contract documents and other related electronic data.Hash operation is performed to form the corresponding hash value, and then the hash value is uploaded to the blockchain electronic certificate storage platform for certificate storage. When the two parties filed a case online after a dispute occurred, the bank submitted electronic evidence stored on the blockchain online.

Later in the court trial, during the evidence and cross-examination process, the court performed a hash value calculation on the electronic evidence submitted by the bank on the spot, and compared the resulting hash value with the hash value on the blockchain evidence storage platform. After comparison, the verification result is obtained that "the evidence has not been tampered with since the date it was uploaded to the chain." This will help the judge quickly determine whether the evidence has been tampered with since it was uploaded to the chain, and further certify its authenticity.

The application of blockchain evidence storage and verification technology effectively solves the problem of authenticity determination of electronic evidence in online litigation, effectively reduces the parties’ costs of evidence storage, evidence production and cross-examination, and reduces the burden of litigation for the parties. , and at the same time, the court's certification efficiency has been greatly improved, and the quality and efficiency of trials have been further improved.



Legal Express

"People's Court Online Litigation Rules"

Article 16 [Effectiveness of Data Stored by Blockchain Technology] If the electronic data submitted by the parties as evidence is stored through blockchain technology and is consistent after technical verification, the People's Court may determine that the electronic data has not been uploaded to the chain. has been tampered with, unless there is sufficient contrary evidence to overturn it.

Article 17 [Audit Rules for Data Stored by Blockchain Technology] If a party objects to the authenticity of electronic data stored by blockchain technology after being uploaded to the chain, and has reasonable grounds, the People’s Court shall Make a judgment based on the following factors:

(1) Whether the certificate deposit platform complies with the relevant regulations of the relevant national departments on providing blockchain certificate deposit services;

(2) The parties and the certificate deposit Whether the platform has an interest and uses technical means to improperly interfere with the evidence collection and evidence storage process;

(3) Whether the information system of the evidence storage platform meets the national standards for cleanliness, safety, reliability, and availability or Industry standards;

(4) Whether the information system of the certificate storage platform meets the requirements of relevant national standards or industry standards regarding system environment, technical security, encryption methods, data transmission, information verification, etc.

Article 18 [Authenticity review of data before uploading to the blockchain] If a party claims that the electronic data is no longer authentic before being uploaded to the blockchain and stored, and provides evidence to prove it or explains the reasons, the people's court shall review it.

Based on the circumstances of the case, the People’s Court may require the party that submitted the electronic data stored using blockchain technology to provide evidence to prove that the electronic data was stored on the blockchain before being stored on the blockchain.The authenticity of the data shall be determined comprehensively based on the specific source, generation mechanism, storage process, notarization by a notary agency, third-party witness, and related verification data before being stored on the chain. If the party concerned cannot provide evidence to prove or make a reasonable explanation, and the electronic data cannot be mutually corroborated with other evidence, the people's court will not confirm its authenticity.

Article 19 [Reinforced Determination of Authenticity of Blockchain Stored Data] The parties may apply for a person with specialized knowledge to provide opinions on technical issues related to electronic data stored in blockchain technology. The People's Court may, based on the application of the parties or ex officio, entrust the identification of the authenticity of the electronic data stored by blockchain technology, or obtain other relevant evidence for verification.




Acknowledgments: Special thanks to Tencent Group Legal Affairs Mr. Jiang Hongming, Product Director of the Ministry of Legal Innovation Center, for his guidance and support in the writing of this article.

㈦ Can new blockchain technology solve the dilemma of traditional copyright protection

On July 29, 2018, the blockchain brand hosted by Dataguan (Beijing) Media Technology Co., Ltd. The salon seminar was held in Beijing. This salon aims to deeply explore the current status and future of the development of the blockchain industry through expert sharing, dialogue, and discussion.

Zhao Yong, founder and CEO of Maichi.com, believes that blockchain technology and copyright are inherently combined. It can bring new opportunities for change in copyright protection and solve traditional problems. Centralized copyright services address issues such as rights confirmation, transactions and rights protection.

Some people in the industry believe that at present, my country's copyright service agencies are not yet sound, the relevant legal system is not perfect enough, copyright protection is still in its infancy, and the copyright industry is facing severe problems and challenges.

This salon event is hosted by the Guiyang Blockchain Development and Application Promotion Headquarters and hosted by the Data Officer and Information Technology Research Institute.

Content source: China News Network

㈧ How can blockchain solve the Byzantine Generals Problem in theory?

The official conclusion of the Byzantine Generals Problem (hereinafter referred to as the "Consensus Problem") The formulation is: How to reach consensus on information in a distributed network that is not based on trust? This expression sounds a bit obscure, but its essence is not complicated. Although the following example is not completely consistent with the consensus issue, it helps our understanding [9].

Imagine that in the distant Byzantine era, there was a wealthy city-state with all kinds of gold, silver, jewelry, silk and satin, and its lord Doraemon enjoyed all this luxury and glory. On the outskirts of the city-state, four Byzantine generals Nobita, Fat Tiger, Xiaofu, and Shizuka all coveted Doraemon's wealth, so they decided to join forces to capture Doraemon's city-state. According to the strength comparison between the two sides, more than half of the generals must attack at the same time to defeat the enemy. Therefore, the winning condition isAt least three of the four can agree on the shot clock. So what are the chances of winning for the four generals?

The answer to this question depends on how the four people cooperate. If it is a centralized system and there is a leader, such as Fat Tiger (equivalent to the central server), then their victory is completely impossible. It's suspenseful, because reaching an agreement on the attack time is very simple. As long as Fat Tiger convenes Nobita, Xiaofu and Shizuka to hold a meeting to discuss it, Fat Tiger can make a final decision even if everyone has different opinions. Let us return to the assumption of the Byzantine Generals Problem. In a distributed network not based on trust, what are the odds of winning for the four generals?

?

First of all, due to the lack of trust between the four generals, the possibility of gathering in the dark room for a conspiracy meeting was ruled out (once in the dark room What should I do if I am kidnapped by Fat Tiger?); Secondly, since there is no alliance leader, the opinions of the four people will be equally valued. In this case, the four generals could only pass messages between their respective camps through messengers to agree on the time of attack. For example, if Nobita thinks that 6 o'clock in the morning is a good time to launch an attack, he will send a messenger to tell Fat Tiger, Xiao Fu and Shizuka his opinions. At the same time, Fat Tiger may think that launching a surprise attack at 9 pm is better, and Xiao Fu prefers it. The attack was at 3pm, and Shizuka hoped it would be 10am. The three of them would also send out their own messengers at the same time. In this way, after the first round of communication, each of the four generals has four attack times to choose from, and they each have to inform the other three of their chosen times in the next round of communication. Since the decisions of the four people are all made independently, there are 256 possible final choices. Only when more than three people happen to choose the same time, a consensus is reached, and there are only 64 such results. , which means that the probability of reaching consensus is only 1/4. This is only the case of four generals. What if the number of generals is 10, 100, or 1,000? A little calculation shows that as the number of people increases, the hope of reaching consensus becomes increasingly slim.

Replace the generals in the above example with nodes in the computer network, replace the messengers with communication between nodes, and replace the attack time with information that requires consensus, and you can understand the consensus problem. Describe the dilemma. The ability to reach consensus is self-evidently important for a payment system. If you wire a sum of money to your family to buy a car, and when you go to the bank to verify it the next day, the counter will tell you "As to how much money you wired, There are three versions of records in our system." Obviously you would not dare to deposit money into such a bank. Before the emergence of Bitcoin, the consensus problem was difficult to solve perfectly. To ensure that consensus was reached, a centralized system was required (unless the nodes met specific conditions), and decentralized consensus could not be guaranteed. So how does blockchain technology solve this problem? (Follow the public account weoption and reply "blockchain" to view the full text.)

㈨ What exactly is blockchain? Decrypt the concept of blockchain

㈩ Blockchain technology

Background: After the birth of Bitcoin, Blockchain technology was discovered after the technology was found to be advanced. Bitcoin and blockchain technology were discovered at the same time.

1.1 The purpose of the birth of Bitcoin:

①Currency transactions have records, that is, ledgers;

②The disadvantages of centralized institution accounting - it can be tampered with; Yi Chaofa

Bitcoin solves the first problem: anti-tampering - hash function

1.2 hash function (encryption method)

① Function: convert any A string of length, converted to a fixed-length (sha256) output. The output is also called a hash value.

② Features: It is difficult to find two different x and y such that h(x)=h(y).

③Application: md5 file encryption

1.3 Blockchain

①Definition

Block: Split the general ledger into zones Block storage

Blockchain: On each block, add a block header. It records the hash value of the parent block. By storing the hash value of the parent block in each block, all blocks are connected in order to form a blockchain.

②How does the blockchain prevent transaction records from being tampered with?

After the blockchain is formed, tampering with any transaction will cause the hash value of the transaction block to be different from that of its sub-blocks. , tampering was discovered.

Even if you continue to tamper with the hash value in the sub-block header, the hash value in the sub-block will be different from that in the grandchild block, and the tampering will be discovered.


1.4 The essence of blockchain

①The essence of Bitcoin and blockchain: a big ledger visible to everyone, only recording transactions .

②Core technology: Through cryptographic hash function + data structure, it ensures that the ledger records cannot be tampered with.

③Core function: Create trust. Fiat currency relies on government credibility, and Bitcoin relies on technology.

1.5 How to trade

① To conduct transactions, you need an account number and password, corresponding to the public key and private key

Private key: a string of 256-bit binary numbers , you don’t need to apply for it, you don’t even need a computer, you can generate the private key by tossing a coin 256 times

The address is converted from the private key. The address cannot reverse the private key.

The address is the identity, which represents the ID in the Bitcoin world.

oneAfter the address is generated, it can only be known by everyone if it enters the blockchain ledger.

②Digital signature technology

Signature function sign (Zhang San’s private key, transfer information: Zhang San transfers 10 yuan to Li Si) = signature of this transfer

< p> Verify Korean verify (Zhang San’s address, transfer information: Zhang San transfers 10 yuan to Li Si, signature of this transfer) = True

Zhang San uses his own signature function sign() The private key signs this transaction.

Anyone can verify whether the signature was issued by Zhang San himself who holds Zhang San's private key by verifying the Korean vertify(). It returns true, otherwise it returns false.

sign() and verify() are cryptographically guaranteed not to be cracked. ·

③Complete the transaction

Zhang San will provide the transfer information and signature to the entire network. Under the premise that the account has a balance, after verifying that the signature is true, it will be recorded in the blockchain ledger. Once recorded, Zhang San's account will be reduced by 10 yuan, and Li Si's account will be increased by 10 yuan.

Supports one-to-one, one-to-many, many-to-one, and many-to-many transactions.


In the Bitcoin world, private keys are everything! ! !

1.6 Centralized Accounting

① Advantages of Centralized Accounting:

a. No matter which center keeps accounts, don’t worry too much

< p> b. Centralized accounting, high efficiency

②Disadvantages of centralized accounting:

a Denial of service attack

b Stop service after getting tired

p>

c Central institutions are vulnerable to attacks. For example, destroying servers and networks, committing self-intrusion, legal termination, government intervention, etc.

All attempts at confidential currencies with centralized institutions in history have failed.


Bitcoin solves the second problem: how to decentralize

1.7 Decentralized accounting

①Decentralization: Everyone can keep accounts. Everyone can keep a complete ledger.

Anyone can download open source programs, participate in the P2P network, monitor transactions sent around the world, become an accounting node, and participate in accounting.

② Decentralized accounting process

After someone initiates a transaction, it is broadcast to the entire network.

Each accounting node continues to monitor and continue transactions across the entire network. received a new paymentAfter verifying the accuracy, it is put into the transaction pool and continues to be propagated to other nodes.

Due to network propagation, the transactions of different accounting nodes at the same time are not necessarily the same.

Every 10 minutes, one person is selected from all accounting nodes in a certain way, and his transaction pool is used as the next block and broadcast to the entire network.

Other nodes delete the transactions that have been recorded in their own transaction pool based on the transactions in the latest block, continue accounting, and wait for the next selection.

③ Features of decentralized accounting

A block is generated every 10 minutes, but not all transactions within these 10 minutes can be recorded.

The accounting node that obtains the accounting rights will be rewarded with 50 Bitcoins. After every 210,000 blocks (approximately 4 years), the reward is halved. The total amount is about 21 million, and it is expected to be mined in 2040.

Recording the reward of a block is also the only way to issue Bitcoin.

④ How to allocate accounting rights: POW (proof of work) method

Compete for accounting rights by calculating mathematical problems on several accounting points.

Find a random number that makes the following inequality true:

There is no other solution except traversing the random numbers starting from 0 and trying your luck. The process of solving the problem is also called mining.

Whoever solves the problem correctly first will get the accounting rights.

If a certain accounting node finds the solution first, it will announce it to the entire network. After other nodes verify that it is correct, a new round of calculation will start again after the new block. This method is called POW.

⑤ Difficulty adjustment

The generation time of each block is not exactly 10 minutes

As Bitcoin develops, the computing power of the entire network does not increase.

In order to cope with changes in computing power, the difficulty will be increased or decreased every 2016 blocks (about 2 weeks), so that the average time for each block to be generated is 10 minutes.

#欧易OKEx# #BTC[超话]# #digital currency#

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