Skip to content

Commit 282a0f0

Browse files
author
Alessio Treglia
authored
Merge branch 'master' into robert/errors-wrap
2 parents 6a3e69e + 553aac5 commit 282a0f0

Some content is hidden

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

75 files changed

+2238
-1939
lines changed

.github/workflows/proto.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,28 @@ name: Protobuf
33
# This workflow is only run when a .proto file has been changed
44
on:
55
pull_request:
6-
paths:
7-
- "**.proto"
6+
87
jobs:
98
lint:
109
runs-on: ubuntu-latest
1110
timeout-minutes: 5
1211
steps:
1312
- uses: actions/checkout@master
13+
- uses: technote-space/get-diff-action@v4
14+
with:
15+
PATTERNS: |
16+
**/**.proto
1417
- name: lint
1518
run: make proto-lint
19+
if: env.GIT_DIFF
1620
breakage:
1721
runs-on: ubuntu-latest
1822
steps:
1923
- uses: actions/checkout@master
24+
- uses: technote-space/get-diff-action@v4
25+
with:
26+
PATTERNS: |
27+
**/**.proto
2028
- name: check-breakage
2129
run: make proto-check-breaking
30+
if: env.GIT_DIFF

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@ Ref: https://keepachangelog.com/en/1.0.0/
4040

4141
* [\#8559](https://github.com/cosmos/cosmos-sdk/pull/8559) Added Protobuf compatible secp256r1 ECDSA signatures.
4242
* [\#8786](https://github.com/cosmos/cosmos-sdk/pull/8786) Enabled secp256r1 in x/auth.
43-
43+
* (rosetta) [\#8729](https://github.com/cosmos/cosmos-sdk/pull/8729) Data API fully supports balance tracking. Construction API can now construct any message supported by the application.
4444

4545
### Client Breaking Changes
4646

4747
* [\#8363](https://github.com/cosmos/cosmos-sdk/pull/8363) Addresses no longer have a fixed 20-byte length. From the SDK modules' point of view, any 1-255 bytes-long byte array is a valid address.
4848
* [\#8346](https://github.com/cosmos/cosmos-sdk/pull/8346) All CLI `tx` commands generate ServiceMsgs by default. Graceful Amino support has been added to ServiceMsgs to support signing legacy Msgs.
4949
* (crypto/ed25519) [\#8690] Adopt zip1215 ed2559 verification rules.
50+
* [\#8849](https://github.com/cosmos/cosmos-sdk/pull/8849) Upgrade module no longer supports time based upgrades.
5051

5152

5253
### API Breaking Changes
@@ -66,8 +67,6 @@ Ref: https://keepachangelog.com/en/1.0.0/
6667
### State Machine Breaking
6768

6869
* (x/{bank,distrib,gov,slashing,staking}) [\#8363](https://github.com/cosmos/cosmos-sdk/issues/8363) Store keys have been modified to allow for variable-length addresses.
69-
* (x/ibc) [\#8266](https://github.com/cosmos/cosmos-sdk/issues/8266) Add amino JSON for IBC messages in order to support Ledger text signing.
70-
* (x/ibc) [\#8405](https://github.com/cosmos/cosmos-sdk/pull/8405) Refactor IBC client update governance proposals to use a substitute client to update a frozen or expired client.
7170
* (x/evidence) [\#8502](https://github.com/cosmos/cosmos-sdk/pull/8502) `HandleEquivocationEvidence` persists the evidence to state.
7271
* (x/gov) [\#7733](https://github.com/cosmos/cosmos-sdk/pull/7733) ADR 037 Implementation: Governance Split Votes
7372
* (x/bank) [\#8656](https://github.com/cosmos/cosmos-sdk/pull/8656) balance and supply are now correctly tracked via `coin_spent`, `coin_received`, `coinbase` and `burn` events.
@@ -78,15 +77,16 @@ Ref: https://keepachangelog.com/en/1.0.0/
7877

7978
* (x/bank) [\#8614](https://github.com/cosmos/cosmos-sdk/issues/8614) Add `Name` and `Symbol` fields to denom metadata
8079
* (x/auth) [\#8522](https://github.com/cosmos/cosmos-sdk/pull/8522) Allow to query all stored accounts
81-
* (x/ibc) [\#7949](https://github.com/cosmos/cosmos-sdk/issues/7949) Standardized channel `Acknowledgement` moved to its own file. Codec registration redundancy removed.
8280
* (crypto/types) [\#8600](https://github.com/cosmos/cosmos-sdk/pull/8600) `CompactBitArray`: optimize the `NumTrueBitsBefore` method and add an `Equal` method.
81+
* (grpc) [\#8815](https://github.com/cosmos/cosmos-sdk/pull/8815) Add orderBy parameter to `TxsByEvents` endpoint.
8382

8483
### Bug Fixes
8584

8685
* (keyring) [#\8635](https://github.com/cosmos/cosmos-sdk/issues/8635) Remove hardcoded default passphrase value on `NewMnemonic`
8786
* (x/bank) [\#8434](https://github.com/cosmos/cosmos-sdk/pull/8434) Fix legacy REST API `GET /bank/total` and `GET /bank/total/{denom}` in swagger
8887
* (x/slashing) [\#8427](https://github.com/cosmos/cosmos-sdk/pull/8427) Fix query signing infos command
8988
* (server) [\#8399](https://github.com/cosmos/cosmos-sdk/pull/8399) fix gRPC-web flag default value
89+
* (crypto) [\#8841](https://github.com/cosmos/cosmos-sdk/pull/8841) Fix legacy multisig amino marshaling, allowing migrations to work between v0.39 and v0.40+.
9090

9191
## [v0.42.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.0) - 2021-03-08
9292

buf.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ lint:
2626
breaking:
2727
use:
2828
- FILE
29+
except:
30+
- FIELD_NO_DELETE
2931
ignore:
3032
- tendermint
3133
- gogoproto

client/flags/flags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func AddTxFlagsToCmd(cmd *cobra.Command) {
110110
cmd.Flags().Bool(FlagGenerateOnly, false, "Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase is not accessible)")
111111
cmd.Flags().Bool(FlagOffline, false, "Offline mode (does not allow any online functionality")
112112
cmd.Flags().BoolP(FlagSkipConfirmation, "y", false, "Skip tx broadcasting prompt confirmation")
113-
cmd.Flags().String(FlagKeyringBackend, DefaultKeyringBackend, "Select keyring's backend (os|file|kwallet|pass|test)")
113+
cmd.Flags().String(FlagKeyringBackend, DefaultKeyringBackend, "Select keyring's backend (os|file|kwallet|pass|test|memory)")
114114
cmd.Flags().String(FlagSignMode, "", "Choose sign mode (direct|amino-json), this is an advanced feature")
115115
cmd.Flags().Uint64(FlagTimeoutHeight, 0, "Set a block timeout height to prevent the tx from being committed past a certain height")
116116
cmd.Flags().String(FlagFeeAccount, "", "Fee account pays fees for the transaction instead of deducting from the signer")

codec/types/any.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package types
22

33
import (
4+
fmt "fmt"
5+
46
"github.com/gogo/protobuf/proto"
57

68
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
@@ -116,3 +118,26 @@ func (any *Any) pack(x proto.Message) error {
116118
func (any *Any) GetCachedValue() interface{} {
117119
return any.cachedValue
118120
}
121+
122+
// GoString returns a string representing valid go code to reproduce the current state of
123+
// the struct.
124+
func (any *Any) GoString() string {
125+
if any == nil {
126+
return "nil"
127+
}
128+
extra := ""
129+
if any.XXX_unrecognized != nil {
130+
extra = fmt.Sprintf(",\n XXX_unrecognized: %#v,\n", any.XXX_unrecognized)
131+
}
132+
return fmt.Sprintf("&Any{TypeUrl: %#v,\n Value: %#v%s\n}",
133+
any.TypeUrl, any.Value, extra)
134+
}
135+
136+
// String implements the stringer interface
137+
func (any *Any) String() string {
138+
if any == nil {
139+
return "nil"
140+
}
141+
return fmt.Sprintf("&Any{TypeUrl:%v,Value:%v,XXX_unrecognized:%v}",
142+
any.TypeUrl, any.Value, any.XXX_unrecognized)
143+
}

codec/types/any.pb.go

Lines changed: 12 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codec/types/any_internal_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,15 @@ func TestAnyPackUnpack(t *testing.T) {
5151
require.NoError(t, err)
5252
require.Equal(t, spot, animal)
5353
}
54+
55+
func TestString(t *testing.T) {
56+
require := require.New(t)
57+
spot := &Dog{Name: "Spot"}
58+
any, err := NewAnyWithValue(spot)
59+
require.NoError(err)
60+
61+
require.Equal("&Any{TypeUrl:/tests/dog,Value:[10 4 83 112 111 116],XXX_unrecognized:[]}", any.String())
62+
require.Equal(`&Any{TypeUrl: "/tests/dog",
63+
Value: []byte{0xa, 0x4, 0x53, 0x70, 0x6f, 0x74}
64+
}`, any.GoString())
65+
}

contrib/rosetta/configuration/bootstrap.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
{
33
"account_identifier": {
4-
"address":"cosmos158nkd0l9tyemv2crp579rmj8dg37qty8lzff88"
4+
"address":"cosmos1ujtnemf6jmfm995j000qdry064n5lq854gfe3j"
55
},
66
"currency":{
77
"symbol":"stake",

contrib/rosetta/configuration/data.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ sleep 10
4545

4646
# send transaction to deterministic address
4747
echo sending transaction with addr $addr
48-
simd tx bank send "$addr" cosmos1wjmt63j4fv9nqda92nsrp2jp2vsukcke4va3pt 100stake --yes --keyring-backend=test --broadcast-mode=block --chain-id=testing
48+
simd tx bank send "$addr" cosmos19g9cm8ymzchq2qkcdv3zgqtwayj9asv3hjv5u5 100stake --yes --keyring-backend=test --broadcast-mode=block --chain-id=testing
4949

5050
sleep 10
5151

contrib/rosetta/configuration/rosetta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"constructor_dsl_file": "transfer.ros",
2626
"end_conditions": {
2727
"create_account": 1,
28-
"transfer": 3
28+
"transfer": 1
2929
}
3030
},
3131
"data": {

0 commit comments

Comments
 (0)