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

区块链挖矿全节点是什么,区块链挖矿全节点怎么算

发布时间:2023-12-14-17:38:00 来源:网络 区块链知识 区块   节点   挖矿

区块链挖矿全节点是什么,区块链挖矿全节点怎么算

区块链挖矿全节点是一种特殊的网络节点,它能够完整地存储区块链的整个历史数据,包括每一个区块中的所有交易信息。这种节点可以持续地接收、验证、存储和传播新的区块,从而维护着整个区块链网络的安全性和可靠性。

关于区块链挖矿全节点,我们可以拓展3个相关关键词:矿工、挖矿报酬、共识机制。

一、矿工:矿工是区块链网络中的一种节点,它们负责验证新区块中的交易,并将其添加到区块链上。矿工通过计算机算力解决复杂的数学难题,以确定新区块的有效性。一旦新区块被验证,矿工将获得挖矿报酬,这是他们贡献劳动所得到的回报。

二、挖矿报酬:挖矿报酬是指矿工在验证新区块时获得的回报。挖矿报酬可以是数字货币,也可以是其他形式的奖励,如矿池的奖励、矿池的折扣等。挖矿报酬的数量取决于矿工的算力,以及网络中的总交易量。

三、共识机制:共识机制是指确保区块链网络的安全性和可靠性的一种机制。它有助于确保区块链网络中的所有节点都能够保持一致,以及确保区块链的安全性。常见的共识机制有工作量证明(PoW)、权益证明(PoS)、账本共识(PBFT)等。

区块链挖矿全节点是区块链网络中不可或缺的一种节点,它能够完整地存储和传播区块链的数据,从而维护网络的安全性和可靠性。关于区块链挖矿全节点,我们可以拓展3个相关关键词:矿工、挖矿报酬、共识机制,它们都是区块链网络中不可缺少的要素,能够确保区块链的安全性和可靠性。


请查看相关英文文档

① What does blockchain node mean?

Blockchain node means a smart device connected to the blockchain network, which can be called a node. , but this node may play different roles according to the characteristics of the device. This is a great feature of distributed networks, and the more nodes there are on the entire blockchain network, it means that the blockchain network is more widely distributed, more stable and more secure. Nodes include mobile phones, mining machines, servers, etc. Those who operate a node can be ordinary wallet users, miners, and mining pool users who collaborate with multiple people. ”
[Extended information]
A node is a server in a region. In the Internet area, all the running data of an enterprise is in one server, then this server is a node.
Just like what we use every day WeChat handles so many chat messages, transfers, etc. every day. The storage and operation of these data are all in Tencent's company's servers. So this server that processes data can be called a "node". Let's talk about blockchain In the world, everyone already knows that blockchain is a decentralized distributed database. It does not rely on any centralized server. It is composed of thousands of "small servers". As long as we download a blockchain Client, we become one of the thousands of "little servers".
In this way, if we want to play with the blockchain, we ourselves are equivalent to a node.
Nodes are also divided into light nodes and full nodes. A full node is a node that owns all the transaction data of the entire network, and a light node is a node that only owns transaction data related to itself. And the more and more widely the nodes are distributed, the more the blockchain network will The more decentralized the network is, the safer and more stable the network operation will be. For example, there are 16 million LinkChain users now, which means that there are also many ChainChain nodes now. Friends who want to play with blockchain can try it now Try Lianxin. Lianxin is a good blockchain application.
The existence of nodes is a representation of the distributed nature of the blockchain and is also the charm of the blockchain.
The blockchain is a distributed system, a system There are many nodes in it. You can simply understand these nodes as computers or servers connected through the Internet. And depending on the nature of the blockchain, the ways to become a node are also different. Of course, the definition of a node is also different. For In theory, for a public chain like Bitcoin, you download the complete blockchain, participate in transactions and mining, and you are considered a node.
However, in today's Bitcoin, miners, full nodes, and lightweight nodes , or even ordinary users, may be called nodes in different contexts. But in any case, Bitcoin’s system is not so much “the blockchain will automatically update when you connect to the network”, but rather that you want to mine. Or for transactions (and you don’t trust other people’s verification results), you must update the entire blockchain. This is not an automatic obligation, but a voluntary matter.

② Bitcoin nodes are What

So let’s talk about what a node is?
Node is a network node in the blockchain distributed ledger system. It connects servers, computers and other equipment through the network. Blockchains of different natures have different ways of becoming nodes. For example, Bitcoin is a node that participates in transactions and transactions. For mining, EOS participates in the election to become a node.
The following is what a Bitcoin full node is.
Bitcoin full node is a node that downloads and preserves complete blockchain data by loading the Bitcoin client (including BitcoinUnlimited version and bitcoincore version, etc.).
Because of the congestion of the blockchain transaction network, the author solves the problem by adjusting broadcast communication, information encryption and decryption, consensus mechanism, and transaction verification mechanism. In the entire Bitcoin network, from miners to ordinary users, it can be seen as It is a node in the Bitcoin network, but because Bitcoin has the characteristics of decentralization, its important role in the entire network is the "Bitcoin full node."

③ Super in the blockchain What are nodes and what are they used for?

There are many discussions on who can be selected as an EOS super node. So, what exactly is an EOS super node, why should we run for election, and what are the criteria for running?
EOS can be understood as Enterprise
Operation
System, which is a blockchain operating system designed for commercial distributed applications. It is not a currency like Bitcoin and Ethereum, but a token based on the EOS.IO software project.
As for the most critical consensus mechanism, EOS uses the DPOS (Delegated Proof of Stake) consensus mechanism, which creates blocks by trusted accounts (trustees, the top 21 votes) elected by the community. , which is characterized by short block generation time, high efficiency, and almost no forks. This is a bit like a joint-stock company. Ordinary shareholders cannot join the board of directors and must vote for representatives (trustees) to make decisions for them.
Nodes are the basis for building the EOS network. The above 21 trusted accounts are the EOS super nodes (there are 100 backup nodes at the same time), and they generate all block records of the EOS network. In other words, the reason why EOS wants to run for super nodes is determined by the DPOS consensus mechanism.
The development of EOS requires 21 super nodes to provide computing and bandwidth support for the entire network. Each super node has organized its own EOS community, which will also introduce people, money, and materials into the development of EOS. Super nodes It will also compete for development like real cities.
According to relevant information, the founder of Big
one, Lao Mao, EOS Alliance, EOS Gravity Zone, Prince Gong and others have all joined the election of EOS super nodes. In this case, there must be a correlation of interests between super nodes and EOS. It is understood that in addition to mining income, EOS will issue an additional 5% every year to these superLevel nodes, each node can earn approximately
2.38
Ten thousand
EOS per year. Moreover, if EOS subverts ETH after the mainnet goes online in June, the price will skyrocket dozens or even hundreds of times. This is undoubtedly very tempting.

④ Can the blockchain node be on the same computer?

The blockchain node can be on the same computer. If you are just mining, you do not need a full node. Blockchain nodes are also divided into light nodes and full nodes. Light nodes store part of the information on the blockchain, and full nodes store all the information on the blockchain.

How the blockchain operates:

Take the Bitcoin blockchain system as an example. The time system for the birth of a new Bitcoin block is set to ten minutes.

1. After a transaction is generated, in order for the entire network to recognize it as valid, it must first be broadcast to other participating nodes (linked computers) in the blockchain network.

2. Each node must correctly timestamp the ten-minute transactions and put them into this block.

3. If a node solves the mathematical problem of random numbers and has legal block accounting rights, this node will announce to the entire network all its time-stamped transactions in the past 10 minutes. , and checked by other participating nodes in the entire network.

4. The Bitcoin system will reward the node that wins the legal block accounting rights. After it broadcasts, other nodes will check the accuracy of the block accounting. Other nodes are actually solving the math problem at the same time and stamping timestamps at the same time, but they are not faster at solving the math problem. In other words, they can't win the reward in this block, and they have to find a way in the next block.

5. Generally speaking, each transaction must go through 6 confirmations, that is, it must pass 6 10-minute accounting before it can be recognized as a legal transaction in the system. Once Accounting is not recognized.

⑤ What are full nodes and light nodes of the blockchain?

Including wallets, miners, complete blockchains, and network routing nodes, which can independently verify transactions and maintain peer nodes. Connection.

⑥ What is blockchain mining and what does it do? Detailed introduction to blockchain and virtual currency

When Bitcoin was first released, people discovered that it was decentralized and not It is controlled by any center; it is completely open, except for the encryption of transaction information, the entire system information is highly transparent, and the technology is open source; security, as long as you cannot control %51 of all nodes, you cannot modify the data arbitrarily, which makes it relatively safe ; Independence, the entire model and Bitcoin do not rely on any third party, all nodes verify and exchange data within the system without any intervention

Here we explain in detail what blockchain technology is, to put it bluntly It’s block + chain, so what is “block”? What is a "chain" again?

A block is aLedger transaction accounting is completed by multiple nodes distributed in different places, and each node records a complete account, so they can all participate in supervising the legality of the transaction and can also jointly testify for it

Each block contains the encrypted hash of the previous block, the corresponding timestamp and transaction data (usually represented by a hash value calculated by the Merkle tree algorithm). This design makes the block content Difficult to tamper with. Distributed ledgers connected by blockchain technology can effectively record transactions between two parties and permanently verify the transactions.

The function of the hash function h(): convert a string of any length into a fixed-length (for example, 256 bits) output. The output is also called a hash value. This output is irreversible

It is difficult to find two different x and y such that h(x) = h(y), that is, two different inputs, There will be different output. Theoretically, two different inputs may have different outputs, but this is almost impossible. For example, if an infinite space is mapped to a finite space, there must be a many-to-one situation. The theory exists, but there are no rules. It is guaranteed that you cannot find this result through any mathematical inference. Why is it 256 bits here? Isn't it longer? Because 256 bits are secure enough.

Split the ledger into blocks. For example, a piece of paper in a book is a block. Each block records transactions within a period of time, such as 10 minutes.

We divide Each piece of paper is likened to a block. A part of content is added to each block. We call it a block header, which records the hash value of the parent block. Each block stores the hash value of the parent block. , connect all blocks smoothly to form a blockchain

Record the hash value of block 1 to the block header of block 2. In this way, the block header of each block is recorded The hash value of the parent block, each block is linked in order, this is called a blockchain. The first block has no block header and is also called the genesis block

The blockchain is a ledger. Only when transactions occur in the ledger will the money in your account increase. If you need to make a transaction, you first need an account number and password. Just like your bank card has an account number and password, others can make a transfer to you. The account password on the block ledger is the public key and private key

Lao Wang (who already has a private key and a public key) wants to transfer 10 BTC to Zhang, which requires some operations

It is proved that Lao Wang himself issued the transfer signature function Sign (Lao Wang’s private key + Transfer information: Lao Wang transferred 10 BTC to Zhang San) = signature of this special account
The verification is that Lao Wang himself issued the transfer verification function Verify (Lao Wang’s address + transferAccount details: Lao Wang transferred 10 BTC to Zhang San + signature of this transfer) = true
Once the transfer is recorded in the block, no one can change it. Zhang San will increase by 10 BTC, Lao Wang will decrease by 10 BTC accordingly. The entire operation is automatic. For example, your wallet app will help you do this. The app knows your private key, you tell the wallet the transaction content, and the wallet signature is announced to the entire network, waiting for others to verify the transaction.

Centralized accounting will be more efficient. Banks, governments, or Alipay will keep accounts for you, which is very reliable, because they cannot touch your money unless they have your private key

There are some shortcomings in centralized accounting

In decentralization, everyone can keep accounts, and everyone can keep a complete ledger. Anyone can download open source programs, participate in Bitcoin's p2p network, monitor transactions sent from all over the world, become an accounting node, and participate in accounting. Suppose Xiaoyi releases a transaction and broadcasts it to the entire network, and accounting node A listens. When this transaction arrives, A verifies that the transaction bit is true and puts it into the transaction pool to continue to spread to other nodes. Because it is spread through the network, the transaction pools of different accounting nodes are not necessarily the same at the same time. Every 10 minutes, from all accounting nodes Among the nodes, select one according to a certain method. After verifying that the transaction of this node is true, then compare the transaction records in the transaction pool of this selected node with the transaction records in the transaction pool of your own (A) node. The comparison is completed. After that, the transactions recorded by the selected accounting nodes will be deleted from the transaction pool, and the other accounting nodes will continue to record and wait for the next selection. There is a cycle every 10 minutes. During this 10 minutes, all accounting nodes will record accounts normally. , 10 minutes later, a node will be selected to use the transactions in its transaction pool as a new block. This block comes from the transaction pool of an accounting node I randomly selected among all the accounting nodes, and the cycle continues

A transaction is not completed once it is recorded. Only when the transaction becomes a certain block, the transaction is truly completed. This is a complete accounting process of decentralization. Your transaction will not be recorded immediately because the p2p network propagation takes time. If the node of the selected block has not received your transaction, the transaction will be not done. A block is generated every 10 minutes, but not all transactions within 10 minutes can be recorded. 10 minutes is just an average value

Due to the characteristics of decentralized accounting, accounting nodes with accounting rights will receive a 50BTC reward every ten minutes, which is about the same for every 210,000 blocks. In 4 years, the reward is halved. Bitcoin has been halved twice since its issuance. Then a new block is generated every ten minutes. The reward for this accounting node is 10.5 BTC. If it is halved every 4 years, the total number of BTC can be calculated. The amount is approximately 21 million, and it is expected to be mined in 2040. The reward for recording a block is also the only one in Bitcoin.Issuance method, after BTC is mined, the only income the accounting nodes can obtain is the transaction fee

The accounting nodes compete for accounting rights through questions,

Find someone bit random number makes the equation invalid
SHA256 hash function (random number + parent block hash value + transaction in the transaction pool) a certain specified value)
Start from 0 and try your luck by traversing the random number Except, there is no other solution. The process of solving the problem is also called mining, so the accounting node that solves this problem is also called a miner. The faster you traverse the random numbers, the greater the possibility that you will get the accounting right. , this traversal speed is called computing power by mine bosses. In order to obtain this computing power, mine bosses will buy more mining machines with higher computing power

Whoever solves the problem correctly first will win. You get the accounting rights. Accounting node A is the first to find the solution, which is announced to the entire network. After other nodes verify that it is correct, node A obtains the block, gains 12.5 BTC, and restarts a new round of calculation after the new block. This method is called (POW) allocating accounting rights

It usually takes about 10 minutes to solve this random number. 10 is not absolute, because the process of solving this problem is a process of luck. In response to changes in computing power in the future, Bitcoin will increase or decrease the difficulty every 2016 blocks, about two weeks, so that the average block generation time is ten minutes

Each block contains The encrypted hash of the previous block, the corresponding timestamp, and the transaction data (usually represented by a hash value calculated by the Merkle tree algorithm) are included. This design makes the block content difficult to tamper with. Distributed ledgers connected by blockchain technology can effectively record transactions between two parties and permanently verify the transactions.

Different from traditional stored data, each node of the blockchain stores complete data according to the block chain structure. Each node of the blockchain is independent and has equal status, relying on The consensus mechanism ensures storage consistency, while traditional distributed storage generally synchronizes data to other backup nodes through a central node.

Mahjong is a traditional Chinese blockchain project. A group of four miners work together. The miner who first collides with the correct hash value of 13 numbers can obtain the accounting rights and be rewarded.

Many people say that blockchain is a scam and Bitcoin is a scam. This may be a scam, but this technology has been widely recognized and applied. The cryptography knowledge involved in blockchain can only be used by ordinary people. Even if you don’t understand it, the most important thing is to look at the problem from a relatively rational perspective. Don’t let the wind be the rain.

There is something incredible about this technology. It maintains absolute order without a center or supervision. This is the trust that only needs to be established by everyone's consensus. Bitcoin has created this.Consensus, everyone is fair and equal in the world of blockchain.

⑦ Bitcoin test network

Satoshi Nakamoto created the main Bitcoin blockchain, and the main chain network where the genesis block is located is called the main network. There are other Bitcoin chains for testing purposes:
The existing ones are testnet, segnet and regtest.

testnet is a fully functional online P2P network that includes wallets, test Bitcoins (testnet coins), mining, and all other mainnet-like features.
In fact, there are only two differences from the main network: no one recognizes the value of testnet coins, and the mining difficulty is relatively low, so you can happily use testnet coins.

Those development software that want to interact with the Bitcoin main network can now be tested on the testnet. The benefits of this are really obvious.

testnet3 is the current test network version, because it has appeared three times since the genesis block was restarted. This network is also relatively large, with dozens of Gs.

To carry out testnet full node mining, you need to prepare a hard disk. If you are starting the testnet instead of the mainnet, you can use the following command:

Then you can use the bitcoin-cli command line tool, but switch to testnet mode:

testnet3 All features of the mainnet are supported, including Segregated Witness which has not yet been activated on the mainnet, so testnet3 can also be used to test the Segregated Witness feature.

Such an isolated test network is used to help develop and test Segregated Witness (segwit). This test blockchain is called segnet and can be connected by running a special version of Bitcoin Core.

Since segwit was added to testnet3, segnet will no longer be used to test the segwit function later.

Regtest stands for regression testing and is a Bitcoin core feature that allows users to create local blockchains for testing.
Unlike testnet3, the regtest blockchain is designed to run as a closed system for local testing. So you can start from the genesis block, start the regtest chain, and create a local genesis block.

Additional nodes can be added to the network, or run with a single node to test the Bitcoin Core software.

To use regtesTo start Bitcoin Core in t mode, you can use the regtest flag:

You can develop Bitcoin core, full-node consensus clients, wallets, exchanges, etc., even smart contracts and complex scripts, etc. You can use the test network for development.

⑧ What does blockchain mining mean?

In 2009, Satoshi Nakamoto invented Bitcoin and set a limit of only 21 million Bitcoins to be added to the Bitcoin network. , by participating in the production of blocks and providing proof of work (PoW), you can obtain rewards from the Bitcoin network. This process is mining.

The concept of "mining" is taken from the existing concepts in our real economic life, such as gold mining, silver mining, etc. Because minerals are valuable, people are driven to work hard. dig.

Another important point of Bitcoin mining is that the miners participating in mining recognize the value of Bitcoin, and there are people in the market who are willing to spend money on the Bitcoins they mine. So, Bitcoin mining makes sense.

(8) Blockchain Mining Full Node Extended Reading

Bitcoin’s Currency Characteristics

1. Decentralization

Bitcoin is the first distributed virtual currency. The entire network is composed of users and there is no central bank. Decentralization is the guarantee of Bitcoin’s security and freedom.

2. Circulation around the world

Bitcoin can be managed on any computer connected to the Internet. Anyone can mine, buy, sell or receive Bitcoin regardless of location.

3. Exclusive ownership

Manipulating Bitcoin requires a private key, which can be isolated and stored in any storage medium. No one can obtain it except the user himself.

4. Low transaction fees

Bitcoins can be remitted for free, but a transaction fee of about 1 bit cent will ultimately be charged for each transaction to ensure faster transaction execution.

5. No hidden costs

As a means of payment from A to B, Bitcoin does not have cumbersome limits and procedures. You can make the payment by knowing the other party's Bitcoin address.

6. Cross-platform mining

Users can explore the computing capabilities of different hardware on many platforms.

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