Skip to content

Commit

Permalink
aleth: fix some remaining snags
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Aug 10, 2018
1 parent 71b35a6 commit 049bbc0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
10 changes: 10 additions & 0 deletions clients/aleth:nightly/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ ADD config.json /config.json
ADD aleth.sh /aleth.sh
RUN chmod +x /aleth.sh

RUN apk add --no-cache jq bc bash

# The /version.json is a softlink, which hive won't resolve when trying to read it.
# We copy it into a regular file, and also remove the 'bool' field is_prerelease


RUN cat /version.json | jq "del(.is_prerelease)" > /x.json && \
rm /version.json && \
mv /x.json /version.json

# Export the usual networking ports to allow outside access to the node
EXPOSE 8545 30303

Expand Down
12 changes: 6 additions & 6 deletions clients/aleth:nightly/aleth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ if [ "$accounts" != "" ]; then
chainconfig=`jq -s '.[0] * .[1]' tmp1 tmp2`
fi


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

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

1 comment on commit 049bbc0

@winsvega
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why should we set nonce, code, storage for a precompiled in genesis config ?
I think having those fields will just mess up the config.
Related discussion:
ethereum/tests#469

Please sign in to comment.