diff --git a/Dockerfile b/Dockerfile index 7ac68d7..656e1f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -79,26 +79,22 @@ RUN cd bin \ # Install Geth FROM stage-base-plain AS stage-Geth -RUN wget https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64-1.13.14-2bd6bd01.tar.gz \ +RUN wget https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64-1.15.6-19d2b4c8.tar.gz \ && tar xf geth*tar.gz \ && rm geth*tar.gz \ && cd geth* # Install Consensus FROM stage-base-plain AS stage-Prysm -RUN mkdir ethereum \ - && cd ethereum \ - && mkdir consensus \ - && cd consensus \ - && mkdir prysm \ - && cd prysm \ - && curl https://raw.githubusercontent.com/prysmaticlabs/prysm/master/prysm.sh --output prysm.sh \ - && chmod 755 prysm.sh \ - && wget https://github.com/eth-clients/eth2-networks/blob/master/shared/mainnet/genesis.ssz \ - && export PRYSM_ALLOW_UNVERIFIED_BINARIES=1 \ - && ./prysm.sh beacon-chain generate-auth-secret \ - && cp jwt.hex .. \ - && cd .. \ +ARG PRYSM_VERSION=v5.2.0 +RUN mkdir -p /ethereum/consensus/prysm /ethereum/consensus/bin \ + && cd /ethereum/consensus/bin \ + && wget "https://github.com/prysmaticlabs/prysm/releases/download/${PRYSM_VERSION}/beacon-chain-${PRYSM_VERSION}-linux-amd64" -O beacon-chain \ + && chmod +x beacon-chain \ + && cd /ethereum/consensus/prysm \ + && wget https://github.com/eth-clients/eth2-networks/raw/master/shared/mainnet/genesis.ssz \ + && cd /ethereum/consensus \ + && openssl rand -hex 32 > jwt.hex \ && chmod 0444 jwt.hex # Install IPFS @@ -115,9 +111,9 @@ RUN wget https://dist.ipfs.io/go-ipfs/v0.7.0/go-ipfs_v0.7.0_linux-amd64.tar.gz \ # Final Image FROM stage-base-02 as final-image COPY --from=stage-Solidity /bin/solc /bin/ -COPY --from=stage-Geth /geth-alltools-linux-amd64-1.13.14-2bd6bd01/geth /bin/ -COPY --from=stage-Geth /geth-alltools-linux-amd64-1.13.14-2bd6bd01/clef /bin/ -COPY --from=stage-Prysm /ethereum /ethereum +COPY --from=stage-Geth /geth-alltools-linux-amd64-1.15.6-19d2b4c8/geth /bin/ +COPY --from=stage-Geth /geth-alltools-linux-amd64-1.15.6-19d2b4c8/clef /bin/ +COPY --from=stage-Prysm /ethereum/consensus /ethereum/consensus COPY --from=stage-IPFS /usr/local/bin/ipfs /usr/local/bin/ COPY . truebit-eth/ ARG URL_TRUEBIT_OS=https://downloads.truebit.io/truebit-linux diff --git a/mainnet.sh b/mainnet.sh index 64ebfee..b151d92 100644 --- a/mainnet.sh +++ b/mainnet.sh @@ -20,15 +20,14 @@ tmux new -d 'ipfs daemon' CLEF='/root/.clef/clef.ipc' GETHIPC='/root/.ethereum/geth.ipc' +GETH=$(echo 'geth console --http --http.api web3,eth,net,engine,admin --datadir=/root/.ethereum --authrpc.jwtsecret /ethereum/consensus/jwt.hex --authrpc.vhosts localhost --authrpc.addr=localhost --authrpc.port=8551 --signer' $CLEF) -GETH=$(echo 'geth console --http --http.api web3,eth,net,engine,admin --datadir=/root/.ethereum --authrpc.jwtsecret /ethereum/consensus/jwt.hex --authrpc.vhosts localhost --signer' $CLEF) - -PRYSM=$(echo '/ethereum/consensus/prysm/prysm.sh beacon-chain --execution-endpoint=http://localhost:8551 --datadir=/root/.eth2/beaconchain --jwt-secret=/ethereum/consensus/jwt.hex --suggested-fee-recipient=0x1Da28542742614B3CA2941F9DFcD23FFc3CB0071') +PRYSM=$(echo '/ethereum/consensus/bin/beacon-chain --execution-endpoint=http://localhost:8551 --datadir=/root/.eth2/beaconchain --jwt-secret=/ethereum/consensus/jwt.hex --genesis-state=/ethereum/consensus/prysm/genesis.ssz --suggested-fee-recipient=0x1Da28542742614B3CA2941F9DFcD23FFc3CB0071 --accept-terms-of-use') cat <<< $(jq '.geth.providerURL="/root/.ethereum/geth.ipc"' /truebit-eth/wasm-client/config.json) > /truebit-eth/wasm-client/config.json tmux \ -new-session 'clef --advanced --nousb --chainid 1 --keystore=/root/.ethereum/keystore --configdir=/root/.clef --rules /truebit-eth/wasm-client/ruleset.js' \; \ +new-session 'clef --advanced --nousb --chainid 1 --keystore=/root/.ethereum/keystore --configdir=/root/.clef --rules /truebit-eth/wasm-client/ruleset.js' \; \ split-window "echo 'Geth is waiting for Clef IPC socket...'; until [ -S $CLEF ]; do sleep 0.1; done; $GETH" \; \ -split-window -hf "echo 'Prysm Geth is waiting for Clef IPC socket...'; until [ -S $CLEF ]; do sleep 0.1; done; $PRYSM " \; \ +split-window -hf "echo 'Waiting for Geth Engine API to initialize (30 seconds)...'; until [ -S $CLEF ]; do sleep 0.1; done; sleep 30; echo 'Starting Prysm...'; $PRYSM " \; \ selectp -L \; swap-pane -U # Improve IPFS connectivity by connecting to other Truebit users