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
-10
View File
@@ -34,7 +34,6 @@ import (
"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/ethash"
"github.com/ethereum/go-ethereum/consensus/misc"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/state"
@@ -2055,15 +2054,6 @@ func (api *DebugAPI) PrintBlock(ctx context.Context, number uint64) (string, err
return spew.Sdump(block), nil
}
// SeedHash retrieves the seed hash of a block.
func (api *DebugAPI) SeedHash(ctx context.Context, number uint64) (string, error) {
block, _ := api.b.BlockByNumber(ctx, rpc.BlockNumber(number))
if block == nil {
return "", fmt.Errorf("block #%d not found", number)
}
return fmt.Sprintf("%#x", ethash.SeedHash(number)), nil
}
// ChaindbProperty returns leveldb properties of the key-value database.
func (api *DebugAPI) ChaindbProperty(property string) (string, error) {
if property == "" {