Skip to content

Commit 19f0f92

Browse files
authored
Merge PR #3660: Release v0.32.0
2 parents 05de813 + 6252de8 commit 19f0f92

File tree

195 files changed

+5065
-1279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+5065
-1279
lines changed

CHANGELOG.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# Changelog
22

3+
## 0.32.0
4+
5+
BREAKING CHANGES
6+
7+
* Gaia REST API
8+
* [\#3642](https://github.com/cosmos/cosmos-sdk/pull/3642) `GET /tx/{hash}` now returns `404` instead of `500` if the transaction is not found
9+
10+
* SDK
11+
* [\#3580](https://github.com/cosmos/cosmos-sdk/issues/3580) Migrate HTTP request/response types and utilities to types/rest.
12+
* [\#3592](https://github.com/cosmos/cosmos-sdk/issues/3592) Drop deprecated keybase implementation's New() constructor in
13+
favor of a new crypto/keys.New(string, string) implementation that
14+
returns a lazy keybase instance. Remove client.MockKeyBase,
15+
superseded by crypto/keys.NewInMemory()
16+
* [\#3621](https://github.com/cosmos/cosmos-sdk/issues/3621) staking.GenesisState.Bonds -> Delegations
17+
18+
IMPROVEMENTS
19+
20+
* SDK
21+
* [\#3311] Reconcile the `DecCoin/s` API with the `Coin/s` API.
22+
* [\#3614] Add coin denom length checks to the coins constructors.
23+
* [\#3621](https://github.com/cosmos/cosmos-sdk/issues/3621) remove many inter-module dependancies
24+
* [\#3601] JSON-stringify the ABCI log response which includes the log and message
25+
index.
26+
* [\#3604] Improve SDK funds related error messages and allow for unicode in
27+
JSON ABCI log.
28+
* [\#3620](https://github.com/cosmos/cosmos-sdk/pull/3620) Version command shows build tags
29+
* [\#3638] Add Bcrypt benchmarks & justification of security parameter choice
30+
* [\#3648] Add JSON struct tags to vesting accounts.
31+
32+
* Tendermint
33+
* [\#3618] Upgrade to Tendermint 0.30.03
34+
35+
BUG FIXES
36+
37+
* SDK
38+
* [\#3646](https://github.com/cosmos/cosmos-sdk/issues/3646) `x/mint` now uses total token supply instead of total bonded tokens to calculate inflation
39+
40+
341
## 0.31.2
442

543
BREAKING CHANGES
@@ -527,7 +565,7 @@ BREAKING CHANGES
527565
* [gaiad init] [\#2602](https://github.com/cosmos/cosmos-sdk/issues/2602) New genesis workflow
528566

529567
* SDK
530-
* [simulation] [\#2665](https://github.com/cosmos/cosmos-sdk/issues/2665) only argument to simulation.Invariant is now app
568+
* [simulation] [\#2665](https://github.com/cosmos/cosmos-sdk/issues/2665) only argument to sdk.Invariant is now app
531569

532570
* Tendermint
533571
* Upgrade to version 0.26.0

Gopkg.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
[[override]]
4242
name = "github.com/tendermint/tendermint"
43-
revision = "v0.30.0-rc0"
43+
revision = "v0.30.0"
4444

4545
[[constraint]]
4646
name = "github.com/zondax/ledger-cosmos-go"

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//')
44
COMMIT := $(shell git log -1 --format='%H')
55
BUILD_TAGS = netgo
66
CAT := $(if $(filter $(OS),Windows_NT),type,cat)
7-
BUILD_FLAGS = -tags "${BUILD_TAGS}" -ldflags \
8-
"-X github.com/cosmos/cosmos-sdk/version.Version=${VERSION} \
9-
-X github.com/cosmos/cosmos-sdk/version.Commit=${COMMIT} \
10-
-X github.com/cosmos/cosmos-sdk/version.VendorDirHash=$(shell $(CAT) vendor-deps)"
7+
BUILD_FLAGS = -tags "$(BUILD_TAGS)" -ldflags \
8+
'-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
9+
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
10+
-X github.com/cosmos/cosmos-sdk/version.VendorDirHash=$(shell $(CAT) vendor-deps) \
11+
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(BUILD_TAGS)"'
1112
LEDGER_ENABLED ?= true
1213
GOTOOLS = \
1314
github.com/golang/dep/cmd/dep \

PENDING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ BREAKING CHANGES
1212

1313
* Tendermint
1414

15+
1516
FEATURES
1617

1718
* Gaia REST API

baseapp/baseapp.go

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -628,9 +628,15 @@ func (app *BaseApp) getContextForTx(mode runTxMode, txBytes []byte) (ctx sdk.Con
628628
return
629629
}
630630

631+
type indexedABCILog struct {
632+
MsgIndex int `json:"msg_index"`
633+
Success bool `json:"success"`
634+
Log string `json:"log"`
635+
}
636+
631637
// runMsgs iterates through all the messages and executes them.
632638
func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg, mode runTxMode) (result sdk.Result) {
633-
logs := make([]string, 0, len(msgs))
639+
idxlogs := make([]indexedABCILog, 0, len(msgs)) // a list of JSON-encoded logs with msg index
634640

635641
var data []byte // NOTE: we just append them all (?!)
636642
var tags sdk.Tags // also just append them all
@@ -659,23 +665,28 @@ func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg, mode runTxMode) (re
659665
tags = append(tags, sdk.MakeTag(sdk.TagAction, msg.Type()))
660666
tags = append(tags, msgResult.Tags...)
661667

668+
idxLog := indexedABCILog{MsgIndex: msgIdx, Log: msgResult.Log}
669+
662670
// stop execution and return on first failed message
663671
if !msgResult.IsOK() {
664-
logs = append(logs, fmt.Sprintf("Msg %d failed: %s", msgIdx, msgResult.Log))
672+
idxLog.Success = false
673+
idxlogs = append(idxlogs, idxLog)
674+
665675
code = msgResult.Code
666676
codespace = msgResult.Codespace
667677
break
668678
}
669679

670-
// construct usable logs in multi-message transactions
671-
logs = append(logs, fmt.Sprintf("Msg %d: %s", msgIdx, msgResult.Log))
680+
idxLog.Success = true
681+
idxlogs = append(idxlogs, idxLog)
672682
}
673683

684+
logJSON := codec.Cdc.MustMarshalJSON(idxlogs)
674685
result = sdk.Result{
675686
Code: code,
676687
Codespace: codespace,
677688
Data: data,
678-
Log: strings.Join(logs, "\n"),
689+
Log: strings.TrimSpace(string(logJSON)),
679690
GasUsed: ctx.GasMeter().GasConsumed(),
680691
Tags: tags,
681692
}

baseapp/baseapp_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ func TestBaseAppOptionSeal(t *testing.T) {
256256
}
257257

258258
func TestSetMinGasPrices(t *testing.T) {
259-
minGasPrices := sdk.DecCoins{sdk.NewDecCoin("stake", 5000)}
259+
minGasPrices := sdk.DecCoins{sdk.NewInt64DecCoin("stake", 5000)}
260260
app := newBaseApp(t.Name(), SetMinGasPrices(minGasPrices.String()))
261261
require.Equal(t, minGasPrices, app.minGasPrices)
262262
}

client/keys/add.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/cosmos/cosmos-sdk/cmd/gaia/app"
1414
"github.com/cosmos/cosmos-sdk/crypto/keys"
1515
sdk "github.com/cosmos/cosmos-sdk/types"
16+
"github.com/cosmos/cosmos-sdk/types/rest"
1617

1718
"errors"
1819

@@ -399,7 +400,7 @@ func AddNewKeyRequestHandler(indent bool) http.HandlerFunc {
399400

400401
keyOutput.Mnemonic = mnemonic
401402

402-
PostProcessResponse(w, cdc, keyOutput, indent)
403+
rest.PostProcessResponse(w, cdc, keyOutput, indent)
403404
}
404405
}
405406

@@ -488,6 +489,6 @@ func RecoverRequestHandler(indent bool) http.HandlerFunc {
488489
return
489490
}
490491

491-
PostProcessResponse(w, cdc, keyOutput, indent)
492+
rest.PostProcessResponse(w, cdc, keyOutput, indent)
492493
}
493494
}

client/keys/list.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package keys
33
import (
44
"net/http"
55

6+
"github.com/cosmos/cosmos-sdk/types/rest"
67
"github.com/spf13/cobra"
78
)
89

@@ -49,7 +50,7 @@ func QueryKeysRequestHandler(indent bool) http.HandlerFunc {
4950
}
5051
// an empty list will be JSONized as null, but we want to keep the empty list
5152
if len(infos) == 0 {
52-
PostProcessResponse(w, cdc, []string{}, indent)
53+
rest.PostProcessResponse(w, cdc, []string{}, indent)
5354
return
5455
}
5556
keysOutput, err := Bech32KeysOutput(infos)
@@ -58,6 +59,6 @@ func QueryKeysRequestHandler(indent bool) http.HandlerFunc {
5859
_, _ = w.Write([]byte(err.Error()))
5960
return
6061
}
61-
PostProcessResponse(w, cdc, keysOutput, indent)
62+
rest.PostProcessResponse(w, cdc, keysOutput, indent)
6263
}
6364
}

client/keys/show.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"github.com/tendermint/tendermint/crypto"
88

99
"github.com/cosmos/cosmos-sdk/crypto/keys"
10+
"github.com/cosmos/cosmos-sdk/types/rest"
1011

1112
"errors"
1213

@@ -188,6 +189,6 @@ func GetKeyRequestHandler(indent bool) http.HandlerFunc {
188189
return
189190
}
190191

191-
PostProcessResponse(w, cdc, keyOutput, indent)
192+
rest.PostProcessResponse(w, cdc, keyOutput, indent)
192193
}
193194
}

0 commit comments

Comments
 (0)