Skip to content

Commit

Permalink
clients/go-ethereum: remove deprecated PoW (#773)
Browse files Browse the repository at this point in the history
Remove ethash-related flags and utils from go-ethereum, since they were
deprecated upstream.

---------

Co-authored-by: Martin Holst Swende <[email protected]>
  • Loading branch information
s1na and holiman authored May 4, 2023
1 parent 972a180 commit 7e559b0
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 29 deletions.
5 changes: 0 additions & 5 deletions clients/go-ethereum/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,4 @@ ADD genesis.json /genesis.json
# Export the usual networking ports to allow outside access to the node
EXPOSE 8545 8546 8547 8551 30303 30303/udp

# Generate the ethash verification caches
RUN \
/usr/local/bin/geth makecache 1 ~/.ethereum/geth/ethash && \
/usr/local/bin/geth makecache 30001 ~/.ethereum/geth/ethash

ENTRYPOINT ["/geth.sh"]
8 changes: 2 additions & 6 deletions clients/go-ethereum/geth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ fi
# It doesn't make sense to dial out, use only a pre-set bootnode.
FLAGS="$FLAGS --bootnodes=$HIVE_BOOTNODE"

if [ "$HIVE_SKIP_POW" != "" ]; then
FLAGS="$FLAGS --fakepow"
fi

# If a specific network ID is requested, use that
if [ "$HIVE_NETWORK_ID" != "" ]; then
FLAGS="$FLAGS --networkid $HIVE_NETWORK_ID"
Expand Down Expand Up @@ -131,7 +127,7 @@ if [ "$HIVE_CLIQUE_PRIVATEKEY" != "" ]; then
# Create password file.
echo "Importing clique key..."
echo "secret" > /geth-password-file.txt
$geth --nousb account import --password /geth-password-file.txt <(echo "$HIVE_CLIQUE_PRIVATEKEY")
$geth account import --password /geth-password-file.txt <(echo "$HIVE_CLIQUE_PRIVATEKEY")

# Ensure password file is used when running geth in mining mode.
if [ "$HIVE_MINER" != "" ]; then
Expand All @@ -141,7 +137,7 @@ fi

# Configure any mining operation
if [ "$HIVE_MINER" != "" ] && [ "$HIVE_NODETYPE" != "light" ]; then
FLAGS="$FLAGS --mine --miner.threads 1 --miner.etherbase $HIVE_MINER"
FLAGS="$FLAGS --mine --miner.etherbase $HIVE_MINER"
fi
if [ "$HIVE_MINER_EXTRA" != "" ]; then
FLAGS="$FLAGS --miner.extradata $HIVE_MINER_EXTRA"
Expand Down
1 change: 1 addition & 0 deletions clients/go-ethereum/mapper.jq
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ def to_bool:
"mergeForkBlock": env.HIVE_MERGE_BLOCK_ID|to_int,
"terminalTotalDifficulty": env.HIVE_TERMINAL_TOTAL_DIFFICULTY|to_int,
"shanghaiTime": env.HIVE_SHANGHAI_TIMESTAMP|to_int,
"terminalTotalDifficultyPassed": true,
}|remove_empty
}
8 changes: 0 additions & 8 deletions simulators/eth2/engine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# Generate the ethash verification caches.
# Use a static version because this will never need to be updated.
FROM ethereum/client-go:v1.10.20 AS geth
RUN \
/usr/local/bin/geth makecache 1 /ethash && \
/usr/local/bin/geth makedag 1 /ethash

# Build the simulator binary
FROM golang:1-alpine AS builder
RUN apk --no-cache add gcc musl-dev linux-headers cmake make clang build-base clang-static clang-dev
Expand All @@ -21,6 +14,5 @@ RUN go build -o ./sim .
FROM alpine:latest
ADD . /
COPY --from=builder /source/engine/sim /
COPY --from=geth /ethash /ethash

ENTRYPOINT ["./sim"]
10 changes: 0 additions & 10 deletions simulators/ethereum/engine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# Generate the ethash verification caches.
# Use a static version because this will never need to be updated.
FROM ethereum/client-go:v1.10.20 AS geth
RUN \
/usr/local/bin/geth makecache 1 /ethash && \
/usr/local/bin/geth makecache 30000 /ethash && \
/usr/local/bin/geth makedag 1 /ethash && \
/usr/local/bin/geth makedag 30000 /ethash

# This simulation runs Engine API tests.
FROM golang:1-alpine as builder
RUN apk add --update gcc musl-dev linux-headers
Expand All @@ -21,5 +12,4 @@ FROM alpine:latest
ADD . /source
WORKDIR /source
COPY --from=builder /source/engine .
COPY --from=geth /ethash /ethash
ENTRYPOINT ["./engine"]

0 comments on commit 7e559b0

Please sign in to comment.