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

区块链记账规则节点计算方法,区块链记账规则节点有哪些

发布时间:2023-12-09-01:20:00 来源:网络 比特币基础 区块   节点   规则

区块链记账规则节点计算方法,区块链记账规则节点有哪些

区块链记账规则节点是区块链网络的核心部分,它是一种分布式计算机技术,用于将交易数据记录在区块链上,以确保数据的安全性和完整性。它是一种可验证的,可信任的,可控的,可扩展的分布式账本技术。它可以记录所有交易,确保数据的安全性和完整性,以及防止篡改和伪造。

区块链记账规则节点拓展的三个关键词分别是:智能合约,私钥和共识机制。

智能合约是一种可以在区块链网络上执行的自动执行的计算机程序,它可以用来记录各种交易信息,如价格,时间,地点等。智能合约可以帮助区块链节点更好地执行交易,避免纠纷,提高安全性和可靠性。智能合约还可以用来实现资产的转移,支付费用,执行投票等功能。

私钥是一种用于签名区块链交易的数字签名,它是区块链节点的唯一标识,也是保护节点资产的重要工具。私钥是一串随机生成的数字,只有节点拥有者才能访问。私钥可以用来签署区块链交易,以确保交易的安全性和完整性。

共识机制是区块链网络中的一种复杂的分布式算法,它是区块链网络上的一种分布式协议,用于确定网络中的交易是否有效。共识机制可以帮助区块链节点达成一致,确保交易的安全性和完整性。共识机制的主要目的是确保所有参与者都能达成一致,以确保区块链网络的安全和可靠性。

以上三个关键词是区块链记账规则节点的重要拓展,它们可以帮助区块链节点更好地执行交易,确保交易的安全性和完整性,以及达成共识,确保区块链网络的安全和可靠性。


请查看相关英文文档

㈠ What are the core blockchain technologies of blockchain technology?


What is the hottest topic on the Internet right now? You don’t need to tell me what the editor is saying, that is 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 can be a public ledger (visible by anyone) or a permissioned network (visible only by those authorized), which 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 y=hash(x) to represent it. This 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 finally generateA unified hash value of all transaction information in this block. Any change in transaction information in the block will cause the Merkle tree to change.
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 hash value of the new block plus the random number 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, PeercoinCoin) 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----ContractLayer: Giving the ledger programmable features
Core technology 8. Smart contract:
Smart contract is a set of scenario-responsive programmed rules and logic, which is a decentralized and programmable system deployed on the blockchain. Implemented by letter sharing script code. Normally, 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 introduced to the core technology of blockchain.

㈡ You have to know the operating principles and development of blockchain!


1. Why is there innovation in blockchain?
The starting point of the first generation of the Internet is the TCP/IP protocol, which implements a unified format for peer-to-peer transmission of information by all nodes on the network. Open code. However, the impact of such an uncomplicated innovation on mankind is epoch-making. It has programmed, agreed, and enforced the basic values ​​required by a unified global market: "freedom, equality, and fraternity." Then the STMP email protocol, HTTP domain name protocol, etc. were derived, achieving low-cost and high-efficiency global information transmission in a decentralized manner. As Alibaba Vice President Gao Hongbing said:
"The Internet is to eliminate the (information) supply chain that has very low value and high cost - it is open, interconnected, peer-to-peer, globalized, and decentralized."
We know: The essence of the market is also decentralized. It automatically executes the decentralized agreement of "equivalent exchange". Just as Nobel Prize winner Ronald Coase summed up: "The market economy is based on two On the basis of deep cognition: admitting ignorance and tolerating uncertainty." Adam Smith also described the market as: "the invisible hand"! Therefore, the market must require the low-cost flow of information decentralization, and the Internet has adapted to the global Under the general climate formed by the unified market, it turned out to be.
However, the first generation of Internet decentralized solved the problem of low-cost and efficient transmission of information, but it did not solve the problem of credit of information. Therefore, what the second-generation Internet must break through is: how to establish global credit in a decentralized manner so that value transfer can be carried out at low cost and with high efficiency.
So what are the problems with the original centralized credit system? As we all know: centralized credit, such as the legal currencies of various countries, has different credit values, and the clearing systems are also incompatible, which adds a lot of cost to global trade. The current global credit system centered on the US dollar has a "Triffin Paradox" in its mechanism (the essence is that a country's legal currency cannot simultaneously resolve the conflict between its own economic interests and global economic needs). Therefore, in 2009, the Governor of the Central Bank of China, Zhou Ogawa called for the creation of super-sovereign storage currencies. In the same year, Satoshi Nakamoto disclosed the first-generation blockchain source online.Code————“Bitcoin”.
2. How does the blockchain system operate?
First of all, Satoshi Nakamoto knew very well that establishing a credit system for payment must solve the problem of preventing "duplicate payments", that is, no counterfeit currency can be created. The centralized credit system relies on state machinery to prevent counterfeit currency. What about "Bitcoin"? Satoshi Nakamoto's great innovation is to "timestamp" every transaction. There is a block (block: equivalent to a network account book) every ten minutes, and all network transactions for these ten minutes are correctly timestamped. The question is who will cover it? Satoshi Nakamoto did not assume that everyone on the Internet is Lei Feng. He agreed with Adam Smith: people in the market are greedy. He asked the so-called "miners" to compete for the accounting rights of these ten-minute blocks. The rules of the competition were to correctly record the accounting while solving the SHA256 problem. Who can prove that their computer has the fastest computing power (the so-called PROOF OF WORK mechanism), he can compete for the legal accounting rights of these ten-minute blocks and get a reward of twenty-five bitcoins. This is the so-called "mining" process. It is actually a decentralized credit process that establishes a network-wide ledger - the blockchain. Therefore, the more essential function of miners is "bookkeepers"!
Satoshi Nakamoto is here In its Bitcoin white paper, the process of establishing this credit system is described in detail:
Step 1: In order for the entire network to recognize it as valid, each transaction must be broadcast to each node (node: that is, the miner);
The second step: Each miner node must correctly timestamp each transaction in these ten minutes and record it in that block;
The third step: Each miner node must Compete for the legal accounting rights of this ten-minute block by solving the SHA256 puzzle, and strive to get a reward of twenty-five bitcoins (fifty bitcoins every ten minutes for the first four years, decreasing by half every four years);< br>Step 4: If a miner node solves the SHA256 puzzle of these ten minutes, it will publish all the timestamped transactions recorded in its ten-minute blocks to the entire network, and they will be checked by other miner nodes in the entire network;< br>Step 5: Other miner nodes in the entire network check the correctness of the block accounting (because they are also stamping the accounting at the same time, but they have not competed for the legal block accounting rights, so there is no reward), there is no error Finally, they will compete for the next block after the legal block, thus forming a single chain of legal accounting blocks, which is the general ledger of the Bitcoin payment system - the blockchain.
Generally speaking, each transaction must undergo six block confirmations, that is, six ten-minute accounting, before it can finally be recognized as a legal transaction on the blockchain. The following is the accounting format of Bitcoin:
So the so-called "Bitcoin" is such a billing system: it includes the owner electronically signing with the private key and paying to the next owner, and then the entire network's "miners" "Time stamp the account and form a blockchain.
3. What innovations are there in Bitcoin’s blockchain finance?
Gold-like, tryTrying to establish a decentralized credit on the global Internet, it is possible to transfer value at high speed and low rates across the entire network (currently the rate for each transfer is one ten thousandth);
The total amount of currency is agreed upon by the cryptography protocol;< br>Compared to gold, digital currency is infinitely divisible;
Currency value can be built on a large number of P2P transactions;
Complete transparency of financial management (each transaction can be checked on the blockchain) .
Bitcoin’s blockchain network-wide accounting has established a market value of US$10 billion, the highest on the global Internet. Therefore, Wu Xiaoling, dean of Tsinghua PBC School of Finance, pointed out: The blockchain experiment established distributed credit, which is an upgraded version of Internet TCP/IP, upgrading from information transmission to value transmission;
4. Bitcoin’s blocks What are the inherent flaws of the chain system?
Bitcoin’s blockchain system has had successes since it was open sourced on the Internet in 2009, but it also shows some inherent flaws that are difficult to overcome:
The total amount cannot be adjusted at any time As the market situation changes, it will inevitably rise and fall sharply;
Mining is high-carbon. Only less than 1% of miners can compete for the accounting rights of blocks of less than ten minutes, and more than 99% of other miners participating in the competition have the computing power. Waste;
The annual inflation of about 10% has greatly increased the cost of the Bitcoin financial ecology, and even threatened her survival;
As a decentralized self-organizing DAC system, the operating costs of the accounting and issuance functions are too high high.
As a global payment system, its efficiency is far from meeting the actual requirements of global trade. The Bitcoin network currently confirms a maximum of 7 transactions per second. In comparison, Visa's network system can process 10,000 transactions per second at the fastest, and Alipay's record is 80,000 transactions per second on Singles' Day in 2014!
5. Block The development of chain technology 2.0:
As the 2.0 upgrade and development of blockchain, it first focuses on solving the high-carbon mining of Bitcoin accounting:
When we discuss how to overcome the high carbon of Bitcoin mining and accounting Professor Liu Taoxiong from the Tsinghua Institute of Economics pointed out that mining competition relies on computing power. In the end, only one company competes for the legal accounting rights, and the other 99% of the miner nodes are mined for nothing, which is a waste of resources. It is obviously unreasonable. If The whole network transparently knows the legal accounting rights of the next block, and it is randomly generated in the entire network, which eliminates the high carbon cost of competitive accounting! After hearing this, we all praised Professor Liu for his brilliant idea, because the second generation is now more successful. Coin NXT has this mechanism. Their white paper is called "Transparent Forging". However, the probability of the accounting rights going to someone is directly proportional to the NXT token holdings in each miner node wallet. This is called the proof of equity mechanism ( PROOF OF STOCK). Of course, this also triggered a debate about the unfairness of NXT’s distribution of tokens to early investment developers!
RIPPLE is a semi-decentralized blockchain solution that uses “trusted gateways” to conduct block operations. Chain accounting, whose credit is based on the consensus accounting that these gateways will not do evil at the same time (consensus ledger) protocol.
The most ambitious attempt is Ethereum, which combines blockchain technology with Turing completeness, hoping to develop a basic platform that can support the construction of various blockchain systems in the future. The development of various credit currencies, digital assets, smart protocols and even financial derivatives. The system design is to unify blockchain accounting on the ETHERUM platform and be used by all developers. Maybe their official version will be released in the near future.
6. Possible applications of blockchain innovation in other fields:
Now, blockchain’s attempts to establish decentralized credit are no longer limited to the financial world, but have attracted attention from all fields of society, especially in At present, some of China's central credit institutions, such as the "Red Cross", are in a "collapse" situation. Blockchain can provide a new way of thinking and technical options for social management. The following are some new developments and related discussions we have learned about:
The combination of blockchain and the Internet of Things unifies digital assets and atomic assets, smooths the difference between consumer assets and cash assets, expands public credit, and accelerates value circulation; (IBM-Samsung)
Built on the blockchain Intellectual property protection system, accounting for the use of intellectual property across the entire network, and establishing a global advertising market;
Whether blockchain can provide technical support for the issuance of protocol-based cryptographic currencies by emerging economies along the Belt and Road;
Block Chain + cloud computing can develop into a decentralized self-media and community system;
Blockchain can build a decentralized equity crowdfunding system, allowing innovative projects to enter the circulation field in advance;
Blockchain can develop Develop a fully transparent financial management system;
Blockchain supports the establishment of a global decentralized corporate organization.
In short, in this era when credit has become a scarce resource, the technological innovation of blockchain, as a distributed credit model, provides new opportunities for finance, social management, talent evaluation and decentralized organization construction in the global market. All provide a broad development prospect.

iii Three common consensus mechanisms in blockchain

Blockchain is a distributed ledger system built on P2P network and participated by nodes. The biggest feature is " Decentralization”. That is to say, in the blockchain system, there is no need to establish trust between users, between users and institutions, and between institutions. Transactions can be realized by relying only on the blockchain protocol system.

But how to ensure the accuracy, authority, and reliability of the ledger? Why do nodes on the blockchain network participate in accounting? What should I do if the node is fake? How to prevent the ledger from being tampered with? How to ensure data consistency between nodes? …These are the problems that blockchain needs to solve when establishing “decentralized” transactions, resulting in the consensus mechanism.

The so-called "consensus mechanism" is to complete the verification and confirmation of transactions in a very short time through the voting of special nodes; when there is a disagreement, there is no centralUnder control, several nodes participate in decision-making to reach consensus, that is, how to establish a trust relationship between individuals who have no basis for trust in each other.

Blockchain technology uses a set of consensus-based mathematical algorithms to establish a "trust" network between machines, thereby creating new credit through technical endorsement rather than centralized credit institutions.

Different blockchain types require different consensus algorithms to ensure that the last block on the blockchain can reflect the status of the entire network at any time.

So far, the blockchain consensus mechanisms mainly include the following: POW workload proof, POS equity proof, DPOS authorized equity proof, Paxos, PBFT (Practical Byzantine Fault Tolerance Algorithm), dBFT, DAG ( Directed acyclic graph)

Next, we will mainly talk about the principles and application scenarios of common POW, POS, and DPOS consensus mechanisms

Concept:

Proof of work was originally an economic term, referring to the measurement method set up by the system to achieve a certain goal. A simple understanding is a certificate to confirm that you have done a certain amount of work, and to prove that the corresponding amount of work has been completed by certifying the results of the work.

The proof-of-work mechanism has the advantage of complete decentralization. In a blockchain with a proof-of-work mechanism as the consensus, nodes can enter and exit freely and calculate the numerical solution of the random hash. The ability to compete for accounting rights and obtain correct numerical solutions to generate blocks is a concrete manifestation of node computing power.

Applications:

The most famous application of POW is Bitcoin. In the Bitcoin network, during the Block generation process, miners need to solve complex cryptographic mathematical problems to find a Block Hash that meets the requirements, consisting of N leading zeros. The number of zeros depends on the difficulty value of the network. During this period, a lot of trial calculations (workload) are required, and the calculation time depends on the hashing speed of the machine.

Finding a reasonable hash is a probabilistic event. When a node has n% of the computing power of the entire network, the node has an n/100 probability of finding the Block Hash. After the node successfully finds a satisfactory Hash value, it will immediately broadcast the packaged block to the entire network. The nodes in the network will verify it immediately after receiving the broadcast packaged block.

If the verification passes, it means that a node has successfully solved the puzzle, and it will no longer compete for the current block, but choose to accept the block, record it in its own ledger, and then proceed to the next block. Competitive guessing game of blocks. Only the fastest puzzle-solving block in the network will be added to the ledger, and other nodes will copy it, thus ensuring that the entire ledger isuniqueness.

If a node engages in any cheating behavior, it will cause the network node verification to fail and directly discard its packaged block. This block will not be recorded in the general ledger, and the cost of the cheating node will be It is all in vain. Therefore, under the huge mining cost, miners voluntarily comply with the consensus protocol of the Bitcoin system, thus ensuring the security of the entire system.

Advantages and Disadvantages

Advantages: The results can be verified quickly, the system bears a large number of nodes, and the cost of evil is high to ensure the conscious compliance of miners.

Disadvantages: It requires a large amount of algorithm consumption, and it takes a long time to reach consensus

Concept:

Proof of Stake mechanism (Proof of Stake), requirements A certifier provides ownership of a certain amount of cryptocurrency.

The way the proof-of-stake mechanism works is that when a new block is created, the miner needs to create a "coin rights" transaction, which will send some coins to the miners themselves according to a preset ratio. The proof-of-stake mechanism reduces the mining difficulty of nodes in equal proportions based on the proportion and time of tokens owned by each node based on the algorithm, thus speeding up the search for random numbers.

Application:

In 2012, a netizen with the pseudonym Sunny King launched Peercoin, which was the first application of the proof-of-stake mechanism in encrypted electronic currency. The biggest innovation of PPC is that its mining method mixes POW and POS methods, uses a proof-of-work mechanism to issue new coins, and uses a proof-of-stake mechanism to maintain network security.

In order to implement POS, Sunny King learned from Satoshi Nakamoto’s Coinbase and designed a special type of transaction called Coinstake.

The picture above shows how Coinstake works. Coin age refers to the holding period of the currency. If you own 10 coins and hold them for 10 days, then you have collected 100 days of coins. age. If you use these 10 coins, the coin age is consumed (destroyed).

Advantages and Disadvantages:

Advantages: Shortens the time required to reach consensus and is more energy-saving than proof of work.

Disadvantages: Essentially, nodes in the network are still required to perform mining operations, and the authenticity of transfers is difficult to guarantee

Concept:

Authorized equity certificate Mechanism (Delegated Proof of Stake), similar to board voting, this mechanism has a built-in real-time shareholder voting system, just like the systemA never-ending shareholders' meeting is being held every day, where all shareholders vote on company decisions.

While trying to solve the problems of traditional PoW and PoS mechanisms, authorized proof of equity can also offset the negative effects of centralization by implementing technological democracy. The decentralization of the blockchain established based on the DPoS mechanism relies on a certain number of representatives rather than all users. In such a blockchain, all nodes vote to elect a certain number of node representatives, who act on behalf of all nodes to confirm blocks and maintain the orderly operation of the system.

At the same time, all nodes in the blockchain have the power to remove and appoint representatives at any time. If necessary, all nodes can vote to disqualify the current node representatives and re-elect new representatives to achieve real-time democracy.

Application:

Bitshare is a type of cryptocurrency that uses the DPOS mechanism. By introducing the concept of witnesses, witnesses can generate blocks, and everyone who holds BitShares can vote for witnesses. Candidates who get the top N (N is usually defined as 101) candidates in the total number of consent votes can be elected as witnesses. The number of elected witnesses (N) must meet: at least half of the participating voters believe that N has been fully decentralized. .

The candidate list of witnesses is updated every maintenance cycle (1 day). The witnesses are then randomly arranged, and each witness has 2 seconds of permission time to generate a block in order. If the witness cannot generate a block in a given time slice, the block generation permission is given to the witness corresponding to the next time slice. . This design of DPoS makes the generation of blocks faster and more energy-saving.

DPOS makes full use of the votes of shareholders to reach consensus in a fair and democratic way. The N witnesses they voted for can be regarded as N mining pools, and these N mining pools Each other's rights are completely equal. Shareholders can change these witnesses (mining pools) at any time by voting, as long as the computing power they provide is unstable, the computer is down, or they try to use their power to do evil.

Advantages and Disadvantages:

Advantages: Reduce the number of nodes participating in verification and accounting, thereby achieving second-level consensus verification

Disadvantages: Centrality Weaker, the security is weaker than POW, and the node agents are artificially selected, and the fairness is lower than POS. At the same time, the entire consensus mechanism still relies on the additional issuance of tokens to maintain the stability of the agent nodes.

㈣ One article to understand the Internet blockchain

One article to understand the Internet blockchain

One article to understand the Internet blockchain. To understand the blockchain, We have to study the technological development of blockchain from the birth of the Internet.history, to discover the motivations for the emergence of blockchain, and to infer the future of blockchain. Let’s understand the Internet blockchain in one article.

Understand the Internet blockchain in one article 1

The originator of blockchain is mahjong, and the earliest blockchain was invented by the Chinese! The blockchain is just like Mahjong, except that Mahjong has fewer blocks. Mahjong only has 136 blocks. The rules of Mahjong vary from place to place and can be regarded as a hard fork of Bitcoin.

As the oldest blockchain project, Mahjong has a team of four miners. The first one to dig out the 13 correct hash values ​​will get the accounting rights and rewards. It adopts the method of being willing to admit defeat and not cheating. Thousands of consensus mechanisms!

Mahjong is decentralized, everyone can be the banker, and it is completely peer-to-peer.

Mining pool = commission from the boss of the chess and card room.

It cannot be tampered with, because convincing the other three people requires too much computing power and physical strength.

A typical value Internet. The value in my pocket didn't last eight rounds before it went into their pockets.

The Chinese are basically good at playing mahjong. In terms of blockchain, they produce 70% to 80% of the world’s mining machines and have the most computing power in the world, accounting for about 77% of the computing power.

Mahjong is actually the earliest blockchain project:

1. A group of four miners. The miner who first collides with the correct hash value of 13 numbers can obtain the accounting rights. and get rewarded.

2. It cannot be tampered with. Because convincing the other three people requires too much computing power and physical strength.

3. Typical value Internet. The valuable digital currency www.gendan5.com/digitalcurrency/btc.html in my pocket ran into their pockets after eight rounds.

4. Decentralization, everyone can be a banker, it is completely peer-to-peer.

5. UTXO, unspent transaction expenses.

There is another blockchain method of credit, assuming that everyone has no cash

Let’s take a closer look. When everyone reaches a consensus, we see There is no intermediary or third party to judge whether C wins, and the rewards given to C do not need to be transferred to C through a third party. They are all direct peer-to-peer transactions. This process is decentralized, and players (miners) record their own records. After recording the results of the first game, B Dahu drew thirteen pieces, and B got Jia Dongfeng. After the record was completed, a complete block was generated, but remember, this was only the first game. In the entire blockchain , this is just one node. After the 8 rounds mentioned at the beginning, there are 8 nodes (blocks). The 8 blocks are connected together to form a complete ledger, which is the blockchain. Because everyone has one of this ledger, it is a distributed ledger. The purpose is to prevent someone from tampering with the record. At the end of the game, it is clear who wins and who loses.

4 men (A, B, C and D)We gathered together to play mahjong to make money, but no one brought any cash, so we asked a beautiful woman (centralized) to use a notebook to keep track of how much money she won and how much she lost in each game. At the end of the day, everyone uses Alipay or WeChat to pay and settle the ledger. However, if this beauty made a mistake in accounting or was bribed by one of the four people in advance to make a mistake on purpose, there is no guarantee that the outcome of this game will be fair, just, and reasonable. ,dont you agree? then what should we do? If you "play mahjong", you can use "blockchain" as the game rules and adapt it as follows:

Four men (A, B, C and D) got together to play mahjong for money. No one brought any cash. B said Let the beauty she brought keep accounts. A said that none of us knew this beauty, so the four of them, A, B, C, and D, agreed that everyone would keep accounts at the same time (decentralized) on their mobile phones (blockchain nodes) for each game. ), after finally playing mahjong and paying with electronic money directly on the mobile phone, everyone checked the accounting results. The accounting results should have been the same.

Assume that the original result is the account recorded on A’s mobile phone: B owes A 10 yuan. However, the record on B's mobile phone shows that there is no debt, but the other two people (C and D) have the same accounting as A, so the settlement is still based on the majority rule. In addition, everyone has a bad impression of B's ​​integrity. Next The first time I play mahjong, I won’t take B to play with me.

Unless B bribes two people (C and D) in advance to deliberately cheat, but the cost of B bribes them is 100,000 yuan (10,000 times the default of 10 yuan), then in common sense, B only You can choose to give up because the cost of counterfeiting is too high.

Assume that even if B is secretly willing to pay a high price of 100,000 yuan to buy C and D to do this silly cat transaction with huge losses during the card game, the rules of the blockchain are to keep accounts based on timestamps. Yes, it turns out that B owed A 10 yuan when debiting the account at 1 p.m., that is, when C and D changed the account at 3 p.m., time is irreversible and they can only record 3 p.m., which does not comply with the rules of the game. .

In fact, in 2017 the blogger has developed a set of Mahjong coins

China’s earliest blockchain project: a group of four miners, first starting from 148 random numbers The miner who collides with the correct hash value of 14 numbers can obtain an accounting right incentive. Since distributed accounting requires the consensus of several other miners, each accounting transaction takes about ten minutes.

Understanding the Internet Blockchain in One Article 2

1. Before the birth of Bitcoin, 5 Internet technologies that will have a significant impact on the future of the blockchain

In 1969, the Internet was born in the United States. Since then, the Internet has expanded from four research institutions in the United States to the entire planet. In terms of application, it has expanded from the earliest military and scientific research to all aspects of human life. In the nearly 50 years since the birth of the Internet, five technologies have been of particularly great significance to the future development of blockchain.

1. The TCP/IP protocol born in 1974: determines the position of blockchain in the Internet technology ecosystem

In 1974, the development of the Internet took the most critical step, which was the official introduction of the Internet's core communication technology-TCP/IP protocol jointly developed by American scientists Vinton Cerf and Robert Kahn.

This protocol enables the transmission of information between different computers and even different types of networks. All computers connected to the network can communicate and interact as long as they comply with this protocol.

In layman's terms, Internet data can travel tens of thousands of kilometers to reach the computer users who need it. This is mainly because the Internet world has formed a unified information dissemination mechanism. That is to say, Internet devices follow a unified law-TCP/IP protocol when disseminating information.

Understanding the TCP/IP protocol is of great significance to mastering the Internet and blockchain. After the invention of TCP/IP in 1974, the entire Internet was between the underlying hardware devices, the intermediate network protocols and the network Addresses have always been relatively stable, but an endless stream of innovative applications are emerging at the top application layer, including news, e-commerce, social networks, QQ, WeChat, and blockchain technology.

In other words, in the technical ecology of the Internet, blockchain is a new technology at the top layer of the Internet - the application layer. Its emergence, operation and development have not affected the underlying infrastructure and communication protocols of the Internet. , is still one of the many software technologies that operates according to the TCP/IP protocol.

2. Cisco router technology born in 1984: an imitation of blockchain technology

In December 1984, Cisco was established in the United States. The founder was a professor from Stanford University. A couple, Leonard Posak, director of the computer center, and Sandy Lerner, director of the business school's computer center, designed a networking device called a "multiprotocol router" that was placed on the Internet's communication lines to help data Get from one end of the Internet to the other thousands of kilometers away accurately and quickly.

In the entire Internet hardware layer, tens of millions of routers are busy working, directing the transmission of Internet information. An important function of Cisco routers is that each router saves a complete Internet device address table. Once something happens Changes will be synchronized to tens of millions of other routers (theoretically), ensuring that each router can calculate the shortest and fastest path.

When you see the operation process of the router, you will feel very familiar. That is the important feature of the blockchain later. The significance of understanding the router lies in the important features of the blockchain. It has been implemented on the router in 1984. For the router, even if the node device is damaged or attacked by hackers, it will not affect the transmission of the entire Internet information.

3. The B/S (C/S) architecture that was born with the World Wide Web: the opponent of the blockchain and the target of attempted subversion

The World Wide Web is referred to as the Web and is divided into Web clients and server. All updated information is only on the web serverModify, other thousands, tens of thousands, or even tens of millions of client computers do not retain information and only obtain the information data when accessing the server. This structure is often called the B/S architecture of the Internet, that is, the central type architecture. This architecture is also the most important architecture of the current Internet. Internet giants such as Google, Facebook, Tencent, Alibaba, and Amazon have all adopted this architecture.

Understanding the B/S architecture will be of great significance to the subsequent understanding of blockchain technology. The B/S architecture is that data is only stored in the central server, and all other computers obtain information from the server. Blockchain technology has tens of millions of computers without a center, and all data will be synchronized to all computers. This is the core of blockchain technology.

4. Peer-to-Peer Network (P2P): Blockchain The father of the chain and its technical basis

Peer-to-peer network P2P is another Internet infrastructure corresponding to C/S (B/S). Its characteristic is that multiple computers connected to each other are connected to each other. In a peer-to-peer position, there is no distinction between master and slave. A computer can be used as a server, setting shared resources for use by other computers in the network, and as a workstation.

Napster is one of the earliest P2P systems, mainly used for sharing music resources. Napster cannot be regarded as a true peer-to-peer network system. On March 14, 2000, a message was posted on the Slashdot mailing list of the underground hacker site in the United States, saying that AOL's Nullsoft department had released Gnutella, an open source Napster clone software.

In the Gnutella distributed peer-to-peer network model, each networked computer is functionally peer, serving as both a client and a server, so Gnutella is called the first true peer-to-peer network model. Network Architecture.

In the past 20 years, some Internet technology giants such as Microsoft and IBM, as well as liberals, hackers, and even criminals who infringe intellectual property rights, have continued to promote the development of peer-to-peer networks. Of course, those on the Internet want to strengthen information sharing. The idealists also put a lot of enthusiasm into peer-to-peer networks. Blockchain is a software application based on a peer-to-peer network architecture. It is a benchmark application for peer-to-peer networks trying to break out from the silence of the past.

5. Hash algorithm: the key to generating Bitcoin and tokens (tokens)

The hash algorithm converts numbers of any length into fixed-length values ​​using a hash function. Algorithms, famous hash functions such as: MD4, MD5, SHS, etc. It is a member of the family of cryptographic functions defined by the American National Institute of Standards and Technology.

This family of algorithms is crucial to the functioning of the entire world. From Internet application stores, emails, anti-virus software, to browsers, etc., all of them are using secure hashing algorithms. It can determine whether Internet users have downloaded what they want, and whether Internet users have downloaded what they want.Be the victim of a man-in-the-middle or phishing attack.

The process of blockchain and its application to generate new coins from Bitcoin or other virtual currencies is to use the function of the hash algorithm to perform operations to obtain numbers that meet the format requirements, and then the blockchain program gives Bitcoin rewards.

Mining, including Bitcoin and tokens, is actually a small mathematical game built with a hash algorithm. However, because of the fierce competition, people all over the world used powerful servers to perform calculations in order to get the rewards first. As a result, many computers on the Internet participated in this little mathematical game, which even consumed more than 40% of the electricity in some countries.

2. The birth and technical core of blockchain

The birth of blockchain should be the most unusual and mysterious invention and technology in the history of human science, because apart from blockchain, So far, there is no major invention in the history of modern science whose inventor cannot be found.

On October 31, 2008, Bitcoin founder Satoshi Nakamoto (pseudonym) published a paper on the cryptography mailing group - "Bitcoin: A Peer-to-Peer Electronic Cash System". In this paper, the author claims to have invented a new electronic currency system that is not controlled by governments or institutions. Blockchain technology is the basis for supporting the operation of Bitcoin.

The preprint address of the paper is at http://www.bitcoin.org/bitcoin.pdf. From an academic point of view, this paper is far from a qualified paper. The main body of the article is composed of 8 flow charts. It is composed of corresponding explanatory text, no nouns and terms are defined, and the format of the paper is also very irregular.

In January 2009, Satoshi Nakamoto released an application case of blockchain on the SourceForge website - the open source software of the Bitcoin system. After the release of the open source software, it is said that Satoshi Nakamoto mined approximately 1 million bits. Coin. A week later, Satoshi Nakamoto sent 10 Bitcoins to cryptography expert Hal Finney, which became the first transaction in Bitcoin history. With the booming development of Bitcoin, research on blockchain technology has also begun to show explosive growth.

It is indeed difficult to fully and clearly explain the blockchain to the public. We use Bitcoin as the object to introduce the technical characteristics of the blockchain as simply as possible but in depth.

1. Blockchain is a peer-to-peer network (P2P) software application

As we mentioned before, at the beginning of the 21st century, the Internet formed two major types of applications. Architecture, centralized B/S architecture and non-centered peer-to-peer (P2P) architecture. Many Internet giants such as Alibaba, Sina, Amazon, etc. all have centralized B/S architecture. Simply put, it is data Put it in a giant server, and our ordinary users can access the servers of Alibaba, Sina and other websites through mobile phones and personal computers.

Since the beginning of the 21st century, there have been many free sharing of music, videos, and paper materials.Most of the software applications for data use a peer-to-peer network (P2P) architecture, that is, there is no central server. Everyone's personal computers are both servers and clients, with equal status. However, this type of application has never become popular. The main reasons are large resource consumption and intellectual copyright issues. Blockchain is a software application in this field.

2. Blockchain is a peer-to-peer network (P2P) software application that synchronizes information across the entire network

Peer-to-peer networks also have many application methods. In many cases, everyone is not required to Each computer keeps the same information. Everyone only stores the information they need, and downloads it to other computers when needed.

However, in order to support Bitcoin financial transactions, the blockchain requires that every transaction that occurs must be written into historical transaction records and change information be sent to all computers with Bitcoin programs installed. Every computer with Bitcoin software installed maintains the latest and complete Bitcoin historical transaction information.

The characteristics of blockchain's network-wide synchronization and network-wide backup are often referred to as blockchain information security, and the source cannot be changed. Although it is still not absolutely safe in practice, when the number of users is very large, it does have certain security advantages in preventing information tampering.

3. Blockchain is a peer-to-peer (P2P) software application that uses a hash algorithm to generate "tokens" to synchronize information across the entire network

Area The first application of blockchain is the famous Bitcoin. When discussing Bitcoin, a term that is often mentioned is "mining". So what exactly is mining?

The metaphor is that the blockchain program gives the miners (players) 256 coins, numbered 1, 2, 3...256. Every time a Hash operation is performed, it is like tossing a coin. 256 coins are thrown at the same time. After landing, if all the coins with the first 70 numbers happen to be heads. The miner can tell the blockchain program this number, and the blockchain will reward the miner with 50 Bitcoins.

From the perspective of software programs, Bitcoin mining is a mathematical game built using the hash SHA256 function. The blockchain first stipulates a winning mode in this small game: a 256-bit hash number is given, but the last 70 bits of the hash number are all 0, and then the player (miner) continuously enters various numbers. Give the hash SHA256 function and see if you can use this function to get a number with 70 zeros. If you find one, the blockchain program will reward the player with 50 Bitcoins. Actual mining and rewards are more complex, but the above example expresses the core process of mining and obtaining Bitcoin.

When Bitcoin was born in 2009, each bounty was 50 Bitcoins. Ten minutes after its birth, the first batch of 50 Bitcoins was generated, and the total currency amount at this time was 50. Then Bitcoin grew at a rate of about 50 every 10 minutes. When the total reaches 10.5 million (21050% of 00,000), the bounty is halved to 25. When the total amount reaches 15.75 million (new output is 5.25 million, which is 50% of 1050), the bounty is further halved to 12.5. According to the design of the Bitcoin program, the total number of Bitcoins is 21 million.

From the above introduction, Bitcoin can be seen as a guessing game based on a peer-to-peer network architecture. The Bitcoin information rewarded for each correct guess will be transmitted to all players and recorded. into each player's history database.

4. Smart contracts, tokens, ICOs and blockchain basic platforms generated by blockchain technology due to the rise of Bitcoin

From the above introduction, Bitcoin technology It is not a new technology falling from the sky, but a clever combination of various original Internet technologies, such as peer-to-peer network architecture, network-wide synchronization of routing, and network security encryption technology. It can be regarded as a combination of innovative algorithm games. .

Because Bitcoin can be exchanged for legal currency, purchased in kind, and made huge profits through appreciation, the whole world is not calm. With the attitude that if you can do it, I can do it, many people have created their own imitation Bitcoin software applications. At the same time, taking advantage of the difficulty for the government to regulate peer-to-peer networks, various altcoins exploded together with Bitcoin. There have been many incidents of fraud and absconding, which have gradually attracted the attention of governments around the world.

Blockchain basic platform: It is still quite technically difficult to create currency using the blockchain technology framework. At this time, basic technology platforms such as Ethereum, the blockchain basic platform, have emerged, making it convenient for ordinary people. Create a "Bitcoin"-like software program, each showing its magical powers, inviting people to join the game to mine coins, speculate on coins, and gain profits from it.

Pass or token: If each "Bitcoin" or "Altcoin" uses a hash algorithm to create a guessing game and generates its own "currency", this "currency" is collectively referred to as " "Certificate" or "Token".

ICO: Since Bitcoin and Ethereum have been exchanged with the legal currencies of various countries, when other new virtual currencies are issued, only Bitcoin and Ethereum are allowed to purchase the new issued coins. This process of issuing coins It’s called ICO. The emergence of ICO has amplified the transaction volume of Bitcoin and Ethereum. At the same time, many ICO projects are completely based on nihilistic projects, resulting in a large number of frequent fraud cases. This further deepens society’s negative understanding of virtual currencies generated by blockchain.

Smart contract: It can be seen as a software function on the blockchain. It is a program that assists various virtual currency transactions on the blockchain. The specific function is like the fund custody of Alipay on Taobao. When a user receives goods and confirms them on Alipay, the funds are automatically paid to the buyer and owner. Smart contracts also assume this intermediary payment function in blockchain applications such as Bitcoin.

3. The historical status and future prospects of blockchain technology in the Internet

1. Where does blockchain stand in Internet technology? It is a new software and architecture at the top level.

We mentioned in the previous introduction to TCP/IP that blockchain, like browsers, QQ, WeChat, online game software, mobile APPs, etc., is a software form of the top layer of the Internet - the application layer. Its operation still relies on the TCP/IP architecture system to transmit data. But unlike most application layer software, it does not adopt the central software architecture of C/S (B/S). Instead, an unusual peer-to-peer network architecture is adopted. From this point of view, blockchain cannot subvert the Internet infrastructure.

2. Who does blockchain want to subvert? Want to subvert the B/S (C/S) structure of the World Wide Web.

It attempts to subvert the B/S, C/S structure of the World Wide Web, which was born in 1989. Said before. Since 1989, European physicist Tim Berners-Lee invented the World Wide Web and gave up applying for a patent. In the past nearly 30 years, companies including Google, Amazon, Facebook, Alibaba, Internet, Tencent and other companies have used the B/S (C/S) structure of the World Wide Web to grow into Internet giants.

In their headquarters, a powerful central server cluster was established to store massive amounts of data. Hundreds of millions of users obtained the data they needed from the giant servers. This also led to the emergence of cloud computing, and then the Internet giants Open up your unused central server resources to further absorb data from enterprises, governments, and individuals. Centralized Internet giants have an increasing influence on the world, countries, and Internet users.

The goal of blockchain is to try to reduce the influence of Internet giants by distributing data to each Internet user’s computer. It can be seen that the real opponent of blockchain and what it wants to subvert is the 1990 The B/S (C/S) structure born in 2007. But whether it can be subverted depends on its technical advantages and bottlenecks.

3. Technical flaws of blockchain: dilemmas caused by the pursuit of complete equality and freedom

The technical flaws of blockchain first come from its peer-to-peer network architecture. For example For example, Taobao currently has a B/S structure, and massive data is stored in the Taobao server cluster computer room. Hundreds of millions of consumers access the Taobao server website through their browsers to obtain the latest information and historical information.

If blockchain technology is used, hundreds of millions of people will retain a complete Taobao database on their personal computers or mobile phones. Every time a transaction occurs, it will be synchronized to hundreds of millions of other users. This is completely unachievable in reality. The amount of data transferred and stored is too large. It is equivalent to setting up and running hundreds of millions of Taobao websites at the same time.

Therefore, blockchain cannot be applied to projects with large amounts of data, and even smaller website projects will have difficulty using blockchain. By 2018, Bitcoin had been running for nearly 10 years, and the accumulated transaction data had brought the entire system to collapse.

So the blockchain has adopted many alternative methods, such as establishing relay nodes and lightning nodes. These two concepts can also make people confused. In layman’s terms, the blockchain will ask it for DianAfter learning the overriding object B/S structure, we established a data server center to become the relay node of the blockchain, which is also accessed using a browser-like terminal. This is the lightning node of the blockchain.

This change can alleviate the technical shortcomings of the blockchain, but it does make the blockchain what it opposes, centralization. It can be seen that pure blockchain technology has major flaws due to its technical characteristics and cannot be widely used like the World Wide Web. If the technology is upgraded and some parts adopt a B/S (C/S) structure, the blockchain will become centralized. The information node no longer maintains the dream when it was born.

4. Looking at the future prospects of blockchain from the Internet brain model

We know that the Internet generally refers to the Internet that connects computer networks around the world. On this basis The development of a global Internet network covering the whole world is called the Internet, which is a network structure that is interconnected.

Since the birth of the Internet in 1969, humans have innovated in the Internet field from different directions, and there is no unified plan to build the Internet into a structure. When the wheel of time reaches 2017, with the advent of artificial intelligence, With the vigorous development of science and technology such as the Internet of Things, big data, cloud computing, robots, virtual reality, and the industrial Internet, when humans look up to see the giant systems they have created, the model and architecture of the Internet brain have become increasingly clear.

Through nearly 20 years of development, relying on the B/S and C/S structures of the World Wide Web, Tencent QQ, WeChat, Facebook, Weibo, and Twitter Amazon have developed structures similar to neuron networks. Internet devices, especially personal computers and mobile phones, map personal data and functional space on the giant's central server through the software on the device, allowing them to add friends, communicate and transfer information. Internet giants continue to optimize the software versions of hundreds of millions of terminals through software upgrades in central server clusters. In the neurological system, this is a standard central nervous system structure.

The birth of the blockchain provides another neuron model. Instead of uniformly managing neurons in the centralized services of giants, each terminal, including personal computers and personal mobile phones, becomes an independent neuron node. , retaining an independent data space and synchronizing mutual information. In the neurological system, this is a distributed neural structure with no center and multiple neural nodes.

Interestingly, these two different types of neural structures appear in the development of the nervous system. In lower organisms, blockchain-like neural structures have appeared. There are multiple ganglia with the same functions, all of which can command body activities and reactions. However, as organisms evolve, these ganglia gradually merge. When they evolve into higher In biology, the central nervous system appeared, which contains a large number of neurons that interact with each other.

4. Judgment on the future status of blockchain in the Internet

1. Understanding of Bitcoin: a guessing game based on peer-to-peer network architecture (P2P), through highIt has become a "world currency" that is not subject to government supervision through the operation of smart finance and public opinion.

2. Understanding of blockchain: a peer-to-peer (P2P) software application that uses hashing algorithms to generate "tokens" to synchronize information across the entire network.

3. Blockchain has specific uses, such as large-scale election voting, large-scale gambling, financial transactions that circumvent government financial supervision, etc. It still has irreplaceable uses.

4. In more cases, blockchain technology will rely on the B/S and C/S structures of the Internet to achieve functional expansion, but overall it is still a supplement to the existing technology of the Internet. Most of the application scenarios currently envisaged by blockchain can be implemented using B/S and C/S structures, with higher efficiency and more mature technology.

5. Whether from the perspective of information transmission efficiency and resource consumption, or from the evolution of the nervous system, blockchain cannot become the mainstream architecture of the Internet, let alone a subversive and revolutionary leader of the future Internet.

6. Of course, Internet giants developed with B/S and C/S structures also have their problems, but these can be gradually solved through commercial and political methods in the future.

㈤ Are there 7 core technologies for blockchain operation that you should know?


How many of the 7 core technologies for blockchain operation do you know?
1 .Blockchain link
As the name suggests, blockchain is a chain composed of blocks. Each block is divided into two parts: block header and block body (including transaction data). The block header includes the hash (PrevHash) value (also called hash value) of the previous block used to implement block linking and the random number (nonce) used to calculate the mining difficulty. The hash value of the previous block is actually the hash value of the header of the previous block, and the rules for calculating random numbers determine which miner can obtain the power to record the block.
2. Consensus Mechanism
Blockchain was born with Bitcoin and is the basic technical architecture of Bitcoin. Blockchain can be understood as a decentralized accounting system based on the Internet. A decentralized digital currency system like Bitcoin requires blockchain to ensure the consistency of accounting by each honest node without a central node. Therefore, the core of blockchain technology is a consensus mechanism that reaches consensus on the legality of transactions among individuals who have no basis for trust in each other without central control.
There are currently four main categories of blockchain consensus mechanisms: PoW, PoS, DPoS, and distributed consensus algorithms.
3. Unlocking scripts
Scripts are an important technology for automatic verification and automatic execution of contracts on the blockchain. Each output of each transaction does not strictly point to an address, but to a script. A script is like a set of rules that govern how the recipient can spend the assets locked on this output.
The legality verification of transactions also relies on scripts. Currently it relies on two types of scripts: lock scripts and unlock scripts. The locking script is a condition added to the output transaction, implemented through a script language, and is located at the output of the transaction. The unlocking script corresponds to the locking script. Only if the conditions required by the locking script are met, the corresponding assets on this script can be spent, which is located at the input of the transaction. Many flexible items can be expressed through scripting language. The interpretation script is similar to a "virtual machine" in our programming field, which is distributed and runs on every node in the blockchain network.
4. Transaction Rules
Blockchain transactions are the basic units that constitute blocks, and are also the actual effective content that the blockchain is responsible for recording. A blockchain transaction can be a transfer or other transactions such as the deployment of smart contracts.
In the case of Bitcoin, a transaction refers to a payment transfer. The trading rules are as follows:
1) The input and output of the transaction cannot be empty.
2) For each input of the transaction, if its corresponding UTXO output can be found in the current transaction pool, the transaction will be rejected. Because the current transaction pool is a transaction that has not been recorded in the blockchain, and each input of the transaction should come from a confirmed UTXO. If found in the current transaction pool, it is a double spend transaction.
3) For each input in the transaction, its corresponding output must be UTXO.
4) Each input unlocking script must work with the corresponding output locking script to verify the compliance of the transaction.
5. Transaction Priority
The priority of blockchain transactions is determined by the blockchain protocol rules. For Bitcoin, the priority of a transaction being included in a block is determined by the time it takes for the transaction to be broadcast to the network and the size of the transaction. As the time it takes for a transaction to be broadcast to the network increases and the chain age of the transaction increases, the priority of the transaction is increased and will eventually be included in the block. For Ethereum, the priority of a transaction is also related to the transaction fee that the publisher of the transaction is willing to pay. The higher the transaction fee that the publisher is willing to pay, the higher the priority of the transaction being included in the block.
6.Merkle proof
The original application of Merkle proof is the Bitcoin system (Bitcoin), which was described and created by Satoshi Nakamoto in 2009. The Bitcoin blockchain uses Merkle proofs in order to store transactions in every block. This makes the transaction unable to be tampered with and makes it easy to verify whether the transaction is included in a specific block.
7.RLP
RLP (Recursive Length Prefix, recursive length prefix encoding) is a main encoding method for object serialization in Ethereum. Its purpose is to encode any nested sequence of binary virtual data. Lu Ji

㈥ What does Jin Wowo mean by blockchain distributed accounting

What does Jin Wowo mean by blockchain distributed accounting? , how to understand goldDistributed accounting of Wowo blockchain technology?

Blockchain technology is also called distributed ledger. Generally speaking, if we assume that the database is a ledger, reading and writing the database can be regarded as an accounting behavior. The principle of blockchain technology is Find the person with the fastest and best accounting within a period of time, let this person do the accounting, and then send this page of information in the ledger to everyone else in the entire system. This is equivalent to changing all the records in the database and sending them to every other node in the entire network, which not only ensures data security, but also ensures the authenticity of the data, thus improving social credibility.

What are the characteristics of distributed accounting mentioned by Jinwowo’s blockchain technology? , how to simply understand the distributed accounting function of Jinwowo Network Technology’s blockchain technology?

Blockchain technology adopts a distributed accounting model. Whether it is real-time reconciliation capabilities in registration and settlement scenarios or non-tampering capabilities in data storage scenarios, it can provide traceability, anti-counterfeiting, and supply chain scenarios. Provide strong protection. Jinwowo uses blockchain technology to ensure product data security.

How should we understand the distributed accounting of Jinwowo blockchain technology?

Distributed storage is a data storage technology that uses the disk space on each machine through the network and constructs these dispersed storage resources into a virtual storage device, and the data is dispersedly stored in various corners of the network.

What is distributed storage in Jinwowo blockchain technology?

Chongqing Jinwowo analyzes and studies the distributed storage in blockchain technology as follows:
First, each node of the blockchain stores complete data according to the block chain structure. Traditional distributed storage generally uses The data is divided into multiple parts for storage according to certain rules.
Secondly, each node in the blockchain stores independently and has equal status, relying on a consensus mechanism to ensure storage consistency, while traditional distributed storage generally synchronizes data to other backup nodes through a central node.

How does Jin Wowo explain the blockchain, the distributed ledger model?

Blockchain technology is also called distributed ledger. Generally speaking, if we assume that the database is a ledger, reading and writing the database can be regarded as an accounting behavior. The principle of blockchain technology is Find the person with the fastest and best accounting within a period of time, let this person do the accounting, and then send this page of information in the ledger to everyone else in the entire system. This is equivalent to changing all the records in the database and sending them to every other node in the entire network, which not only ensures data security, but also ensures the authenticity of the data, thus improving social credibility.
The trust of blockchain comes from the underlying technology, which is to exchange historical information for current trust. This is a low-cost credit mechanism that has slowly grown from birth to blockchain, which is bound to receive attention and promotion.

What does distributed accounting of blockchain mean?

This is a good question. Let me give you an example. For example, I deposited 100 in the bank.Yuan, this deposit data is only recorded in the bank's database and cannot be obtained by others, that is, "centralized accounting". The blockchain is a distributed accounting, a new information recording technology, and it is "encrypted" and "distributed". The data no longer exists in a center, but is stored once on all computers in the network. . For example, if I transfer 100 yuan to you, I will shout to all the computers in the entire network, and everyone will keep an account together, which is "distributed accounting".

What is the distributed storage in Jinwowo blockchain technology?

Chongqing Jinwowo Analysis: Big data refers to data that cannot be captured, managed and processed with conventional software tools within a certain time range***. It requires new processing models to have stronger decision-making power and insights. massive, high growth rate and diversified information assets with strong capabilities and process optimization capabilities.
Big data needs to cope with massive and rapidly growing storage, which requires the underlying hardware architecture and file system to be much more cost-effective than traditional technologies and to be able to flexibly expand storage capacity.

Jinwowo Network: What is distributed storage in the blockchain?

Jinwowo Network Analysis: In the blockchain, data is stored on different computers, which not only achieves decentralization, but also has a high degree of encryption and security, while also reducing costs.
And if your computer has extra storage space, you can even rent out the extra storage capacity, killing multiple birds with one stone.

㈦ Blockchain Technology

Background: After the birth of Bitcoin, it was discovered that the technology was very advanced, and blockchain technology was discovered. 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 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, and the tampering will be 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.

After an 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

b. Centralized accounting is highly efficient

②Disadvantages of centralized accounting: < /p>

a Denial of service attack

b Stop service after getting tired

c Central organization is vulnerable to attack. 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. When a new transaction is received and the accuracy is verified, 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#

㈧ Consensus algorithm in blockchain technology

About the block We have shared some explanations and analysis of knowledge points on chain technology with you many times. Today, in the Huilongguan Java course, we will learn about some basic definitions and characteristics of the consensus algorithm in blockchain technology.

A brief look at the blockchain

The chain in our general ideology is an iron chain, made of iron. One link after another. Figuratively, the blockchain can be understood this way, except that it is not made of iron, but connected by blocks with a certain data structure. This is a simple prototype

< /p>

Popular explanation of consensus

The so-called consensus, in layman’s terms, means that we all agree on the understanding of something. For example, we have daily meetings to discuss issues, or we can judge whether an animal is a cat. After looking at it with the naked eye, we feel it looks like a cat. If it meets the characteristics of a cat, then we think it is a cat. Consensus is a rule.

Continuing with our meeting example. Participants in the meeting discuss and solve problems through meetings.

Compared with the blockchain, miners participating in mining use a certain consensus method (algorithm) to make their own ledger consistent with the ledgers of other nodes. The deeper meaning of keeping the ledger consistent is to keep the block information in the chain consistent.

Why is consensus needed? Is it possible to not need it? Of course not. Without the rules of consensus in life, everything will be chaotic. The blockchain loses consensus rules, and each node does its own thing, losing its consistent meaning.

The corresponding relationship between these two examples is as follows:

Meeting people = mining miners

Meeting = consensus method (algorithm)

Talk about solving problems = make your own ledger consistent with the ledgers of other nodes

If you don’t understand the concept of a node, please first understand it as a miner. A node contains many training roles, and miners are one of them.

Consensus Algorithm

Currently common in blockchains, nodes keep their own ledgers consistent with the ledgers of other nodes. There are several consensus methods (algorithms) as follows:

PoW, represented by Bitcoin (BTC)

Disadvantages:

The emergence of mining pools violates the original intention of decentralization to a certain extent, and also makes 51% attacks possible, affecting its security.

There is a huge waste of computing power. Look at the mining pool that consumes a lot of electricity resources. As the difficulty increases, what is mined is not enough to pay the electricity bill

< /p>

PoS, represented by Ethereum (ETH), transitioning from PoW to PoS

Disadvantages:

< p>The cost of attackers attacking the network is very low, and they can compete if they own tokens

In addition, the probability that nodes with a larger number of tokens will obtain accounting rights will If it is larger, the network consensus will be dominated by a few wealthy accounts, thus losing fairness.

㈨ Each block in the blockchain records what verification steps it needs to go through

It will go through three verification steps, namely:
1. Ledger verification problem In fact, for the first problem, it is easy to think of a solution, that is, the minority obeys the majority. If the ledger data of a certain node is tampered with, then it only needs to be compared with the data of other nodes in the entire network. Abnormalities will definitely be found. But the problem is that as time goes by and the accumulation of records, the amount of data will become larger and larger. I remember that in 2013, the Bitcoin wallet I downloaded and the transaction ledger data downloaded simultaneously from the network already amounted to several times. Ten GB. It can be said that it is unrealistic to transmit and compare such a large amount of data one by one.
2. Proof of account ownership If I want to transfer money from one account to another, I must prove my ownership of the account. For a centralized currency system, we only need to show the password to the bank, but for a decentralized system, if we also prove our ownership of the account by showing the password to other nodes, then our password will be leaked. given to other nodes (i.e. users).
3. In fact, this is a relatively basic problem in modern cryptography. To put it bluntly, it is how to self-certify your identity without exposing your private key. There is also a very mature solution: using an asymmetric encryption algorithm. Regarding the details of the algorithm, we plan to talk about some basic algorithms of modern cryptography separately later. Here we will use an analogy to describe them.
4. Accounting problem: The premise of decentralization is that nodes need to be online at all times, otherwise no one will handle accounting, verifying transactions, etc. So, what mechanism does Bitcoin have to make people willing to stay online at all times? Woolen cloth? As we said before, thanBitcoin_10 minutes will package and record the transaction data within these 10 minutes into a block, which is accounting. But not everyone has the right to keep accounts. Every node in the entire network will calculate a question. Only the first node to solve the answer that meets the requirements has the right to keep accounts. As a reward, this node You will get a certain amount of Bitcoin.
5. As the price of Bitcoin gets higher and higher, more and more people are participating in this kind of problem-solving competition and jokingly calling this process "mining". It is these "miners" ”, maintaining the operation of the entire Bitcoin network. And this is the issuance process of Bitcoin: _10 minutes, new Bitcoins are generated by rewarding miners.

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