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

feat: bump up cosmos [email protected] #783

Merged
merged 62 commits into from
Nov 21, 2022

Conversation

dudong2
Copy link
Contributor

@dudong2 dudong2 commented Nov 3, 2022

Description

bump up cosmos-sdk v0.45.10

major changes

closes: #775

Motivation and context

How has this been tested?

Screenshots (if appropriate):

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

mergify bot and others added 30 commits November 1, 2022 19:15
* feat: improve GetLastCompletedUpgrade

* rename

* use var block
…nterfaces (backport #12603) (#12638)

* feat: Move AppModule.BeginBlock and AppModule.EndBlock to extension interfaces (#12603)

Most modules right now have a no-op for AppModule.BeginBlock and AppModule.EndBlock. We should move these methods off the AppModule interface so we have less deadcode, and instead move them to extension interfaces.

1. I added `BeginBlockAppModule` and `EndBlockAppModule` interface.
2. Remove the dead-code from modules that do no implement them
3. Add type casting in the the module code to use the new interface

Closes: #12462

---

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit b65f3fe)

* remove conflicts

* remove conflicts

* remove unused modules

Co-authored-by: Sishir Giri <[email protected]>
Co-authored-by: marbar3778 <[email protected]>
… balance for a given denom (backport #12674) (#12745)

* feat: Add convenience method for constructing key to access account's balance for a given denom (#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>
* bump tendermint version

* add changelog entry

* replace on jhump

* updates

* updates

* updates

Co-authored-by: Aleksandr Bezobchuk <[email protected]>
* prepare for release

* modify release notes
* fix(docs): typo in staking/state (#12834)

(cherry picked from commit fe89212)

# Conflicts:
#	x/staking/spec/01_state.md

* updates

Co-authored-by: Ari Rubinstein <[email protected]>
Co-authored-by: Julien Robert <[email protected]>
…11737) (#12818)

* fix: Use fixed length hex for pointer at FwdCapabilityKey (backport #11737)

* Update CHANGELOG.md

* add comments and unit tests
* feat: deterministic map iteration (#12781)

We should ensure that events emitted are in a deterministic order on any node.

Sorry, the previous [PR-12693](cosmos/cosmos-sdk#12693) was closed due to wrong operation.

Close: #12693

---

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit 6ed11b8)

* resolve conflict (#12947)

* go mod tidy

* fix test

Co-authored-by: bruce-wayne2 <[email protected]>
Co-authored-by: Julien Robert <[email protected]>
…050)

* fix: missing return statement in BaseApp.Query (#13046)

Closes: #13040

---

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit c73171f)

* fix conflicts

Co-authored-by: Julien Robert <[email protected]>
* chore: v0.45.8 release changelog

* fix issue name
…kport #13107) (#13109)

* fix: call `SetIAVLCacheSize` with the configured value in simapp (#13107)

* Call `SetIAVLCacheSize` with the configured value in simapp.

* Update CHANGELOG.md

(cherry picked from commit ab33342)

* fix conflicts

Co-authored-by: yihuang <[email protected]>
… (backport #12742) (#13120)

* feat: Add a cli cmd to prune old states according to current settings (#12742)

* add PruningCmd and change PruneStores signature

* the mimimum default pruning interval is 10

Co-authored-by: Marko <[email protected]>
(cherry picked from commit d874ace)

* fix backport error and conflicts

Co-authored-by: adu-crypto <[email protected]>
Co-authored-by: adu <[email protected]>
* feat: configurable fastnode (#13321)

(cherry picked from commit 412e2fc)

* fix conflicts

Co-authored-by: Marko <[email protected]>
…drawal (backport #13323) (#13340)

* fix: ensure withdraw_rewards events are always emitted on reward withdrawal (#13323)

(cherry picked from commit c1c23a7)

* fix conflicts

* move changelog to right place

* fix typo

Co-authored-by: Aleksandr Bezobchuk <[email protected]>
Co-authored-by: Julien Robert <[email protected]>
* imp(keyring): improve UX for keyring.List

* use offline info in case of error

* Delete .dccache

* c++

* conflicts
…entation, and configuration (#8664) (#13326)

* feat: ADR-038 Part 2: StreamingService interface, file writing implementation, and configuration (#8664)

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
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
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review.
-->

Hello 👋 this PR introduces the second stage of changes to support [ADR-038](cosmos/cosmos-sdk#8012) state listening. This is rebased on top of the [first segment](cosmos/cosmos-sdk#8551), which introduces the low level changes to the MultiStore and KVStore interfaces and implementations, the new WriteListener types, and the new listen.KVStore type.

In this segment we introduce the StreamingService interface, an implementation that writes out to files, and it's integration and configuration at the BaseApp level.

The idea was to have the first segment reviewed independently first but if people think it is easier/more time efficient to review both at the same time then we could start here.

Thanks!

This work is towards satisfying [ADR-038](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-038-state-listening.md)

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [x] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [x] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [x] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [x] Review `Codecov Report` in the comment section below once CI passes

* fix lint

* Update CHANGELOG.md

Co-authored-by: Ian Norden <[email protected]>
baseapp/msg_service_router.go Outdated Show resolved Hide resolved
.golangci.yml Show resolved Hide resolved
baseapp/testutil/buf.gen.yaml Show resolved Hide resolved
server/mock/app.go Outdated Show resolved Hide resolved
third_party/proto/ostracon/abci/types.proto Outdated Show resolved Hide resolved
types/module/module.go Show resolved Hide resolved
version/version.go Outdated Show resolved Hide resolved
.github/workflows/lint.yml Outdated Show resolved Hide resolved
.goreleaser.yml Outdated Show resolved Hide resolved
baseapp/msg_service_router.go Outdated Show resolved Hide resolved
baseapp/queryrouter.go Show resolved Hide resolved
baseapp/testutil/messages.proto Outdated Show resolved Hide resolved
contrib/devtools/Makefile Outdated Show resolved Hide resolved
proto/cosmos/auth/v1beta1/query.proto Outdated Show resolved Hide resolved
server/rosetta/client_online.go Outdated Show resolved Hide resolved
version/version.go Outdated Show resolved Hide resolved
.golangci.yml Outdated Show resolved Hide resolved
Copy link
Member

@zemyblue zemyblue left a comment

Choose a reason for hiding this comment

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

Please write the major changes in this PR description.

Comment on lines 1 to 37
name: Lint
# Lint runs golangci-lint over the entire cosmos-sdk repository
# This workflow is run on every pull request and push to main
# The `golangci` will pass without running if no *.{go, mod, sum} files have been changed.
env:
GOPRIVATE: "github.com/line/*"
on:
push:
tags:
- v*
branches:
- main
- rc*/*
- release/*
jobs:
golangci:
name: golangci-lint
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- uses: actions/[email protected]
with:
go-version: 1.18
- uses: actions/checkout@v3
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: golangci/golangci-lint-action@master
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.47.2
args: --timeout 10m
github-token: ${{ secrets.GITHUB_TOKEN }}
if: env.GIT_DIFF
Copy link
Member

Choose a reason for hiding this comment

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

Why does this file exist?

// TODO: Consider micro-slashing for missing votes.
//
// Ref: https://github.com/cosmos/cosmos-sdk/issues/2525#issuecomment-430838701
powerFraction := sdk.NewDec(vote.Validator.Power).QuoTruncate(sdk.NewDec(totalPreviousPower))
Copy link
Member

Choose a reason for hiding this comment

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

Our Ostracon should use vote.Validator.VotingWeight instead of vote.Validator.Power, because it is different with tendermint in the power for voting.


return newCacheMergeIterator(parent, cache, ascending)
}

// TODO(dudong2): need to bump up this func - (https://github.com/cosmos/cosmos-sdk/pull/10024)
func findStartIndex(strL []string, startQ string) int {
Copy link
Member

@zemyblue zemyblue Nov 15, 2022

Choose a reason for hiding this comment

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

When I check this code's origin, it came from https://github.com/cosmos/cosmos-sdk/pull/10024/files. But the other test codes was not applied. Please check it.

Copy link
Member

@zemyblue zemyblue left a comment

Choose a reason for hiding this comment

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

Please check the swagger and rest api of cosmos.base.node.v1beta1.Service/Config.
I think rest api supportion is missed in cosmos/cosmos-sdk#13589. The origin code is https://github.com/cosmos/cosmos-sdk/blob/3f71b799226317d125f5376f1a57b9b2e243865a/runtime/app.go#L146-L147.

And in swagger didn't add both PR cosmos/cosmos-sdk#13589 and cosmos/cosmos-sdk#13485.

The next code should be added in client/docs/config.json.

{
  "url": "./tmp-swagger-gen/cosmos/base/node/v1beta1/query.swagger.json",
},

Copy link
Collaborator

@0Tech 0Tech left a comment

Choose a reason for hiding this comment

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

LGTM

require-explanation: false
require-specific: false
require-specific: false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add a new line at the end of file. Mind the indent.

@zemyblue
Copy link
Member

Please use create a merge commit.

@dudong2 dudong2 merged commit 12e60fc into Finschia:rc9/v0.46.0 Nov 21, 2022
@dudong2 dudong2 deleted the dudong2/feat/[email protected] branch November 21, 2022 11:54
This was referenced Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: improvement Changes in existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.