Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.39.2 #7574

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c7d0b5a
fix tests build failures with go1.15 (#7073)
Aug 18, 2020
86f953b
unblock CI on Launchpad (#7088)
Aug 19, 2020
4d3afea
launchpad: backport BigInt fix (#7087)
fedekunze Aug 20, 2020
42c3c57
Update CODEWNERS as per Launchpad Release Policy (#7137)
Aug 22, 2020
298fbbc
client: fix keys add interactive command (#7193)
Aug 31, 2020
cb23ee2
Fix ApproxRoot Infinite Looping (#7140) (#7199)
Aug 31, 2020
a1d18a1
Update 99designs/keyring to v1.1.6 for go 1.15 (#7398)
Sep 28, 2020
203876e
Update launchpad docs to build without failing (#7412)
clevinson Sep 30, 2020
c3cc14c
make coin evaluation into functions instead of static
okwme Oct 3, 2020
5b6cff4
reset default regex
okwme Oct 4, 2020
726d57a
Update CHANGELOG.md
okwme Oct 7, 2020
a74a519
Update CHANGELOG.md
okwme Oct 7, 2020
85d4291
Merge branch 'launchpad/backports' into billy/6744-launchpad-custom-v…
okwme Oct 7, 2020
3101928
Merge pull request #7450 from cosmos/billy/6744-launchpad-custom-vali…
okwme Oct 7, 2020
59c6527
tendermint security update (#7555)
Oct 15, 2020
792c7bc
post-upgrade with x/upgrade queries not working (#7531)
RiccardoM Oct 16, 2020
c4f4d03
launchpad: fix query params on governance votes querier (#7624)
yun-yeo Oct 23, 2020
5cb54ab
enrich version --long's output with build deps (#7864)
Nov 10, 2020
1bbffff
update RELEASE_NOTES.md (#7858)
Nov 13, 2020
2d38dad
docs: fix broken urls (#7833)
lovincyrus Nov 17, 2020
0c2e3fa
Update CHANGELOG.md
okwme Nov 18, 2020
7b152b3
Merge PR #7969: bump version git diff
tac0turtle Nov 18, 2020
36ff5ca
launchpad: bump tendermint to v0.33.9 (#7971)
fedekunze Nov 18, 2020
69f6ec2
version --long displays replaced build dependencies (#7943)
Nov 19, 2020
5be42d9
crypto/hd: add 'm/' prefix to hd path (#7977)
fedekunze Nov 20, 2020
2727c14
types/Coin: compile and reuse Regexps to reduce massive RAM+CPU burn …
Nov 24, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/

# Primary repo maintainers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason for these changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes committed as per Launchpad's release policy. The Policy states that PRs to the stable release branch must be approved by the Stable Release Managers.
Changes were approved offline by @okwme.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok this is just for launchpad?

Also, why is the base branch launchpad/release/v0.39.2? It should be release/v0.39.x or something similar.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok this is just for launchpad?

Currently yes, correct - although IIRC people liked the concept of having a small dedicated group of people maintaining each stable release branch. Yet yes of course, this applies to Launchpad only.

Also, why is the base branch launchpad/release/v0.39.2?

There should be ACLs enforced on branches that start with launchpad/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyways, the release branch will be removed once the final tag is pushed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand but ok!

* @rigelrozanski @alexanderbez @jackzampolin @alessio @fedekunze
# Launchpad Stable Release Managers
* @alessio @clevinson @ethanfrey

###############################################################################
# Module Specific Ownership
# See CONTRIBUTING.md for further details
###############################################################################

# The following contributors own all files in the x/nft directory at the root
# of the repository and any of its subdirectories.
x/nft @okwme @fedekunze
8 changes: 4 additions & 4 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v1
- uses: technote-space/get-diff-action@v4
with:
SUFFIX_FILTER: |
.go
Expand All @@ -57,7 +57,7 @@ jobs:
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v1
- uses: technote-space/get-diff-action@v4
with:
SUFFIX_FILTER: |
.go
Expand All @@ -80,7 +80,7 @@ jobs:
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v1
- uses: technote-space/get-diff-action@v4
with:
SUFFIX_FILTER: |
.go
Expand All @@ -103,7 +103,7 @@ jobs:
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v1
- uses: technote-space/get-diff-action@v4
with:
SUFFIX_FILTER: |
.go
Expand Down
154 changes: 145 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,163 @@ jobs:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"

test-coverage-upload:
split-test-files:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2-beta
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v1
- name: Create a file with all the pkgs
run: go list ./... > pkgs.txt
- name: Split pkgs into 4 files
run: split -n l/4 --additional-suffix=.txt ./pkgs.txt
# cache multiple
- uses: actions/upload-artifact@v2
with:
name: "${{ github.sha }}-aa"
path: ./xaa.txt
- uses: actions/upload-artifact@v2
with:
name: "${{ github.sha }}-ab"
path: ./xab.txt
- uses: actions/upload-artifact@v2
with:
name: "${{ github.sha }}-ac"
path: ./xac.txt
- uses: actions/upload-artifact@v2
with:
name: "${{ github.sha }}-ad"
path: ./xad.txt

test-coverage-run-1:
runs-on: ubuntu-latest
needs: split-test-files
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v3
id: git_diff
with:
SUFFIX_FILTER: |
.go
.mod
.sum
- name: build
- uses: actions/download-artifact@v2
with:
name: "${{ github.sha }}-aa"
if: "env.GIT_DIFF != ''"
- name: test & coverage report creation
run: |
make build
cat xaa.txt | xargs go test -mod=readonly -timeout 15m -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock'
if: "env.GIT_DIFF != ''"
- name: filter out DONTCOVER
run: |
excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')"
excludelist+=" $(find ./ -type f -name '*.pb.go')"
excludelist+=" $(find ./ -type f -path './tests/mocks/*.go')"
for filename in ${excludelist}; do
filename=$(echo $filename | sed 's/^./github.com\/cosmos\/cosmos-sdk/g')
echo "Excluding ${filename} from coverage report..."
sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt
done
if: "env.GIT_DIFF != ''"
- uses: codecov/[email protected]
with:
file: ./coverage.txt
if: "env.GIT_DIFF != ''"

test-coverage-run-2:
runs-on: ubuntu-latest
needs: split-test-files
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v3
id: git_diff
with:
SUFFIX_FILTER: |
.go
.mod
.sum
- uses: actions/download-artifact@v2
with:
name: "${{ github.sha }}-ab"
if: "env.GIT_DIFF != ''"
- name: test & coverage report creation
run: |
cat xab.txt | xargs go test -mod=readonly -timeout 15m -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock'
if: "env.GIT_DIFF != ''"
- name: filter out DONTCOVER
run: |
excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')"
excludelist+=" $(find ./ -type f -name '*.pb.go')"
excludelist+=" $(find ./ -type f -path './tests/mocks/*.go')"
for filename in ${excludelist}; do
filename=$(echo $filename | sed 's/^./github.com\/cosmos\/cosmos-sdk/g')
echo "Excluding ${filename} from coverage report..."
sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt
done
if: "env.GIT_DIFF != ''"
- uses: codecov/[email protected]
with:
file: ./coverage.txt
if: "env.GIT_DIFF != ''"

test-coverage-run-3:
runs-on: ubuntu-latest
needs: split-test-files
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v3
id: git_diff
with:
SUFFIX_FILTER: |
.go
.mod
.sum
- uses: actions/download-artifact@v2
with:
name: "${{ github.sha }}-ac"
if: "env.GIT_DIFF != ''"
- name: test & coverage report creation
run: |
cat xac.txt | xargs go test -mod=readonly -timeout 15m -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock'
if: "env.GIT_DIFF != ''"
- name: filter out DONTCOVER
run: |
excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')"
excludelist+=" $(find ./ -type f -name '*.pb.go')"
excludelist+=" $(find ./ -type f -path './tests/mocks/*.go')"
for filename in ${excludelist}; do
filename=$(echo $filename | sed 's/^./github.com\/cosmos\/cosmos-sdk/g')
echo "Excluding ${filename} from coverage report..."
sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt
done
if: "env.GIT_DIFF != ''"
- uses: codecov/[email protected]
with:
file: ./coverage.txt
if: "env.GIT_DIFF != ''"

test-coverage-run-4:
runs-on: ubuntu-latest
needs: split-test-files
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v3
id: git_diff
with:
SUFFIX_FILTER: |
.go
.mod
.sum
- uses: actions/download-artifact@v2
with:
name: "${{ github.sha }}-ad"
if: "env.GIT_DIFF != ''"
- name: test & coverage report creation
run: |
go test ./... -mod=readonly -timeout 12m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock'
cat xad.txt | xargs go test -mod=readonly -timeout 15m -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock'
if: "env.GIT_DIFF != ''"
- name: filter out DONTCOVER
run: |
Expand All @@ -45,8 +182,7 @@ jobs:
sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt
done
if: "env.GIT_DIFF != ''"
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v1.0.13
with:
file: ./coverage.txt # optional
fail_ci_if_error: true
file: ./coverage.txt
if: "env.GIT_DIFF != ''"
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,27 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## [v0.39.2]

### Features
okwme marked this conversation as resolved.
Show resolved Hide resolved

* (types/coin.go) [\#6755](https://github.com/cosmos/cosmos-sdk/pull/6755) Add custom regex validation for `Coin` denom by overwriting `CoinDenomRegex` when using `/types/coin.go`.
* (version) [\#7835](https://github.com/cosmos/cosmos-sdk/issues/7835) [\#7940](https://github.com/cosmos/cosmos-sdk/issues/7940) The version --long command now shows the list of build dependencies and their versioning information.

### Improvements

* (deps) Bump Tendermint version to [v0.33.9](https://github.com/tendermint/tendermint/releases/tag/v0.33.9)

### Bug Fixes

* (crypto) [\#7966](https://github.com/cosmos/cosmos-sdk/issues/7966) `BIP44Params` `String()` method now correctly returns the absolute HD path by adding the `m/` prefix.
* (client) [\#7588](https://github.com/cosmos/cosmos-sdk/issues/7588) Fix gov votes querier to use proper query params.
* (types) [\#7038](https://github.com/cosmos/cosmos-sdk/issues/7038) Fix infinite looping of `ApproxRoot` by including a hard-coded maximum iterations limit of 100.
* (types) [\#7084](https://github.com/cosmos/cosmos-sdk/pull/7084) Fix panic when calling `BigInt()` on an uninitialized `Int`.
* (client) [\#7048](https://github.com/cosmos/cosmos-sdk/issues/7048) Fix client `keys add` failure when generating mnemonic in interactive mode.
* (keys) [\#7397](https://github.com/cosmos/cosmos-sdk/pull/7397) Update 99designs/keyring to v1.1.6 for go 1.15 compatibility.
* (kvstore) [\#7385](https://github.com/cosmos/cosmos-sdk/issues/7385) Allow new stores to be registered during on-chain upgrades.

## [v0.39.1]

* (x/auth) [\#6861](https://github.com/cosmos/cosmos-sdk/pull/6861) Remove public key Bech32 encoding for all account types for JSON serialization, instead relying on direct Amino encoding. In addition, JSON serialization utilizes Amino instead of the Go stdlib, so integers are treated as strings.
Expand Down
51 changes: 39 additions & 12 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,47 @@
# Cosmos SDK v0.39.1 Release Notes
# Cosmos SDK v0.39.2 Release Notes

This release fixes the [issue affecting the accounts migration](https://github.com/cosmos/cosmos-sdk/issues/6828) from v0.38 to v0.39.
This release fixes various bugs and brings coin's denom validation to the *Cosmos SDK 0.39* release series.

See the [Cosmos SDK 0.39.1 milestone](https://github.com/cosmos/cosmos-sdk/milestone/29?closed=1) on our issue tracker for details.
See the [Cosmos SDK 0.39.2 milestone](https://github.com/cosmos/cosmos-sdk/milestone/30?closed=1) on our issue tracker for details.

## Remove custom JSON serialization for account types
## Allow ValidateDenom() to be customised per application

Account types JSON serialization has now changed to Amino. Changes are significant (e.g. integers are treated
as strings) thus it is required to migrate the exported state of an application before restarting the node
with a more recent version of the Cosmos SDK.
Applications can now customise `types.Coin` denomination validation by
replacing `types.CoinDenomRegex` with their application-specific validation function.

## REST server's --unsafe-cors mode
## Upgrade queries don't work after upgrade

This a UX improvement [back ported from master](https://github.com/cosmos/cosmos-sdk/pull/6853) that allows developers to disable CORS
restrictions during app development and testing by passing the `--unsafe-cors` option to the client's `rest-server` command.
New stores can now be registered during an on-chain upgrade. This is to
prevent blockchain state queries from stopping working after a successful upgrade.

## Tendermint 0.33.7
## ApproxRoot() infinite looping

Tendermint 0.33.7 brings an important regression fix. Please refer to [this bug report](https://github.com/tendermint/tendermint/issues/5112) for more information.
The `types.Dec.ApproxRoot()` function has now a maximum number 100 iterations as backup boundary
condition to prevent the client's code from entering an endless loop.

## Go 1.15

This is the first release of the Launchpad series that has been tested and built with **go 1.15**.

## Tendermint's updates

Tendermint has received a few updates in the last development cycle.

The pings frequency for remote private validators and the number of GetPubKey requests
have been reduced to prevent validators from [failing to sync when using remote signers](https://github.com/tendermint/tendermint/issues/5550).

A security vulnerability that affected the Go's `encoding/binary` package was reported.
Tendermint's `v0.33.8` release was published with the objective to aid users in using the correct version of Go.
Please refer to [this bug report](https://github.com/golang/go/issues/40618) for more information.

## Known issues

Keyrings using the `test` backend that were created with applications built with `Cosmos SDK v0.39.1`
and `go 1.15` may break with the following error after re-compiling with `Cosmos SDK v0.39.2`:

```
ERROR: aes.KeyUnwrap(): integrity check failed.
```

This is due to [the update](https://github.com/99designs/keyring/pull/75) that the `jose2go` dependency
has received that made it [fully compatible with go 1.15](https://github.com/dvsekhvalnov/jose2go/issues/26).
2 changes: 1 addition & 1 deletion baseapp/baseapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func TestLoadVersionPruning(t *testing.T) {

for _, v := range []int64{1, 2, 4} {
_, err = app.cms.CacheMultiStoreWithVersion(v)
require.Error(t, err)
require.NoError(t, err)
}

for _, v := range []int64{3, 5, 6, 7} {
Expand Down
20 changes: 12 additions & 8 deletions client/keys/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,21 +216,25 @@ func RunAddCmd(cmd *cobra.Command, args []string, kb keys.Keybase, inBuf *bufio.
}

// Get bip39 mnemonic
var mnemonic string
var bip39Passphrase string
var mnemonic, bip39Passphrase string

if interactive || viper.GetBool(flagRecover) {
bip39Message := "Enter your bip39 mnemonic"
if !viper.GetBool(flagRecover) {
bip39Message = "Enter your bip39 mnemonic, or hit enter to generate one."
recover, _ := cmd.Flags().GetBool(flagRecover)
if recover {
mnemonic, err = input.GetString("Enter your bip39 mnemonic", inBuf)
if err != nil {
return err
}

mnemonic, err = input.GetString(bip39Message, inBuf)
if !bip39.IsMnemonicValid(mnemonic) {
return errors.New("invalid mnemonic")
}
} else if interactive {
mnemonic, err = input.GetString("Enter your bip39 mnemonic, or hit enter to generate one.", inBuf)
if err != nil {
return err
}

if !bip39.IsMnemonicValid(mnemonic) {
if !bip39.IsMnemonicValid(mnemonic) && mnemonic != "" {
return errors.New("invalid mnemonic")
}
}
Expand Down
Loading