mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 13:28:01 -05:00
* wip passing e2e * reverting temp comment * remove unneeded comments * fixing merge errors * fixing more bugs from merge * fixing test * WIP moving code around and fixing tests * unused linting * gaz * temp removing these tests as we need placeholder/wrapper APIs for them with the removal of the gateway * attempting to remove dependencies to gRPC gateway , 1 mroe left in deps.bzl * renaming flags and other gateway services to http * goimport * fixing deepsource * git mv * Update validator/package/validator.yaml Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update validator/package/validator.yaml Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update cmd/beacon-chain/flags/base.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update cmd/beacon-chain/flags/base.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update cmd/beacon-chain/flags/base.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * addressing feedback * missed lint * renaming import * reversal based on feedback * fixing web ui registration * don't require mux handler * gaz * removing gRPC service from validator completely, merged with http service, renames are a work in progress * updating go.sum * linting * trailing white space * realized there was more cleanup i could do with code reuse * adding wrapper for routes * reverting version * fixing dependencies from merging develop * gaz * fixing unit test * fixing dependencies * reverting unit test * fixing conflict * updating change log * Update log.go Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com> * gaz * Update api/server/httprest/server.go Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com> * addressing some feedback * forgot to remove deprecated flag in usage * gofmt * fixing test * fixing deepsource issue * moving deprecated flag and adding timeout handler * missed removal of a flag * fixing test: * Update CHANGELOG.md Co-authored-by: Radosław Kapka <rkapka@wp.pl> * addressing feedback * updating comments based on feedback * removing unused field for now, we can add it back in if we need to use the option * removing unused struct * changing api-timeout flag based on feedback --------- Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
105 lines
2.5 KiB
Bash
Executable File
105 lines
2.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
"""
|
|
2019/09/08 -- Interop start script.
|
|
This script is intended for dockerfile deployment for interop testing.
|
|
This script is fragile and subject to break as flags change.
|
|
Use at your own risk!
|
|
|
|
|
|
Use with interop.Dockerfile from the workspace root:
|
|
|
|
docker build -f interop.Dockerfile .
|
|
"""
|
|
|
|
# Flags
|
|
IDENTITY="" # P2P private key
|
|
PEERS="" # Comma separated list of peers
|
|
GEN_STATE="" # filepath to ssz encoded state.
|
|
PORT="8000" # port to serve p2p traffic
|
|
RPCPORT="8001" # port to serve rpc traffic
|
|
YAML_KEY_FILE="" # Path to yaml keyfile as defined here: https://github.com/ethereum/eth2.0-pm/tree/master/interop/mocked_start
|
|
|
|
# Constants
|
|
BEACON_LOG_FILE="/tmp/beacon.log"
|
|
VALIDATOR_LOG_FILE="/tmp/validator.log"
|
|
|
|
usage() {
|
|
echo "--identity=<identity>"
|
|
echo "--peer=<peer>"
|
|
echo "--num-validators=<number>"
|
|
echo "--gen-state=<file path>"
|
|
echo "--port=<port number>"
|
|
echo "--rpcport=<port number>"
|
|
}
|
|
|
|
while [ "$1" != "" ];
|
|
do
|
|
PARAM=`echo $1 | awk -F= '{print $1}'`
|
|
VALUE=`echo $1 | sed 's/^[^=]*=//g'`
|
|
|
|
case $PARAM in
|
|
--identity)
|
|
IDENTITY=$VALUE
|
|
;;
|
|
--peers)
|
|
[ -z "$PEERS" ] && PEERS+=","
|
|
PEERS+="$VALUE"
|
|
;;
|
|
--validator-keys)
|
|
YAML_KEY_FILE=$VALUE
|
|
;;
|
|
--gen-state)
|
|
GEN_STATE=$VALUE
|
|
;;
|
|
--port)
|
|
PORT=$VALUE
|
|
;;
|
|
--rpcport)
|
|
RPCPORT=$VALUE
|
|
;;
|
|
--help)
|
|
usage
|
|
exit
|
|
;;
|
|
*)
|
|
echo "ERROR: unknown parameter \"$PARAM\""
|
|
usage
|
|
exit 1
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
|
|
echo "Converting hex yaml keys to a format that Prysm understands"
|
|
|
|
# Expect YAML keys in hex encoded format. Convert this into the format the validator already understands.
|
|
./convert-keys $YAML_KEY_FILE /tmp/keys.json
|
|
|
|
echo "Starting beacon chain and logging to $BEACON_LOG_FILE"
|
|
|
|
echo -n "$IDENTITY" > /tmp/id.key
|
|
|
|
|
|
|
|
BEACON_FLAGS="--bootstrap-node= \
|
|
--deposit-contract=0xD775140349E6A5D12524C6ccc3d6A1d4519D4029 \
|
|
--p2p-port=$PORT \
|
|
--http-port=$RPCPORT \
|
|
--peer=$PEERS \
|
|
--interop-genesis-state=$GEN_STATE \
|
|
--p2p-priv-key=/tmp/id.key \
|
|
--log-file=$BEACON_LOG_FILE"
|
|
|
|
./beacon-chain $BEACON_FLAGS &
|
|
|
|
echo "Starting validator client and logging to $VALIDATOR_LOG_FILE"
|
|
|
|
VALIDATOR_FLAGS="--monitoring-port=9091 \
|
|
--unencrypted-keys /tmp/keys.json \
|
|
--log-file=$VALIDATOR_LOG_FILE
|
|
|
|
./validator- $VALIDATOR_FLAGS &
|
|
|