Skip to content

Commit 049bbc0

Browse files
committed
aleth: fix some remaining snags
1 parent 71b35a6 commit 049bbc0

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

clients/aleth:nightly/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ ADD config.json /config.json
1616
ADD aleth.sh /aleth.sh
1717
RUN chmod +x /aleth.sh
1818

19+
RUN apk add --no-cache jq bc bash
20+
21+
# The /version.json is a softlink, which hive won't resolve when trying to read it.
22+
# We copy it into a regular file, and also remove the 'bool' field is_prerelease
23+
24+
25+
RUN cat /version.json | jq "del(.is_prerelease)" > /x.json && \
26+
rm /version.json && \
27+
mv /x.json /version.json
28+
1929
# Export the usual networking ports to allow outside access to the node
2030
EXPOSE 8545 30303
2131

clients/aleth:nightly/aleth.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ if [ "$accounts" != "" ]; then
105105
chainconfig=`jq -s '.[0] * .[1]' tmp1 tmp2`
106106
fi
107107

108-
109-
if [ "$((16#$HIVE_FORK_METROPOLIS))" -eq "0" ]; then
110-
chainconfig=`echo $chainconfig | jq "delpaths([[\"accounts\", \"0000000000000000000000000000000000000005\", \"code\"]])"`
111-
chainconfig=`echo $chainconfig | jq "delpaths([[\"accounts\", \"0000000000000000000000000000000000000006\", \"code\"]])"`
112-
chainconfig=`echo $chainconfig | jq "delpaths([[\"accounts\", \"0000000000000000000000000000000000000007\", \"code\"]])"`
113-
fi
108+
# For some reason, aleth doesn't like it when precompiles have code/nonce/storage, so we need to remove those fields.
109+
for i in $(seq 1 8); do
110+
chainconfig=`echo $chainconfig | jq "delpaths([[\"accounts\", \"000000000000000000000000000000000000000$i\", \"code\"]])"`
111+
chainconfig=`echo $chainconfig | jq "delpaths([[\"accounts\", \"000000000000000000000000000000000000000$i\", \"nonce\"]])"`
112+
chainconfig=`echo $chainconfig | jq "delpaths([[\"accounts\", \"000000000000000000000000000000000000000$i\", \"storage\"]])"`
113+
done
114114

115115
#if [ "$HIVE_TESTNET" == "1" ]; then
116116
# chainconfig=`echo $chainconfig | jq "setpath([\"params\", \"accountStartNonce\"]; \"0x0100000\")"`

0 commit comments

Comments
 (0)