From b2086bb6b40ca74a3959927ca7219bfe0b60c7d9 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Tue, 19 Nov 2019 22:29:50 +0100 Subject: [PATCH] Search and replace gaiad/cl with wasmd/cli --- .circleci/config.yml | 14 +- .github/CODEOWNERS | 2 +- .github/ISSUE_TEMPLATE/bug-report.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .gitignore | 2 +- CHANGELOG.md | 80 +++---- CONTRIBUTING.md | 12 +- Dockerfile | 14 +- Makefile | 14 +- README.md | 8 +- app/app_test.go | 8 +- app/benchmarks/txsize_test.go | 2 +- cli_test/README.md | 16 +- cli_test/cli_test.go | 38 +-- cli_test/test_helpers.go | 112 ++++----- cmd/wasmd/testnet.go | 4 +- contrib/gitian-build.sh | 2 +- contrib/gitian-descriptors/gitian-darwin.yml | 10 +- contrib/gitian-descriptors/gitian-linux.yml | 10 +- contrib/gitian-descriptors/gitian-windows.yml | 10 +- docker-compose.yml | 40 ++-- docs/DOCS_README.md | 12 +- docs/README.md | 2 +- docs/delegator-guide-cli.md | 110 ++++----- docs/deploy-testnet.md | 84 +++---- docs/gaiacli.md | 216 +++++++++--------- docs/genesis.md | 12 +- docs/installation.md | 20 +- docs/join-mainnet.md | 32 +-- docs/join-testnet.md | 8 +- docs/keys.md | 2 +- docs/launch/blog-1-cn.md | 4 +- docs/launch/blog-1-en.md | 6 +- docs/launch/blog-1-kr.md | 4 +- docs/launch/blog-2-en.md | 2 +- docs/ledger.md | 42 ++-- docs/migration/cosmoshub-2.md | 40 ++-- docs/reproducible-builds.md | 2 +- docs/translations/cn/delegator-guide-cli.md | 102 ++++----- docs/translations/cn/deploy-testnet.md | 74 +++--- docs/translations/cn/gaiacli.md | 200 ++++++++-------- docs/translations/cn/genesis.md | 12 +- docs/translations/cn/installation.md | 12 +- docs/translations/cn/join-mainnet.md | 28 +-- docs/translations/cn/join-testnet.md | 4 +- docs/translations/cn/launch/blog-1-cn.md | 4 +- docs/translations/cn/ledger.md | 8 +- .../cn/validators/validator-faq.md | 6 +- .../cn/validators/validator-setup.md | 40 ++-- docs/translations/cn/what-is-gaia.md | 4 +- docs/translations/kr/delegator-guide-cli.md | 106 ++++----- docs/translations/kr/deploy-testnet.md | 76 +++--- docs/translations/kr/gaiacli.md | 208 ++++++++--------- docs/translations/kr/genesis.md | 12 +- docs/translations/kr/installation.md | 20 +- docs/translations/kr/join-mainnet.md | 32 +-- docs/translations/kr/join-testnet.md | 30 +-- docs/translations/kr/keys.md | 2 +- docs/translations/kr/ledger.md | 36 +-- docs/translations/kr/upgrade-node.md | 20 +- .../kr/validators/validator-faq.md | 6 +- .../kr/validators/validator-setup.md | 64 +++--- docs/translations/kr/what-is-gaia.md | 4 +- docs/upgrade-node.md | 20 +- docs/validators/kms/kms_ledger.md | 16 +- docs/validators/validator-faq.md | 6 +- docs/validators/validator-setup.md | 40 ++-- docs/what-is-gaia.md | 4 +- lcd_test/helpers.go | 14 +- lcd_test/testdata/setup.sh | 14 +- networks/Makefile | 12 +- networks/local/Makefile | 4 +- networks/local/gaiadnode/Dockerfile | 4 +- networks/local/gaiadnode/wrapper.sh | 8 +- networks/new-testnet.sh | 2 +- networks/remote/ansible/logzio.yml | 2 +- .../ansible/roles/add-lcd/handlers/main.yml | 6 +- .../ansible/roles/add-lcd/tasks/main.yml | 8 +- .../add-lcd/templates/gaiacli.service.j2 | 8 +- .../ansible/roles/clear-config/tasks/main.yml | 8 +- .../roles/extract-config/tasks/main.yml | 8 +- .../roles/increase-openfiles/tasks/main.yml | 4 +- .../roles/logzio/templates/journalbeat.yml.j2 | 2 +- .../roles/setup-fullnodes/files/gaiad.service | 8 +- .../roles/setup-fullnodes/handlers/main.yml | 2 +- .../roles/setup-fullnodes/tasks/main.yml | 22 +- .../setup-validators/files/gaiad.service | 8 +- .../roles/setup-validators/handlers/main.yml | 2 +- .../roles/setup-validators/tasks/main.yml | 24 +- .../files/conf.d/http_check.d/conf.yaml | 4 +- .../files/conf.d/process.d/conf.yaml | 8 +- .../roles/upgrade-gaiad/handlers/main.yml | 4 +- .../roles/upgrade-gaiad/tasks/main.yml | 16 +- networks/remote/ansible/start.yml | 2 +- networks/remote/ansible/stop.yml | 2 +- networks/remote/ansible/upgrade-gaia.yml | 2 +- networks/remote/ansible/upgrade-gaiad.yml | 2 +- .../remote/terraform-app/files/terraform.sh | 2 +- .../remote/terraform-aws/files/terraform.sh | 2 +- networks/remote/terraform-do/Makefile | 10 +- .../remote/terraform-do/files/terraform.sh | 2 +- networks/upgrade-gaiad.sh | 6 +- sims.mk | 10 +- 103 files changed, 1219 insertions(+), 1219 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c0254659ab..e1096ccdfc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,11 +4,11 @@ executors: golang: docker: - image: circleci/golang:1.13 - working_directory: /go/src/github.com/cosmos/gaia + working_directory: /go/src/github.com/cosmwasm/wasmd mac: macos: xcode: "10.3.0" - working_directory: /Users/distiller/project/src/github.com/cosmos/gaia + working_directory: /Users/distiller/project/src/github.com/cosmwasm/wasmd environment: GO_VERSION: "1.13" docs: @@ -197,7 +197,7 @@ jobs: command: bash <(curl -s https://codecov.io/bash) -f coverage.txt localnet: - working_directory: /home/circleci/.go_workspace/src/github.com/cosmos/gaia + working_directory: /home/circleci/.go_workspace/src/github.com/cosmwasm/wasmd machine: image: circleci/classic:latest environment: @@ -329,14 +329,14 @@ jobs: rm -rf gitian-build-${os}/ done - store_artifacts: - path: /go/src/github.com/cosmos/gaia/gaia-darwin-res.yml + path: /go/src/github.com/cosmwasm/wasmd/gaia-darwin-res.yml - store_artifacts: - path: /go/src/github.com/cosmos/gaia/gaia-linux-res.yml + path: /go/src/github.com/cosmwasm/wasmd/gaia-linux-res.yml - store_artifacts: - path: /go/src/github.com/cosmos/gaia/gaia-windows-res.yml + path: /go/src/github.com/cosmwasm/wasmd/gaia-windows-res.yml # FIXME: The `setup-contract-tests-data` make target is broken as it completely -# overrides the .gaiad directory. +# overrides the .wasmd directory. # # contract_tests: # executor: golang diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5233beb348..a6be25e244 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,4 @@ # CODEOWNERS: https://help.github.com/articles/about-codeowners/ # Primary repo maintainers -* @alessio @alexanderbez @rigelrozanski @jackzampolin @fedekunze +* @ethanfrey diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index d6d9c6feb5..6a8a64a3e7 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -16,7 +16,7 @@ v Please also ensure that this is not a duplicate issue :) ## Version - + ## Steps to Reproduce diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0f6760e8bc..94301cbac0 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,7 +4,7 @@ v Before smashing the submit button please review the checkboxes. v If a checkbox is n/a - please still include it but + a little note why ☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --> -- Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/gaia/blob/master/CONTRIBUTING.md#pr-targeting)) +- Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmwasm/wasmd/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] Linked to github-issue with discussion and accepted design OR link to spec that describes this work. - [ ] Wrote tests diff --git a/.gitignore b/.gitignore index 96722f977c..e28bc13c55 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,7 @@ tools-stamp # Data - ideally these don't exist baseapp/data/* client/lcd/keys/* -cmd/gaiacli/statik/statik.go +cmd/wasmcli/statik/statik.go mytestnet # Testing diff --git a/CHANGELOG.md b/CHANGELOG.md index 876d15f020..ece140c461 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,16 +38,16 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features -* (gaiad) [\#119](https://github.com/cosmos/gaia/pull/119) Add support for the `--inter-block-cache` CLI +* (wasmd) [\#119](https://github.com/cosmwasm/wasmd/pull/119) Add support for the `--inter-block-cache` CLI flag and configuration. -* (gaiacli) [\#132](https://github.com/cosmos/gaia/pull/132) Add `tx decode` command to decode +* (wasmcli) [\#132](https://github.com/cosmwasm/wasmd/pull/132) Add `tx decode` command to decode Base64 encoded transactions. -* (modules) [\#190](https://github.com/cosmos/gaia/pull/190) Introduce use of the `x/evidence` module. -* (gaiad) [\#191](https://github.com/cosmos/gaia/pull/191) Add debug commands to gaiad: +* (modules) [\#190](https://github.com/cosmwasm/wasmd/pull/190) Introduce use of the `x/evidence` module. +* (wasmd) [\#191](https://github.com/cosmwasm/wasmd/pull/191) Add debug commands to wasmd: - `pubkey`: decode pubkey from base64, hex or bech32 - `addr`: convert a address between hex and bech32 - `raw-bytes` convert raw-bytes to hex -* (gaiacli) [\#191](https://github.com/cosmos/gaia/pull/191) Add cmd `decode-tx`, decodes a tx from hex or base64 +* (wasmcli) [\#191](https://github.com/cosmwasm/wasmd/pull/191) Add cmd `decode-tx`, decodes a tx from hex or base64 ## [v2.0.3] - 2019-11-04 @@ -67,11 +67,11 @@ Base64 encoded transactions. ### Features -* (gaiad) [\#119](https://github.com/cosmos/gaia/pull/119) Add support for the `--halt-time` CLI flag and configuration. +* (wasmd) [\#119](https://github.com/cosmwasm/wasmd/pull/119) Add support for the `--halt-time` CLI flag and configuration. ### Improvements -* [\#119](https://github.com/cosmos/gaia/pull/119) Refactor and upgrade Circle CI +* [\#119](https://github.com/cosmwasm/wasmd/pull/119) Refactor and upgrade Circle CI configuration. * (sdk) Update SDK version to v0.37.1 @@ -79,7 +79,7 @@ configuration. ### Bug Fixes -* [\#104](https://github.com/cosmos/gaia/issues/104) Fix `ModuleAccountAddrs` to +* [\#104](https://github.com/cosmwasm/wasmd/issues/104) Fix `ModuleAccountAddrs` to not rely on the `x/supply` keeper to get module account addresses for blacklisting. ### State Machine Breaking Changes @@ -90,29 +90,29 @@ not rely on the `x/supply` keeper to get module account addresses for blacklisti ### Bug Fixes -* (gaiad) [\#4113](https://github.com/cosmos/cosmos-sdk/issues/4113) Fix incorrect `$GOBIN` in `Install Go` -* (gaiacli) [\#3945](https://github.com/cosmos/cosmos-sdk/issues/3945) There's no check for chain-id in TxBuilder.SignStdTx -* (gaiacli) [\#4190](https://github.com/cosmos/cosmos-sdk/issues/4190) Fix redelegations-from by using the correct params and query endpoint. -* (gaiacli) [\#4219](https://github.com/cosmos/cosmos-sdk/issues/4219) Return an error when an empty mnemonic is provided during key recovery. -* (gaiacli) [\#4345](https://github.com/cosmos/cosmos-sdk/issues/4345) Improved Ledger Nano X detection +* (wasmd) [\#4113](https://github.com/cosmos/cosmos-sdk/issues/4113) Fix incorrect `$GOBIN` in `Install Go` +* (wasmcli) [\#3945](https://github.com/cosmos/cosmos-sdk/issues/3945) There's no check for chain-id in TxBuilder.SignStdTx +* (wasmcli) [\#4190](https://github.com/cosmos/cosmos-sdk/issues/4190) Fix redelegations-from by using the correct params and query endpoint. +* (wasmcli) [\#4219](https://github.com/cosmos/cosmos-sdk/issues/4219) Return an error when an empty mnemonic is provided during key recovery. +* (wasmcli) [\#4345](https://github.com/cosmos/cosmos-sdk/issues/4345) Improved Ledger Nano X detection ### Breaking Changes * (sdk) Update SDK version to v0.36.0 -* (gaiad) [\#3985](https://github.com/cosmos/cosmos-sdk/issues/3985) ValidatorPowerRank uses potential consensus power -* (gaiad) [\#4027](https://github.com/cosmos/cosmos-sdk/issues/4027) gaiad version command does not return the checksum of the go.sum file shipped along with the source release tarball. +* (wasmd) [\#3985](https://github.com/cosmos/cosmos-sdk/issues/3985) ValidatorPowerRank uses potential consensus power +* (wasmd) [\#4027](https://github.com/cosmos/cosmos-sdk/issues/4027) wasmd version command does not return the checksum of the go.sum file shipped along with the source release tarball. Go modules feature guarantees dependencies reproducibility and as long as binaries are built via the Makefile shipped with the sources, no dependendencies can break such guarantee. -* (gaiad) [\#4159](https://github.com/cosmos/cosmos-sdk/issues/4159) use module pattern and module manager for initialization -* (gaiad) [\#4272](https://github.com/cosmos/cosmos-sdk/issues/4272) Merge gaiareplay functionality into gaiad replay. - Drop `gaiareplay` in favor of new `gaiad replay` command. -* (gaiacli) [\#3715](https://github.com/cosmos/cosmos-sdk/issues/3715) query distr rewards returns per-validator +* (wasmd) [\#4159](https://github.com/cosmos/cosmos-sdk/issues/4159) use module pattern and module manager for initialization +* (wasmd) [\#4272](https://github.com/cosmos/cosmos-sdk/issues/4272) Merge gaiareplay functionality into wasmd replay. + Drop `gaiareplay` in favor of new `wasmd replay` command. +* (wasmcli) [\#3715](https://github.com/cosmos/cosmos-sdk/issues/3715) query distr rewards returns per-validator rewards along with rewards total amount. -* (gaiacli) [\#40](https://github.com/cosmos/cosmos-sdk/issues/40) rest-server's --cors option is now gone. -* (gaiacli) [\#4027](https://github.com/cosmos/cosmos-sdk/issues/4027) gaiacli version command dooes not return the checksum of the go.sum file anymore. -* (gaiacli) [\#4142](https://github.com/cosmos/cosmos-sdk/issues/4142) Turn gaiacli tx send's --from into a required argument. - New shorter syntax: `gaiacli tx send FROM TO AMOUNT` -* (gaiacli) [\#4228](https://github.com/cosmos/cosmos-sdk/issues/4228) Merge gaiakeyutil functionality into gaiacli keys. - Drop `gaiakeyutil` in favor of new `gaiacli keys parse` command. Syntax and semantic are preserved. +* (wasmcli) [\#40](https://github.com/cosmos/cosmos-sdk/issues/40) rest-server's --cors option is now gone. +* (wasmcli) [\#4027](https://github.com/cosmos/cosmos-sdk/issues/4027) wasmcli version command dooes not return the checksum of the go.sum file anymore. +* (wasmcli) [\#4142](https://github.com/cosmos/cosmos-sdk/issues/4142) Turn wasmcli tx send's --from into a required argument. + New shorter syntax: `wasmcli tx send FROM TO AMOUNT` +* (wasmcli) [\#4228](https://github.com/cosmos/cosmos-sdk/issues/4228) Merge gaiakeyutil functionality into wasmcli keys. + Drop `gaiakeyutil` in favor of new `wasmcli keys parse` command. Syntax and semantic are preserved. * (rest) [\#3715](https://github.com/cosmos/cosmos-sdk/issues/3715) Update /distribution/delegators/{delegatorAddr}/rewards GET endpoint as per new specs. For a given delegation, the endpoint now returns the comprehensive list of validator-reward tuples along with the grand total. @@ -123,19 +123,19 @@ not rely on the `x/supply` keeper to get module account addresses for blacklisti ### Features -* (gaiad) Add `migrate` command to `gaiad` to provide the ability to migrate exported +* (wasmd) Add `migrate` command to `wasmd` to provide the ability to migrate exported genesis state from one version to another. -* (gaiad) Update Gaia for community pool spend proposals per Cosmos Hub governance proposal [\#7](https://github.com/cosmos/cosmos-sdk/issues/7) "Activate the Community Pool" +* (wasmd) Update Gaia for community pool spend proposals per Cosmos Hub governance proposal [\#7](https://github.com/cosmos/cosmos-sdk/issues/7) "Activate the Community Pool" ### Improvements -* (gaiad) [\#4042](https://github.com/cosmos/cosmos-sdk/issues/4042) Update docs and scripts to include the correct `GO111MODULE=on` environment variable. -* (gaiad) [\#4066](https://github.com/cosmos/cosmos-sdk/issues/4066) Fix 'ExportGenesisFile() incorrectly overwrites genesis' -* (gaiad) [\#4064](https://github.com/cosmos/cosmos-sdk/issues/4064) Remove `dep` and `vendor` from `doc` and `version`. -* (gaiad) [\#4080](https://github.com/cosmos/cosmos-sdk/issues/4080) add missing invariants during simulations -* (gaiad) [\#4343](https://github.com/cosmos/cosmos-sdk/issues/4343) Upgrade toolchain to Go 1.12.5. -* (gaiacli) [\#4068](https://github.com/cosmos/cosmos-sdk/issues/4068) Remove redundant account check on `gaiacli` -* (gaiacli) [\#4227](https://github.com/cosmos/cosmos-sdk/issues/4227) Support for Ledger App v1.5 +* (wasmd) [\#4042](https://github.com/cosmos/cosmos-sdk/issues/4042) Update docs and scripts to include the correct `GO111MODULE=on` environment variable. +* (wasmd) [\#4066](https://github.com/cosmos/cosmos-sdk/issues/4066) Fix 'ExportGenesisFile() incorrectly overwrites genesis' +* (wasmd) [\#4064](https://github.com/cosmos/cosmos-sdk/issues/4064) Remove `dep` and `vendor` from `doc` and `version`. +* (wasmd) [\#4080](https://github.com/cosmos/cosmos-sdk/issues/4080) add missing invariants during simulations +* (wasmd) [\#4343](https://github.com/cosmos/cosmos-sdk/issues/4343) Upgrade toolchain to Go 1.12.5. +* (wasmcli) [\#4068](https://github.com/cosmos/cosmos-sdk/issues/4068) Remove redundant account check on `wasmcli` +* (wasmcli) [\#4227](https://github.com/cosmos/cosmos-sdk/issues/4227) Support for Ledger App v1.5 * (rest) [\#2007](https://github.com/cosmos/cosmos-sdk/issues/2007) Return 200 status code on empty results * (rest) [\#4123](https://github.com/cosmos/cosmos-sdk/issues/4123) Fix typo, url error and outdated command description of doc clients. * (rest) [\#4129](https://github.com/cosmos/cosmos-sdk/issues/4129) Translate doc clients to chinese. @@ -143,9 +143,9 @@ not rely on the `x/supply` keeper to get module account addresses for blacklisti -[Unreleased]: https://github.com/cosmos/gaia/compare/v2.0.3...HEAD -[v2.0.3]: https://github.com/cosmos/gaia/releases/tag/v2.0.3 -[v2.0.2]: https://github.com/cosmos/gaia/releases/tag/v2.0.2 -[v2.0.1]: https://github.com/cosmos/gaia/releases/tag/v2.0.1 -[v2.0.0]: https://github.com/cosmos/gaia/releases/tag/v2.0.0 -[v1.0.0]: https://github.com/cosmos/gaia/releases/tag/v1.0.0 +[Unreleased]: https://github.com/cosmwasm/wasmd/compare/v2.0.3...HEAD +[v2.0.3]: https://github.com/cosmwasm/wasmd/releases/tag/v2.0.3 +[v2.0.2]: https://github.com/cosmwasm/wasmd/releases/tag/v2.0.2 +[v2.0.1]: https://github.com/cosmwasm/wasmd/releases/tag/v2.0.1 +[v2.0.0]: https://github.com/cosmwasm/wasmd/releases/tag/v2.0.0 +[v1.0.0]: https://github.com/cosmwasm/wasmd/releases/tag/v1.0.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 26b787a9c1..3e508a749a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,8 +21,8 @@ Contributing to this repo can mean many things such as participated in discussion or proposing code changes. To ensure a smooth workflow for all contributors, the general procedure for contributing has been established: -1. Either [open](https://github.com/cosmos/gaia/issues/new/choose) or - [find](https://github.com/cosmos/gaia/issues) an issue you'd like to help with +1. Either [open](https://github.com/cosmwasm/wasmd/issues/new/choose) or + [find](https://github.com/cosmwasm/wasmd/issues) an issue you'd like to help with 2. Participate in thoughtful discussion on that issue 3. If you would like to contribute: 1. If a the issue is a proposal, ensure that the proposal has been accepted @@ -54,7 +54,7 @@ tools` for installing the linting tools. Other notes: - Looking for a good place to start contributing? How about checking out some - [good first issues](https://github.com/cosmos/gaia/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) + [good first issues](https://github.com/cosmwasm/wasmd/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) - Please make sure to use `gofmt` before every commit - the easiest way to do this is have your editor run it for you upon saving a file. Additionally please ensure that your code is lint compliant by running `make lint` @@ -92,12 +92,12 @@ Please note that Go requires code to live under absolute paths, which complicate While my fork lives at `https://github.com/rigeyrigerige/gaia`, the code should never exist at `$GOPATH/src/github.com/rigeyrigerige/gaia`. Instead, we use `git remote` to add the fork as a new remote for the original repo, -`$GOPATH/src/github.com/cosmos/gaia `, and do all the work there. +`$GOPATH/src/github.com/cosmwasm/wasmd `, and do all the work there. For instance, to create a fork and work on a branch of it, I would: - Create the fork on github, using the fork button. - - Go to the original repo checked out locally (i.e. `$GOPATH/src/github.com/cosmos/gaia`) + - Go to the original repo checked out locally (i.e. `$GOPATH/src/github.com/cosmwasm/wasmd`) - `git remote rename origin upstream` - `git remote add origin git@github.com:rigeyrigerige/gaia.git` @@ -177,7 +177,7 @@ only pull requests targeted directly against master. - `master` must never fail `make test` or `make test_cli` - `master` should not fail `make lint` - no `--force` onto `master` (except when reverting a broken commit, which should seldom happen) - - create a development branch either on github.com/cosmos/gaia, or your fork (using `git remote add origin`) + - create a development branch either on github.com/cosmwasm/wasmd, or your fork (using `git remote add origin`) - before submitting a pull request, begin `git rebase` on top of `master` ### Pull Merge Procedure diff --git a/Dockerfile b/Dockerfile index c123dbf65e..d732d85458 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,14 @@ # Simple usage with a mounted data directory: # > docker build -t gaia . -# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.gaiad:/root/.gaiad -v ~/.gaiacli:/root/.gaiacli gaia gaiad init -# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.gaiad:/root/.gaiad -v ~/.gaiacli:/root/.gaiacli gaia gaiad start +# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.wasmd:/root/.wasmd -v ~/.wasmcli:/root/.wasmcli gaia wasmd init +# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.wasmd:/root/.wasmd -v ~/.wasmcli:/root/.wasmcli gaia wasmd start FROM golang:alpine AS build-env # Set up dependencies ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python # Set working directory for the build -WORKDIR /go/src/github.com/cosmos/gaia +WORKDIR /go/src/github.com/cosmwasm/wasmd # Add source files COPY . . @@ -26,8 +26,8 @@ RUN apk add --update ca-certificates WORKDIR /root # Copy over binaries from the build-env -COPY --from=build-env /go/bin/gaiad /usr/bin/gaiad -COPY --from=build-env /go/bin/gaiacli /usr/bin/gaiacli +COPY --from=build-env /go/bin/wasmd /usr/bin/wasmd +COPY --from=build-env /go/bin/wasmcli /usr/bin/wasmcli -# Run gaiad by default, omit entrypoint to ease using container with gaiacli -CMD ["gaiad"] +# Run wasmd by default, omit entrypoint to ease using container with wasmcli +CMD ["wasmd"] diff --git a/Makefile b/Makefile index 6a57a865b3..a43bb838ea 100644 --- a/Makefile +++ b/Makefile @@ -105,7 +105,7 @@ go.sum: go.mod draw-deps: @# requires brew install graphviz or apt-get install graphviz go get github.com/RobotsAndPencils/goviz - @goviz -i ./cmd/gaiad -d 2 | dot -Tpng -o dependency-graph.png + @goviz -i ./cmd/wasmd -d 2 | dot -Tpng -o dependency-graph.png clean: rm -rf snapcraft-local.yaml build/ @@ -150,12 +150,12 @@ benchmark: ######################################## ### Local validator nodes using docker and docker-compose -build-docker-gaiadnode: +build-docker-wasmdnode: $(MAKE) -C networks/local # Run a 4-node testnet locally localnet-start: build-linux localnet-stop - @if ! [ -f build/node0/gaiad/config/genesis.json ]; then docker run -e COSMOS_SDK_TEST_KEYRING=y --rm -v $(CURDIR)/build:/gaiad:Z tendermint/gaiadnode testnet --v 4 -o . --starting-ip-address 192.168.10.2 ; fi + @if ! [ -f build/node0/wasmd/config/genesis.json ]; then docker run -e COSMOS_SDK_TEST_KEYRING=y --rm -v $(CURDIR)/build:/wasmd:Z tendermint/wasmdnode testnet --v 4 -o . --starting-ip-address 192.168.10.2 ; fi docker-compose up -d # Stop testnet @@ -167,11 +167,11 @@ setup-contract-tests-data: rm -rf /tmp/contract_tests ; \ mkdir /tmp/contract_tests ; \ cp "${GOPATH}/pkg/mod/${SDK_PACK}/client/lcd/swagger-ui/swagger.yaml" /tmp/contract_tests/swagger.yaml ; \ - ./build/gaiad init --home /tmp/contract_tests/.gaiad --chain-id lcd contract-tests ; \ + ./build/wasmd init --home /tmp/contract_tests/.wasmd --chain-id lcd contract-tests ; \ tar -xzf lcd_test/testdata/state.tar.gz -C /tmp/contract_tests/ start-gaia: setup-contract-tests-data - ./build/gaiad --home /tmp/contract_tests/.gaiad start & + ./build/wasmd --home /tmp/contract_tests/.wasmd start & @sleep 2s setup-transactions: start-gaia @@ -179,11 +179,11 @@ setup-transactions: start-gaia run-lcd-contract-tests: @echo "Running Gaia LCD for contract tests" - ./build/gaiacli rest-server --laddr tcp://0.0.0.0:8080 --home /tmp/contract_tests/.gaiacli --node http://localhost:26657 --chain-id lcd --trust-node true + ./build/wasmcli rest-server --laddr tcp://0.0.0.0:8080 --home /tmp/contract_tests/.wasmcli --node http://localhost:26657 --chain-id lcd --trust-node true contract-tests: setup-transactions @echo "Running Gaia LCD for contract tests" - dredd && pkill gaiad + dredd && pkill wasmd # include simulations include sims.mk diff --git a/README.md b/README.md index ca6dd6a8d0..f63365f032 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,10 @@ [![CircleCI](https://circleci.com/gh/cosmos/gaia/tree/master.svg?style=shield)](https://circleci.com/gh/cosmos/gaia/tree/master) [![codecov](https://codecov.io/gh/cosmos/gaia/branch/master/graph/badge.svg)](https://codecov.io/gh/cosmos/gaia) -[![Go Report Card](https://goreportcard.com/badge/github.com/cosmos/gaia)](https://goreportcard.com/report/github.com/cosmos/gaia) -[![license](https://img.shields.io/github/license/cosmos/gaia.svg)](https://github.com/cosmos/gaia/blob/master/LICENSE) -[![LoC](https://tokei.rs/b1/github/cosmos/gaia)](https://github.com/cosmos/gaia) -[![GolangCI](https://golangci.com/badges/github.com/cosmos/gaia.svg)](https://golangci.com/r/github.com/cosmos/gaia) +[![Go Report Card](https://goreportcard.com/badge/github.com/cosmwasm/wasmd)](https://goreportcard.com/report/github.com/cosmwasm/wasmd) +[![license](https://img.shields.io/github/license/cosmos/gaia.svg)](https://github.com/cosmwasm/wasmd/blob/master/LICENSE) +[![LoC](https://tokei.rs/b1/github/cosmos/gaia)](https://github.com/cosmwasm/wasmd) +[![GolangCI](https://golangci.com/badges/github.com/cosmwasm/wasmd.svg)](https://golangci.com/r/github.com/cosmwasm/wasmd) [![riot.im](https://img.shields.io/badge/riot.im-JOIN%20CHAT-green.svg)](https://riot.im/app/#/room/#cosmos-sdk:matrix.org) This repository hosts `Gaia`, the first implementation of the Cosmos Hub. diff --git a/app/app_test.go b/app/app_test.go index 84aecfeee0..dd1fb0696c 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -14,14 +14,14 @@ import ( abci "github.com/tendermint/tendermint/abci/types" ) -func TestWasmddExport(t *testing.T) { +func TestWasmdExport(t *testing.T) { db := db.NewMemDB() - gapp := NewWasmdApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0) + gapp := NewWasmApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0) err := setGenesis(gapp) require.NoError(t, err) // Making a new app object with the db, so that initchain hasn't been called - newGapp := NewWasmdApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0) + newGapp := NewWasmApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0) _, _, err = newGapp.ExportAppStateAndValidators(false, []string{}) require.NoError(t, err, "ExportAppStateAndValidators should not have an error") } @@ -29,7 +29,7 @@ func TestWasmddExport(t *testing.T) { // ensure that black listed addresses are properly set in bank keeper func TestBlackListedAddrs(t *testing.T) { db := db.NewMemDB() - gapp := NewWasmdApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0) + gapp := NewWasmApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0) for acc := range maccPerms { require.True(t, gapp.bankKeeper.BlacklistedAddr(gapp.supplyKeeper.GetModuleAddress(acc))) diff --git a/app/benchmarks/txsize_test.go b/app/benchmarks/txsize_test.go index 4863cedc6d..4cc225bef9 100644 --- a/app/benchmarks/txsize_test.go +++ b/app/benchmarks/txsize_test.go @@ -5,7 +5,7 @@ import ( "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/cosmos/gaia/app" + "github.com/cosmwasm/wasmd/app" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" diff --git a/cli_test/README.md b/cli_test/README.md index 67975c4da0..7cc84d1de3 100644 --- a/cli_test/README.md +++ b/cli_test/README.md @@ -10,9 +10,9 @@ go test -mod=readonly -p 4 `go list ./cli_test/...` -tags=cli_test ### Test Structure -This integration suite [uses a thin wrapper](https://godoc.org/github.com/cosmos/cosmos-sdk/tests) over the [`os/exec`](https://golang.org/pkg/os/exec/) package. This allows the integration test to run against built binaries (both `gaiad` and `gaiacli` are used) while being written in golang. This allows tests to take advantage of the various golang code we have for operations like marshal/unmarshal, crypto, etc... +This integration suite [uses a thin wrapper](https://godoc.org/github.com/cosmos/cosmos-sdk/tests) over the [`os/exec`](https://golang.org/pkg/os/exec/) package. This allows the integration test to run against built binaries (both `wasmd` and `wasmcli` are used) while being written in golang. This allows tests to take advantage of the various golang code we have for operations like marshal/unmarshal, crypto, etc... -> NOTE: The tests will use whatever `gaiad` or `gaiacli` binaries are available in your `$PATH`. You can check which binary will be run by the suite by running `which gaiad` or `which gaiacli`. If you have your `$GOPATH` properly setup they should be in `$GOPATH/bin/gaia*`. This will ensure that your test uses the latest binary you have built +> NOTE: The tests will use whatever `wasmd` or `wasmcli` binaries are available in your `$PATH`. You can check which binary will be run by the suite by running `which wasmd` or `which wasmcli`. If you have your `$GOPATH` properly setup they should be in `$GOPATH/bin/gaia*`. This will ensure that your test uses the latest binary you have built Tests generally follow this structure: @@ -21,7 +21,7 @@ func TestMyNewCommand(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server + // start wasmd server proc := f.GDStart() defer proc.Stop(false) @@ -34,18 +34,18 @@ func TestMyNewCommand(t *testing.T) { This boilerplate above: - Ensures the tests run in parallel. Because the tests are calling out to `os/exec` for many operations these tests can take a long time to run. -- Creates `.gaiad` and `.gaiacli` folders in a new temp folder. -- Uses `gaiacli` to create 2 accounts for use in testing: `foo` and `bar` +- Creates `.wasmd` and `.wasmcli` folders in a new temp folder. +- Uses `wasmcli` to create 2 accounts for use in testing: `foo` and `bar` - Creates a genesis file with coins (`1000footoken,1000feetoken,150stake`) controlled by the `foo` key - Generates an initial bonding transaction (`gentx`) to make the `foo` key a validator at genesis -- Starts `gaiad` and stops it once the test exits +- Starts `wasmd` and stops it once the test exits - Cleans up test state on a successful run ### Notes when adding/running tests - Because the tests run against a built binary, you should make sure you build every time the code changes and you want to test again, otherwise you will be testing against an older version. If you are adding new tests this can easily lead to confusing test results. -- The [`test_helpers.go`](./test_helpers.go) file is organized according to the format of `gaiacli` and `gaiad` commands. There are comments with section headers describing the different areas. Helper functions to call CLI functionality are generally named after the command (e.g. `gaiacli query staking validator` would be `QueryStakingValidator`). Try to keep functions grouped by their position in the command tree. +- The [`test_helpers.go`](./test_helpers.go) file is organized according to the format of `wasmcli` and `wasmd` commands. There are comments with section headers describing the different areas. Helper functions to call CLI functionality are generally named after the command (e.g. `wasmcli query staking validator` would be `QueryStakingValidator`). Try to keep functions grouped by their position in the command tree. - Test state that is needed by `tx` and `query` commands (`home`, `chain_id`, etc...) is stored on the `Fixtures` object. This makes constructing your new tests almost trivial. -- Sometimes if you exit a test early there can be still running `gaiad` and `gaiacli` processes that will interrupt subsequent runs. Still running `gaiacli` processes will block access to the keybase while still running `gaiad` processes will block ports and prevent new tests from spinning up. You can ensure new tests spin up clean by running `pkill -9 gaiad && pkill -9 gaiacli` before each test run. +- Sometimes if you exit a test early there can be still running `wasmd` and `wasmcli` processes that will interrupt subsequent runs. Still running `wasmcli` processes will block access to the keybase while still running `wasmd` processes will block ports and prevent new tests from spinning up. You can ensure new tests spin up clean by running `pkill -9 wasmd && pkill -9 wasmcli` before each test run. - Most `query` and `tx` commands take a variadic `flags` argument. This pattern allows for the creation of a general function which is easily modified by adding flags. See the `TxSend` function and its use for a good example. - `Tx*` functions follow a general pattern and return `(success bool, stdout string, stderr string)`. This allows for easy testing of multiple different flag configurations. See `TestGaiaCLICreateValidator` or `TestGaiaCLISubmitProposal` for a good example of the pattern. diff --git a/cli_test/cli_test.go b/cli_test/cli_test.go index eb14217a3f..1f0fc429f1 100644 --- a/cli_test/cli_test.go +++ b/cli_test/cli_test.go @@ -19,7 +19,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/gaia/app" + "github.com/cosmwasm/wasmd/app" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/tests" @@ -91,7 +91,7 @@ func TestGaiaCLIMinimumFees(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server with minimum fees + // start wasmd server with minimum fees minGasPrice, _ := sdk.NewDecFromStr("0.000006") fees := fmt.Sprintf( "--minimum-gas-prices=%s,%s", @@ -129,7 +129,7 @@ func TestGaiaCLIGasPrices(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server with minimum fees + // start wasmd server with minimum fees minGasPrice, _ := sdk.NewDecFromStr("0.000006") proc := f.GDStart(fmt.Sprintf("--minimum-gas-prices=%s", sdk.NewDecCoinFromDec(feeDenom, minGasPrice))) defer proc.Stop(false) @@ -163,7 +163,7 @@ func TestGaiaCLIFeesDeduction(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server with minimum fees + // start wasmd server with minimum fees minGasPrice, _ := sdk.NewDecFromStr("0.000006") proc := f.GDStart(fmt.Sprintf("--minimum-gas-prices=%s", sdk.NewDecCoinFromDec(feeDenom, minGasPrice))) defer proc.Stop(false) @@ -216,7 +216,7 @@ func TestGaiaCLISend(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server + // start wasmd server proc := f.GDStart() defer proc.Stop(false) @@ -285,7 +285,7 @@ func TestGaiaCLIGasAuto(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server + // start wasmd server proc := f.GDStart() defer proc.Stop(false) @@ -345,7 +345,7 @@ func TestGaiaCLICreateValidator(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server + // start wasmd server proc := f.GDStart() defer proc.Stop(false) @@ -436,7 +436,7 @@ func TestGaiaCLIQueryRewards(t *testing.T) { genDoc.AppState, err = cdc.MarshalJSON(genesisState) require.NoError(t, genDoc.SaveAs(genFile)) - // start gaiad server + // start wasmd server proc := f.GDStart() defer proc.Stop(false) @@ -451,7 +451,7 @@ func TestGaiaCLIQuerySupply(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server + // start wasmd server proc := f.GDStart() defer proc.Stop(false) @@ -468,7 +468,7 @@ func TestGaiaCLISubmitProposal(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server + // start wasmd server proc := f.GDStart() defer proc.Stop(false) @@ -761,7 +761,7 @@ func TestGaiaCLIQueryTxPagination(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server + // start wasmd server proc := f.GDStart() defer proc.Stop(false) @@ -811,7 +811,7 @@ func TestGaiaCLIValidateSignatures(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server + // start wasmd server proc := f.GDStart() defer proc.Stop(false) @@ -860,7 +860,7 @@ func TestGaiaCLISendGenerateSignAndBroadcast(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server + // start wasmd server proc := f.GDStart() defer proc.Stop(false) @@ -944,7 +944,7 @@ func TestGaiaCLIMultisignInsufficientCosigners(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server with minimum fees + // start wasmd server with minimum fees proc := f.GDStart() defer proc.Stop(false) @@ -997,7 +997,7 @@ func TestGaiaCLIEncode(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server + // start wasmd server proc := f.GDStart() defer proc.Stop(false) @@ -1035,7 +1035,7 @@ func TestGaiaCLIMultisignSortSignatures(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server with minimum fees + // start wasmd server with minimum fees proc := f.GDStart() defer proc.Stop(false) @@ -1100,7 +1100,7 @@ func TestGaiaCLIMultisign(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server with minimum fees + // start wasmd server with minimum fees proc := f.GDStart() defer proc.Stop(false) @@ -1286,7 +1286,7 @@ func TestSlashingGetParams(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server + // start wasmd server proc := f.GDStart() defer proc.Stop(false) @@ -1307,7 +1307,7 @@ func TestValidateGenesis(t *testing.T) { t.Parallel() f := InitFixtures(t) - // start gaiad server + // start wasmd server proc := f.GDStart() defer proc.Stop(false) diff --git a/cli_test/test_helpers.go b/cli_test/test_helpers.go index 411c6e9332..05617c5955 100644 --- a/cli_test/test_helpers.go +++ b/cli_test/test_helpers.go @@ -16,7 +16,7 @@ import ( tmtypes "github.com/tendermint/tendermint/types" - "github.com/cosmos/gaia/app" + "github.com/cosmwasm/wasmd/app" clientkeys "github.com/cosmos/cosmos-sdk/client/keys" "github.com/cosmos/cosmos-sdk/codec" @@ -104,10 +104,10 @@ func NewFixtures(t *testing.T) *Fixtures { T: t, BuildDir: buildDir, RootDir: tmpDir, - GaiadBinary: filepath.Join(buildDir, "gaiad"), - GaiacliBinary: filepath.Join(buildDir, "gaiacli"), - GaiadHome: filepath.Join(tmpDir, ".gaiad"), - GaiacliHome: filepath.Join(tmpDir, ".gaiacli"), + GaiadBinary: filepath.Join(buildDir, "wasmd"), + GaiacliBinary: filepath.Join(buildDir, "wasmcli"), + GaiadHome: filepath.Join(tmpDir, ".wasmd"), + GaiacliHome: filepath.Join(tmpDir, ".wasmcli"), RPCAddr: servAddr, P2PAddr: p2pAddr, Port: port, @@ -189,9 +189,9 @@ func (f *Fixtures) Flags() string { } //___________________________________________________________________________________ -// gaiad +// wasmd -// UnsafeResetAll is gaiad unsafe-reset-all +// UnsafeResetAll is wasmd unsafe-reset-all func (f *Fixtures) UnsafeResetAll(flags ...string) { cmd := fmt.Sprintf("%s --home=%s unsafe-reset-all", f.GaiadBinary, f.GaiadHome) executeWrite(f.T, addFlags(cmd, flags)) @@ -199,7 +199,7 @@ func (f *Fixtures) UnsafeResetAll(flags ...string) { require.NoError(f.T, err) } -// GDInit is gaiad init +// GDInit is wasmd init // NOTE: GDInit sets the ChainID for the Fixtures instance func (f *Fixtures) GDInit(moniker string, flags ...string) { cmd := fmt.Sprintf("%s init -o --home=%s %s", f.GaiadBinary, f.GaiadHome, moniker) @@ -217,25 +217,25 @@ func (f *Fixtures) GDInit(moniker string, flags ...string) { f.ChainID = chainID } -// AddGenesisAccount is gaiad add-genesis-account +// AddGenesisAccount is wasmd add-genesis-account func (f *Fixtures) AddGenesisAccount(address sdk.AccAddress, coins sdk.Coins, flags ...string) { cmd := fmt.Sprintf("%s add-genesis-account %s %s --home=%s", f.GaiadBinary, address, coins, f.GaiadHome) executeWriteCheckErr(f.T, addFlags(cmd, flags)) } -// GenTx is gaiad gentx +// GenTx is wasmd gentx func (f *Fixtures) GenTx(name string, flags ...string) { cmd := fmt.Sprintf("%s gentx --name=%s --home=%s --home-client=%s", f.GaiadBinary, name, f.GaiadHome, f.GaiacliHome) executeWriteCheckErr(f.T, addFlags(cmd, flags)) } -// CollectGenTxs is gaiad collect-gentxs +// CollectGenTxs is wasmd collect-gentxs func (f *Fixtures) CollectGenTxs(flags ...string) { cmd := fmt.Sprintf("%s collect-gentxs --home=%s", f.GaiadBinary, f.GaiadHome) executeWriteCheckErr(f.T, addFlags(cmd, flags)) } -// GDStart runs gaiad start with the appropriate flags and returns a process +// GDStart runs wasmd start with the appropriate flags and returns a process func (f *Fixtures) GDStart(flags ...string) *tests.Process { cmd := fmt.Sprintf("%s start --home=%s --rpc.laddr=%v --p2p.laddr=%v", f.GaiadBinary, f.GaiadHome, f.RPCAddr, f.P2PAddr) proc := tests.GoExecuteTWithStdout(f.T, addFlags(cmd, flags)) @@ -244,7 +244,7 @@ func (f *Fixtures) GDStart(flags ...string) *tests.Process { return proc } -// GDTendermint returns the results of gaiad tendermint [query] +// GDTendermint returns the results of wasmd tendermint [query] func (f *Fixtures) GDTendermint(query string) string { cmd := fmt.Sprintf("%s tendermint %s --home=%s", f.GaiadBinary, query, f.GaiadHome) success, stdout, stderr := executeWriteRetStdStreams(f.T, cmd) @@ -253,40 +253,40 @@ func (f *Fixtures) GDTendermint(query string) string { return strings.TrimSpace(stdout) } -// ValidateGenesis runs gaiad validate-genesis +// ValidateGenesis runs wasmd validate-genesis func (f *Fixtures) ValidateGenesis() { cmd := fmt.Sprintf("%s validate-genesis --home=%s", f.GaiadBinary, f.GaiadHome) executeWriteCheckErr(f.T, cmd) } //___________________________________________________________________________________ -// gaiacli keys +// wasmcli keys -// KeysDelete is gaiacli keys delete +// KeysDelete is wasmcli keys delete func (f *Fixtures) KeysDelete(name string, flags ...string) { cmd := fmt.Sprintf("%s keys delete --home=%s %s", f.GaiacliBinary, f.GaiacliHome, name) executeWrite(f.T, addFlags(cmd, append(append(flags, "-y"), "-f"))) } -// KeysAdd is gaiacli keys add +// KeysAdd is wasmcli keys add func (f *Fixtures) KeysAdd(name string, flags ...string) { cmd := fmt.Sprintf("%s keys add --home=%s %s", f.GaiacliBinary, f.GaiacliHome, name) executeWriteCheckErr(f.T, addFlags(cmd, flags)) } -// KeysAddRecover prepares gaiacli keys add --recover +// KeysAddRecover prepares wasmcli keys add --recover func (f *Fixtures) KeysAddRecover(name, mnemonic string, flags ...string) (exitSuccess bool, stdout, stderr string) { cmd := fmt.Sprintf("%s keys add --home=%s --recover %s", f.GaiacliBinary, f.GaiacliHome, name) return executeWriteRetStdStreams(f.T, addFlags(cmd, flags), mnemonic) } -// KeysAddRecoverHDPath prepares gaiacli keys add --recover --account --index +// KeysAddRecoverHDPath prepares wasmcli keys add --recover --account --index func (f *Fixtures) KeysAddRecoverHDPath(name, mnemonic string, account uint32, index uint32, flags ...string) { cmd := fmt.Sprintf("%s keys add --home=%s --recover %s --account %d --index %d", f.GaiacliBinary, f.GaiacliHome, name, account, index) executeWriteCheckErr(f.T, addFlags(cmd, flags), mnemonic) } -// KeysShow is gaiacli keys show +// KeysShow is wasmcli keys show func (f *Fixtures) KeysShow(name string, flags ...string) keys.KeyOutput { cmd := fmt.Sprintf("%s keys show --home=%s %s", f.GaiacliBinary, f.GaiacliHome, name) out, _ := tests.ExecuteT(f.T, addFlags(cmd, flags), "") @@ -305,42 +305,42 @@ func (f *Fixtures) KeyAddress(name string) sdk.AccAddress { } //___________________________________________________________________________________ -// gaiacli config +// wasmcli config -// CLIConfig is gaiacli config +// CLIConfig is wasmcli config func (f *Fixtures) CLIConfig(key, value string, flags ...string) { cmd := fmt.Sprintf("%s config --home=%s %s %s", f.GaiacliBinary, f.GaiacliHome, key, value) executeWriteCheckErr(f.T, addFlags(cmd, flags)) } //___________________________________________________________________________________ -// gaiacli tx send/sign/broadcast +// wasmcli tx send/sign/broadcast -// TxSend is gaiacli tx send +// TxSend is wasmcli tx send func (f *Fixtures) TxSend(from string, to sdk.AccAddress, amount sdk.Coin, flags ...string) (bool, string, string) { cmd := fmt.Sprintf("%s tx send %s %s %s %v", f.GaiacliBinary, from, to, amount, f.Flags()) return executeWriteRetStdStreams(f.T, addFlags(cmd, flags), client.DefaultKeyPass) } -// TxSign is gaiacli tx sign +// TxSign is wasmcli tx sign func (f *Fixtures) TxSign(signer, fileName string, flags ...string) (bool, string, string) { cmd := fmt.Sprintf("%s tx sign %v --from=%s %v", f.GaiacliBinary, f.Flags(), signer, fileName) return executeWriteRetStdStreams(f.T, addFlags(cmd, flags), client.DefaultKeyPass) } -// TxBroadcast is gaiacli tx broadcast +// TxBroadcast is wasmcli tx broadcast func (f *Fixtures) TxBroadcast(fileName string, flags ...string) (bool, string, string) { cmd := fmt.Sprintf("%s tx broadcast %v %v", f.GaiacliBinary, f.Flags(), fileName) return executeWriteRetStdStreams(f.T, addFlags(cmd, flags), client.DefaultKeyPass) } -// TxEncode is gaiacli tx encode +// TxEncode is wasmcli tx encode func (f *Fixtures) TxEncode(fileName string, flags ...string) (bool, string, string) { cmd := fmt.Sprintf("%s tx encode %v %v", f.GaiacliBinary, f.Flags(), fileName) return executeWriteRetStdStreams(f.T, addFlags(cmd, flags), client.DefaultKeyPass) } -// TxMultisign is gaiacli tx multisign +// TxMultisign is wasmcli tx multisign func (f *Fixtures) TxMultisign(fileName, name string, signaturesFiles []string, flags ...string) (bool, string, string) { @@ -351,9 +351,9 @@ func (f *Fixtures) TxMultisign(fileName, name string, signaturesFiles []string, } //___________________________________________________________________________________ -// gaiacli tx staking +// wasmcli tx staking -// TxStakingCreateValidator is gaiacli tx staking create-validator +// TxStakingCreateValidator is wasmcli tx staking create-validator func (f *Fixtures) TxStakingCreateValidator(from, consPubKey string, amount sdk.Coin, flags ...string) (bool, string, string) { cmd := fmt.Sprintf("%s tx staking create-validator %v --from=%s --pubkey=%s", f.GaiacliBinary, f.Flags(), from, consPubKey) cmd += fmt.Sprintf(" --amount=%v --moniker=%v --commission-rate=%v", amount, from, "0.05") @@ -362,29 +362,29 @@ func (f *Fixtures) TxStakingCreateValidator(from, consPubKey string, amount sdk. return executeWriteRetStdStreams(f.T, addFlags(cmd, flags), client.DefaultKeyPass) } -// TxStakingUnbond is gaiacli tx staking unbond +// TxStakingUnbond is wasmcli tx staking unbond func (f *Fixtures) TxStakingUnbond(from, shares string, validator sdk.ValAddress, flags ...string) bool { cmd := fmt.Sprintf("%s tx staking unbond %s %v --from=%s %v", f.GaiacliBinary, validator, shares, from, f.Flags()) return executeWrite(f.T, addFlags(cmd, flags), client.DefaultKeyPass) } //___________________________________________________________________________________ -// gaiacli tx gov +// wasmcli tx gov -// TxGovSubmitProposal is gaiacli tx gov submit-proposal +// TxGovSubmitProposal is wasmcli tx gov submit-proposal func (f *Fixtures) TxGovSubmitProposal(from, typ, title, description string, deposit sdk.Coin, flags ...string) (bool, string, string) { cmd := fmt.Sprintf("%s tx gov submit-proposal %v --from=%s --type=%s", f.GaiacliBinary, f.Flags(), from, typ) cmd += fmt.Sprintf(" --title=%s --description=%s --deposit=%s", title, description, deposit) return executeWriteRetStdStreams(f.T, addFlags(cmd, flags), client.DefaultKeyPass) } -// TxGovDeposit is gaiacli tx gov deposit +// TxGovDeposit is wasmcli tx gov deposit func (f *Fixtures) TxGovDeposit(proposalID int, from string, amount sdk.Coin, flags ...string) (bool, string, string) { cmd := fmt.Sprintf("%s tx gov deposit %d %s --from=%s %v", f.GaiacliBinary, proposalID, amount, from, f.Flags()) return executeWriteRetStdStreams(f.T, addFlags(cmd, flags), client.DefaultKeyPass) } -// TxGovVote is gaiacli tx gov vote +// TxGovVote is wasmcli tx gov vote func (f *Fixtures) TxGovVote(proposalID int, option gov.VoteOption, from string, flags ...string) (bool, string, string) { cmd := fmt.Sprintf("%s tx gov vote %d %s --from=%s %v", f.GaiacliBinary, proposalID, option, from, f.Flags()) return executeWriteRetStdStreams(f.T, addFlags(cmd, flags), client.DefaultKeyPass) @@ -419,9 +419,9 @@ func (f *Fixtures) TxGovSubmitCommunityPoolSpendProposal( } //___________________________________________________________________________________ -// gaiacli query account +// wasmcli query account -// QueryAccount is gaiacli query account +// QueryAccount is wasmcli query account func (f *Fixtures) QueryAccount(address sdk.AccAddress, flags ...string) auth.BaseAccount { cmd := fmt.Sprintf("%s query account %s %v", f.GaiacliBinary, address, f.Flags()) out, _ := tests.ExecuteT(f.T, addFlags(cmd, flags), "") @@ -438,9 +438,9 @@ func (f *Fixtures) QueryAccount(address sdk.AccAddress, flags ...string) auth.Ba } //___________________________________________________________________________________ -// gaiacli query txs +// wasmcli query txs -// QueryTxs is gaiacli query txs +// QueryTxs is wasmcli query txs func (f *Fixtures) QueryTxs(page, limit int, tags ...string) *sdk.SearchTxsResult { cmd := fmt.Sprintf("%s query txs --page=%d --limit=%d --tags='%s' %v", f.GaiacliBinary, page, limit, queryTags(tags), f.Flags()) out, _ := tests.ExecuteT(f.T, cmd, "") @@ -459,9 +459,9 @@ func (f *Fixtures) QueryTxsInvalid(expectedErr error, page, limit int, tags ...s } //___________________________________________________________________________________ -// gaiacli query staking +// wasmcli query staking -// QueryStakingValidator is gaiacli query staking validator +// QueryStakingValidator is wasmcli query staking validator func (f *Fixtures) QueryStakingValidator(valAddr sdk.ValAddress, flags ...string) staking.Validator { cmd := fmt.Sprintf("%s query staking validator %s %v", f.GaiacliBinary, valAddr, f.Flags()) out, _ := tests.ExecuteT(f.T, addFlags(cmd, flags), "") @@ -472,7 +472,7 @@ func (f *Fixtures) QueryStakingValidator(valAddr sdk.ValAddress, flags ...string return validator } -// QueryStakingUnbondingDelegationsFrom is gaiacli query staking unbonding-delegations-from +// QueryStakingUnbondingDelegationsFrom is wasmcli query staking unbonding-delegations-from func (f *Fixtures) QueryStakingUnbondingDelegationsFrom(valAddr sdk.ValAddress, flags ...string) []staking.UnbondingDelegation { cmd := fmt.Sprintf("%s query staking unbonding-delegations-from %s %v", f.GaiacliBinary, valAddr, f.Flags()) out, _ := tests.ExecuteT(f.T, addFlags(cmd, flags), "") @@ -483,7 +483,7 @@ func (f *Fixtures) QueryStakingUnbondingDelegationsFrom(valAddr sdk.ValAddress, return ubds } -// QueryStakingDelegationsTo is gaiacli query staking delegations-to +// QueryStakingDelegationsTo is wasmcli query staking delegations-to func (f *Fixtures) QueryStakingDelegationsTo(valAddr sdk.ValAddress, flags ...string) []staking.Delegation { cmd := fmt.Sprintf("%s query staking delegations-to %s %v", f.GaiacliBinary, valAddr, f.Flags()) out, _ := tests.ExecuteT(f.T, addFlags(cmd, flags), "") @@ -494,7 +494,7 @@ func (f *Fixtures) QueryStakingDelegationsTo(valAddr sdk.ValAddress, flags ...st return delegations } -// QueryStakingPool is gaiacli query staking pool +// QueryStakingPool is wasmcli query staking pool func (f *Fixtures) QueryStakingPool(flags ...string) staking.Pool { cmd := fmt.Sprintf("%s query staking pool %v", f.GaiacliBinary, f.Flags()) out, _ := tests.ExecuteT(f.T, addFlags(cmd, flags), "") @@ -505,7 +505,7 @@ func (f *Fixtures) QueryStakingPool(flags ...string) staking.Pool { return pool } -// QueryStakingParameters is gaiacli query staking parameters +// QueryStakingParameters is wasmcli query staking parameters func (f *Fixtures) QueryStakingParameters(flags ...string) staking.Params { cmd := fmt.Sprintf("%s query staking params %v", f.GaiacliBinary, f.Flags()) out, _ := tests.ExecuteT(f.T, addFlags(cmd, flags), "") @@ -517,9 +517,9 @@ func (f *Fixtures) QueryStakingParameters(flags ...string) staking.Params { } //___________________________________________________________________________________ -// gaiacli query gov +// wasmcli query gov -// QueryGovParamDeposit is gaiacli query gov param deposit +// QueryGovParamDeposit is wasmcli query gov param deposit func (f *Fixtures) QueryGovParamDeposit() gov.DepositParams { cmd := fmt.Sprintf("%s query gov param deposit %s", f.GaiacliBinary, f.Flags()) out, _ := tests.ExecuteT(f.T, cmd, "") @@ -530,7 +530,7 @@ func (f *Fixtures) QueryGovParamDeposit() gov.DepositParams { return depositParam } -// QueryGovParamVoting is gaiacli query gov param voting +// QueryGovParamVoting is wasmcli query gov param voting func (f *Fixtures) QueryGovParamVoting() gov.VotingParams { cmd := fmt.Sprintf("%s query gov param voting %s", f.GaiacliBinary, f.Flags()) out, _ := tests.ExecuteT(f.T, cmd, "") @@ -541,7 +541,7 @@ func (f *Fixtures) QueryGovParamVoting() gov.VotingParams { return votingParam } -// QueryGovParamTallying is gaiacli query gov param tallying +// QueryGovParamTallying is wasmcli query gov param tallying func (f *Fixtures) QueryGovParamTallying() gov.TallyParams { cmd := fmt.Sprintf("%s query gov param tallying %s", f.GaiacliBinary, f.Flags()) out, _ := tests.ExecuteT(f.T, cmd, "") @@ -552,7 +552,7 @@ func (f *Fixtures) QueryGovParamTallying() gov.TallyParams { return tallyingParam } -// QueryGovProposals is gaiacli query gov proposals +// QueryGovProposals is wasmcli query gov proposals func (f *Fixtures) QueryGovProposals(flags ...string) gov.Proposals { cmd := fmt.Sprintf("%s query gov proposals %v", f.GaiacliBinary, f.Flags()) stdout, stderr := tests.ExecuteT(f.T, addFlags(cmd, flags), "") @@ -567,7 +567,7 @@ func (f *Fixtures) QueryGovProposals(flags ...string) gov.Proposals { return out } -// QueryGovProposal is gaiacli query gov proposal +// QueryGovProposal is wasmcli query gov proposal func (f *Fixtures) QueryGovProposal(proposalID int, flags ...string) gov.Proposal { cmd := fmt.Sprintf("%s query gov proposal %d %v", f.GaiacliBinary, proposalID, f.Flags()) out, _ := tests.ExecuteT(f.T, addFlags(cmd, flags), "") @@ -578,7 +578,7 @@ func (f *Fixtures) QueryGovProposal(proposalID int, flags ...string) gov.Proposa return proposal } -// QueryGovVote is gaiacli query gov vote +// QueryGovVote is wasmcli query gov vote func (f *Fixtures) QueryGovVote(proposalID int, voter sdk.AccAddress, flags ...string) gov.Vote { cmd := fmt.Sprintf("%s query gov vote %d %s %v", f.GaiacliBinary, proposalID, voter, f.Flags()) out, _ := tests.ExecuteT(f.T, addFlags(cmd, flags), "") @@ -589,7 +589,7 @@ func (f *Fixtures) QueryGovVote(proposalID int, voter sdk.AccAddress, flags ...s return vote } -// QueryGovVotes is gaiacli query gov votes +// QueryGovVotes is wasmcli query gov votes func (f *Fixtures) QueryGovVotes(proposalID int, flags ...string) []gov.Vote { cmd := fmt.Sprintf("%s query gov votes %d %v", f.GaiacliBinary, proposalID, f.Flags()) out, _ := tests.ExecuteT(f.T, addFlags(cmd, flags), "") @@ -600,7 +600,7 @@ func (f *Fixtures) QueryGovVotes(proposalID int, flags ...string) []gov.Vote { return votes } -// QueryGovDeposit is gaiacli query gov deposit +// QueryGovDeposit is wasmcli query gov deposit func (f *Fixtures) QueryGovDeposit(proposalID int, depositor sdk.AccAddress, flags ...string) gov.Deposit { cmd := fmt.Sprintf("%s query gov deposit %d %s %v", f.GaiacliBinary, proposalID, depositor, f.Flags()) out, _ := tests.ExecuteT(f.T, addFlags(cmd, flags), "") @@ -611,7 +611,7 @@ func (f *Fixtures) QueryGovDeposit(proposalID int, depositor sdk.AccAddress, fla return deposit } -// QueryGovDeposits is gaiacli query gov deposits +// QueryGovDeposits is wasmcli query gov deposits func (f *Fixtures) QueryGovDeposits(propsalID int, flags ...string) []gov.Deposit { cmd := fmt.Sprintf("%s query gov deposits %d %v", f.GaiacliBinary, propsalID, f.Flags()) out, _ := tests.ExecuteT(f.T, addFlags(cmd, flags), "") @@ -637,7 +637,7 @@ func (f *Fixtures) QuerySigningInfo(val string) slashing.ValidatorSigningInfo { return sinfo } -// QuerySlashingParams is gaiacli query slashing params +// QuerySlashingParams is wasmcli query slashing params func (f *Fixtures) QuerySlashingParams() slashing.Params { cmd := fmt.Sprintf("%s query slashing params %s", f.GaiacliBinary, f.Flags()) res, errStr := tests.ExecuteT(f.T, cmd, "") diff --git a/cmd/wasmd/testnet.go b/cmd/wasmd/testnet.go index 28760e85be..997ab2e0eb 100644 --- a/cmd/wasmd/testnet.go +++ b/cmd/wasmd/testnet.go @@ -55,7 +55,7 @@ necessary files (private validator, genesis, config, etc.). Note, strict routability for addresses is turned off in the config file. Example: - gaiad testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2 + wasmd testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2 `, RunE: func(cmd *cobra.Command, _ []string) error { config := ctx.Config @@ -223,7 +223,7 @@ func InitTestnet(cmd *cobra.Command, config *tmconfig.Config, cdc *codec.Codec, // TODO: Rename config file to server.toml as it's not particular to Gaia // (REF: https://github.com/cosmos/cosmos-sdk/issues/4125). - wasmConfigFilePath := filepath.Join(nodeDir, "config/gaiad.toml") + wasmConfigFilePath := filepath.Join(nodeDir, "config/wasmd.toml") srvconfig.WriteConfigFile(wasmConfigFilePath, wasmConfig) } diff --git a/contrib/gitian-build.sh b/contrib/gitian-build.sh index 2e0516b082..f97a9d6937 100755 --- a/contrib/gitian-build.sh +++ b/contrib/gitian-build.sh @@ -18,7 +18,7 @@ DEFAULT_SIGN_COMMAND='gpg --detach-sign' DEFAULT_GAIA_SIGS=${GAIA_SIGS:-'gaia.sigs'} DEFAULT_GITIAN_REPO='https://github.com/tendermint/gitian-builder' DEFAULT_GBUILD_FLAGS='' -DEFAULT_SIGS_REPO='https://github.com/cosmos/gaia.sigs' +DEFAULT_SIGS_REPO='https://github.com/cosmwasm/wasmd.sigs' # Overrides diff --git a/contrib/gitian-descriptors/gitian-darwin.yml b/contrib/gitian-descriptors/gitian-darwin.yml index e7f81a2ce8..133a20336b 100644 --- a/contrib/gitian-descriptors/gitian-darwin.yml +++ b/contrib/gitian-descriptors/gitian-darwin.yml @@ -20,7 +20,7 @@ packages: - "xxd" - "quilt" remotes: -- "url": "https://github.com/cosmos/gaia.git" +- "url": "https://github.com/cosmwasm/wasmd.git" "dir": "gaia" files: - "go1.13.3.linux-amd64.tar.gz" @@ -65,7 +65,7 @@ script: | popd # Prepare GOPATH and install deps - distsrc=${GOPATH}/src/github.com/cosmos/gaia + distsrc=${GOPATH}/src/github.com/cosmwasm/wasmd mkdir -p ${distsrc} pushd ${distsrc} tar --strip-components=1 -xf $SOURCEDIST @@ -75,8 +75,8 @@ script: | # Configure LDFLAGS for reproducible builds LDFLAGS="-extldflags=-static -buildid=${VERSION} -s -w \ -X github.com/cosmos/cosmos-sdk/version.Name=gaia \ - -X github.com/cosmos/cosmos-sdk/version.ServerName=gaiad \ - -X github.com/cosmos/cosmos-sdk/version.ClientName=gaiacli \ + -X github.com/cosmos/cosmos-sdk/version.ServerName=wasmd \ + -X github.com/cosmos/cosmos-sdk/version.ClientName=wasmcli \ -X github.com/cosmos/cosmos-sdk/version.Version=${VERSION} \ -X github.com/cosmos/cosmos-sdk/version.Commit=${COMMIT} \ -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger" @@ -88,7 +88,7 @@ script: | # Build gaia tool suite pushd ${distsrc} - for prog in gaiacli gaiad; do + for prog in wasmcli wasmd; do GOARCH=${arch} GOROOT_FINAL=${GOROOT} go build -a \ -trimpath \ -gcflags=all=-trimpath=${GOPATH} \ diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 10e1c926e4..b8306b67d3 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -20,7 +20,7 @@ packages: - "xxd" - "quilt" remotes: -- "url": "https://github.com/cosmos/gaia.git" +- "url": "https://github.com/cosmwasm/wasmd.git" "dir": "gaia" files: - "go1.13.3.linux-amd64.tar.gz" @@ -64,7 +64,7 @@ script: | popd # Prepare GOPATH and install deps - distsrc=${GOPATH}/src/github.com/cosmos/gaia + distsrc=${GOPATH}/src/github.com/cosmwasm/wasmd mkdir -p ${distsrc} pushd ${distsrc} tar --strip-components=1 -xf $SOURCEDIST @@ -74,8 +74,8 @@ script: | # Configure LDFLAGS for reproducible builds LDFLAGS="-extldflags=-static -buildid=${VERSION} -s -w \ -X github.com/cosmos/cosmos-sdk/version.Name=gaia \ - -X github.com/cosmos/cosmos-sdk/version.ServerName=gaiad \ - -X github.com/cosmos/cosmos-sdk/version.ClientName=gaiacli \ + -X github.com/cosmos/cosmos-sdk/version.ServerName=wasmd \ + -X github.com/cosmos/cosmos-sdk/version.ClientName=wasmcli \ -X github.com/cosmos/cosmos-sdk/version.Version=${VERSION} \ -X github.com/cosmos/cosmos-sdk/version.Commit=${COMMIT} \ -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger" @@ -87,7 +87,7 @@ script: | # Build gaia tool suite pushd ${distsrc} - for prog in gaiacli gaiad; do + for prog in wasmcli wasmd; do GOARCH=${arch} GOROOT_FINAL=${GOROOT} go build -a \ -trimpath \ -gcflags=all=-trimpath=${GOPATH} \ diff --git a/contrib/gitian-descriptors/gitian-windows.yml b/contrib/gitian-descriptors/gitian-windows.yml index 3841ad6e53..ada6fb69ad 100644 --- a/contrib/gitian-descriptors/gitian-windows.yml +++ b/contrib/gitian-descriptors/gitian-windows.yml @@ -20,7 +20,7 @@ packages: - "xxd" - "quilt" remotes: -- "url": "https://github.com/cosmos/gaia.git" +- "url": "https://github.com/cosmwasm/wasmd.git" "dir": "gaia" files: - "go1.13.3.linux-amd64.tar.gz" @@ -65,7 +65,7 @@ script: | popd # Prepare GOPATH and install deps - distsrc=${GOPATH}/src/github.com/cosmos/gaia + distsrc=${GOPATH}/src/github.com/cosmwasm/wasmd mkdir -p ${distsrc} pushd ${distsrc} tar --strip-components=1 -xf $SOURCEDIST @@ -75,8 +75,8 @@ script: | # Configure LDFLAGS for reproducible builds LDFLAGS="-extldflags=-static -buildid=${VERSION} -s -w \ -X github.com/cosmos/cosmos-sdk/version.Name=gaia \ - -X github.com/cosmos/cosmos-sdk/version.ServerName=gaiad \ - -X github.com/cosmos/cosmos-sdk/version.ClientName=gaiacli \ + -X github.com/cosmos/cosmos-sdk/version.ServerName=wasmd \ + -X github.com/cosmos/cosmos-sdk/version.ClientName=wasmcli \ -X github.com/cosmos/cosmos-sdk/version.Version=${VERSION} \ -X github.com/cosmos/cosmos-sdk/version.Commit=${COMMIT} \ -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger" @@ -88,7 +88,7 @@ script: | # Build gaia tool suite pushd ${distsrc} - for prog in gaiacli gaiad; do + for prog in wasmcli wasmd; do exe=${prog}.exe GOARCH=${arch} GOROOT_FINAL=${GOROOT} go build -a \ -trimpath \ diff --git a/docker-compose.yml b/docker-compose.yml index a0001416e2..b90c9dff65 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,58 +1,58 @@ version: '3' services: - gaiadnode0: - container_name: gaiadnode0 - image: "tendermint/gaiadnode" + wasmdnode0: + container_name: wasmdnode0 + image: "tendermint/wasmdnode" ports: - "26656-26657:26656-26657" environment: - ID=0 - - LOG=${LOG:-gaiad.log} + - LOG=${LOG:-wasmd.log} volumes: - - ./build:/gaiad:Z + - ./build:/wasmd:Z networks: localnet: ipv4_address: 192.168.10.2 - gaiadnode1: - container_name: gaiadnode1 - image: "tendermint/gaiadnode" + wasmdnode1: + container_name: wasmdnode1 + image: "tendermint/wasmdnode" ports: - "26659-26660:26656-26657" environment: - ID=1 - - LOG=${LOG:-gaiad.log} + - LOG=${LOG:-wasmd.log} volumes: - - ./build:/gaiad:Z + - ./build:/wasmd:Z networks: localnet: ipv4_address: 192.168.10.3 - gaiadnode2: - container_name: gaiadnode2 - image: "tendermint/gaiadnode" + wasmdnode2: + container_name: wasmdnode2 + image: "tendermint/wasmdnode" environment: - ID=2 - - LOG=${LOG:-gaiad.log} + - LOG=${LOG:-wasmd.log} ports: - "26661-26662:26656-26657" volumes: - - ./build:/gaiad:Z + - ./build:/wasmd:Z networks: localnet: ipv4_address: 192.168.10.4 - gaiadnode3: - container_name: gaiadnode3 - image: "tendermint/gaiadnode" + wasmdnode3: + container_name: wasmdnode3 + image: "tendermint/wasmdnode" environment: - ID=3 - - LOG=${LOG:-gaiad.log} + - LOG=${LOG:-wasmd.log} ports: - "26663-26664:26656-26657" volumes: - - ./build:/gaiad:Z + - ./build:/wasmd:Z networks: localnet: ipv4_address: 192.168.10.5 diff --git a/docs/DOCS_README.md b/docs/DOCS_README.md index 505a3b7897..bf049bed43 100644 --- a/docs/DOCS_README.md +++ b/docs/DOCS_README.md @@ -1,6 +1,6 @@ # Updating the docs -If you want to open a PR on Gaia to update the documentation, please follow the guidelines in the [`CONTRIBUTING.md`](https://github.com/cosmos/gaia/tree/master/CONTRIBUTING.md) +If you want to open a PR on Gaia to update the documentation, please follow the guidelines in the [`CONTRIBUTING.md`](https://github.com/cosmwasm/wasmd/tree/master/CONTRIBUTING.md) ## Docs Build Workflow @@ -8,7 +8,7 @@ The documentation for Gaia is hosted at: - https://hub.cosmos.network/docs/ -built from the files in this (`/docs`) directory for [master](https://github.com/cosmos/gaia/tree/master/docs) +built from the files in this (`/docs`) directory for [master](https://github.com/cosmwasm/wasmd/tree/master/docs) ### How It Works @@ -94,7 +94,7 @@ then navigate to localhost:8080 in your browser. First, run `make tools` from the root of repo, to install the swagger-ui tool. -Then, edit the `swagger.yaml` manually; it is found [here](https://github.com/cosmos/gaia/blob/master/cmd/gaiacli/swagger-ui/swagger.yaml) +Then, edit the `swagger.yaml` manually; it is found [here](https://github.com/cosmwasm/wasmd/blob/master/cmd/wasmcli/swagger-ui/swagger.yaml) Finally, run `make update-gaia-lite-docs` from the root of the repo. @@ -114,10 +114,10 @@ much as possible with its [counterpart in the Tendermint Core repo](https://gith make tools ``` 2. Edit API docs - 1. Directly Edit API docs manually: `cmd/gaiacli/swagger-ui/swagger.yaml`. + 1. Directly Edit API docs manually: `cmd/wasmcli/swagger-ui/swagger.yaml`. 2. Edit API docs within the [Swagger Editor](https://editor.swagger.io/). Please refer to this [document](https://swagger.io/docs/specification/2-0/basic-structure/) for the correct structure in `.yaml`. -3. Download `swagger.yaml` and replace the old `swagger.yaml` under fold `cmd/gaiacli/swagger-ui`. -4. Compile gaiacli +3. Download `swagger.yaml` and replace the old `swagger.yaml` under fold `cmd/wasmcli/swagger-ui`. +4. Compile wasmcli ```bash make install ``` diff --git a/docs/README.md b/docs/README.md index 518e1450e8..e69e25ffef 100644 --- a/docs/README.md +++ b/docs/README.md @@ -29,7 +29,7 @@ Welcome to the documentation of the **Cosmos Hub application: `gaia`**. # Contribute -See [this file](https://github.com/cosmos/gaia/blob/master/docs/DOCS_README.md) for details of the build process and +See [this file](https://github.com/cosmwasm/wasmd/blob/master/docs/DOCS_README.md) for details of the build process and considerations when making changes. # Version diff --git a/docs/delegator-guide-cli.md b/docs/delegator-guide-cli.md index f1964a8217..766bf04044 100644 --- a/docs/delegator-guide-cli.md +++ b/docs/delegator-guide-cli.md @@ -29,14 +29,14 @@ Please exercise extreme caution! ## Table of Contents -- [Installing `gaiacli`](#installing-gaiacli) +- [Installing `wasmcli`](#installing-wasmcli) - [Cosmos Accounts](#cosmos-accounts) + [Restoring an Account from the Fundraiser](#restoring-an-account-from-the-fundraiser) + [Creating an Account](#creating-an-account) - [Accessing the Cosmos Hub Network](#accessing-the-cosmos-hub-network) + [Running Your Own Full-Node](#running-your-own-full-node) + [Connecting to a Remote Full-Node](#connecting-to-a-remote-full-node) -- [Setting Up `gaiacli`](#setting-up-gaiacli) +- [Setting Up `wasmcli`](#setting-up-wasmcli) - [Querying the State](#querying-the-state) - [Sending Transactions](#sending-transactions) + [A Note on Gas and Fees](#a-note-on-gas-and-fees) @@ -44,12 +44,12 @@ Please exercise extreme caution! + [Participating in Governance](#participating-in-governance) + [Signing Transactions from an Offline Computer](#signing-transactions-from-an-offline-computer) -## Installing `gaiacli` +## Installing `wasmcli` -`gaiacli`: This is the command-line interface to interact with a `gaiad` full-node. +`wasmcli`: This is the command-line interface to interact with a `wasmd` full-node. ::: warning -**Please check that you download the latest stable release of `gaiacli` that is available** +**Please check that you download the latest stable release of `wasmcli` that is available** ::: [**Download the binaries**] @@ -58,7 +58,7 @@ Not available yet. [**Install from source**](https://cosmos.network/docs/cosmos-hub/installation.html) ::: tip -`gaiacli` is used from a terminal. To open the terminal, follow these steps: +`wasmcli` is used from a terminal. To open the terminal, follow these steps: - **Windows**: `Start` > `All Programs` > `Accessories` > `Command Prompt` - **MacOS**: `Finder` > `Applications` > `Utilities` > `Terminal` - **Linux**: `Ctrl` + `Alt` + `T` @@ -147,7 +147,7 @@ Next, click [here](#using-a-ledger-device) to learn how to generate an account. To restore an account using a fundraiser mnemonic and store the associated encrypted private key on a computer, use the following command: ```bash -gaiacli keys add --recover +wasmcli keys add --recover ``` - `` is the name of the account. It is a reference to the account number used to derive the key pair from the mnemonic. You will use this name to identify your account when you want to send a transaction. @@ -166,7 +166,7 @@ store security policies please refer to your operating system manual.** ### Creating an Account -To create an account, you just need to have `gaiacli` installed. Before creating it, you need to know where you intend to store and interact with your private keys. The best options are to store them in an offline dedicated computer or a ledger device. Storing them on your regular online computer involves more risk, since anyone who infiltrates your computer through the internet could exfiltrate your private keys and steal your funds. +To create an account, you just need to have `wasmcli` installed. Before creating it, you need to know where you intend to store and interact with your private keys. The best options are to store them in an offline dedicated computer or a ledger device. Storing them on your regular online computer involves more risk, since anyone who infiltrates your computer through the internet could exfiltrate your private keys and steal your funds. #### Using a Ledger Device @@ -174,7 +174,7 @@ To create an account, you just need to have `gaiacli` installed. Before creating **Only use Ledger devices that you bought factory new or trust fully** ::: -When you initialize your ledger, a 24-word mnemonic is generated and stored in the device. This mnemonic is compatible with Cosmos and Cosmos accounts can be derived from it. Therefore, all you have to do is make your ledger compatible with `gaiacli`. To do so, you need to go through the following steps: +When you initialize your ledger, a 24-word mnemonic is generated and stored in the device. This mnemonic is compatible with Cosmos and Cosmos accounts can be derived from it. Therefore, all you have to do is make your ledger compatible with `wasmcli`. To do so, you need to go through the following steps: 1. Download the Ledger Live app [here](https://www.ledger.com/pages/ledger-live). 2. Connect your ledger via USB and update to the latest firmware @@ -184,7 +184,7 @@ When you initialize your ledger, a 24-word mnemonic is generated and stored in t Then, to create an account, use the following command: ```bash -gaiacli keys add --ledger +wasmcli keys add --ledger ``` ::: warning @@ -203,7 +203,7 @@ gaiacli keys add --ledger To generate an account, just use the following command: ```bash -gaiacli keys add +wasmcli keys add ``` The command will generate a 24-words mnemonic and save the private and public keys for account `0` @@ -238,7 +238,7 @@ rm ~/.bash_history You can generate more accounts from the same mnemonic using the following command: ```bash -gaiacli keys add --recover --account 1 +wasmcli keys add --recover --account 1 ``` This command will prompt you to input a passphrase as well as your mnemonic. Change the account number to generate a different account. @@ -256,30 +256,30 @@ In order to query the state and send transactions, you need a way to access the This is the most secure option, but comes with relatively high resource requirements. In order to run your own full-node, you need good bandwidth and at least 1TB of disk space. -You will find the tutorial on how to install `gaiad` [here](https://cosmos.network/docs/cosmos-hub/installation.html), and the guide to run a full-node [here](https://cosmos.network/docs/cosmos-hub/join-mainnet.html). +You will find the tutorial on how to install `wasmd` [here](https://cosmos.network/docs/cosmos-hub/installation.html), and the guide to run a full-node [here](https://cosmos.network/docs/cosmos-hub/join-mainnet.html). ### Connecting to a Remote Full-Node If you do not want or cannot run your own node, you can connect to someone else's full-node. You should pick an operator you trust, because a malicious operator could return incorrect query results or censor your transactions. However, they will never be able to steal your funds, as your private keys are stored locally on your computer or ledger device. Possible options of full-node operators include validators, wallet providers or exchanges. -In order to connect to the full-node, you will need an address of the following form: `https://77.87.106.33:26657` (*Note: This is a placeholder*). This address has to be communicated by the full-node operator you choose to trust. You will use this address in the [following section](#setting-up-gaiacli). +In order to connect to the full-node, you will need an address of the following form: `https://77.87.106.33:26657` (*Note: This is a placeholder*). This address has to be communicated by the full-node operator you choose to trust. You will use this address in the [following section](#setting-up-wasmcli). -## Setting Up `gaiacli` +## Setting Up `wasmcli` ::: tip -**Before setting up `gaiacli`, make sure you have set up a way to [access the Cosmos Hub network](#accessing-the-cosmos-hub-network)** +**Before setting up `wasmcli`, make sure you have set up a way to [access the Cosmos Hub network](#accessing-the-cosmos-hub-network)** ::: ::: warning -**Please check that you are always using the latest stable release of `gaiacli`** +**Please check that you are always using the latest stable release of `wasmcli`** ::: -`gaiacli` is the tool that enables you to interact with the node that runs on the Cosmos Hub network, whether you run it yourself or not. Let us set it up properly. +`wasmcli` is the tool that enables you to interact with the node that runs on the Cosmos Hub network, whether you run it yourself or not. Let us set it up properly. -In order to set up `gaiacli`, use the following command: +In order to set up `wasmcli`, use the following command: ```bash -gaiacli config +wasmcli config ``` It allows you to set a default value for each given flag. @@ -287,9 +287,9 @@ It allows you to set a default value for each given flag. First, set up the address of the full-node you want to connect to: ```bash -gaiacli config node :: +wasmcli query account // query the list of validators -gaiacli query staking validators +wasmcli query staking validators // query the information of a validator given their address (e.g. cosmosvaloper1n5pepvmgsfd3p2tqqgvt505jvymmstf6s9gw27) -gaiacli query staking validator +wasmcli query staking validator // query all delegations made from a delegator given their address (e.g. cosmos10snjt8dmpr5my0h76xj48ty80uzwhraqalu4eg) -gaiacli query staking delegations +wasmcli query staking delegations // query a specific delegation made from a delegator (e.g. cosmos10snjt8dmpr5my0h76xj48ty80uzwhraqalu4eg) to a validator (e.g. cosmosvaloper1n5pepvmgsfd3p2tqqgvt505jvymmstf6s9gw27) given their addresses -gaiacli query staking delegation +wasmcli query staking delegation // query the rewards of a delegator given a delegator address (e.g. cosmos10snjt8dmpr5my0h76xj48ty80uzwhraqalu4eg) -gaiacli query distribution rewards +wasmcli query distribution rewards // query all proposals currently open for depositing -gaiacli query gov proposals --status deposit_period +wasmcli query gov proposals --status deposit_period // query all proposals currently open for voting -gaiacli query gov proposals --status voting_period +wasmcli query gov proposals --status voting_period // query a proposal given its proposalID -gaiacli query gov proposal +wasmcli query gov proposal ``` For more commands, just type: ```bash -gaiacli query +wasmcli query ``` For each command, you can use the `-h` or `--help` flag to get more information. @@ -380,7 +380,7 @@ For mainnet, the recommended `gas-prices` is `0.025uatom`. ### Sending Tokens ::: tip -**Before you can bond atoms and withdraw rewards, you need to [set up `gaiacli`](#setting-up-gaiacli) and [create an account](#creating-an-account)** +**Before you can bond atoms and withdraw rewards, you need to [set up `wasmcli`](#setting-up-wasmcli) and [create an account](#creating-an-account)** ::: ::: warning @@ -392,13 +392,13 @@ For mainnet, the recommended `gas-prices` is `0.025uatom`. // Ex value for parameters (do not actually use these values in your tx!!): =cosmos16m93fezfiezhvnjajzrfyszml8qm92a0w67ntjhd3d0 =1000000uatom // Ex value for flags: =0.025uatom -gaiacli tx send --from --gas auto --gas-adjustment 1.5 --gas-prices +wasmcli tx send --from --gas auto --gas-adjustment 1.5 --gas-prices ``` ### Bonding Atoms and Withdrawing Rewards ::: tip -**Before you can bond atoms and withdraw rewards, you need to [set up `gaiacli`](#setting-up-gaiacli) and [create an account](#creating-an-account)** +**Before you can bond atoms and withdraw rewards, you need to [set up `wasmcli`](#setting-up-wasmcli) and [create an account](#creating-an-account)** ::: ::: warning @@ -413,7 +413,7 @@ gaiacli tx send --from --gas auto --gas-adju // Bond a certain amount of Atoms to a given validator // ex value for flags: =cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, =10000000uatom, =0.025uatom -gaiacli tx staking delegate --from --gas auto --gas-adjustment 1.5 --gas-prices +wasmcli tx staking delegate --from --gas auto --gas-adjustment 1.5 --gas-prices // Redelegate a certain amount of Atoms from a validator to another @@ -422,19 +422,19 @@ gaiacli tx staking delegate --from =cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, =100000000uatom, =0.025uatom -gaiacli tx staking redelegate --from --gas auto --gas-adjustment 1.5 --gas-prices +wasmcli tx staking redelegate --from --gas auto --gas-adjustment 1.5 --gas-prices // Withdraw all rewards // ex value for flag: =0.025uatom -gaiacli tx distribution withdraw-all-rewards --from --gas auto --gas-adjustment 1.5 --gas-prices +wasmcli tx distribution withdraw-all-rewards --from --gas auto --gas-adjustment 1.5 --gas-prices // Unbond a certain amount of Atoms from a given validator // You will have to wait 3 weeks before your Atoms are fully unbonded and transferrable // ex value for flags: =cosmosvaloper18thamkhnj9wz8pa4nhnp9rldprgant57pk2m8s, =10000000uatom, =0.025uatom -gaiacli tx staking unbond --from --gas auto --gas-adjustment 1.5 --gas-prices +wasmcli tx staking unbond --from --gas auto --gas-adjustment 1.5 --gas-prices ``` ::: warning @@ -445,14 +445,14 @@ To confirm that your transaction went through, you can use the following queries ```bash // your balance should change after you bond Atoms or withdraw rewards -gaiacli query account +wasmcli query account // you should have delegations after you bond Atom -gaiacli query staking delegations +wasmcli query staking delegations // this returns your tx if it has been included // use the tx hash that was displayed when you created the tx -gaiacli query tx +wasmcli query tx ``` @@ -489,19 +489,19 @@ At the end of the voting period, the proposal is accepted if there are more than // =text/parameter_change/software_upgrade // ex value for flag: =0.025uatom -gaiacli tx gov submit-proposal --title "Test Proposal" --description "My awesome proposal" --type --deposit=10000000uatom --gas auto --gas-adjustment 1.5 --gas-prices --from +wasmcli tx gov submit-proposal --title "Test Proposal" --description "My awesome proposal" --type --deposit=10000000uatom --gas auto --gas-adjustment 1.5 --gas-prices --from // Increase deposit of a proposal -// Retrieve proposalID from $gaiacli query gov proposals --status deposit_period +// Retrieve proposalID from $wasmcli query gov proposals --status deposit_period // ex value for parameter: =10000000uatom -gaiacli tx gov deposit --gas auto --gas-adjustment 1.5 --gas-prices --from +wasmcli tx gov deposit --gas auto --gas-adjustment 1.5 --gas-prices --from // Vote on a proposal -// Retrieve proposalID from $gaiacli query gov proposals --status voting_period +// Retrieve proposalID from $wasmcli query gov proposals --status voting_period //