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

backport: fix ibc genesis export bug #9401

Merged
merged 4 commits into from
Jun 9, 2021

Conversation

colin-axner
Copy link
Contributor

@colin-axner colin-axner commented May 27, 2021

Description

backport of fix on ibc-go

closes: #XXXX


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.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@colin-axner
Copy link
Contributor Author

would be great to get this in the next patch release 🙏

@amaury1093 amaury1093 added this to the v0.42.6 milestone May 27, 2021
Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

utACK.

Not sure what to do about the QA here, this is actually something I don't have enough context with to approve/disapprove, I'm just blindly trusting @colin-axner here

@colin-axner
Copy link
Contributor Author

Not sure what to do about the QA here, this is actually something I don't have enough context with to approve/disapprove, I'm just blindly trusting @colin-axner here

These files only touch x/ibc thus getting an approval from the code owners of x/ibc (myself, @AdityaSripal, @fedekunze, @cwgoes) I think is sufficient. This brings up a good example of why having folks take ownership of modules is important

To give a little more context on this bug fix. IBC has identifiers for things called clients/connections/channels. These identifiers are auto generated using a global sequence assigned to each. The previous code wasn't setting the current sequence value for each client/connection/channel when exporting the genesis file. This results in the genesis file containing a starting sequence of 0 despite the fact there have already been many clients/connections/channel created with the 0 sequence and higher. x/ibc needs unique identifiers otherwise restarting a chain with existing identifiers who have a sequence <= the current sequence is extremely problematic

There isn't much QA to be done here. Exporting genesis isn't apart of the state machine. This fix is the equivalent of using the current binaries and manually setting the sequence in the genesis file to a correct value

Copy link
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

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

utACK

@fedekunze fedekunze added the A:automerge Automatically merge PR once all prerequisites pass. label Jun 1, 2021
@colin-axner
Copy link
Contributor Author

I think we need some admin privileges to bypass the linting test. I'm also not sure if the liveness test should pass?

@colin-axner
Copy link
Contributor Author

@alexanderbez or @aaronc could one of y'all use admin perms to bypass the linter check? It'd be great to have this in a release before people start trying to genesis restart to v0.43

@alexanderbez alexanderbez merged commit e9674d5 into release/v0.42.x Jun 9, 2021
@alexanderbez alexanderbez deleted the colin/backport-ibc-genesis-export branch June 9, 2021 15:29
Raumo0 pushed a commit to mapofzones/cosmos-sdk that referenced this pull request Feb 13, 2022
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants