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] #468

Merged
merged 605 commits into from
Mar 23, 2022
Merged

feat: bump up cosmos [email protected] #468

merged 605 commits into from
Mar 23, 2022

Conversation

dudong2
Copy link
Contributor

@dudong2 dudong2 commented Mar 16, 2022

Description

Version up lbm-sdk to [email protected].
closes: #XXXX

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

tac0turtle and others added 30 commits March 16, 2022 22:18
Bumps [github.com/confio/ics23/go](https://github.com/confio/ics23) from 0.6.3 to 0.6.6.
- [Release notes](https://github.com/confio/ics23/releases)
- [Commits](cosmos/ics23@v0.6.3...go/v0.6.6)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.4.0 to v1.4.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](codecov/codecov-action@v1.4.0...967e2b3)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* add basics for permanent locked vesting account support

* remove sdk.Msg support for PermanentLockedVestingAccount

* add tests for PermanentLockedVestingAccount

* remove unecessary tests

* drop unecessary create vesting acct msgs

* Update x/auth/vesting/types/vesting_account.go

Co-authored-by: Aaron Craelius <[email protected]>

* Update x/auth/vesting/types/vesting_account.go

Co-authored-by: Aaron Craelius <[email protected]>

* Update x/auth/vesting/types/vesting_account.go

Co-authored-by: Aaron Craelius <[email protected]>

* Update x/auth/vesting/types/vesting_account_test.go

Co-authored-by: Aaron Craelius <[email protected]>

* Review changes

* Factorize init function

* Factorize more

* Comments

* Fix build after rename

Co-authored-by: Amaury <[email protected]>
Co-authored-by: Aaron Craelius <[email protected]>
* add governance hooks

* fix lint

* fix lint

* CHANGELOG

* sh -> gh

* improve comments

* add test

* add more tests

* rename two of the hooks

Co-authored-by: ahmedaly113 <[email protected]>
… (#9163)

Ensure that we don't pass overflowed values into make, because
a clever attacker could see that to cause:

    (bits+7)/8

to become negative, they just have to make (bits+7) become negative
simply by >=maxint-6

but also reject unreasonably large element count like >2**32, which
while arbitrary is super duper large for a bit array.

Fixes #9162
…(#9167)

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.20.0 to 0.21.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.20.0...v0.21.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Otherwise, NewDecFromStr may accept very large input, causing Dec
methods panic, e.g Dec.TruncateInt

Found by oss-fuzz: https://oss-fuzz.com/testcase-detail/6454129938530304

Fixes #9160
the getting started link is busted, how about we send folks to Starport? and fix a few minor editorial nits

Make integration test suites reusable by apps (#6711)

* WIP on refactoring new integration tests.

* godocs

* godocs

* Fix ineff assign

* Updates

* Updates

* fix test

* refactor crisis, distr testsuites

* fix import issue

* refactor x/auth

* refactor x/authz

* refactor x/evidence

* refactor x/feegrant

* refactor x/genutil

* refactor x/gov

* refactor x/mint

* refactor x/params

* refactor x/{auth_vesting, slashing, staking}

* fix lint

* fix tests & lint

* fix lint

* fix tests

* lint

* lint

* fix lint memory

* add missing `norace` build flag

* update feegrant cfg

* fix lint

Co-authored-by: atheesh <[email protected]>
Co-authored-by: atheeshp <[email protected]>

build(deps): bump github.com/armon/go-metrics from 0.3.6 to 0.3.7 (#9187)

Bumps [github.com/armon/go-metrics](https://github.com/armon/go-metrics) from 0.3.6 to 0.3.7.
- [Release notes](https://github.com/armon/go-metrics/releases)
- [Commits](hashicorp/go-metrics@v0.3.6...v0.3.7)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze <[email protected]>
Bumps [github.com/grpc-ecosystem/go-grpc-middleware](https://github.com/grpc-ecosystem/go-grpc-middleware) from 1.2.2 to 1.3.0.
- [Release notes](https://github.com/grpc-ecosystem/go-grpc-middleware/releases)
- [Changelog](https://github.com/grpc-ecosystem/go-grpc-middleware/blob/master/CHANGELOG.md)
- [Commits](grpc-ecosystem/go-grpc-middleware@v1.2.2...v1.3.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* remove IBC ADRs

* remove ADR references from README

Co-authored-by: Marko <[email protected]>
Co-authored-by: Amaury <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* setup: reuses proto container

* push docker image

* set image name

* revert and use latest

Co-authored-by: marbar3778 <[email protected]>
Co-authored-by: Amaury <[email protected]>
Proposal for expanding the ADR committee
…x,SetIndex (#9196)

Fixes unchecked negative index access that'd cause panics, in CompactBitArray's:
* CompactUnmarshal, which blindly used the result of binary.Uvarint
* GetIndex
* SetIndex

Fixes #9164
Fixes #9165
* simulation genesis changes

* update msg types

* refactor

* update operations test

* fix sims

* fix tests

* fix tests

* address review changes

Co-authored-by: Marie Gauthier <[email protected]>

Co-authored-by: Marie Gauthier <[email protected]>
* Updates to Genesis

* Move grpc_query tests to keeper pkg

* Unify CLI command usage message

* Use timestamp for time based expiration in cli

* Update FlagExpiration

* Update wording

* Add test case for invalid expiration

* Update cli Long description

* Update exp date examples

* Use constants
* Add labeler action

* Update .github/labeler.yml

* Update .github/labeler.yml

* update labels

* update labels

* Update .github/labeler.yml

* update labels
* update contributor docs

* revert changes to release section

* fix formatting

Co-authored-by: Marko <[email protected]>
* Squashed commit of the following:

commit 58dc50051226a9eeb8d0ebea5bb0908fe5b9637f
Author: technicallyty <[email protected]>
Date:   Fri Apr 23 15:09:27 2021 -0700

    remove comments

commit a84107e1b3eaa31324cb0f4f097b49f02af79c69
Author: technicallyty <[email protected]>
Date:   Fri Apr 23 15:02:41 2021 -0700

    add tests for msgs.go

commit 2ad16869237e9631b402c93cde650c3fc554daf2
Author: technicallyty <[email protected]>
Date:   Fri Apr 23 13:20:21 2021 -0700

    specify test name

commit b7121277c9be586a7c80d010ec401e50b510e02a
Merge: c0c134d971 3c65c3d
Author: technicallyty <[email protected]>
Date:   Fri Apr 23 12:54:55 2021 -0700

    Merge branch 'master' into ty-9115-types_tests

commit c0c134d97107194dc4f9d3c501a15d023ae083e5
Author: technicallyty <[email protected]>
Date:   Thu Apr 22 19:59:11 2021 -0700

    -add test case to cli_test.go for filtered fee
    -clean up identifiers
    -remove redundant import alias from filtered_fee.go

commit f7ab3699da39be3ab886f96962d28d23438d2e8e
Author: technicallyty <[email protected]>
Date:   Thu Apr 22 09:57:31 2021 -0700

    remove unecessary constant

commit 9db59a82a7337cf5a7a3569c6900a44a6c81e8b4
Merge: a3e75ceb8a e28271b
Author: technicallyty <[email protected]>
Date:   Thu Apr 22 09:19:20 2021 -0700

    Merge branch 'master' into ty-9115-types_tests

commit a3e75ceb8a510ad9db43dd96073c43b7a8b062b0
Merge: 4d3dafab85 bffcae5
Author: technicallyty <[email protected]>
Date:   Wed Apr 21 12:04:39 2021 -0700

    Merge branch 'master' into ty-9115-types_tests

commit 4d3dafab85d85526a7c94b045289605289ee6b0d
Author: technicallyty <[email protected]>
Date:   Wed Apr 21 12:03:41 2021 -0700

    cleanup id's / add test case

commit e8f6924931ba95e592bfc3057ba167700458da41
Author: technicallyty <[email protected]>
Date:   Wed Apr 21 10:55:29 2021 -0700

    add test for 0 allowance / remove unused field on exp test

commit 516b6ef89a4582ad681cc6c5c101cf50a9a54fb5
Author: technicallyty <[email protected]>
Date:   Tue Apr 20 15:22:48 2021 -0700

    make names more clear, remove unused field

* fix imports

* fix tests

* rename test field

Co-authored-by: technicallyty <[email protected]>
Co-authored-by: Marie Gauthier <[email protected]>
Co-authored-by: MD Aleem <[email protected]>
* replace panic with error

* improve test coverage

* add time based tests to basic-fee

* add periodic fee tests

* wip

* add msg_server tests

* improve getFeeGrant

* fix failing test

* fix test

* fix comments

* refactor

* review changes

* review changes

* fix errors

* Update x/feegrant/types/basic_fee_test.go

Co-authored-by: Marie Gauthier <[email protected]>

* review changes

Co-authored-by: Marie Gauthier <[email protected]>
When testing with -race, sometimes the random source generate the same
string for consecutive calls, causing duplicated voter address. So the
number of votes in DB is not 20.

To fix this, we ensure unique addresses are generated, by using a map
for tracking which one was produced, and skip the duplicated address and
generated new one. Testing with:

	go test -race -v -count=1000 -run=TestPaginatedVotesQuery

now passes.

Updates #9010
* Added a "new_shares" attribute inside the delegate event type

* ADded CHANGELOG entry
* codec: Rename codec and marshaler interfaces, ref: 8413

* codec: remove BinaryBare

* changelog update

* Update comments and documentation

* adding doc string comments

* Update CHANGELOG.md

Co-authored-by: Federico Kunze <[email protected]>

* Update codec/codec.go

Co-authored-by: Marko <[email protected]>

Co-authored-by: Federico Kunze <[email protected]>
Co-authored-by: Amaury <[email protected]>
Co-authored-by: Marko <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Mar 16, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 5 committers have signed the CLA.

✅ 0Tech
✅ dudong2
❌ robert-zaremba
❌ mergify[bot]
❌ amaurym
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov
Copy link

codecov bot commented Mar 16, 2022

Codecov Report

❗ No coverage uploaded for pull request base (feat/versionup_to_0_45_x@29e2abb). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@                     Coverage Diff                     @@
##             feat/versionup_to_0_45_x     #468   +/-   ##
===========================================================
  Coverage                            ?   56.60%           
===========================================================
  Files                               ?      781           
  Lines                               ?    83428           
  Branches                            ?        0           
===========================================================
  Hits                                ?    47225           
  Misses                              ?    33125           
  Partials                            ?     3078           

@dudong2 dudong2 requested review from zemyblue and 0Tech March 16, 2022 14:18
@dudong2 dudong2 changed the base branch from main to feat/versionup_to_0_45_x March 17, 2022 02:28
@zemyblue
Copy link
Member

I think we need to remove the document files under the docs/architecture/. Because this is the file that is proposed and describe the cosmos-sdk's architecture. So I think we just redirect the link to cosmos-sdk. How about this?

@@ -32,7 +32,7 @@ service Query {
}

// Grants queries grants on a given grantee.
rpc Grants(QueryGrantsRequest) returns (QueryGrantsResponse) {
rpc TokenGrants(QueryGrantsRequest) returns (QueryGrantsResponse) {
Copy link
Member

Choose a reason for hiding this comment

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

I think this change is not a official change. Please check it @0Tech.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this change is not a official change. Please check it @0Tech.

I think he changed it to avoid some kind of error. I have encountered very same error before. At that moment, I changed my rpc name Balances into TokenBalances.
I think we may figure out how to resolve the error later.

Copy link
Member

Choose a reason for hiding this comment

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

OK, I understand. Please check and correct in #412 later.

baseapp/baseapp.go Outdated Show resolved Hide resolved
baseapp/baseapp.go Outdated Show resolved Hide resolved
@@ -28,7 +26,6 @@ func NewAnteHandler(
ante.TxTimeoutHeightDecorator{},
ante.NewValidateMemoDecorator(ak),
ante.NewConsumeGasForTxSizeDecorator(ak),
ante.NewDeductGrantedFeeDecorator(ak.(keeper2.AccountKeeper), bankKeeper.(types2.BankKeeper), feegrantKeeper),
Copy link
Member

Choose a reason for hiding this comment

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

The antehandler of fee is removed. Is it right?

Copy link
Member

Choose a reason for hiding this comment

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

And feegrantKeeper of parameter is not used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In cosmos-sdk, feegrant's antehandler has been changed to be included in auth's antehandler. So that code has been removed.

@@ -27,7 +27,7 @@ func CollectGenTxsCmd(genBalIterator types.GenesisBalancesIterator, defaultNodeH
config := serverCtx.Config

clientCtx := client.GetClientContextFromCmd(cmd)
cdc := clientCtx.JSONMarshaler
cdc := clientCtx.Codec
Copy link
Member

Choose a reason for hiding this comment

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

Do you know it is right?
ctx.JSONMarshaler of Other code is replaced with ctx.JSONCodec. But this is different.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's same with cosmos-sdk code.

@@ -61,7 +61,7 @@ $ %s gentx my-key-name 1000000stake --home=/path/to/home/dir --keyring-backend=o
if err != nil {
return err
}
cdc := clientCtx.JSONMarshaler
cdc := clientCtx.Codec
Copy link
Member

Choose a reason for hiding this comment

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

It is also different.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's same with cosmos-sdk code, too.

x/genutil/client/cli/migrate.go Outdated Show resolved Hide resolved
@@ -410,7 +405,7 @@ func (s *IntegrationTestSuite) TestCmdGetProposal() {
} else {
s.Require().NoError(err)
var proposal types.Proposal
s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &proposal), out.String())
s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &proposal), out.String())
Copy link
Member

Choose a reason for hiding this comment

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

Please check if codec is correct, not JSONCodec.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's same with cosmos-sdk code, too.

res, err := handler(ctx, msg)
if err != nil {
return nil, err
if legacyMsg, ok := msg.(legacytx.LegacyMsg); ok {
Copy link
Member

Choose a reason for hiding this comment

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

Does This legacytx need to remove or fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

legacytx is used in many places.
There is a possibility that it will be updated in cosmos-sdk in the future.

@zemyblue
Copy link
Member

zemyblue commented Mar 18, 2022

@dudong2 , please merge this PR as a Create a merge commit type.

@0Tech
Copy link
Collaborator

0Tech commented Mar 21, 2022

LGTM other than renaming RPC.
There would be two ways to solve the ID conflict:

  1. Rename the newer RPCs, so the conflict would not occur in the first place.
  2. Rename the ID only in swagger, so one can use the same naming in protobuf.

Any opinions? @dudong2 @zemyblue

@zemyblue
Copy link
Member

LGTM other than renaming RPC. There would be two ways to solve the ID conflict:

  1. Rename the newer RPCs, so the conflict would not occur in the first place.
  2. Rename the ID only in swagger, so one can use the same naming in protobuf.

Any opinions? @dudong2 @zemyblue

How can we do 2? As for the suggestion, I think 2 is better if possible.

@0Tech
Copy link
Collaborator

0Tech commented Mar 21, 2022

LGTM other than renaming RPC. There would be two ways to solve the ID conflict:

  1. Rename the newer RPCs, so the conflict would not occur in the first place.
  2. Rename the ID only in swagger, so one can use the same naming in protobuf.

Any opinions? @dudong2 @zemyblue

How can we do 2? As for the suggestion, I think 2 is better if possible.

Please refer to https://www.npmjs.com/package/swagger-combine Renaming Path OperationIds section for the description.
You can also find the examples in client/docs/config.json. cosmos-sdk and lbm-sdk are already using it :)
e.g.)

"url": "./tmp-swagger-gen/lbm/token/v1/query.swagger.json",
"operationIds": {
  "rename": {
    "Params": "TokenParams",
    "Balance": "TokenBalance",
    "Grant": "TokenGrant"
  }
}

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.

LGTM

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

@dudong2 dudong2 merged commit 3466745 into Finschia:feat/versionup_to_0_45_x Mar 23, 2022
@zemyblue zemyblue assigned 0Tech and dudong2 and unassigned dudong2 and 0Tech Mar 28, 2022
@dudong2 dudong2 mentioned this pull request Mar 30, 2022
4 tasks
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.