Skip to content

Commit

Permalink
fix: use gentx --home-server instead of --home-client
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Oct 7, 2020
1 parent b487f14 commit ed634bf
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 21 deletions.
22 changes: 4 additions & 18 deletions packages/agoric-cli/lib/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export default async function startMain(progname, rawArgs, powers, opts) {

// Get or create the essential addresses.
const addrs = {};
for (const keyName of ['provision']) {
for (const keyName of ['provision', 'delegate0']) {
/* eslint-disable no-await-in-loop */
let capret = showKey(keyName);
if (await capret[0]) {
Expand Down Expand Up @@ -263,32 +263,18 @@ export default async function startMain(progname, rawArgs, powers, opts) {
if (exitStatus) {
return exitStatus;
}
// We need to generate the delegate address on the node.
exitStatus = await chainSpawn([
'keys',
'add',
'delegate0',
'--keyring-backend=test',
]);
if (exitStatus) {
return exitStatus;
}
exitStatus = await chainSpawn([
'add-genesis-account',
'delegate0',
addrs.delegate0,
DELEGATE0_COINS,
'--keyring-backend=test',
]);
if (exitStatus) {
return exitStatus;
}
const keysHome = opts.sdk
? `_agstate/keys`
: `/usr/src/dapp/_agstate/keys`;
exitStatus = await chainSpawn([
exitStatus = await keysSpawn([
'gentx',
'delegate0',
`--home-client=${keysHome}`,
`--home-server=${localAgServer}`,
'--keyring-backend=test',
`--chain-id=${CHAIN_ID}`,
`--amount=${DELEGATE0_COINS}`,
Expand Down
2 changes: 1 addition & 1 deletion packages/cosmic-swingset/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ scenario2-setup-nobuild:
$(AGCH) --home=t1/bootstrap keys show -a bootstrap --keyring-backend=test > t1/bootstrap-address
$(AGC) --home=t1/n0 add-genesis-account `cat t1/bootstrap-address` 100000000uagstake,100provisionpass,100sendpacketpass
# Create the (singleton) chain node.
$(AGC) --home=t1/n0 gentx --keyring-backend=test --home-client=t1/bootstrap bootstrap --amount=1000000uagstake --chain-id=$(CHAIN_ID)
$(AGCH) --home-server=t1/n0 --home=t1/bootstrap gentx --keyring-backend=test bootstrap --amount=1000000uagstake --chain-id=$(CHAIN_ID)
$(AGC) --home=t1/n0 collect-gentxs
$(AGC) --home=t1/n0 validate-genesis
../agoric-cli/bin/agoric set-defaults ag-chain-cosmos t1/n0/config
Expand Down
3 changes: 2 additions & 1 deletion packages/cosmic-swingset/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ replace github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.

replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.4

replace github.com/cosmos/cosmos-sdk => github.com/agoric-labs/cosmos-sdk v0.34.4-0.20201001195146-e863c3443850
// FIXME: Need for gentx --home-server=xxx
replace github.com/cosmos/cosmos-sdk => github.com/agoric-labs/cosmos-sdk v0.34.4-0.20201001212829-e88edc6ee90a
4 changes: 4 additions & 0 deletions packages/cosmic-swingset/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ github.com/agoric-labs/cosmos-sdk v0.34.4-0.20200428210309-3cf84258cc12 h1:xnDgo
github.com/agoric-labs/cosmos-sdk v0.34.4-0.20200428210309-3cf84258cc12/go.mod h1:tvCen72hkJxkYT1/CsOaKHjZ4PouX4Isp4w9aRL2K4c=
github.com/agoric-labs/cosmos-sdk v0.34.4-0.20201001195146-e863c3443850 h1:5SlQr2pfjK30AWGbq5iYjRydit03vtXHWvXzmAi/yT0=
github.com/agoric-labs/cosmos-sdk v0.34.4-0.20201001195146-e863c3443850/go.mod h1:bLowJxl+f0nyM10MQbRIyBdXqC7yb5GErM/qsmSbz3M=
github.com/agoric-labs/cosmos-sdk v0.34.4-0.20201001210213-8c0b3f33b0f0 h1:vptv4/qg76Pbd5pkbf9gXHPynnv6JMml6wF1jcULtcA=
github.com/agoric-labs/cosmos-sdk v0.34.4-0.20201001210213-8c0b3f33b0f0/go.mod h1:bLowJxl+f0nyM10MQbRIyBdXqC7yb5GErM/qsmSbz3M=
github.com/agoric-labs/cosmos-sdk v0.34.4-0.20201001212829-e88edc6ee90a h1:LTRf0qqi60MSeIF6BC+KJpgGiLWLsVKRAUspaxTt8qs=
github.com/agoric-labs/cosmos-sdk v0.34.4-0.20201001212829-e88edc6ee90a/go.mod h1:bLowJxl+f0nyM10MQbRIyBdXqC7yb5GErM/qsmSbz3M=
github.com/agoric-labs/cosmos-sdk v0.37.0 h1:y9OTnnORhLHPnfxLIaK4Pv/7Z7KcpnbTxpE5xxWlUUY=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
become: yes
become_user: "{{ service }}"
shell: "\
{{ service }} gentx --home-client=/home/{{ service }}/.ag-cosmos-helper \
ag-chain-cosmos gentx --home-server=/home/{{ service }}/.{{ service }} \
--keyring-backend=test --amount={{ STAKER_AMOUNT }} \
{{ (website | default(None)) and '--website=' ~ website }} \
{{ (identity | default(None)) and '--identity=' ~ identity }} \
Expand Down

0 comments on commit ed634bf

Please sign in to comment.