主流区块链都是如何挖矿的呢,区块链怎么挖矿的
近年来,区块链技术的发展已经迅速,它已经成为了一种新型的金融技术,并且在各行各业得到了广泛的应用。而挖矿,作为区块链技术的基础,也受到了越来越多的关注。那么,主流区块链都是如何挖矿的呢?
首先,我们要了解挖矿的基本概念。挖矿是指通过计算机系统来验证区块链交易,并获得报酬的过程。比特币是最具代表性的区块链应用,它使用工作量证明(Proof of Work)的方式来进行挖矿。
工作量证明,也称为PoW,是指挖矿者需要解决一个计算难题,以获得报酬。当挖矿者成功解决该难题后,就可以获得一定数量的比特币,从而完成挖矿。
此外,还有一种比特币挖矿方式,它称为“比特币矿池挖矿”,是指多个挖矿者共同参与挖矿,以获得报酬。矿池挖矿的优势在于,挖矿者可以分享比特币的收益,而且可以更加高效地进行挖矿。
此外,还有一种更加先进的区块链挖矿技术,即“工作量证明+(PoW+)”,它是比特币的一种改进模式,它把PoW挖矿方式和矿池挖矿方式相结合,以获得更多的收益。
再比如以太坊,它使用的是Proof of Stake(PoS)挖矿方式,它是一种不用解决计算难题就可以获得报酬的挖矿方式。挖矿者需要把他们的以太币抵押到一个智能合约中,然后就可以获得报酬了。
以上就是主流区块链如何挖矿的基本概念。比特币使用的是PoW挖矿方式,而以太坊则使用的是PoS挖矿方式,而且它们都有矿池挖矿和PoW+挖矿的改进模式。所以,想要成为一名挖矿者,你需要了解这些技术,以获得更多的收益。
请查看相关英文文档
❶ How to mine Ethereum
Like all blockchain technologies, Ethereum uses an incentive-based security model. Any node claiming to be a miner in the network can attempt to create and block validation zones. Many miners around the world are creating and validating blocks simultaneously.
1. Basic principles of Ethereum mining
1. Like all blockchain technologies, Ethereum uses an incentive-based security model. Any node claiming to be a miner in the network can attempt to create and block validation zones. Many miners around the world are creating and validating blocks simultaneously. Each miner provides "proof" of the mathematical mechanism by sending a block to the blockchain. This test is like a guarantee: if this test exists, this block must be valid.
2. For blocks to be added to the main chain, miners must provide this "test" faster than other miners. The confirmation process of each block is called a work test through the "proof" of the mathematical mechanism provided by the miners. Once confirmed, miners within the new block will receive certain rewards. What is a reward? Ethereum uses an intrinsic digital token - ether - as rewards. Every time a miner attempts a new block, a new Ethereum is generated and given to the miner.
Second, the difference between Ethereum and Bitcoin
1. Similar points: Bitcoin and Ethereum are both successful blockchain technology applications. People know blockchain technology through Bitcoin. With Ethereum, people realized that blockchains could be independent. All are based on blockchain, where transactions are publicly recorded, currency and asset transactions are more convenient and concessionary, and cumbersome middlemen are eliminated.
2. Difference: Bitcoin is a decentralized peer-to-peer digital payment system, similar to a global clearing bank. And this bank is not a member of a centralized organization, it has no CEO, it has no administrators, only the basic principles and consensus of the code. Transfer value from peers and no other third parties or fiduciaries.
3. The total amount of Bitcoin is 21 million. For every 21W block generated, the number of Bitcoins generated by the block is reduced by half, with a block generated every 10 minutes. Generally speaking, it is a deflationary electronic currency. Ethereum is defined as a decentralized peer-to-peer virtual machine, which can be understood as a platform that uses tokens to perform value distribution and attract all parties to build an ecosystem. There is no upper limit on the total amount of Ethereum.
3. Smart contracts and protocols ERC20
1. Smart contracts are first and foremost contracts, which stipulate the parties involved in transaction execution in the form of code and stipulate certain activation conditions for the execution of the contract. . Once these conditions are activated, the agreed-upon transaction, usually a number of transactions, is automatically executed. These transactions will be mined by miners and eventually merged into the public chain, which is undeniable and irreversible.
2. Smart contracts in Ethereum are basically open source on the Internet. Any user can see the definition and activation time of the relevant interface. Without unified standards, many smart combinationsThe appointment will make it difficult for everyone to understand, what exactly does this smart contract do? At this time, the ERC20 protocol has been launched.
3. Developers can easily understand the role of relevant interfaces by viewing other smart contracts and then calling their own contracts. Standardization is very beneficial, it means that these assets can be used across different platforms and projects, otherwise they can only be used in specific situations.
4. Why Ethereum can be used to send coins
Because of the existence of smart contracts, the contract can be used to arrange currency fundraising and finally deposit it into the account of the user, and because 0x7D0 is used The same standard ERC20 as direct exchange 0x7D0 and FAD supports the Ethereum ecosystem which will be easier.
5. Ethereum trade restrictions
1. For each transaction, the initiator of the transaction must set the Gas limit and Gas price of the transaction. Different operations will generate different Gas costs. When the miner is finished, the miner will stop running and the used Gas will be rewarded to the miner.
2. If some gas still exists, if the user declares that the limit value is too low or the intermediate account Eth is not enough to cover the Gas consumption, it will be returned to the initiator of the transaction or the creator of the smart contract, due to If there is insufficient Gas, the agreement will be cancelled, and the Gas used for calculation will not be returned to the account.
6. The network computing power is the total computing power of all Ethereum mining machines. The current mining cluster calculates the difficulty of the current block based on this value.
7. Ethereum Extraction Difficulty
The difficulty of the block is used to improve the consistency of the block verification area. The difficulty of the Genesis block is 131,072, and there is a special formula used to calculate the difficulty of each subsequent block. If a block is checked faster than the previous block, the Ethereum protocol will increase the difficulty of the block. By adjusting the difficulty of a block, you can adjust the time it takes to verify a block, known as the burst speed. Check that the time adjusts itself to continue generating new blocks at a constant rate.
8. The relationship between the computing power of a single card and mining income
The greater the computing power of a single card, the more checks can be performed, and the probability of obtaining formula results Yes, the greater the situation, the greater the number of shares offered and the greater the revenue from mining if mine groups are used.
❷ How to mine Ethereum
Most of the mainstream Ethereum mining machines on the market currently come from Bitmain and Canaan. However, with the decline in the price of Ethereum, mining The profits brought are already very meager, and investors can choose to trade and invest in Ethereum on digital currency exchanges. Currently, the mainstream digital currency exchanges on the market include Binance, Huobi, Bitnet, etc.
❸ Detailed explanation of the principle of Bitcoin mining
You can think of the blockchain as a public ledger (list) that records all transactions. Every participant in the Bitcoin network Authors regard it as an authoritative record of ownership.
Bitcoin has no central authority, and almost all full nodes have a copy of the public ledger, which can be regarded as a certified record.
So far, there has not been a single successful attack on the main blockchain, not even one.
Bitcoins are minted at a definite but ever-decreasing rate by creating new blocks. A new block is produced approximately every ten minutes, and each new block is accompanied by a certain amount of brand-new Bitcoins created from scratch. Every 210,000 blocks mined, which takes approximately 4 years, the currency issuance rate is reduced by 50%.
At some point in 2016, it dropped to 12.5 BTC/block after the 420,000th block was “mined.” Before the 13,230,000th block (probably mined in 2137), the issuance rate of new coins will be "halved" 64 times in an exponential manner. At that time, the number of Bitcoins issued per block will become the smallest monetary unit of Bitcoin - 1 satoshi. Eventually, after 13.44 million blocks, all 2099,999,997,690,000 Satoshi Bitcoins will be issued. In other words, by around 2140, there will be close to 21 million Bitcoins. After that, new blocks no longer contain Bitcoin rewards, and miners’ income comes entirely from transaction fees.
After receiving transactions, each node will verify these transactions before broadcasting them to the entire network, and establish a pool (transaction pool) for valid new transactions in the corresponding order when received. .
Each node needs to check a long list of standards when verifying each transaction:
The syntax and data structure of the transaction must be correct.
Neither the input nor the output lists can be empty.
The byte size of the transaction is less than MAX_BLOCK_SIZE.
Each output value, as well as the total amount, must be within the specified value range (less than 21 million coins, greater than 0).
There are no inputs with hash equal to 0 and N equal to -1 (coinbase transactions should not be relayed).
nLockTime is less than or equal to INT_MAX.
The byte size of the transaction is greater than or equal to 100.
The number of signatures in a transaction should be smallThe upper limit on the number of signature operations.
The unlocking script (Sig) can only push numbers onto the stack, and the locking script (Pubkey) must conform to the isStandard format (this format will reject non-standard transactions).
A matching transaction must exist in the pool or in the main branch block.
For each input, if the referenced output exists in any transaction in the pool, the transaction will be rejected.
For each input, look for the referenced output transaction in the main branch and the transaction pool. If an output transaction is missing any of its inputs, the transaction becomes an orphan transaction. If the matching transaction has not yet appeared in the pool, it will be added to the orphan transaction pool.
For each input, if the referenced output transaction is a coinbase output, the input must have at least COINBASE_MATURITY (100) confirmations.
For each input, the referenced output must exist and not be spent.
Use the referenced output transaction to obtain the input value, and check whether each input value and the total value are within the specified value range (less than 21 million coins, greater than 0).
If the sum of input values is less than the sum of output values, the transaction will be aborted.
If the transaction fee is too low to fit into an empty block, the transaction will be rejected.
Each input unlocking script must be validated against the corresponding output locking script.
The following mining node is named A mining node
The mining node always monitors new blocks propagated to the Bitcoin network. These newly added blocks have special significance for mining nodes. The competition among miners ends with the propagation of a new block, which is like announcing the final winner. For miners, getting a new block means that one participant has won and they have lost the competition. However, the end of one round of competition also represents the beginning of the next round of competition.
After validating transactions, Bitcoin nodes add these transactions to their own mempool. The memory pool is also called the transaction pool, which is used to temporarily store transaction records that have not yet been added to the block.
Node A needs to assign a priority to each transaction in the memory pool and select higher priority transaction records to build candidate blocks.
A deal wants to be a “higher-quality"Priority", the conditions to be met: the priority value is greater than 57,600,000. The generation of this value depends on 3 parameters: one Bitcoin (i.e. 100 million Satoshi), age of one day (144 blocks), and transaction size of 250 Bytes:
High Priority > 100,000,000 satoshis * 144 blocks / 250 bytes = 57,600,000
The first 50K bytes in the block used to store transactions are reserved for higher priority level transactions. When the node fills these 50K bytes, it will give priority to these highest-priority transactions, regardless of whether they include mining fees. This mechanism allows high-priority transactions to be prioritized even if they have zero mining fees. Processing.
Then, mining node A will select those transactions that contain the minimum miner fee and sort them according to "miner fee per kilobyte", giving priority to transactions with higher miner fees to fill the remaining block under the block.
If there is still space left in the block, mining node A can select those transactions that do not include mining fees. Some miners will try their best to integrate those transactions that do not include mining fees. into the block, and other miners may choose to ignore these transactions.
After the block is filled, the remaining transactions in the mempool will become candidate transactions for the next block. Because these transactions It remains in the memory pool, so as new blocks are added to the chain, the depth of the UTXO referenced when these transactions are entered (i.e., the transaction "block age") will also become larger. Since the priority value of the transaction depends on Due to the "block age" of its transaction input, the priority value of this transaction will also increase accordingly. Finally, the priority value of a zero-mining fee transaction may meet the high-priority threshold and be packaged into the zone for free. Block.
UTXO (Unspent Transaction Output): Each transaction has several transaction inputs, which is the source of funds, and also has several transaction outputs, which is where the funds go. Generally speaking, each transaction Each transaction spends an input and produces an output, and the output it produces is the "unspent transaction output", which is UTXO.
Block age: UTXO The "block age" is the number of blocks that have passed since the UTXO was recorded on the blockchain, that is, the depth of this UTXO in the blockchain.
The first transaction in the block The transaction is a special transaction, called a coin creation transaction or a coinbase transaction. This transaction is constructed by the mining node and used to reward the miners for their contributions. Assume that the reward for a block at this time is 25 Bitcoins, A mining The node will create "pay 25.1 Bitcoins to A's address (including the miner fee of 0.1 Bitcoins).)" such a transaction, sends the reward of the generated transaction to its own wallet. The reward amount received by A for mining the block is the sum of the coinbase reward (25 brand new Bitcoins) and the mining fees of all transactions in the block.
Node A has constructed a candidate block, then it is the turn of A’s mining machine to “mine” this new block and solve the workload proof algorithm to make this block valid. Bitcoin mining process The SHA256 hash function is used.
In the simplest terms, the mining node keeps trying again and again until it finds a random tweak that produces a hash value below a certain The goal. The result of the hash function cannot be known in advance, and there is no pattern that can obtain a specific hash value. For example, you are playing billiards alone in the room, and the white ball goes from point A to point B, but a person pushes When you come in and see the white ball at point B, you don't know how to get from A to B anyway. This characteristic of the hash function means that the only way to get the hash value is to keep trying, randomly modifying the input each time, until The appropriate hash value appears.
The following parameters are required
• The version of the block
• The hash value of the previous block: prev_hash
/>
• The value of the hash tree of the transaction record that needs to be written: merkle_root
• Update time: ntime
• Current difficulty: nbits
The mining process is to find x such that
SHA256(SHA256(version + prev_hash + merkle_root + ntime + nbits + x )) < TARGET
The above formula The range of x is 0~2^32, and TARGET can be calculated based on the current difficulty.
For a simple analogy, imagine a game in which people keep throwing a pair of dice to get less than a specific number. Chapter 1 In one round, the target is 12. As long as you don't throw two 6s, you will win. Then the target in the next round is 11. Players can only win by throwing 10 or smaller points, but it is also very simple. If several rounds The target was then reduced to 5. Now there is more than half a chance that the total points of the dice thrown will exceed 5, so it is invalid. As the target becomes smaller and smaller, if you want to win, the number of dice thrown will increase exponentially. Eventually when the target is 2 (the smallest possible number of points), only one person throws on averageHe can win in 36 throws, or 2% of the throws.
As mentioned before, the goal determines the difficulty, which in turn affects the time required to solve the proof-of-work algorithm. So the question is: Why is this difficulty value adjustable? Who will make adjustments? How to adjust?
Bitcoin blocks are generated on average every 10 minutes. This is the heartbeat of Bitcoin, the basis for the rate at which money is issued and the speed at which transactions are completed. It has to remain constant not just in the short term, but over decades. During this period, computer performance will increase dramatically. Additionally, the people and computers involved in mining are constantly changing. In order to maintain the production rate of new blocks every 10 minutes, the difficulty of mining must be adjusted according to these changes. In fact, difficulty is a dynamic parameter that is adjusted regularly to achieve the goal of a new block every 10 minutes. Simply put, the difficulty is set so that, regardless of mining power, the new block generation rate remains at one every 10 minutes.
So, how is such an adjustment achieved in a completely decentralized network? Difficulty adjustments occur independently and automatically in each full node. All nodes adjust the difficulty every 2,016 blocks (blocks generated every 2 weeks). The difficulty adjustment formula is calculated by comparing the elapsed time of the latest 2,016 blocks to 20,160 minutes (two weeks, which is how long these blocks are expected to take at a rate of 10 minutes). The difficulty is adjusted accordingly (either harder or easier) based on the ratio of actual duration to desired duration. Simply put, if the network finds that the block generation rate is faster than 10 minutes, it will increase the difficulty. If you find it is slower than 10 minutes, lower the difficulty.
In order to prevent the difficulty from changing too quickly, the adjustment amplitude per period must be less than a factor (a value of 4). If the adjustment range is greater than 4 times, adjust by 4 times. Since the imbalance will continue to exist in the next 2,016 block cycle, further difficulty adjustments will be made in the next cycle. Balancing the huge differences in hashing power and difficulty may therefore take several 2,016 block cycles to complete.
For example, node A is currently mining 277,316 blocks. Once the mining node A completes the calculation, it will immediately send the block to all its neighboring nodes. After these nodes receive and verify this new block, they will continue to propagate this block. As this new block propagates through the network, each node will add it to its own copy of the blockchain as block 277,316 (the parent block is 277,315). When the mining nodes receive and verify this new block, they abandon their previous calculations to build this block of the same height and immediately begin the work of calculating the next block in the blockchain.
The third step of the Bitcoin consensus mechanism is to independently verify each new zone through each node in the networkpiece. When a new block propagates through the network, each node performs a series of tests to verify it before forwarding it to its peers. This ensures that only valid blocks are propagated across the network.
Each node independently verifies each new block, ensuring that miners cannot cheat. In the previous chapter, we saw how miners record a transaction to obtain the new Bitcoins created in this block and the transaction fee. Why don't miners record a transaction for themselves to get thousands of Bitcoins? This is because every node verifies blocks according to the same rules. An invalid coinbase transaction will invalidate the entire block, which will cause the block to be rejected and, therefore, the transaction will not become part of the ledger.
The final step in Bitcoin’s decentralized consensus mechanism is to assemble blocks into the chain with the largest proof of work. Once a node validates a new block, it will attempt to connect the new block to the existing blockchain, assembling them.
Nodes maintain three types of blocks:
· The first is connected to the main chain,
· The second is from the main chain Branches are generated on the chain (standby chain),
· The third type is that no known parent block is found in the known chain.
Sometimes, the blockchain extended by the new block is not the main chain, as we will see in "Blockchain Forks" below.
If a node receives a valid block but its parent block is not found in the existing blockchain, then the block is considered an "orphan block". Orphan blocks will be kept in the orphan block pool until their parent block is received by the node. Once the parent block is received and connected to the existing blockchain, the node takes the orphan block out of the orphan pool and connects it to its parent block, making it part of the blockchain. When two blocks are mined within a short time interval, nodes may receive them in reverse order. At this time, the orphan block phenomenon will occur.
After selecting the blockchain with the highest difficulty, all nodes finally reached a network-wide consensus. Temporary differences in the chain will eventually be resolved as more proof of work is added to the chain. Mining nodes "vote" to choose which blockchain they want to extend. When they mine a new block and extend a chain, the new block itself represents their vote.
Because the blockchain is a decentralized data structure, different copies cannot always be consistent. Blocks may arrive at different nodes at different times, resulting in nodes having different views of the blockchain. The solution is that each node always chooses and tries to extend the blockchain that represents the largest accumulated proof of work, that is, the longest or the largest cumulative difficulty chain.
A fork event occurs when two candidate blocks want to extend the longest blockchain at the same time. Under normal circumstances, a fork occurs when two miners each calculate a proof-of-work solution within a short period of time. As soon as the two miners find a solution in their respective candidate blocks, they immediately propagate their "winning" blocks to the network, first to neighboring nodes and then to the entire network. Each node that receives a valid block will incorporate it into the blockchain and extend it. If the node subsequently receives another candidate block, and this block has the same parent block, the node will connect this block to the candidate chain. The result is that some nodes receive one candidate block and other nodes receive another candidate block, and two different versions of the blockchain appear.
Before the fork
The fork begins
We see that two miners mined two different blocks almost at the same time. In order to facilitate tracking of this fork event, we set up a block marked in red from Canada, and a block marked in green from Australia.
Suppose there is a situation where a miner in Canada discovers the proof-of-work solution to the "red" block and extends the block chain on the "blue" parent block. At almost the same moment, an Australian miner found the solution to the "green" block and also extended the "blue" block. So now we have two blocks: one is the "red" block originating from Canada; the other is the "green" one originating from Australia. Both blocks are valid, contain valid proof-of-work solutions and extend the same parent block. The two blocks may contain almost identical transactions, with only slight differences in the ordering of transactions.
Nodes in the Bitcoin network that are close to (network topologically, not geographically) Canada will receive the "red" block first and build a block with the maximum cumulative difficulty, " The "red" block is the last block in the chain (blue-red), while "green" blocks arriving later are ignored. In contrast, nodes closer to Australia will decide that the "green" block wins and extend the blockchain (blue-green) with it as the last block, ignoring the "red" area that arrives a few seconds later. piece. Those nodes that first receive the "red" block will immediately use this block as the parent block to generate a new candidate block and try to find the workload proof solution of this candidate block. Likewise, nodes that accept "green" blocks will end up with thisA block starts to generate a new block for the vertex of the chain, extending the chain.
Forking issues are almost always resolved within a block. Part of the computing power in the network focuses on the "red" block as the parent block and building new blocks on top of it; the other part of the computing power focuses on the "green" block. Even if the computing power is evenly distributed between the two camps, there will always be one camp that discovers the proof-of-work solution and spreads it before the other camp. In this example we can make an analogy, if the miners working on the "green" block find a "pink" block that extends the blockchain (blue-green-pink), they will immediately propagate this new block , the entire network will consider this block to be valid, as shown in the figure above.
All nodes that selected the "green" block as the winner in the previous round will directly extend the chain by one block. However, those nodes that selected the “red” block as the winner will now see two chains: “blue-green-pink” and “blue-red”. As shown in the figure above, these nodes will set the "blue-green-pink" chain as the main chain and the "blue-red" chain as the backup chain based on the results. These nodes accepted the new longer chain and were forced to change their original views on the blockchain. This is called the re-consensus of the chain. Because the "red" block as the parent block is no longer on the longest chain, their candidate blocks have become "orphan blocks", so now anyone who originally wanted to extend the zone on the "blue-red" chain Blockchain miners will stop. The entire network identifies the "blue-green-pink" chain as the main chain, and the "pink" block is the last block of this chain. All miners immediately switch the parent block of the candidate block they generated to "pink" to extend the "blue-green-pink" chain.
Theoretically, the fork of two blocks is possible. This happens when miners who are opposed to each other due to the previous fork discover two different blocks almost at the same time. Solution to block. However, the chance of this happening is very low. Single block forks happen every week, while double block forks are very rare.
Bitcoin designs the block interval to 10 minutes, which is a compromise between faster transaction confirmation and lower probability of forks. Shorter block generation intervals will allow transaction settlement to be completed faster, and will also lead to more frequent blockchain forks. In contrast, longer intervals reduce the number of forks but result in longer liquidation times.
❹ What is blockchain mining? How is blockchain mining?
What is blockchain mining? How is blockchain mining?
In blockchain Before the rise of miners, miners specifically referred to workers digging coal mines. The collective impression was that men with dark skin were covered in coal dust and except for their clothes. After the birth of the blockchain, miner is no longer just the abbreviation of coal miner, but has a new meaning: a person engaged in virtual currency mining.
For those who have not participated in miningIt may be difficult for people to understand blockchain mining, so today we will start with the most basic questions: What is blockchain mining? How to mine blockchain?
Area What is blockchain mining?
There are two types of mining in the new era, the first one is mining Bitcoin. After each transaction occurs, it is not completed. The transaction data must be written into the database before it is established and the other party can actually receive the money. First, all transaction data will be sent to the miners, who are responsible for writing these transactions into the blockchain and completing mining to obtain profits.
The second type is to dig up copycats. Various “altcoins” such as Zcoin, Monero, Ethereum, Litecoin, and BitShares. After assembling a mining machine, connect to the designated mining pool and start computing at full load according to a specific algorithm. After completing one calculation cycle, you can obtain "one" virtual currency. Then put "this" currency on the online trading platform and cash out.
How to mine blockchain?
In the beginning, Bitcoin could be mined using a computer CPU. The founder of Bitcoin, Satoshi Nakamoto, used his computer CPU to mine it. The world’s first genesis block. However, the era of CPU mining has long passed, and now Bitcoin mining is the era of ASIC mining and large-scale cluster mining.
If you want to become a miner, it is actually relatively simple. You can just buy a special mining equipment and start mining. Mining does not require you to do it yourself. The computer actually performs specific calculations. For miners, it is enough to ensure the power supply and network connection of the mining machine.
Can blockchain mining still make money?
In the beginning, some people did get rich through blockchain mining, but as the number of miners increased, there was also great competition among miners. , profit margins are being compressed smaller and smaller. In addition, a machine that mines Bitcoin costs tens of thousands of dollars, and cannot dig out a single coin in a year. The input cost is high and the output is low. If the market conditions are unfavorable again, miners will Basically losing money.
Therefore, in addition to mining, more and more investors choose to invest in foreign exchange to make money. Unlike mining, the investment cost of foreign exchange is extremely low. For example, Juhui ggfx can be traded with a minimum of 8 US dollars. With long and short two-way operations, investors can make profits regardless of whether it is an uptrend or a downtrend. It is also very convenient for people who are busy and want to invest and make money. If you download Juhui ggfx’s MT4 trading software to your mobile phone, you can learn about the latest market conditions and participate in transactions through your mobile phone at any time, and complete orders as quickly as seconds. It is simple and fast. , the efficiency of making money is extremely high, so in addition to mining, this is also a good way to get rich.
Mining is not an easy task. Mining consumes resources because the calculation difficulty of generating virtual currency is very high and it is constantly changing. After every 2016 data blocks are generated globally, mining virtual currency The difficulty of the currency will increase once, so ordinary people must consider all aspects before joining the ranks of miners.
❺ The essence of blockchain mining
Investment products are usually divided into debt products and equity products based on the certainty and uncertainty of returns and risks. Creditor's rights pursue absolute returns, while equity investors are willing to take risks and obtain floating returns. Usually these two are completely different products. However, the emergence of blockchain technology has made it possible to integrate these two types of products.
Take Bitcoin, the first concrete application of blockchain, as an example. BTC is released in mining mode. Every ten minutes, the mining machine that grabs the accounting rights is rewarded with 6.25 Bitcoins. Based on the current computing power difficulty, the output of a mining machine can be expected. Therefore, the income from short-term investment in mining machines is relatively certain, but due to the huge volatility and growth space of Bitcoin itself. The life cycle of a mining machine is more than one year. Investment in mining machines essentially requires a judgment on the future BTC capital value and risks. Bitcoin mining provides a new model of short-term deterministic returns and long-term floating returns.
The reason why this model was established is that first of all, everyone formed an initial consensus on the value of BTC and there was a secondary market for free transactions. The mined BTC can be traded and sold at any time to obtain deterministic returns, or it can be held as an asset for a long time to obtain long-term investment returns.
Equity investment fully embodies the capital spirit of sharing risks and sharing profits.
A sign of the maturity of the capital market is the richness of equity products and tools.
Chinese society is generally dominated by the creditor's rights mentality, and investment capital preservation is the basic expectation of most investors. On the one hand, this mode of thinking is due to historical factors. Traditionally, business risks and returns have been viewed in isolation. It is believed that business must be profitable, and risks are only a matter of the integrity of the businessman, so the requirement to maintain capital is a constraint on the personal credit of the businessman. Another aspect is that China has not developed a more mature capital market. Lack of market tools. Pricing, trading and risk management of equity.
It has been more than 20 years since China’s securities capital market started in the early 1990s. Although it has begun to take shape, its influence on the entire social economy is still very limited. First of all, the threshold is high, and various claims and The market instrument of equity is limited to thousands of listed companies. China's stock market itself lacks a money-making effect, making ordinary people's perception of equity investment even more negative.
As a tool for credit management, blockchain technology can build innovative trading models at low cost and automatically form a secondary trading market. It provides new opportunities to promote equity investment.
Bitcoin’s POW mining mode is a pure computing power game. If mining can be combined with business incubation, real capital functions can be achieved.
This is also the charm of the token economy. Through deterministic algorithms, ecological rights and interests are distributed, and at the same time, through free marketMarket transactions refine value. Convert future uncertainty into capital value. Form consensus on new wealth.
❻ How does blockchain mining make money
The principle of making money by mining: PoW and mining.
In the beginning, Bitcoin could be mined using graphics cards, but in 2013, it was no longer possible to mine Bitcoin BTC using general-purpose computing programs for graphics cards. Bitcoins are now all mined using ASIC mining machines. ".
Similarly, the launch of Litecoin ASIC mining machines in 2014 also ended the history of Litecoin mining using graphics cards. The current digital currencies that graphics cards can "mine" are Ethereum ETH, Ethereum Classic ETC, and Zcash Zerocoin ZEC.
Graphics card "mining" is not a profitable business. In fact, the earlier you start, the higher the income will be, and the income will decrease as more miners and graphics cards are added.
To put it bluntly, buying a high-priced graphics card to enter "mining" will definitely kill you. Purchasing a professional mining machine is a more cost-effective choice. Nowadays, the essential tool for personal mining is a mining pool. The function of a mining pool is to gather a large number of mining machine computing power to increase your chances of mining coins. At the same time, the coins you can mine in the future are evenly distributed to your account in advance.
Take Bitcoin as an example. If the entire Bitcoin network now generates a block every 10 minutes, this block contains 25 Bitcoins. Assuming that there are 10,000 people in the world participating in mining, then within these 10 minutes, only one lucky person will take away the 25 Bitcoins.
Others have nothing to gain. The principle of the mining pool is that everyone forms a team to mine and allocate according to the agreed distribution method, so that the miners' mining returns tend to be stable and the miners' risks are reduced.
In order to enhance the cost performance, you can also purchase some practical mining machines like Wanke Cloud, which can be used as ordinary hardware products and can also be used for mining, killing two birds with one stone.
(6) Extended reading on how mainstream blockchains are mined
There are several core operations of blockchain transactions and digital currencies:< /p>
The transaction network formed by decentralized databases is called the blockchain. All our clients (including mining machines) keep accounts together, confirm transfer transactions, and issue a certain amount of digital currency according to time.
Because the winner takes all, small and medium-sized retail miners have to unite to form a "mining pool" and record the cumulative workload in Shares. The higher the joint computing power, the greater the probability that the mining pool consortium will find the digital currency first. Large, increase the probability of finding newly issued digital currencies, and divide the mined digital currencies. This is called the PoW workload proof mechanism.
❼ What is the principle of Bitcoin and blockchain and what is mining (3)
Continuing from the previous issue, "What is the principle of Bitcoin and blockchain?" What's going on with mining? (2)》
Before I start, let me share with you an interesting thing I saw yesterday.
(On the gate of a community in Shenyang, 66 locks are hung one after another, and it is known as the "cheapest access control system".
It turns out that there were always foreign vehicles coming in and out of this community, so the owners spontaneously built this "access control system". Each lock has a number, and the car owners in the community only need to take the key to open the corresponding lock to open the door. Residents said that this This method saves money and effort, and is especially easy to use.)
This is equivalent to the technical materialization of blockchain :
Specific features: Decentralization (no need for unified management); traceability (whoever has the lock can find it); non-tamperability (one person has one lock) One key), this is the most thorough understanding I have ever had of blockchain.
"Let's stop talking and get back to the story." We said before that there is a difficulty setting of N bits. How to determine this N bit? Obviously, the previous 0, The more there are, the more difficult the problem becomes.
Why is it difficult to count more? Let's imagine that in this problem you can't back-calculate, you can only try randomly one by one. The probability of 0 appearing and the probability of 1 appearing on each digit are both 50%, so what is the probability of the first 0? The probability is 1/2. If the second digit is 0, what is the probability? The probability is also 1/2, the third digit is 0, the probability is also 1/2, until the last digit is 0, the probability is also 1/2, so when multiplied, the result is the nth power of (1/2).
Obviously, the larger n is, the higher the difficulty is, and the smaller n is, the smaller the difficulty is.
When Satoshi Nakamoto was designing it, he ensured that he would produce a block and package it every ten minutes. With thousands of pieces of information, how can we guarantee it? That is to say, adjust the difficulty of this n?
Let’s take an example. For example, there are 10,000 mining machines in the world. The computer power of each of these 10,000 mining machines is 14 T per second. , that is, 14T hash operations can be calculated per minute. So what is 14T?
First of all, 1T is 10 to the 12th power, so this number is (1.4*10) to the 13th power per second, which is for each mining machine Calculated in one second, multiply 10 to the fourth power, which means there are 10,000 mining machines, and then you have to multiply it by 10 minutes, which is about 600 seconds. This number is about 1 of (8*10)9th power, that is to say, we can perform so many operations in ten minutes.
Then let’s think about it again. If the probability is (1/2) raised to the nth power, what do you think? If you come up with this block, the number of calculations you need to make is 2 to the nth power. If your probability is 1/64, you will have to calculate this block 64 times on average.
By the same token, if you have calculated it so many times, then it is roughly equal to the power of 2. We can find through calculation that if n is equal to 66, the probability of your appearance at this time can be calculated. It is the 66th power of (1/2), and then the average number of times you need to calculate is 266, which is about the 19th power of (8*10), so in this case the miner will set the difficulty to n equal to 66, so the first person who can purchase and calculate that the first 66 bits are all 0 will successfully package the block and successfully mine the mine.
You have no way to make your luck better. All you can do is buy more mining machines and mine as hard as you can, so that you may get this Bitcoin.
This is probably the principle.
- 上一篇: 江湖快报区块链下载,江湖快报是什么
- 下一篇: 日日赚是真的吗,日日赚是什么平台