go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

Deprecate flags for ethash mining

Open rjl493456442 opened this issue 3 years ago • 4 comments

There are a few CLI flags for ethash mining. Since ethereum is already switched to PoS, these flags should be deprecated.

  • miner.threads
  • miner.notify
  • miner.notify.full
  • miner.etherbase
  • miner.extradata
  • miner.noverify

rjl493456442 avatar Sep 20 '22 04:09 rjl493456442

I started working on a PR to remove ethash altogether. It's a bit of a larger refactor because I need to create a noop consensus engine for tests / chain makers / etc. Will include the removal of these flags too

karalabe avatar Sep 20 '22 10:09 karalabe

But ethash is still needed in case we want to run full sync? Legacy consensus validation.

rjl493456442 avatar Sep 20 '22 10:09 rjl493456442

Mainnet was flipped over to be post-merge, meaning it always requires a beacon client sethead, even on initial genesis sync. At that point, we don't need to verify PoW any more, we just assume the security of the consensus client and run whatever it gives us. This permits us to get rid of ethash altogether.

After stopping Rinkeby, we'll also be able to get rid of Clique, and thus completely wiping the consensus package and related complexity. This would also allow us to get back to having a single entry point for inserting new blocks / reorging the chain into the system. One extra needed is to have a Clique v2 that operates above the engine API.

karalabe avatar Sep 20 '22 10:09 karalabe

Does it mean we can also get rid of the block generation logic in miner package? If so we only need to keep the logic for generating payload by demand. It should simplify the codebase a lot.

But yeah, if we deprecate the entire consensus package, it means we not are a complete client at all and it might be problematic for dev network? (we can't launch a network by ourselves).

rjl493456442 avatar Sep 20 '22 12:09 rjl493456442

Fixed via https://github.com/ethereum/go-ethereum/pull/27178

s1na avatar May 24 '23 14:05 s1na