Skip to content

Commit

Permalink
update demo scripts
Browse files Browse the repository at this point in the history
  * add setup to combine init steps, configurable initial mint
  * bash -e -> bash and be explicit about errors with || exit $?
  * feed transaction logs to validator, too
  • Loading branch information
rob-solana committed Jun 19, 2018
1 parent 92599ac commit 311475a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions multinode-demo/client.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/bash

if [[ -z $1 ]]; then
printf 'usage: %s [network path to solana repo on leader machine] [number of nodes in the network if greater then 1]' "$0"
Expand All @@ -9,7 +9,7 @@ LEADER=$1
COUNT=${2:-1}

set -x
rsync -v -e ssh "$LEADER"/{leader.json,mint-demo.json} .
rsync -v "$LEADER"/{leader.json,mint-demo.json} . || exit $?

# if RUST_LOG is unset, default to info
export RUST_LOG=${RUST_LOG:-solana=info}
Expand Down
4 changes: 3 additions & 1 deletion multinode-demo/leader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ export RUST_LOG=${RUST_LOG:-solana=info}

set -x
[[ $(uname) = Linux ]] && sudo sysctl -w net.core.rmem_max=26214400
cargo run --release --bin solana-fullnode -- -l leader.json < genesis.log

cargo run --release --bin solana-fullnode -- \
-l leader.json < genesis.log tx-*.log > tx-"$(date -u +%Y%m%d%k%M%S%N)"
9 changes: 9 additions & 0 deletions multinode-demo/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

TOKENS=${1:-1000000000}

cargo run --release --bin solana-mint-demo <<<"${TOKENS}" > mint-demo.json
cargo run --release --bin solana-genesis-demo < mint-demo.json > genesis.log

cargo run --release --bin solana-fullnode-config -- -d > leader.json
cargo run --release --bin solana-fullnode-config -- -d > validator.json
4 changes: 2 additions & 2 deletions multinode-demo/validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ LEADER=$1

set -x

rsync -v -e ssh "$LEADER"/{mint-demo.json,leader.json,genesis.log} . || exit $?
rsync -v "$LEADER"/{mint-demo.json,leader.json,genesis.log,tx-*.log} . || exit $?

[[ $(uname) = Linux ]] && sudo sysctl -w net.core.rmem_max=26214400

# if RUST_LOG is unset, default to info
export RUST_LOG=${RUST_LOG:-solana=info}

cargo run --release --bin solana-fullnode -- \
-l validator.json -v leader.json < genesis.log
-l validator.json -v leader.json < genesis.log tx-*.log

0 comments on commit 311475a

Please sign in to comment.