Mining mode of Ethereum
Hardware
algorithm is difficult to solve in memory. In order to make DAG suitable for memory, each GPU needs 1-2gb of memory. If you get an error prompt: error GPU mining. GPU memory fragmentation? It means you don't have enough memory. GPU mining software is based on OpenCL, amd GPU will be faster than NVIDIA GPU of the same level. ASIC and FPGA are relatively inefficient, so they are blocked. To get OpenCL for chip integration platform, try:
amd SDK OpenCL
NVIDIA CUDA OpenCL
Ubuntu Linux settings
for this quick guide, you will need Ubuntu 14.04 or 15.04 and fglrx image driver. You can also use NVIDIA drives and other platforms, but you have to find your own way to get an effective OpenCL installation, such as genoil's ethminer fork
if you are using 15.04, go to & quot; Software and updates 〉 extra drives & quot; Set to & quot; Use the video driver & quot; from fglrx for AMD graphics accelerator
if you are using 14.04, go to & quot; Software and updates 〉 extra drives & quot; Set to & quot; Use the video driver & quot; from fglrx for AMD graphics accelerator;. Unfortunately, for some people, this method may not work, because there is a known program error in Ubuntu 14.04.02 that will prevent you from switching to the exclusive graphics drive necessary for GPU mining
therefore, if you encounter this program error, go to & quot; "Software and update" update & quot; Select & quot; Pre release reliable update proposal & quot;. Then, back to & quot; Software and updates 〉 extra drives & quot; Set to & quot; Use the video driver & quot; from fglrx for AMD graphics accelerator;. After restarting, it's worth checking that the drive is now properly installed (for example, by going to & quot; Additional drives & quot;)
no matter what you do, if you are using 14.04.02, once installed, do not change the drive or drive configuration. For example, the use of aticonfig – initial (especially the - F, - force option) will & quot; Destruction & quot; Your settings. If you accidentally change the configuration, you will need to uninstall the drive, restart, install the drive again and restart.
do you remember what the consensus mechanism of bitcoin is? The consensus mechanism of bitcoin is pow. To put it simply, the more work you do, the higher the amount of computation you pay, the more likely you will be the first to find the correct hash value, and the more likely you will be rewarded with bitcoin
however, there are some defects in the pow of bitcoin, that is, it is too slow to process transactions, and miners need to constantly collide hash values through calculation, which is costly and inefficient. Friends who are interested in blockchain knowledge should see such a saying:
in order to make up for the deficiency of bitcoin, Ethereum has proposed a new consensus mechanism, called POS (this is the abbreviation of English, which means "proof of equity", also translated into "proof of equity")
POS simply means the same as its literal meaning: equity, equity. The more currency you hold, the more equity you have, the higher your equity
Ethereum's POS means that the more money you hold, the longer you hold it, the less difficult it will be to calculate and the easier it will be to mine
in the initial setting of Ethereum, Ethereum hopes to build a relatively stable system by using POW in the early stage, then graally adopt POW + POS, and finally completely transition to POS. So, it's true that the consensus mechanism of Ethereum is POS, but POS is only a plan or goal at the beginning of Ethereum's release. At present, Ethereum has not yet transitioned to POS, and the consensus mechanism adopted by Ethereum is still pow, that is, the pow of bitcoin, but it is slightly different from the pow of bitcoin
the amount of information here is a bit large,
the first information point is that the consensus mechanism currently adopted by Ethereum is also pow, but it is slightly different from the pow of bitcoin. So, what's the difference between the pow of Ethereum and bitcoin: in short, the mining difficulty of Ethereum can be adjusted, but the mining difficulty of bitcoin can't be adjusted. Just like our college entrance examination, because the teaching situation and the number of students in different provinces are not the same, so the college entrance examination is divided into national papers and provincial independent proposition
Ethereum said that I am in favor of the topic by region. Bitcoin said: No, it must be the same volume in the whole country. The difficulty is the same for everyone
the popular explanation is that bitcoin uses computer computing power to do a lot of hash collisions, enumerate various possibilities to find a correct hash value. The Ethereum system has a special formula to calculate the difficulty of each block. If a block is verified faster than the previous block, Ethereum protocol will increase the difficulty of the block. By adjusting the block difficulty, the time needed to verify the block can be adjusted
according to the Ethereum protocol, the dynamic adjustment method of difficulty is to make the time interval of creating new blocks in the whole network 15 seconds, and the network uses 15 seconds to create blockchain. In this way, because the time is too fast, the synchronization of the system is greatly improved, and it is difficult for malicious participants to launch 51% (that is, more than half) of the computing power to modify historical data in such a short time
the second information point is: in the initial setting of Ethereum, we hope to achieve the transition from POW to
POS through phased upgrade
dating back to 2014, at the beginning of Ethereum's launch, the team announced that the launch of the project would be divided into four stages, namely, Froniter, homestead, metropolis and serenity. In the first three stages, the consensus mechanism adopts pow (workload proof mechanism), and in the fourth stage, it switches to POS (equity proof mechanism)
on July 30, 2015, the first phase "frontier" of Ethereum was officially released. This phase is only suitable for developers. Developers can write smart contracts and decentralized application DAPP on Ethereum network, and miners begin to enter Ethereum network to maintain network security and get Ethereum coins. The leading-edge version is similar to the beta version, proving whether the Ethereum network is reliable or not
on March 14, 2016, Ethereum entered the second stage of "homeland". In this stage, Ethereum provides the wallet function, so that ordinary users can easily experience and use Ethereum. There is no obvious technology improvement in other aspects, but it shows that Ethereum network can run smoothly
in September 2017, Ethereum has reached the third stage of "metropolis"“ "Metropolis" is composed of Byzantine and Constantinople. The goal of this stage is to introce the hybrid chain mode of POW and POS, so as to prepare for the smooth transition from POW to POS. This is the latest popular "Ethereum Constantinople upgrade". In the Constantinople upgrade, Ethereum will make some changes to the underlying protocols and algorithms to lay a good foundation for the implementation of POW and
POS
how much reward will Ethereum get for mining? Miners who win the block creation competition will get the following income:
1. Static reward, 5 ethereums
2. The fuel cost in the block, i.e. gas, we talked about in the last issue
3. As a part of the block, it includes the extra reward of "Uncle block". Uncle is uncle of uncle, and each uncle block can get 1 / 32 of the mining reward as a reward, that is, 5 times 1 / 32, which is equal to 0.15625 ethereums. Here, let's briefly explain the concept of "TERT block". The concept of "TERT block" was proposed by Ethereum. Why should we introce the concept of TERT block? This also starts with bitcoin. In the bitcoin protocol, the longest chain is considered absolutely correct. If a block is not part of the longest chain, it is called a "orphan block". An isolated block is a block, which is also legal, but it may be found later, or the network transmission is slower, and it does not become part of the longest chain. In bitcoin, the solitude is meaningless and will be discarded later, and the miners who find the solitude will not receive mining related rewards
however, Ethereum does not think that isolated blocks are worthless, and Ethereum system will give rewards to miners who find isolated blocks. In Ethereum, isolated blocks are called "Uncle blocks", which can contribute to the security of the main chain. Ethereum's ten second block interval is too fast, which will rece the security. By encouraging the use of tertiary blocks, the main chain can obtain more security guarantees (because the isolated block itself is legal). Moreover, paying the tertiary block can also stimulate the miners to actively mine and actively use tertiary blocks. Therefore, Ethereum thinks that it is valuable.
Bitcoin uses SHA-256 encryption algorithm. When mining, it competes with computing power. In order to improve computing power, bitcoin has gone through four stages: CPU mining, GPU mining, FPGA mining and now ASIC mining machine mining, and the degree of specialization is getting higher and higher
Ethereum uses the ethash encryption algorithm. In the process of mining, it needs to read the memory and store the DAG file. Because the bandwidth of each read memory is limited, and the existing computer technology is difficult to have a qualitative breakthrough in this problem, so no matter how to improve the computing efficiency of the computer, the memory read efficiency will not be greatly improved. Therefore, in a sense, Ethereum's ethash encryption algorithm is ASIC resistant.
different encryption algorithms lead to great differences in mining equipment and computing power between bitcoin and Ethereum
at present, bitcoin mining equipment is mainly ASIC mining machine with a very high degree of specialization. The maximum computing power of a single mining machine is 110t / s, and the scale of computing power of the whole network is more than 120eh / s
the main mining equipment of Ethereum is video card miner, and there are very few specialized ASIC miner. On the one hand, the "ASIC resistance" of Ethereum mining algorithm improves the threshold of developing ASIC miner. On the other hand, after Ethereum is upgraded to 2.0, the consensus mechanism will be transformed into POS, and the miner can not continue mining
compared with the ASIC miner, the graphics card miner has two orders of magnitude difference in computing power. At present, the computing power of mainstream graphics card miner (8 cards) is about 420mh / s, and that of Ethereum is about 230th / s.
from the time dimension of the past two years, bitcoin's computing power of the whole network is growing rapidly, while Ethereum's computing power of the whole network is growing relatively slowly
The ASIC mining machine of
bitcoin is monopolized by several major mining machine manufacturers, and miners can only buy it from the market; Although the graphics card miner of Ethereum is also manufactured by a special miner, the miner can buy accessories from the market and assemble them according to his own demand
many new users believe that the sole purpose of mining is to generate ether in a way that does not require a central issuer (see our guide "what is ether?"). It's true. The token of Ethereum is proced in the process of mining, with a mining rate of 5 Ethereum coins per piece. But mining is at least as important. Usually, banks are responsible for keeping accurate records of transactions. They make sure that money is not created out of thin air and that users don't cheat and spend money many times. However, blockchain introces a new way to keep records, the whole network instead of intermediary, to verify transactions and add them to the public ledger
Ethereum mining
although "no trust" or "trust minimization" monetary system is the goal, there are still people who need to ensure the security of financial records and ensure that no one cheats. Mining is one of the innovations that makes decentralized records possible. Miners have reached a consensus on the history of transactions in terms of preventing fraud (especially double spending on ether) - an interesting issue that hasn't been addressed before the decentralized currency works on the blockchain. While Ethereum is looking at other ways to reach a consensus on the effectiveness of the deal, mining currently keeps the platform together
how mining works
today, the mining process of Ethereum is almost the same as that of bitcoin. For each transaction, the miner can use the computer to guess the answer repeatedly and quickly until one of them wins. More specifically, the miner will run the unique header metadata (including time stamp and software version) of the block through the hash function (which will return a fixed length, unordered string of numbers and letters, which appears to be random), changing only the 'nonce value', which will affect the hash value of the result
if the miner finds a hash that matches the current target, the miner will be granted ether and broadcast the block across the network for each node to verify and add to their own ledger . If miner B finds the hash, miner a stops working on the current block and repeats the process for the next block. It's hard for miners to cheat in this game. There is no way to fake the work and come up with the right answer to the puzzle. That's why solving puzzles is called "proof of work."
on the other hand, others have little time to verify whether the hash value is correct, which is exactly what each node does. About every 12-15 seconds, a miner finds a stone. If the miner starts to solve the puzzle faster or slower than this, the algorithm will automatically re adjust the difficulty of the problem so that the miner can rebound to about 12 seconds of solution time
miners earn these ethers randomly, and their profitability depends on their luck and the computing power they put in. The specific workload verification algorithm used by Ethereum is called "ethash", which aims to require more memory, making it difficult to mine with expensive ASIC. Special mining chips are now the only profitable way to mine bitcoin
in a sense, ethash may have achieved this goal successfully, because dedicated ASIC is not available for Ethereum (at least not yet). In addition, as Ethereum aims to shift from proof of work mining to "proof of equity" (which we will discuss below), buying ASIC may not be a wise choice because it may not prove useful for a long time< However, Ethereum may never need miners. Developers plan to abandon proof of work, the algorithm currently used by the network to determine which transactions are valid and protect them from tampering to support proof of equity, which is guaranteed by token owners. If and when the algorithm is launched, proof of equity can become a means to achieve distributed consensus, and the consensus uses less resources.
after Ethereum is upgraded to version 2.0 POS mechanism, miners may switch mining machines to other networks
as Ethereum is finally ready to start its Ethereum 2.0 upgrade later this year, thus eliminating the long-term delay, the network will start to move towards the proof of rights model
therefore, the network will give up the workload proof consensus algorithm, so that eth miners have little choice. As their equipment will become obsolete, they will be forced to start mining counterfeit coins or re qualify as eth mortgagors. So, what is the current situation of Ethereum mining? With the coming transition, what will happen to the whole instry< At present, Ethereum consensus is based on POW system, which is similar to bitcoin (BTC). As a result, Ethereum's mining process is almost the same, as miners use their computing resources to earn rewards for each block they try to complete< However, there are still major differences between these processes. Although bitcoin mining has relied almost entirely on ASIC (large, loud machines designed specifically for cryptocurrency mining, most of which are concentrated in areas with low electricity prices), Ethereum's pow hash algorithm ethash is designed to support global chip manufacturers (such as NVIDIA and AMD). As Thomas Heller, global business director of cryptocurrency mining pool f2pool, explained in a conversation with cointegraph, GPU is much cheaper and easier to access than ASIC
"as ASIC is a very professional machine, when a new generation of procts is released, it is usually a huge technological leap. As a result, they have a much higher hash rate and are more energy efficient than the previous generation. This means that those manufacturers have spent a lot of money to research and develop it. Their machines are usually very expensive, and GPUs are much cheaper. "
Heller added that those who use GPU miners "have more flexibility to mine." For example, the popular NVIDIA geforce GTX 1080 Ti card can mine more than 15 different currencies, while ASIC units usually support only one currency
nevertheless, Ethereum is not completely immune to ASIC miners - at least in its current state. In April 2018, bitcontinent released antminer E3, an ASIC specially proced for mining Ethereum. Although widely praised for its hash rate of 180 megahashes per second and power consumption of 800 watts, it has received different responses from the Ethereum community. After the ASIC is inserted, a considerable number of GPU rig owners seem to suffer from loss of profits, and some are even forced to switch to other networks
"in the white paper, ETH must have ASIC resistance. I would like to say that the white paper stands for something "is one of the highest comments on the AR / ethermining topic about the topic discussed when antminer E3 was announced. Another reddit user argued that "the $800 only applies to 180mh."“ Split or die of a nation. "
some Ethereum users continue to suggest that bitmain's mining devices can lead to greater concentration, thus increasing the possibility of attack by 51%. Soon, a group of developers put forward "programmed workload proof" or progpow, which is an extension of the current Ethereum algorithm ethash, aiming to make GPU more competitive and promote decentralization
according to a paper published in March by Kristy Leigh Minehan, co-founder of progpow, about 40% of the hash rate of Ethereum is generated by bitmain ASIC. Alejandro de la Torre, the vice president of poolin, is the sixth largest pool of eth. He confirmed to cointegration that "GPU mining is still dominant" in Ethereum network, and added:
"at present, the profit of eth mining is not high, and the management threshold and cost of GPU equipment are higher than ASIC equipment. Compared with ASIC devices, GPU devices are more flexible, and you can use other algorithms to switch to other coins. "
progpow has not been integrated into Ethereum, and it is not clear when it will be finally implemented - in March, Ethereum core developers were debating whether progpow will really benefit the network in nearly two hours, and failed to reach a consensus. It is worth noting that a bitmain representative has previously told cointegraph that the mining hardware giant does not intend to extend the service life of antminer E3 to start operation after October 2020: "as far as we know, mining will end in October or some time after that."
a safe but uncertain future
indeed, Ethereum will stay away from mining in the future. Ethereum 2.0, which is planned to be launched later in 2020, is a major network upgrade on the blockchain, aiming to transfer its current POW consensus algorithm to a virtual POS (known as "block verifier")
more specifically, users are randomly selected considering their wealth in the network or their "interests". In other words, the more coins a POS verifier chooses to put in, the more coins accumulated as a reward
according to vitalik buterin, the co-founder of Ethereum, e to the transition, the network will be more secure and the attack cost will be higher than the network of bitcoin, although the debate about the better consensus algorithm in the encryption community has lasted for many years. However, it is not clear when to start Ethereum 2.0, as many errors and management issues are reported to be delaying the process
another hypothetical benefit of POS system is that it has higher energy efficiency than pow blockchain. According to digiconomist, the cryptocurrency's total annual footprint is 59.31 terawatts per hour, which is comparable to the electricity consumption of Greece as a whole. However, since a report in July 2019 estimated that 74% of the exploitation of bitcoin was done using renewable energy, the environmental impact of bitcoin does not seem to be so serious
what will happen to the actual Ethereum miner? According to the documentation of Casper upgrade as part of Ethereum 2.0 roadmap, the network will initially support a hybrid model including both POW and POS, thus providing some space for block verifiers and GPU / ASIC miners. Jack O & 39, CEO of skale network; "There will definitely be a transition period when two networks are running at the same time," Holleran told cointegration The CEO of scale network (based on Ethereum's blockchain platform) gave a detailed description of this process:
"the transition from eth1 to eth2 takes time of course - it may be years rather than months. The good news about this slow transition is that dapps and defi platforms will be able to roam around based on survivability, security and real-world evidence of adoption. This is a positive impact on the Ethereum ecosystem. "
dig or not
once Ethereum is fully in the POS orbit, miners will have two options. One is to sell the equipment and use the money to accumulate more Eth and start mortgage. The other is the choice for GPU miners, which is simply switching to other ethash networks and mining counterfeit money. Nick foster, a representative of kabombacks, a US mining equipment dealer, told cointegration that most eth miners would choose the latter:
"what I want to say is that most of the miners have not really entered Ethereum or the mining of specific tokens. Yes, there is a certain amount of mineral deposits and holds, but I oppose the view that a large number of Shanzhai coin miners hold their coins at any time. "<
foster then described how he used 3gb GPU units to mine ethash's point-to-point blockchain asset ravencoin (RVN). Once it was unable to mine eth, he said, "this is the reason for mining crows. I immediately sold stability to BTC, and then sold it to US dollars to pay for my rights. I would say that a lot of people are adopting this strategy. "
as foster concludes, he wants eth miners to jump out of the network, and new players - those who don't invest in power infrastructure or drilling rigs - will take a stake in eth. He described the following:
"I can't imagine if I found a five-year lease with $0.04 of electricity and I was mining eth, I decided to sell everything and then continue to pay the rent so that I could hold eth as a share. Substitute. "
Marc fresa, founder of asic.to, a mining firmware company, agreed in a conversation with cointegraph: "if you invest in mining, you won't bet because you have enough room to grow."
one of the main counterfeit coins that may benefit from POW miners leaving Ethereum is Ethereum classic (etc), which is a more conservative version of the blockchain. It is reported that there is no POS related plan. As it also runs on the ethash algorithm, the startup of Ethereum 2.0 may lead to the migration of miners, so its hash rate may have a significant peak
eth's larger pools have similar options. When asked about the company's plans for Ethereum after pow, Heller told cointegraph that after the announcement of Ethereum's POS upgrade, f2pool launched a sister company called story.fish in early 2018. Story.fish has started to provide mortgage services for other POS and delegated POS projects, such as tezos (xtz), Cosmos (atom) and Cardano (ADA), e to numerous handover delays. For prin, e to the transition to POS, it "may temporarily give up supporting eth mining," de la Torre told cointegraph
other top eth pools, namely nanopool, ethermine, pool center, sparkpool and spiderpool, did not respond to requests for comment from cointegraph.
it's common for rookies. You need to add an option in the settings, and the specific configuration of private chat. I forgot to say that many people can't query ce6.3 with XP, but I don't know how to configure it. I'm very stable with win64