all: remove ethash pow, only retain shims needed for consensus and tests (#27178)

* all: remove ethash pow, only retain shims needed for consensus and tests

* all: thank you linter

* all: disallow launching Geth in legacy PoW mode

* cmd/env/internal/t8ntool: remove dangling ethash flag
This commit is contained in:
Péter Szilágyi
2023-05-03 12:58:39 +03:00
committed by GitHub
parent ac3418def6
commit dde2da0efb
57 changed files with 210 additions and 5484 deletions
+1 -8
View File
@@ -29,7 +29,6 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/consensus"
"github.com/ethereum/go-ethereum/consensus/beacon"
"github.com/ethereum/go-ethereum/consensus/ethash"
"github.com/ethereum/go-ethereum/core"
@@ -117,14 +116,8 @@ func (t *BlockTest) Run(snapshotter bool) error {
if gblock.Root() != t.json.Genesis.StateRoot {
return fmt.Errorf("genesis block state root does not match test: computed=%x, test=%x", gblock.Root().Bytes()[:6], t.json.Genesis.StateRoot[:6])
}
var engine consensus.Engine
if t.json.SealEngine == "NoProof" {
engine = ethash.NewFaker()
} else {
engine = ethash.NewShared()
}
// Wrap the original engine within the beacon-engine
engine = beacon.New(engine)
engine := beacon.New(ethash.NewFaker())
cache := &core.CacheConfig{TrieCleanLimit: 0}
if snapshotter {