From b024cebaeb419e23c2a6056aa2ac6f0500ffc08d Mon Sep 17 00:00:00 2001 From: Alexander Bezobchuk Date: Tue, 13 Aug 2019 14:40:30 -0400 Subject: [PATCH 1/5] Merge PR #101: v1.0.0 Changelog Updates --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- CHANGELOG.md | 31 ++++++++++++++++++++- CONTRIBUTING.md | 48 +++++++++++++++++++------------- contrib/devtools/Makefile | 6 +--- 4 files changed, 60 insertions(+), 27 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 162c7274196..24eb3aae1fc 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -9,7 +9,7 @@ v If a checkbox is n/a - please still include it but + a little note why - [ ] Linked to github-issue with discussion and accepted design OR link to spec that describes this work. - [ ] Wrote tests - [ ] Updated relevant documentation (`docs/`) -- [ ] Added a relevant changelog entry: `clog add [section] [stanza] [message]` +- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md` - [ ] Reviewed `Files changed` in the github PR explorer ______ diff --git a/CHANGELOG.md b/CHANGELOG.md index 977a7e157b0..9106cbb26de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,30 @@ + + # Changelog -## 1.0.0 +## [Unreleased] + +## [1.0.0] - 2019-08-13 ### Bug Fixes @@ -54,3 +78,8 @@ * (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. * (rest) [\#4141](https://github.com/cosmos/cosmos-sdk/issues/4141) Fix /txs/encode endpoint + + + +[Unreleased]: https://github.com/cosmos/gaia/compare/v1.0.0...HEAD +[1.0.0]: https://github.com/cosmos/gaia/releases/tag/v1.0.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 410845f0a6b..7b8e818fe06 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,17 +1,18 @@ # Contributing -* [Pull Requests](#pull-requests) - * [Process for reviewing PRs](#process-for-reviewing-prs) - * [Updating Documentation](#updating-documentation) -* [Forking](#forking) -* [Dependencies](#dependencies) -* [Testing](#testing) -* [Branching Model and Release](#branching-model-and-release) - * [PR Targeting](#pr-targeting) - * [Development Procedure](#development-procedure) - * [Pull Merge Procedure](#pull-merge-procedure) - * [Release Procedure](#release-procedure) - * [Point Release Procedure](#point-release-procedure) +- [Contributing](#contributing) + - [Pull Requests](#pull-requests) + - [Process for reviewing PRs](#process-for-reviewing-prs) + - [Updating Documentation](#updating-documentation) + - [Forking](#forking) + - [Dependencies](#dependencies) + - [Testing](#testing) + - [Branching Model and Release](#branching-model-and-release) + - [PR Targeting](#pr-targeting) + - [Development Procedure](#development-procedure) + - [Pull Merge Procedure](#pull-merge-procedure) + - [Release Procedure](#release-procedure) + - [Point Release Procedure](#point-release-procedure) Thank you for considering making contributions to Gaia and related repositories! @@ -182,14 +183,21 @@ only pull requests targeted directly against master. - merge pull request ### Release Procedure - - start on `master` - - create the release candidate branch `rc/v*` (going forward known as **RC**) and ensure it's protected against pushing from anyone except the release manager/coordinator. **no PRs targeting this branch should be merged unless exceptional circumstances arise** - - on the `RC` branch, use `clog` to prepare the `CHANGELOG.md` and kick off a large round of simulation testing (e.g. 400 seeds for 2k blocks). - - if errors are found during the simulation testing, commit the fixes to `master` and create a new `RC` branch (making sure to increment the `rcN`) - - after simulation has successfully completed, create the release branch (`release/vX.XX.X`) from the `RC` branch - - merge the release branch to `master` to incorporate the `CHANGELOG.md` updates - - delete the `RC` branches - + +- Start on `master` +- Create the release candidate branch `rc/v*` (going forward known as **RC**) + and ensure it's protected against pushing from anyone except the release + manager/coordinator + - **no PRs targeting this branch should be merged unless exceptional circumstances arise** +- On the `RC` branch, prepare a new version section in the `CHANGELOG.md` and + kick off a large round of simulation testing (e.g. 400 seeds for 2k blocks) +- If errors are found during the simulation testing, commit the fixes to `master` + and create a new `RC` branch (making sure to increment the `rcN`) +- After simulation has successfully completed, create the release branch + (`release/vX.XX.X`) from the `RC` branch +- Merge the release branch to `master` to incorporate the `CHANGELOG.md` updates +- Delete the `RC` branches + ### Point Release Procedure At the moment, only a single major release will be supported, so all point diff --git a/contrib/devtools/Makefile b/contrib/devtools/Makefile index 105024837ff..a5a8c5ef8f6 100644 --- a/contrib/devtools/Makefile +++ b/contrib/devtools/Makefile @@ -46,7 +46,6 @@ TOOLS_DESTDIR ?= $(GOPATH)/bin GOLANGCI_LINT = $(TOOLS_DESTDIR)/golangci-lint GOIMPORTS = $(TOOLS_DESTDIR)/goimports -CLOG = $(TOOLS_DESTDIR)/clog RUNSIM = $(TOOLS_DESTDIR)/runsim all: tools @@ -61,16 +60,13 @@ $(GOLANGCI_LINT): $(mkfile_dir)/install-golangci-lint.sh $(GOIMPORTS): go get golang.org/x/tools/cmd/goimports@v0.0.0-20190628034336-212fb13d595e -$(CLOG): - go get github.com/cosmos/tools/cmd/clog/ - $(RUNSIM): go get github.com/cosmos/tools/cmd/runsim/ golangci-lint: $(GOLANGCI_LINT) tools-clean: - rm -f $(GOIMPORTS) $(CLOG) $(GOLANGCI_LINT) + rm -f $(GOIMPORTS) $(GOLANGCI_LINT) rm -f tools-stamp .PHONY: all tools tools-clean From af7014ff4f5cebad0b68705bc1dae2c4b5bcfa9e Mon Sep 17 00:00:00 2001 From: Alexander Bezobchuk Date: Wed, 14 Aug 2019 11:36:27 -0400 Subject: [PATCH 2/5] Merge PR #102: Remove clog config --- .clog.yaml | 11 ----------- CHANGELOG.md | 15 +++++++++++++-- CONTRIBUTING.md | 39 +++++++++++++++++++++------------------ 3 files changed, 34 insertions(+), 31 deletions(-) delete mode 100644 .clog.yaml diff --git a/.clog.yaml b/.clog.yaml deleted file mode 100644 index 467add0d46e..00000000000 --- a/.clog.yaml +++ /dev/null @@ -1,11 +0,0 @@ -sections: - breaking: Breaking Changes - features: Features - improvements: Improvements - bugfixes: Bug Fixes - -tags: - - gaiad - - gaiacli - - rest - - sdk diff --git a/CHANGELOG.md b/CHANGELOG.md index 9106cbb26de..0b28cf80e74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,17 @@ The latest version comes first. The release date of each version is displayed. Mention whether you follow Semantic Versioning. +Usage: + +Change log entries are to be added to the Unreleased section under the +appropriate stanza (see below). Each entry should ideally include a tag and +the Github issue reference in the following format: + +* () \# message + +The issue numbers will later be link-ified during the release process so you do +not have to worry about including a link manually, but you can if you wish. + Types of changes (Stanzas): "Features" for new features. @@ -24,7 +35,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] -## [1.0.0] - 2019-08-13 +## [v1.0.0] - 2019-08-13 ### Bug Fixes @@ -82,4 +93,4 @@ Ref: https://keepachangelog.com/en/1.0.0/ [Unreleased]: https://github.com/cosmos/gaia/compare/v1.0.0...HEAD -[1.0.0]: https://github.com/cosmos/gaia/releases/tag/v1.0.0 +[v1.0.0]: https://github.com/cosmos/gaia/releases/tag/v1.0.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b8e818fe06..26b787a9c17 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,24 +21,27 @@ 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, - 2. participate in thoughtful discussion on that issue, - 3. if you would then like to contribute code: - 1. if a the issue is a proposal, ensure that the proposal has been accepted, - 2. ensure that nobody else has already begun working on this issue, if they have - make sure to contact them to collaborate, - 3. if nobody has been assigned the issue and you would like to work on it - make a comment on the issue to inform the community of your intentions - to begin work, - 4. follow standard github best practices: fork the repo, branch from the - top of `master`, make some commits, and submit a PR to `master`, - - for core developers working within the Gaia repo, - to ensure a clear ownership of branches, branches must be named with the convention `yourname/{issue-}feature-name`. - 5. submit your PR early and make sure it's opened as a `Draft`, even if it's - incomplete, this indicates to the community you're working on something and - allows them to provide comments early in the development process. When the code - is complete it should be marked as ready-for-review using Github's `Mark Ready` feature. +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 +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 + 2. Ensure that nobody else has already begun working on this issue, if they have + make sure to contact them to collaborate + 3. If nobody has been assigned the issue and you would like to work on it + make a comment on the issue to inform the community of your intentions + to begin work + 4. Follow standard Github best practices: fork the repo, branch from the + HEAD of `master`, make some commits, and submit a PR to `master` + - For core developers working within the cosmos-sdk repo, to ensure a clear + ownership of branches, branches must be named with the convention + `{moniker}/{issue#}-branch-name` + 5. Be sure to submit the PR in `Draft` mode submit your PR early, even if + it's incomplete as this indicates to the community you're working on + something and allows them to provide comments early in the development process + 6. When the code is complete it can be marked `Ready for Review` + 7. Be sure to include a relevant change log entry in the `Unreleased` section + of `CHANGELOG.md` (see file for log format) Note that for very small or blatantly obvious problems (such as typos) it is not required to an open issue to submit a PR, but be aware that for more complex From e6e26d38c7a5dd67b5a7cf3735706b8cf6d73d65 Mon Sep 17 00:00:00 2001 From: colin axner Date: Thu, 15 Aug 2019 15:30:10 -0700 Subject: [PATCH 3/5] Merge PR #105: Fix Module Account Blacklisting in GaiaApp --- app/app.go | 2 +- app/app_test.go | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/app.go b/app/app.go index d1cdefaa1b8..5c1fe893757 100644 --- a/app/app.go +++ b/app/app.go @@ -256,7 +256,7 @@ func (app *GaiaApp) LoadHeight(height int64) error { func (app *GaiaApp) ModuleAccountAddrs() map[string]bool { modAccAddrs := make(map[string]bool) for acc := range maccPerms { - modAccAddrs[app.supplyKeeper.GetModuleAddress(acc).String()] = true + modAccAddrs[supply.NewModuleAddress(acc).String()] = true } return modAccAddrs diff --git a/app/app_test.go b/app/app_test.go index 93b536db944..2e8f877b53f 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tendermint/tm-db" "github.com/tendermint/tendermint/libs/log" + "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/simapp" @@ -25,6 +25,16 @@ func TestGaiadExport(t *testing.T) { require.NoError(t, err, "ExportAppStateAndValidators should not have an error") } +// ensure that black listed addresses are properly set in bank keeper +func TestBlackListedAddrs(t *testing.T) { + db := db.NewMemDB() + app := NewGaiaApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0) + + for acc := range maccPerms { + require.True(t, app.bankKeeper.BlacklistedAddr(app.supplyKeeper.GetModuleAddress(acc))) + } +} + func setGenesis(gapp *GaiaApp) error { genesisState := simapp.NewDefaultGenesisState() From 4201b8b10df1aedbec09600f6a6674a5021d533b Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Fri, 16 Aug 2019 11:35:31 -0400 Subject: [PATCH 4/5] Update change log --- CHANGELOG.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b28cf80e74..37a50821172 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,17 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +## [v2.0.0] - 2019-08-16 + +### Bug Fixes + +* [\#104](https://github.com/cosmos/gaia/issues/104) Fix `ModuleAccountAddrs` to +not rely on the `x/supply` keeper to get module account addresses for blacklisting. + +### Breaking Changes + +* (sdk) Update SDK version to v0.37.0 + ## [v1.0.0] - 2019-08-13 ### Bug Fixes @@ -92,5 +103,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ -[Unreleased]: https://github.com/cosmos/gaia/compare/v1.0.0...HEAD +[Unreleased]: https://github.com/cosmos/gaia/compare/v2.0.0...HEAD +[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 From cd4f3559288908a414d9c10994a3c855d5f922e6 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Fri, 16 Aug 2019 11:36:14 -0400 Subject: [PATCH 5/5] [TEMP] Update SDK to v0.37.0-rc1 --- go.mod | 3 +-- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 8a364511d96..d15d0bea6a3 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.12 require ( github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c // indirect - github.com/cosmos/cosmos-sdk v0.36.0 + github.com/cosmos/cosmos-sdk v0.37.0-rc1 github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d // indirect github.com/go-kit/kit v0.9.0 // indirect github.com/golang/mock v1.3.1 // indirect @@ -33,6 +33,5 @@ require ( golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 // indirect golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa // indirect golang.org/x/text v0.3.2 // indirect - google.golang.org/appengine v1.4.0 // indirect google.golang.org/genproto v0.0.0-20190701230453-710ae3a149df // indirect ) diff --git a/go.sum b/go.sum index 0f6eb0d1ad6..4febc1adc0b 100644 --- a/go.sum +++ b/go.sum @@ -37,8 +37,8 @@ github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8Nz github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/cosmos-sdk v0.36.0 h1:nDHhZDeucmv/PoThz89Q8cj9S8OH2EUutgertz2pZ90= -github.com/cosmos/cosmos-sdk v0.36.0/go.mod h1:3b/k/Zd+YDuttSmEJdNkxga1H5EIiDUhSYeErAHQN7A= +github.com/cosmos/cosmos-sdk v0.37.0-rc1 h1:DjrmTg+MTRJozgqIhI+7vT1MI2hQobeb8AQcXQ87JO0= +github.com/cosmos/cosmos-sdk v0.37.0-rc1/go.mod h1:3b/k/Zd+YDuttSmEJdNkxga1H5EIiDUhSYeErAHQN7A= github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=