ethereum / EIPs

The Ethereum Improvement Proposal repository
https://eips.ethereum.org/
Creative Commons Zero v1.0 Universal
12.72k stars 5.16k forks source link

EIP: Modify block mining to be ASIC resistant. #958

Closed pipermerriam closed 2 years ago

pipermerriam commented 6 years ago

Disclaimer: My area of expertise does not lend well to me suggesting how to make things ASIC resistant. I hope there are some informed opinions floating around out there who can help fill in the how.

According to "the internet" there is an ASIC based ethereum miner on the horizon.

this may be the original source of that news

If you believe the analysis in the comments on this reddit thread BitMain may already running these miners.

I believe it is the accepted wisdom that ASIC based mining leads to increases centralization when compared to GPU mining.

This leads us to two questions:

  1. Should we hard fork to make ASIC mining harder and to demonstrate a willingness to hard fork any future ASIC based ethereum mining.
  2. What specifically changes do we make to implement this increased ASIC resistance.

Should we fork?

I propose that people indicate support/opposition with a simple đź‘Ť / đź‘Ž on this main issue. I would prefer this conversation not devolve into deep discussions around this subjective topic so my request is that people refrain from commenting on that specific question here.

How do we implement improved ASIC resistance

This is the primary issue that I think needs to be addressed, after which we can have an informed discussion about whether we should actually do it.

pipermerriam commented 6 years ago

As a starting point: This came up from some very brief research into current ASIC resistant mining approaches. This is not my area of expertise so I'm somewhat relying on the community to help fill in the blanks here.

X16R-Whitepaper.pdf

MicahZoltu commented 6 years ago

Is there any reason to believe this problem won't just all go away once full PoS lands? Or in the fear around that still being a ways out and centralization could occur in the meantime?

Arachnid commented 6 years ago

I don't think it's practical to design a new asic-resistant algorithm until we have a better idea how the current ASICs (if they exist) function.

For instance, they could be a parallel keccak256 chip with a large and fast array of DRAM attached; in that event it might be easy for them to reconfigure the microcode, and adapt to new variations that rely primarly on keccak256 and fast memory access.

Arachnid commented 6 years ago

Incidentally, I think X11/X15/X17 etc are terrible ideas - none of the individual algorithms are intrinsically ASIC-resistant, they're just trying to use up lots of silicon area. Since they're chained, an ASIC manfacturer could just produce multiple ASICs that are chained together, if they actually ran out of space on one die (which is unlikely).

In fact, I wouldn't be surprised if the slowdown from using multiple algorithms on CPUs and GPUs - from not being able to do consistent register allocation for the algorithm, for instance - is greater than the impact on an ASIC.

cslarson commented 6 years ago

93% upvote rate on that Reddit post. I'm happy to vote here too but I'm not sure what additional protection it offers against manipulation.

AtLeastSignificant commented 6 years ago

@cslarson I'm undecided on whether a fork will be beneficial or not at this moment, but wouldn't manipulation likely come from ASIC miners who oppose a fork? That reddit post, this EIP, Vlad's tweet, etc. all seem to point mostly in the direction of support for maintaining ASIC resistance.

This stance has been taken by Ethereum since inception, I dare say it's part of the undefined "Ethereum Philosophy" we talk about so much these days. If a hard fork is needed to preserve this, then I support it.

CryptoBlockchainTechnologies commented 6 years ago

Thank you for adding this to the agenda next week. I would also like to see a discussion on methods that could be used to detect ASIC mining. This does not have to be on the blockchain but a way to be able to detect them if possible. I have a lot of faith in this team in figuring out how ASICs can be detected.

S1nus commented 6 years ago

PoS

Buttaa commented 6 years ago

i think this is the most recent news about it:

pipermerriam commented 6 years ago

@Arachnid We can't make it ASIC proof, but we should be capable of at least rendering anything currently in production either obsolete, or at least requiring more R&D.

Assuming there's was an alternate ASIC resistant algorithm we were happy with, do you think that the act of forking will adequately demonstrate our willingness to fork the protocol, which should deter bitmain and other manufacturers from sinking costs into producing ASIC miners for Ethereum.

AtLeastSignificant commented 6 years ago

I would say the Monero approach has been successful based on the press coverage / sentiment I observe, so yes - forking would demonstrate our willingness to prevent ASIC domination (same attitude as the "poison the well" statement in the whitepaper).

Even if it proves to only be a minor setback (forces 2-4 months more R&D), the process itself is valuable to other blockchains. It may be wise to just have scheduled changes to the algo and not be so reactionary.

DanielRX commented 6 years ago

I think merely showing that we will not support ASICs will make these producers think twice about trying to build an ASIC for ETH, they may then move all the ASICs over to ETC (not sure if that's relevant).

@pipermerriam We only need to show that the protocol and community stand to the opinion of ASICs being a no-go, even if this fixes things for less than a month, it 1) reduces the problem for that month and 2) may open users upto the idea of hardforks being a good thing when used for this case.

Off topic: As discussed in the reddit link, this may allow for a "mini-HF" that means we can add some of the EIPs ready to be forked in along with this

DanielRX commented 6 years ago

@Arachnid who could / will find some form of stats on GPU usages? It seems like we could see at which total difficulty point many GPUs would leave, and then have better stats on how quickly x H/s will make GPUs drop out, and then how big an effect ASICs could have.

LefterisJP commented 6 years ago

I will echo @MicahZoltu and ask why assign manpower/resources on such research if PoS is going to render this obsolete anyhow?

DanielRX commented 6 years ago

@LefterisJP as much as I agree, the issue is one of both protocol and community

Is PoS going to be here soon enough for this to be wasteful? How much damage could ASICs do in the meantime? Is this not dropping the "ASIC resistance" from the original roadmap?

While it may be fine in protocol to wait, it reduces the communities opinion on the deliverance of the ideals they were promised.

The real question to be asked is will PoS be here fast enough to avoid needing this EIP?

Cakez0r commented 6 years ago

If there is to be a PoW change before PoS is released, why not also consider making GPU mining rigs obsolete in the same patch (E.G. CryptoNight)? Let's see if this is truly about decentralisation or whether it's just GPU miners acting against the interests of the network to protect their hardware investment.

mjdillon commented 6 years ago

@Cakez0r I think while making the hash GPU resistant as well as AISC resistant would be the utopian dream, practically speaking, it would leave the network with a woefully small number of miners in the short term, which could lead to a number of unintended consequences.

quantumpotato commented 6 years ago

PoS solves the electricity problem, but it doesn't solve the centralization of hashpower that the anti-ASIC movement, in Monero, afaik, aims for. I think this was the main push behind the Monero discussion eg. https://www.reddit.com/r/Monero/comments/86zb03/the_end_of_all_asic_miners_moneros_new/dw9ieji/

hadees commented 6 years ago

It just makes sense to keep it ASIC resistant. That was the goal from day one. If they are on the network it creates a possible threat before PoS happens. We don't want to rush PoS so we need to fix the mining.

MicahZoltu commented 6 years ago

@quantumpotato With full PoS there is no more need for "hashpower", thus no need for ASICs. If someone does build some kind of ASIC, they won't have a distinct advantage over someone running a validator on their laptop.

naure commented 6 years ago

This issue is independent of POS. It lives on completely different scales of time, complexity, and uncertainty. POS may be delayed, not work well enough, or simply not be adopted. Meanwhile ASICs can spread like wildfire (and it's suspected to have started), after which you can never get rid of it. In fact, that would hinder the smooth transition to any other consensus protocol. It should be fixed before that.

cforce07 commented 6 years ago
  1. Ethash as ASIC resistance algorithm.

    • I believe ethereum team should keep it's promised to us as public on it's ASIC resistance algorithm until the end of PoW era. This is image that ethereum should lead other relative smaller crypto to go to. Few more month to go does not mean we should not take care on this ASIC resistance branding. We as no 2 crypto in the world, should keep it's promise to public until the end of contract.
  2. Current pace of network hashrate/difficulties

    • there is no way the entire world production can meet current calculation of network increase by these few months ( see chart December to march ) We already let bitmain mine at least few months. Are we going to wait bitmain earn the most and give those used machine to public ? We should challenge bitmain centralization mindset by "soft threaten" we will fork if they come out with those products. Remember..bitmain never loss.. they already ROI with those machine.. the one suffer is public(ethereum supporter who want buy those machine) Ethereum foundation should step up on this.

If we want end PoW era.. give a perfect ending for it.

naure commented 6 years ago

soft threaten

It should be systematic even, to discourage the investment, and because they keep it secret.

MicahZoltu commented 6 years ago

[the spread of ASICs] would hinder the smooth transition to any other consensus protocol

Commenting on this just to prevent the spread of incorrect/misleading information, but this comment really has nothing to do with ASICs:

Miners are not part of the governance system. They are a service provider that can be fired as soon as they are not needed anymore (e.g., PoS). If every miner decides they don't like full PoS (which presumably they will) then they can simply all be fired (which they will). There is no need to get buy-in from miners for anything, you need buy-in from economic participants such as people selling goods/services in exchange ETH. For partial PoS (Casper v1) any miner that doesn't get on board will simply be fired (ignored by Casper enabled clients).

archills commented 6 years ago

Casper is still Pow/PoS hybrid. Considering the bitmain's previous behavior. I reckon it is necessary to hard-fork.

Arachnid commented 6 years ago

@pipermerriam We can't make it ASIC proof, but we should be capable of at least rendering anything currently in production either obsolete, or at least requiring more R&D.

The problem is, unless we know how the ASIC works, we're basically taking stabs in the dark at an alternate algorithm. We can't know for certain what type of change would be necessary to obsolete any existing design.

Assuming there's was an alternate ASIC resistant algorithm we were happy with, do you think that the act of forking will adequately demonstrate our willingness to fork the protocol, which should deter bitmain and other manufacturers from sinking costs into producing ASIC miners for Ethereum.

Personally, yes - but then, I wouldn't have expected anyone to release an ASIC in the first place.

naure commented 6 years ago

@MicahZoltu This is true in the long term. "smooth transition" is the keyword. It is easier to upgrade the existing infrastructure to an hybrid system, with GPUs quietly reconverting to other activities VS two groups with opposite incentives trying to promote their chain and discourage the other.

oskarwu commented 6 years ago

It's very difficult to design a completely ASIC proof hash algo .... Current Ethash is memory bound design , but only memory bound does not mean the memory controller part can not be ASIC-like .... The only way to create a ASIC proof POW block chain is try to make ASIC die size as large as possible to make each of the ASIC as more expensive as possible ... So take one simple idea for example : Let's say each hash function can be highly optimized by circuit design and shrink to a small die size area , but if we create like 1024 hash function in the hash function table but only use like 16 and randomize them in chain for each hash ... That means only 16/1024 of the die size area is utilized for hash function .... That will decrease the ASIC efficiency and when the cost of such ASIC is higher than GPU , there is no incentive to design ASIC to compete with GPU ....

pipermerriam commented 6 years ago

Alright, I'm going to try and capture the sentiment that I've seen thus far.

  1. We probably already have ASICs mining on the mainnet based on recent network hash power increases.
  2. We're not assuming we can make the network ASIC proof, but rather trying to require any ASIC currently in production to require non-trivial additional R&D to adapt to whatever new algorithm we switch to.
  3. We're not assuming we can prevent future ASIC production, but rather to deter anyone from investing resources into technology that we've demonstrated willingness to break with hard forks.
  4. While full POS would fix this problem, full deployment of POS has no firm date on which it will be implemented, nor should we rush that implementation because of this problem.
  5. We don't know how any current ASICs operate, so if we make an algorithm change we will be doing our best-effort to break current ASICs.

This leads me back to my original question... What algorithms should we explore.

oskarwu commented 6 years ago

pipermerriam :

I don't think it's necessary to create or choose which algo to go next ... Just put all the existing proven hash algo into the code and random select some of them and chained them together ... This will make ASIC design need to implement more die size area and increase a lot of cost to do ASIC ... Ex : Ethash + X16R + ... , you name it ...

crazydart commented 6 years ago

@Arachnid Bitmain develops these asics and mines with them for before the public even knows they exist. While I agree that trying to patch PoW algorithm without knowing exactly what defeats these asics is shooting in the dark, the consequence of just waiting until these are available for public analysis is that the next generation may never be made public. The promise of ethereum was asic resistance, not asic reaction. This whole thing is only an issue because the ball has been dropped on asic resistance. We know how long it takes to produce asics. Why does ethereum not have a release scheduled every 3 to 6 months to combat this? It’s too hard or it costs too much is a really poor answer for a multibillion dollar crytpcurrency.

Arachnid commented 6 years ago

What I'm trying to say is that trying to design a new, ASIC-proof algorithm without any idea of how current ASICs might be achieving a speed boost is stumbling in the dark. We're as likely to waste resources on something that existing ASICs can be adapted to do as we are to achieve anything useful.

@oskarwu This is the approach used by X11 etc, and I think it's fundamentally flawed. Doing this imposes a constant-factor overhead on ASIC area, but it also degrades CPU/GPU implementations, and ASIC manufacturers can simply throw more silicon at it. Since only operating gates cost electricity, they will still be significantly more energy efficient, which is the main goal with ASIC manufacturing.

@crazydart Inventing a new PoW algorithm every 3-6 months doesn't seem like a practical goal to me.

crazydart commented 6 years ago

@Arachnid If this was a tiny shit coin with 3 developers, I would totally agree. Because it is the number 2 crypto currency in the world with a market cap of $36 billion dollars, you are dead wrong. If they had to put out a fork every week I would say it is justified at this level. The dev group has many millions of dollars in ethereum to spend on this... while I do expect R&D like work on PoS, I also expect ktlo development like upholding their claim that is is asic resistant. If they can’t scale the development, isn’t that a clue that this whole thing is just a hobby??

Arachnid commented 6 years ago

It's not just about money. Each PoW algorithm has to be unique - you can't just change a key, like you would in crypto - and well vetted for issues and vulnerabilities. Then, multiple implementations are needed, and mining pools etc need to be given time to update their implementations for the new algorithm in time for the fork. Then, for each fork the community needs to be informed, and the fork needs scheduling with enough time for everyone to upgrade in a timely fashion.

crazydart commented 6 years ago

@Arachnid Yes, back in the 1990s these were all problems when we didn’t know how to scale systems quickly. Today in 2018, if you don’t know how to solve these problems you are just inexperienced. If you run a $36 billion dollar crypto and don’t have another PoW algorithm in your back pocket, I call it negligent. What if someone found a vulnerability tomorrow? You just going to shut down while you work on a fix?

Arachnid commented 6 years ago

If it's as trivial as you assert, you're welcome to send in a pull request.

taoteh1221 commented 6 years ago

Careful on this one...or you could have Ethereum Gold / Lite / Platinum from every idiot under the sun, like after bcash showed them they could do it with Bitcoin. Might be more harm than good if not done with proper governance.

pipermerriam commented 6 years ago

@Arachnid

I think the concerns you are raising are very valid. Here is my attempt to create a framework to think about this topic and the risks involved depending on what choices we make.

  1. risk of switching algorithms only to find it that it didn't cripple the ASIC miners curretly in production.
  2. technical/security risks of the algorithm change.
  3. centralization risk of allowing ASIC mining to continue until we can know how to cripple them (assumes that ASIC mining is currently happening).

The way I'm looking at this is:

This feels like a choice between "wait until we know" or "shot in the dark" if we work with the assumption that we will change algorithms to deal with ASIC mining.

So is the risk of changing algorithms greater than the centralization risks. It's not clear to me how to evaluate these two risks, however, I don't want us to fall into the trap of "status quo" is easier, and thus safer since we have to take on the inherent security risks related to switching algorithms no matter what we choose.

All of this works under the assumption that we do not choose to just let ASIC miners continue un-interrupted until POS pushes them out.

ofpcarnage commented 6 years ago

I personally think we should fork sooner rather than later to prevent ASIC's the cancer of crypto before it gets out of hand. Bitmain and the other Asic producers are actively trying to centralise all crypto. Yes POS is on the horizon but unless you fork now this will make POS harder to implement on a later day.

cryptomined commented 6 years ago

Since the launch of ZCash the developers have stated that they would alter the Equihash algorithm if there was a threat of an ASIC. I would suggest asking Zooko & co if they have any input on the best way to alter Ethash so that Ethereum can make any ASICs obsolete.

A good place to start may be at the ZCash forums forum.z.cash

Or asking zooko directly on twitter as he is very active and friendly on twitter.

oskarwu commented 6 years ago

@Arachnid : The reason X11 is failed to be ASIC proof is because it does not increase the die size area significantly ... Let's say each simple hash function require 1mm x 1mm die size area to implement each individual function ... X11 means like 3mmx3mm or 4mm x 4mm to implement all these hash functions ... As long as the die size area is still in a reasonable range , there is still incentive for ASIC company to " produce " such ASIC ... But when the number is X100 , you could need 10mm x 10mm to implement all these hash functions , things start to be different now ... A die size area 1cm x 1cm is relatively large in modern silicon chip and the production cost and chip bounding/packaging cost start to increase significantly and the yield rate start to decrease significantly ... When the number is X1000 , you need 30mm x 30mm die size area to implement all these 1000 hash functions .... 3cm x 3cm chip die size area for each chip is extremely expensive to do ... If only 3% of the 3cm x 3cm silicon area will be used for each hash , even the efficiency is far superior for ASIC to compete with GPU , the initial cost is still way too high for the miner/mining farm to buy such ASIC machine because it's way too space wasting ... If there is x1000 hash and some of them are memory bound like Ethash , you will need an expensive ASIC and a lot of memory chips to do the ASIC mining machine and that will make ASIC very difficult to implement or no financial incentive to do it ...

crazydart commented 6 years ago

@Arachnid I would be happy to solve this problem and submit a pull. I am just going to need to be paid. Last I checked I was a pissed off consumer, not a paid developer. If this was some small open source project I might even entertain doing it for free... but again, this is a $36 billion dollar crypto with many millions to pay developers. I don’t think they need my help really... they just need to make up their minds what is more important: the promise to be asic resistant or their time to dedicate to PoS. Trust is near impossible to earn back. Choose wisely.

bitcartel commented 6 years ago

@cryptomined A discussion started a few weeks ago about Zcash and ASICs here: https://forum.z.cash/t/let-s-talk-about-asic-mining/27353

DanielRX commented 6 years ago

@crazydart Are you expecting the community to pay the devs? Just because the market cap is $36M means nothing for the funding available to the EF/Core devs.

This is not a place to act like that. This is a discussion of what, if anything, can be done to fix this issue (if there is one).

I vote we move this conversation to a gitter or similar (this is giving me more and more desire for #956 to have a set location for discussion.) in order to talk in more depth about the viable solution methods and the worth they will provide if we even attempt them.

Alvarogarcia91 commented 6 years ago

please make it ASIC resistant i have several rigs mining eth and i will get bankrupt if an ASIC is developed :(

boerminer commented 6 years ago

Not a software guy, plz don't roast me! Is there anyway the algorithm itself can change?.. Maybe the block number causes a slight change in the algorithm itself.. That seems like something asics wouldn't be able to cope with yet all gpus/cpus would still be in sync with how they hash each block.

crazydart commented 6 years ago

@DanielRX The community doesn’t have to pay for anything... the Ethereum Foundation had a massive amount of money in reserve... I am sure the number exceeds a billion dollars by now. That was raised to pay for exactly this. The EF/core devs should absolutely be paid out of that. But you are right, this isn’t the place to discuss it. My comment was to someone else that I wouldn’t be submitting a pull request to a profitable project for free.

DanielRX commented 6 years ago

@boerminer your idea is the same as @oskarwu which may be valid however could effect gpus just as badly and may not actually hinder ASICs

cryptomined commented 6 years ago

@bitcartel Thanks I did not see that, have not been on those forums for Months now... i posted another topic in regards to this EIP after posting my comment here... (and tweeted to Zooko on twitter)

@MicahZoltu Please don't discriminate against miners... I mine... I accept ETH for goods/payment... I Hodl ETH... I use ETH... we are all in this together. Miners are not against POS... most of us WANT POS because we know that POS can take ETH to the next level... yes some miners only mine for profit... however some of us mine because we believe in ETH... and a lot of miners start mining for profit and then slowly become believers... its not black and white. Those who currently verify should be respected as a part of the community... without miners today, there would be no ETH. Hopefully we can change that in the future.

tazket84 commented 6 years ago

Hi all. I also belive in the idea of decentralized where people can be part of and also get reward for, that's why cryptos should be asic resistance in order to get the community growing.

Regards