Skip to content

Commit 7d3a610

Browse files
daeMOn63ebuchmanmergify[bot]RiccardoMryanchristo
authored
chores: update to v0.42.6 (cosmos#95)
* CLI: `query ibc-transfer escrow-address` (cosmos#9383) * Fix the liveliness test Docker error (cosmos#9396) (cosmos#9402) (cherry picked from commit 44a4138) Co-authored-by: Riccardo Montagnin <[email protected]> * docs: fix broken interfaces links (backport cosmos#9448) (cosmos#9478) * fix interfaces links (cosmos#9448) Co-authored-by: ryanchrypto <[email protected]> Co-authored-by: Amaury <[email protected]> (cherry picked from commit 37fc37d) # Conflicts: # docs/building-modules/messages-and-queries.md # docs/building-modules/module-interfaces.md # docs/building-modules/module-manager.md # docs/building-modules/query-services.md * resolve merge conflicts * revert rename codec Co-authored-by: Ryan Christoffersen <[email protected]> Co-authored-by: ryanchrypto <[email protected]> * backport: fix ibc genesis export bug (cosmos#9401) * correctly set next identifier sequence in genesis export for clients/connections/channels * add changelog * fix linting (cosmos#9531) * fix: testnet cli command update genesis supply (backport cosmos#9497) (cosmos#9513) * fix: testnet cli command update genesis supply (cosmos#9497) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description closes: cosmos#9372 <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> ### This PR makes the `testnet` command update the bank genesis supply. When using the `testnet` cli command, it creates nodes and balances, but does **not** update the supply. When using this in conjunction with `add-genesis-account` which **does** update the supply, it creates an invalid genesis file. This PR updates the testnet command to properly set the supply. * feat: add header hash to `Context` (backport cosmos#9390) (cosmos#9395) * feat: add header hash to `Context` (cosmos#9390) * baseapp, types: add header hash to * changelog (cherry picked from commit 151d6c5) # Conflicts: # CHANGELOG.md * Fix conflicts Co-authored-by: Federico Kunze <[email protected]> Co-authored-by: Amaury M <[email protected]> * fix: x/gov deposits querier (Initial Deposit) (backport cosmos#9288) (cosmos#9453) * fix: x/gov deposits querier (Initial Deposit) (cosmos#9288) * copied from old PR * fix errors * add test * Update x/gov/client/utils/query.go Co-authored-by: Robert Zaremba <[email protected]> * fix tests * fix failing test * add test * update test * fix tests * fix deposit query * fix test * update tests * add more tests * address lint error * address lint error * review changes Co-authored-by: Robert Zaremba <[email protected]> (cherry picked from commit 66ee994) # Conflicts: # CHANGELOG.md # x/gov/client/cli/query.go # x/gov/client/testutil/cli_test.go # x/gov/client/utils/query.go * resolve conflicts Co-authored-by: MD Aleem <[email protected]> Co-authored-by: aleem1314 <[email protected]> * feat: add `RefundGas` function to `GasMeter` (backport cosmos#9403) (cosmos#9444) * feat: add `RefundGas` function to `GasMeter` (cosmos#9403) * feat: add RefundGas function to GasMeter * changelog * add comment about use case * Apply suggestions from code review Co-authored-by: Alessio Treglia <[email protected]> Co-authored-by: Amaury <[email protected]> (cherry picked from commit 90edeb6) # Conflicts: # CHANGELOG.md * conflicts * fix * Update CHANGELOG.md Co-authored-by: Amaury <[email protected]> Co-authored-by: Federico Kunze <[email protected]> Co-authored-by: Federico Kunze <[email protected]> Co-authored-by: Amaury <[email protected]> * fix: Bank module init genesis optimization (backport cosmos#9428) (cosmos#9440) * fix: Bank module init genesis optimization (cosmos#9428) * optimize the bank module genesis initialization * remove k.setBalances & k.clearBalances and update changelog * fix lint Co-authored-by: Aaron Craelius <[email protected]> (cherry picked from commit 2ae7875) # Conflicts: # CHANGELOG.md # x/bank/keeper/genesis.go # x/bank/keeper/send.go * fix conflicts * Update CHANGELOG.md Co-authored-by: yys <[email protected]> Co-authored-by: Amaury M <[email protected]> * fix: update simapp to use correct default broadcast mode (backport cosmos#9408) (cosmos#9527) * fix: update simapp to use correct default broadcast mode (cosmos#9408) (cherry picked from commit 80330ec) * Add changelog Co-authored-by: Aleksandr Bezobchuk <[email protected]> Co-authored-by: Amaury M <[email protected]> * Backport: IBC query header/node-state fixes (cosmos#9385) * fix ibc query header/node-state cmds * changelog Co-authored-by: Amaury M <[email protected]> * build(deps): tendermint version (backport cosmos#9541) (cosmos#9542) * build(deps): tendermint version (cosmos#9541) * bump tendermint version * go mod tidy (cherry picked from commit e4673ad) * add changelog entry * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Marko <[email protected]> Co-authored-by: Amaury <[email protected]> * feat: add cosmos-sdk Version (backport cosmos#9429) (cosmos#9543) * feat: add cosmos-sdk Version (cosmos#9429) <!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺ v ✰ Thanks for creating a PR! ✰ 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 ☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --> ## Description Add CosmosSDKVersion to nodeInfo. closes: cosmos#9420 (cherry picked from commit 105ad99) # Conflicts: # CHANGELOG.md # CONTRIBUTING.md # docs/core/proto-docs.md * resolve conflicts * resolve conflicts Co-authored-by: Marko <[email protected]> * fix: set header hash every block (backport cosmos#9552) (cosmos#9555) * fix: set header hash every block (cosmos#9552) ## Description - Sets the header hash on every block (ref cosmos#9390). Previously was only set during initialization for `deliverState`. - Closes cosmos#9514 <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> * chore: Update release notes and Changelog for 0.42.6 (cosmos#9544) * Update release notes * Clean up changelog Co-authored-by: Ethan Buchman <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Riccardo Montagnin <[email protected]> Co-authored-by: Ryan Christoffersen <[email protected]> Co-authored-by: ryanchrypto <[email protected]> Co-authored-by: colin axnér <[email protected]> Co-authored-by: Marko <[email protected]> Co-authored-by: Federico Kunze <[email protected]> Co-authored-by: Amaury M <[email protected]> Co-authored-by: MD Aleem <[email protected]> Co-authored-by: aleem1314 <[email protected]> Co-authored-by: Federico Kunze <[email protected]> Co-authored-by: yys <[email protected]> Co-authored-by: Aleksandr Bezobchuk <[email protected]>
1 parent a59a3d4 commit 7d3a610

File tree

120 files changed

+842
-304
lines changed

Some content is hidden

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

120 files changed

+842
-304
lines changed

.golangci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ issues:
5656
- text: "ST1016:"
5757
linters:
5858
- stylecheck
59+
- text: "SA1019: codec.LegacyAmino is deprecated"
60+
linters:
61+
- staticcheck
5962
max-issues-per-linter: 10000
6063
max-same-issues: 10000
6164

CHANGELOG.md

+23
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,33 @@ Ref: https://keepachangelog.com/en/1.0.0/
3434

3535
# Changelog
3636

37+
## [v0.42.6](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.6) - 2021-06-18
38+
39+
### Improvements
40+
41+
* [\#9428](https://github.com/cosmos/cosmos-sdk/pull/9428) Optimize bank InitGenesis. Added `k.initBalances`.
42+
* [\#9429](https://github.com/cosmos/cosmos-sdk/pull/9429) Add `cosmos_sdk_version` to node_info
43+
* [\#9541](https://github.com/cosmos/cosmos-sdk/pull/9541) Bump tendermint dependency to v0.34.11.
44+
45+
### Bug Fixes
46+
47+
* [\#9385](https://github.com/cosmos/cosmos-sdk/pull/9385) Fix IBC `query ibc client header` cli command. Support historical queries for query header/node-state commands.
48+
* [\#9401](https://github.com/cosmos/cosmos-sdk/pull/9401) Fixes incorrect export of IBC identifier sequences. Previously, the next identifier sequence for clients/connections/channels was not set during genesis export. This resulted in the next identifiers being generated on the new chain to reuse old identifiers (the sequences began again from 0).
49+
* [\#9408](https://github.com/cosmos/cosmos-sdk/pull/9408) Update simapp to use correct default broadcast mode.
50+
* [\#9513](https://github.com/cosmos/cosmos-sdk/pull/9513) Fixes testnet CLI command. Testnet now updates the supply in genesis. Previously, when using add-genesis-account and testnet together, inconsistent genesis files would be produced, as only add-genesis-account was updating the supply.
51+
* (x/gov) [\#8813](https://github.com/cosmos/cosmos-sdk/pull/8813) fix `GET /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits` to include initial deposit
52+
53+
### Features
54+
55+
* [\#9383](https://github.com/cosmos/cosmos-sdk/pull/9383) New CLI command `query ibc-transfer escrow-address <port> <channel id>` to get the escrow address for a channel; can be used to then query balance of escrowed tokens
56+
* (baseapp, types) [#\9390](https://github.com/cosmos/cosmos-sdk/pull/9390) Add current block header hash to `Context`
57+
* (store) [\#9403](https://github.com/cosmos/cosmos-sdk/pull/9403) Add `RefundGas` function to `GasMeter` interface
58+
3759
## [v0.42.5](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.5) - 2021-05-18
3860

3961
### Bug Fixes
4062

63+
* [\#9514](https://github.com/cosmos/cosmos-sdk/issues/9514) Fix panic when retrieving the `BlockGasMeter` on `(Re)CheckTx` mode.
4164
* [\#9235](https://github.com/cosmos/cosmos-sdk/pull/9235) CreateMembershipProof/CreateNonMembershipProof now returns an error
4265
if input key is empty, or input data contains empty key.
4366
* [\#9108](https://github.com/cosmos/cosmos-sdk/pull/9108) Fixed the bug with querying multisig account, which is not showing threshold and public_keys.

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ All PRs require two Reviews before merge (except docs changes, or variable name-
9797
If you open a PR on the Cosmos SDK, it is mandatory to update the relevant documentation in /docs.
9898

9999
- If your change relates to the core SDK (baseapp, store, ...), please update the `docs/basics/`, `docs/core/` and/or `docs/building-modules/` folders.
100-
- If your changes relate to the core of the CLI or Light-client (not specifically to module's CLI/Rest), please modify the `docs/interfaces/` folder.
100+
- If your changes relate to the core of the CLI (not specifically to module's CLI/Rest), please modify the `docs/run-node/` folder.
101101
- If your changes relate to a module, please update the module's spec in `x/moduleName/docs/spec/`.
102102

103103
## Forking

RELEASE_NOTES.md

+13-16
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
1-
# Cosmos SDK v0.42.5 "Stargate" Release Notes
1+
# Cosmos SDK v0.42.6 "Stargate" Release Notes
22

33
This release includes various minor bugfixes and improvments, including:
44

5-
- Fix support for building the Cosmos SDK on ARM architectures,
6-
- Fix the `[appd] keys show/list` CLI subcommands for multisigs,
7-
- Internal code performance improvment.
5+
- x/bank's InitGenesis optimization, which should significantly decrease genesis initialization time,
6+
- bump Tendermint to v0.34.11 to fix state sync issues,
7+
- add `cosmos_sdk_version` to `node_info` to be able to query the SDK version used by a node,
8+
- IBC bugfixes and improvements (see below for more info),
9+
- new fields on `sdk.Context` (see below for more info).
810

9-
It also introduces one new feature: adding the `[appd] config` subcommand back to the SDK.
11+
See the [Cosmos SDK v0.42.6 milestone](https://github.com/cosmos/cosmos-sdk/milestone/45?closed=1) on our issue tracker for the exhaustive list of all changes.
1012

11-
See the [Cosmos SDK v0.42.5 milestone](https://github.com/cosmos/cosmos-sdk/milestone/44?closed=1) on our issue tracker for the exhaustive list of all changes.
13+
### IBC Bugfixes and Improvements
1214

13-
### The `config` Subcommand
15+
The `[appd] query ibc client header` is fixed and allows querying by height for the header and node-state command. This allows easier venerability of which IBC tokens belong to which chains. IBC's ExportGenesis now exports all fields, including previously missing `NextClientSequence`, `NextConnectionSequence` and `NextChannelSequence`. A new subcommand `[appd] query ibc-transfer escrow-address` has been added to get the escrow address for a channel; it can be used to then query balance of escrowed tokens.
1416

15-
One new feature introduced in the Stargate series was the merging of the two CLI binaries `[appd]` and `[appcli]` into one single application binary. In this process, the `[appcli] config` subcommand, which was used to save client-side configuration into a TOML file, was removed.
17+
### New Fields on `sdk.Context`
1618

17-
Due to [popular demand](https://github.com/cosmos/cosmos-sdk/issues/8529), we have introduced this feature back to the SDK, under the `[appd] config` subcommand. The functionality is as follows:
19+
Two fields have been added on `sdk.Context`:
1820

19-
- `[appd] config`: Output all client-side configuration.
20-
- `[appd] config [config-name]`: Get the given configuration (e.g. `keyring-backend` or `node-id`).
21-
- `[appd] config [config-name] [config-value]`: Set and persist the given configuration with the new value.
22-
23-
All configurations are persisted to the filesystem, under the path `$APP_HOME/config/client.toml`. For the list of all possible client-side configurations, please have a look at this `client.toml` file, as it is heavily commented.
24-
25-
Environment variables binding to client-side configuration also works. For example, the command `KEYRING_BACKEND=os [appd] tx bank send ...` will bind ENV variable to the `keyring-backend` config. The order or precedence for config is: `flags > env vars > client.toml file`.
21+
- `ctx.HeaderHash` adds the current block header hash obtained during abci.RequestBeginBlock to the Context,
22+
- `ctx.GasMeter().RefundGas(<amount>, <description>)` adds support for refunding gas directly to the gas meter.

baseapp/abci.go

+13-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,19 @@ func (app *BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeg
173173
gasMeter = sdk.NewInfiniteGasMeter()
174174
}
175175

176-
app.deliverState.ctx = app.deliverState.ctx.WithBlockGasMeter(gasMeter)
176+
// NOTE: header hash is not set in NewContext, so we manually set it here
177+
178+
app.deliverState.ctx = app.deliverState.ctx.
179+
WithBlockGasMeter(gasMeter).
180+
WithHeaderHash(req.Hash)
181+
182+
// we also set block gas meter to checkState in case the application needs to
183+
// verify gas consumption during (Re)CheckTx
184+
if app.checkState != nil {
185+
app.checkState.ctx = app.checkState.ctx.
186+
WithBlockGasMeter(gasMeter).
187+
WithHeaderHash(req.Hash)
188+
}
177189

178190
if app.beginBlocker != nil {
179191
res = app.beginBlocker(app.deliverState.ctx, req)

baseapp/baseapp_test.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,11 @@ func TestCheckTx(t *testing.T) {
950950

951951
// If a block is committed, CheckTx state should be reset.
952952
header := tmproto.Header{Height: 1}
953-
app.BeginBlock(abci.RequestBeginBlock{Header: header})
953+
app.BeginBlock(abci.RequestBeginBlock{Header: header, Hash: []byte("hash")})
954+
955+
require.NotNil(t, app.checkState.ctx.BlockGasMeter(), "block gas meter should have been set to checkState")
956+
require.NotEmpty(t, app.checkState.ctx.HeaderHash())
957+
954958
app.EndBlock(abci.RequestEndBlock{})
955959
app.Commit()
956960

client/docs/statik/init.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package statik
22

3-
//This just for fixing the error in importing empty github.com/cosmos/cosmos-sdk/client/docs/statik
3+
// This just for fixing the error in importing empty github.com/cosmos/cosmos-sdk/client/docs/statik

0 commit comments

Comments
 (0)