Skip to content

Commit

Permalink
Merge pull request #11 from vulcanize/let_write_mode_be_configurable
Browse files Browse the repository at this point in the history
let statediff writing mode be configured by env variable
  • Loading branch information
i-norden authored Dec 29, 2021
2 parents e39aac5 + bdfd625 commit 8d4de2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker/startup_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ trap "exit 1" SIGINT SIGTERM

TMPDIR=$(mktemp -d)
dapp testnet --rpc-addr 0.0.0.0 --chain-id 4 --db-user $DB_USER --db-password $DB_PASSWORD --db-name $DB_NAME \
--db-host $DB_HOST --db-port $DB_PORT --dir "$TMPDIR" --address=$ADDRESS &
--db-host $DB_HOST --db-port $DB_PORT --db-write $DB_WRITE --dir "$TMPDIR" --address=$ADDRESS &
echo "sleeping 90 sec"
# give it a few secs to start up
sleep 90
Expand Down
4 changes: 3 additions & 1 deletion src/dapp/libexec/dapp/dapp---testnet-launch
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ db-password=password database password
db-name=name database name
db-host=address database host
db-port=port database port
db-write=bool turn on database write mode
rpc-port=port change RPC port (default: 8545)
rpc-addr=address change RPC address (default: 127.0.0.1)
chain-id=number change chain ID (default: 99)
Expand Down Expand Up @@ -45,6 +46,7 @@ while [[ $1 ]]; do
--db-name) shift; DB_NAME=$1;;
--db-host) shift; DB_HOST=$1;;
--db-port) shift; DB_PORT=$1;;
--db-write) shift; DB_WRITE=$1;;
--rpc-port) shift; RPC_PORT=$1;;
--rpc-addr) shift; RPC_ADDRESS=$1;;
--chain-id) shift; CHAINID=$1;;
Expand Down Expand Up @@ -132,7 +134,7 @@ geth \
--http --http.api "web3,eth,net,debug,personal,statediff" --http.corsdomain '*' --http.vhosts '*' --nodiscover \
--http.addr="$RPC_ADDRESS" --http.port="$RPC_PORT" --syncmode=full --gcmode=archive \
--statediff --statediff.db="host=$DB_HOST port=$DB_PORT user=$DB_USER password=$DB_PASSWORD dbname=$DB_NAME sslmode=disable" \
--statediff.dbnodeid 1 --statediff.dbclientname test1 --statediff.writing=true \
--statediff.dbnodeid 1 --statediff.dbclientname test1 --statediff.writing="$DB_WRITE" \
--ws --ws.addr="0.0.0.0" --unlock="$(IFS=,; echo "${address[*]}")" --password=<(exit) &

gethpid=$!
Expand Down

0 comments on commit 8d4de2a

Please sign in to comment.