diff --git a/packages/agoric-cli/lib/start.js b/packages/agoric-cli/lib/start.js index d3d46cf45a9..40b603f632c 100644 --- a/packages/agoric-cli/lib/start.js +++ b/packages/agoric-cli/lib/start.js @@ -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]) { @@ -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}`, diff --git a/packages/cosmic-swingset/Makefile b/packages/cosmic-swingset/Makefile index 8afc34dc7c8..97dfac92f96 100644 --- a/packages/cosmic-swingset/Makefile +++ b/packages/cosmic-swingset/Makefile @@ -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 diff --git a/packages/cosmic-swingset/go.mod b/packages/cosmic-swingset/go.mod index cfa6cff305b..7027309fe35 100644 --- a/packages/cosmic-swingset/go.mod +++ b/packages/cosmic-swingset/go.mod @@ -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 \ No newline at end of file diff --git a/packages/cosmic-swingset/go.sum b/packages/cosmic-swingset/go.sum index c5f02a2e87d..9ae42fe04f7 100644 --- a/packages/cosmic-swingset/go.sum +++ b/packages/cosmic-swingset/go.sum @@ -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= diff --git a/packages/deployment/ansible/roles/cosmos-genesis/tasks/main.yml b/packages/deployment/ansible/roles/cosmos-genesis/tasks/main.yml index 0df49b9bc3d..1f9007d6104 100644 --- a/packages/deployment/ansible/roles/cosmos-genesis/tasks/main.yml +++ b/packages/deployment/ansible/roles/cosmos-genesis/tasks/main.yml @@ -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 }} \