Skip to content

Commit

Permalink
fix: use agoric set-defaults --bootstrap-address
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed May 2, 2021
1 parent f37adcf commit 4f96b2c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/cosmic-swingset/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ scenario2-setup-nobuild:
$(AGCH) --home=t1/n0 --keyring-dir=t1/bootstrap gentx --keyring-backend=test bootstrap 73000000ubld --chain-id=$(CHAIN_ID)
$(AGCH) --home=t1/n0 collect-gentxs
$(AGCH) --home=t1/n0 validate-genesis
../agoric-cli/bin/agoric set-defaults --export-metrics ag-chain-cosmos t1/n0/config
../agoric-cli/bin/agoric set-defaults --export-metrics --bootstrap-address=`cat t1/bootstrap-address` ag-chain-cosmos t1/n0/config
# Set the chain address in all the ag-solos.
jq '. + { genesis_time: "$(GENESIS_TIME)", initial_height: "$(INITIAL_HEIGHT)" }' t1/n0/config/genesis.json > t1/n0/config/genesis2.json
mv t1/n0/config/genesis2.json t1/n0/config/genesis.json
Expand Down
5 changes: 3 additions & 2 deletions packages/cosmic-swingset/bin/ag-nchainz
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ testnet)
portstart=$(( $BASE_PORT + $i * $NUM_SOLOS ))
portend=$(( $portstart + $NUM_SOLOS - 1 ))
SOLO_ADDRS=()
SOLO_NAMES=()
POWER_FLAGS='[\"agoric.vattp\"]'
egresses=
sep=''
Expand All @@ -64,6 +63,7 @@ testnet)
echo "Initializing ag-solo in $solo"
$SOLO init $solo --webport=$port
addr=$(cat $solo/ag-cosmos-helper-address)
SOLO_ADDRS+=( "$addr" )
$DAEMON add-genesis-account --home=$n0d \
$($CLI --home=$solo/$CLI-statedir --keyring-backend=test keys show -a ag-solo) \
1000urun,1provisionpass
Expand All @@ -73,7 +73,8 @@ testnet)
done
for node in `ls -d $chainid/n* 2>/dev/null || true`; do
[[ "$node/$DAEMON" == $n0d ]] || cp $n0d/config/genesis.json $node/$DAEMON/config/genesis.json
"$thisdir/../../agoric-cli/bin/agoric" set-defaults ag-chain-cosmos $node/$DAEMON/config
"$thisdir/../../agoric-cli/bin/agoric" set-defaults --bootstrap-address=${SOLO_ADDRS[0]} \
ag-chain-cosmos $node/$DAEMON/config
cp "$node/$DAEMON/config/genesis.json" "$node/$DAEMON/config/genesis-orig.json"
# Append the egresses to the genesis and reset bond_denom.
jq ".*{app_state:{staking:{params:{bond_denom:\"stake\"}},swingset:{storage:{$egresses}}}}" \
Expand Down
2 changes: 1 addition & 1 deletion packages/cosmic-swingset/scripts/single-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ case $DAEMON in
ag-chain-cosmos)
# For Agoric
DIR=$(dirname -- "${BASH_SOURCE[0]}")
"$DIR/../../agoric-cli/bin/agoric" set-defaults ag-chain-cosmos ~/.$DAEMON/config
"$DIR/../../agoric-cli/bin/agoric" set-defaults --bootstrap-address=$GENACCT ag-chain-cosmos ~/.$DAEMON/config
;;
esac

Expand Down

0 comments on commit 4f96b2c

Please sign in to comment.