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

02-client refactor #1871

Merged
merged 76 commits into from
Aug 8, 2022
Merged

02-client refactor #1871

merged 76 commits into from
Aug 8, 2022

Conversation

colin-axner
Copy link
Contributor

@colin-axner colin-axner commented Aug 3, 2022

Description

This PR contains a large body of work which simplifies the 02-client implementation while also increasing the flexibility for light client implementations.

Included in these changes include:

  • setting client/consensus states within the light client instead of at the 02-client level
  • merging header/misbehaviour interface and renaming to ClientMessage
  • simplification of the solo machine sign bytes
  • generic verification functions (VerifyMembership, VerifyNonMembership)
  • splitting of the CheckHeaderAndUpdateState into 4 functions
  • emission of upgraded consensus state

Please see #1846 for more detailed information. This refactor will be included in v6 and a tracking issue will be released soon.


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

notbdu and others added 30 commits March 9, 2022 15:33
* chore: remove GetClientID() from Misbehaviour interface

* chore: changed too much

* chore: fix test and add changelog entry

Co-authored-by: Shake Shack <[email protected]>
…#1093)

* updating protos and codegen

* renaming solomachine Mishaviour to DuplicateSignatureHeader

* renaming DuplicateSignatureHeader to DuplicateSignatures

* updating changelog and godocs as per review
* remove GetClientID from 07-tendermint misbehaviour and deprecate the ClientId field in 07-tendermint Misbehaviour

* add changelog entry

Co-authored-by: Damian Nolan <[email protected]>
* reverting renaming of Misbehaviour

* removing client id from 06-solomachine type Misbehaviour

* adding changelog
* refactor: allow the mock module to be used multiple times as base ibc application in middleware stack (#892)

## Description

Currently the `AppModule` assumes a single scoped keeper. This doesn't allow the mock module to be used as a base application for different middleware stack (ica stack, fee stack, etc)

I broke the API because I think it is cleaner. If we want this to be non API breaking, I can try to readjust

ref: #891 

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* feat: adding Pack/Unpack acknowledgement helper fns (#895)

* feat: adding Pack/Unpack acknowledgement helper fns

* chore: changelog

* fix: docs

* Update modules/core/04-channel/types/codec.go

Co-authored-by: colin axnér <[email protected]>

Co-authored-by: colin axnér <[email protected]>

* imp: support custom keys for testing (#893)

* chore: add ParsePacketFromEvents testing helper function (#904)

## Description



ref: #891

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* fix: correctly claim capability for mock module, handle genesis exports (#921)

## Description

This contains two fixes:
- the capability being claimed by the scoped keeper was incorrect (mock.ModuleName -> port ID)
- the mock module wasn't accounting for non empty genesis state in capabilities (after genesis export, capability will create the bound ports so rebinding doesn't need to happen)

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* docs: update migration docs for upgrade proposal in relation to ICS27 (#920)

## Description



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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* chore(ica): add trail of bits audit report (#903)

* chore(ica): add trail of bits audit report

* relocate the audit report for ICA

Co-authored-by: Carlos Rodriguez <[email protected]>

* testing: adding multiple sender accounts for testing purposes (#935)

* testing: adding multiple sender accounts for testing puproses

* fix genesis setup (#936)

* Update testing/chain.go

Co-authored-by: colin axnér <[email protected]>

* refactor: code hygiene

* Update testing/chain.go

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

* fix: setting totalySupply to empty

* nit: CamelCase not UPPERCASE

Co-authored-by: Aditya <[email protected]>
Co-authored-by: colin axnér <[email protected]>

* Create test chain with multiple validators (#942)

* testing: adding multiple sender accounts for testing puproses

* fix genesis setup (#936)

* Update testing/chain.go

Co-authored-by: colin axnér <[email protected]>

* refactor: code hygiene

* Update testing/chain.go

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

* multi validator commit taken from @Saione

* add function to pass custom valset

* add changelog

Co-authored-by: Sean King <[email protected]>
Co-authored-by: Sean King <[email protected]>
Co-authored-by: colin axnér <[email protected]>

* add changelog entry for SDK bump

* fix: classify client states without consensus states as expired (#941)

## Description



closes: #850 

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* chore: fix broken link (#972)

* add backport actions for v1.3.x and v2.1.x (#958)

* Revert "feat: adding Pack/Unpack acknowledgement helper fns (#895)" (#973)

This reverts commit 843b459.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* chore: update migration docs (#985)

* chore: update migration docs

* Update docs/migrations/v2-to-v3.md

Co-authored-by: Damian Nolan <[email protected]>

Co-authored-by: Damian Nolan <[email protected]>

* chore: fix mispelled words (#991)

* fix: remove go mod tidy from proto-gen script (#989)

* bug: support base denoms with slashes (#978)

* bug: support base denoms with slashes

* add changelog entry

Co-authored-by: Carlos Rodriguez <[email protected]>

* upgrade ics23 to v0.7 (#948)

* upgrade ics23 to v0.7-rc

* add changelog entry

* update ics23 to final 0.7

Co-authored-by: Carlos Rodriguez <[email protected]>

* ibctesting: make `testing.T` public (#1020)

* add changelog entry for #941

* fix package import (#1007)

* feat: Add a function to initialize the ICS27 module via an upgrade proposal (#1037)

## Description



closes: #1034 

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* docs: add missing args to NewKeeper in integration docs (#1038)

## Description



This add some missing arguments to `ibckeeper.NewKeeper` and `ibctransferkeeper.NewKeeper` in integration docs

---

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/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* small fixes for v2 to v3 migration (#1016)

* small fixes for v2 to v3 migration

* review comment

* Update v2-to-v3.md

* add store upgrade documentation

Co-authored-by: Carlos Rodriguez <[email protected]>

* add missing slash

* build(deps): bump actions/checkout from 2.4.0 to 3 (#1045)

Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<ul>
<li>Update default runtime to node16</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v2.3.1</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/284">Fix default branch resolution for .wiki and when using SSH</a></li>
</ul>
<h2>v2.3.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/278">Fallback to the default branch</a></li>
</ul>
<h2>v2.2.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/258">Fetch all history for all tags and branches when fetch-depth=0</a></li>
</ul>
<h2>v2.1.1</h2>
<ul>
<li>Changes to support GHES (<a href="https://github-redirect.dependabot.com/actions/checkout/pull/236">here</a> and <a href="https://github-redirect.dependabot.com/actions/checkout/pull/248">here</a>)</li>
</ul>
<h2>v2.1.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/191">Group output</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/199">Changes to support GHES alpha release</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/184">Persist core.sshCommand for submodules</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/163">Add support ssh</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/179">Convert submodule SSH URL to HTTPS, when not using SSH</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/157">Add submodule support</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/144">Follow proxy settings</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/141">Fix ref for pr closed event when a pr is merged</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/128">Fix issue checking detached when git less than 2.22</a></li>
</ul>
<h2>v2.0.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/108">Do not pass cred on command line</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/107">Add input persist-credentials</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/104">Fallback to REST API to download repo</a></li>
</ul>
<h2>v2 (beta)</h2>
<ul>
<li>Improved fetch performance
<ul>
<li>The default behavior now fetches only the SHA being checked-out</li>
</ul>
</li>
<li>Script authenticated git commands
<ul>
<li>Persists <code>with.token</code> in the local git config</li>
<li>Enables your scripts to run authenticated git commands</li>
<li>Post-job cleanup removes the token</li>
<li>Coming soon: Opt out by setting <code>with.persist-credentials</code> to <code>false</code></li>
</ul>
</li>
<li>Creates a local branch
<ul>
<li>No longer detached HEAD when checking out a branch</li>
<li>A local branch is created with the corresponding upstream branch set</li>
</ul>
</li>
<li>Improved layout</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/actions/checkout/commit/a12a3943b4bdde767164f792f33f40b04645d846"><code>a12a394</code></a> update readme for v3 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/708">#708</a>)</li>
<li><a href="https://github.com/actions/checkout/commit/8f9e05e482293f862823fcca12d9eddfb3723131"><code>8f9e05e</code></a> Update to node 16 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/689">#689</a>)</li>
<li><a href="https://github.com/actions/checkout/commit/230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7"><code>230611d</code></a> Change secret name for PAT to not start with GITHUB_ (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/623">#623</a>)</li>
<li>See full diff in <a href="https://github.com/actions/checkout/compare/v2.4.0...v3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=2.4.0&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

* call packet.GetSequence() rather than passing the func as argument (#995)

* Add counterpartyChannelID param to IBCModule.OnChanOpenAck (#1086)

* add counterpartyChannelID param to IBCModule OnChanOpenAck()

* change testing mock

* change ica IBCModules ChannelOpenAck

* change transfer IBCModules ChannelOpenAck

* change core keeper ChannelOpenAck()

* CHANGELOG.md

* update v2-to-v3 migration doc

* Update docs/migrations/v2-to-v3.md

Co-authored-by: Carlos Rodriguez <[email protected]>

Co-authored-by: Carlos Rodriguez <[email protected]>

* fix mirgation docs (#1091)

* fix: handle testing update client errors (#1094)

* replace channel keeper with IBC keeper in AnteDecorator (#950)

* replace channel keeper with IBC keeper in AnteDecorator and pass message to rpc handler

* fix error checking condition

* fix for proper way of getting go context

* refactor tests for ante handler

* review comment

* review comments and some fixes

* review comments

* execute message for update client as well

* add migration

Co-authored-by: Carlos Rodriguez <[email protected]>

* add backport rules for v1.4.x and v2.2.x (#1085)

* ibctesting: custom voting power reduction for testing (#939)

* ibctesting: custom voting power reduction for testing

* changelog

* fix

* make T public

* fix

* revert changes

* fix test

Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: Aditya <[email protected]>
Co-authored-by: Tim Lind <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Damian Nolan <[email protected]>
Co-authored-by: daeMOn <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joe Bowman <[email protected]>
Co-authored-by: khanh <[email protected]>
* refactor: allow the mock module to be used multiple times as base ibc application in middleware stack (#892)

## Description

Currently the `AppModule` assumes a single scoped keeper. This doesn't allow the mock module to be used as a base application for different middleware stack (ica stack, fee stack, etc)

I broke the API because I think it is cleaner. If we want this to be non API breaking, I can try to readjust

ref: #891 

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* feat: adding Pack/Unpack acknowledgement helper fns (#895)

* feat: adding Pack/Unpack acknowledgement helper fns

* chore: changelog

* fix: docs

* Update modules/core/04-channel/types/codec.go

Co-authored-by: colin axnér <[email protected]>

Co-authored-by: colin axnér <[email protected]>

* imp: support custom keys for testing (#893)

* chore: add ParsePacketFromEvents testing helper function (#904)

## Description



ref: #891

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* fix: correctly claim capability for mock module, handle genesis exports (#921)

## Description

This contains two fixes:
- the capability being claimed by the scoped keeper was incorrect (mock.ModuleName -> port ID)
- the mock module wasn't accounting for non empty genesis state in capabilities (after genesis export, capability will create the bound ports so rebinding doesn't need to happen)

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* docs: update migration docs for upgrade proposal in relation to ICS27 (#920)

## Description



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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* chore(ica): add trail of bits audit report (#903)

* chore(ica): add trail of bits audit report

* relocate the audit report for ICA

Co-authored-by: Carlos Rodriguez <[email protected]>

* testing: adding multiple sender accounts for testing purposes (#935)

* testing: adding multiple sender accounts for testing puproses

* fix genesis setup (#936)

* Update testing/chain.go

Co-authored-by: colin axnér <[email protected]>

* refactor: code hygiene

* Update testing/chain.go

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

* fix: setting totalySupply to empty

* nit: CamelCase not UPPERCASE

Co-authored-by: Aditya <[email protected]>
Co-authored-by: colin axnér <[email protected]>

* Create test chain with multiple validators (#942)

* testing: adding multiple sender accounts for testing puproses

* fix genesis setup (#936)

* Update testing/chain.go

Co-authored-by: colin axnér <[email protected]>

* refactor: code hygiene

* Update testing/chain.go

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

* multi validator commit taken from @Saione

* add function to pass custom valset

* add changelog

Co-authored-by: Sean King <[email protected]>
Co-authored-by: Sean King <[email protected]>
Co-authored-by: colin axnér <[email protected]>

* add changelog entry for SDK bump

* fix: classify client states without consensus states as expired (#941)

## Description



closes: #850 

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* chore: fix broken link (#972)

* add backport actions for v1.3.x and v2.1.x (#958)

* Revert "feat: adding Pack/Unpack acknowledgement helper fns (#895)" (#973)

This reverts commit 843b459.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* chore: update migration docs (#985)

* chore: update migration docs

* Update docs/migrations/v2-to-v3.md

Co-authored-by: Damian Nolan <[email protected]>

Co-authored-by: Damian Nolan <[email protected]>

* chore: fix mispelled words (#991)

* fix: remove go mod tidy from proto-gen script (#989)

* bug: support base denoms with slashes (#978)

* bug: support base denoms with slashes

* add changelog entry

Co-authored-by: Carlos Rodriguez <[email protected]>

* upgrade ics23 to v0.7 (#948)

* upgrade ics23 to v0.7-rc

* add changelog entry

* update ics23 to final 0.7

Co-authored-by: Carlos Rodriguez <[email protected]>

* ibctesting: make `testing.T` public (#1020)

* add changelog entry for #941

* fix package import (#1007)

* feat: Add a function to initialize the ICS27 module via an upgrade proposal (#1037)

## Description



closes: #1034 

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* docs: add missing args to NewKeeper in integration docs (#1038)

## Description



This add some missing arguments to `ibckeeper.NewKeeper` and `ibctransferkeeper.NewKeeper` in integration docs

---

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/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* small fixes for v2 to v3 migration (#1016)

* small fixes for v2 to v3 migration

* review comment

* Update v2-to-v3.md

* add store upgrade documentation

Co-authored-by: Carlos Rodriguez <[email protected]>

* add missing slash

* build(deps): bump actions/checkout from 2.4.0 to 3 (#1045)

Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<ul>
<li>Update default runtime to node16</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v2.3.1</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/284">Fix default branch resolution for .wiki and when using SSH</a></li>
</ul>
<h2>v2.3.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/278">Fallback to the default branch</a></li>
</ul>
<h2>v2.2.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/258">Fetch all history for all tags and branches when fetch-depth=0</a></li>
</ul>
<h2>v2.1.1</h2>
<ul>
<li>Changes to support GHES (<a href="https://github-redirect.dependabot.com/actions/checkout/pull/236">here</a> and <a href="https://github-redirect.dependabot.com/actions/checkout/pull/248">here</a>)</li>
</ul>
<h2>v2.1.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/191">Group output</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/199">Changes to support GHES alpha release</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/184">Persist core.sshCommand for submodules</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/163">Add support ssh</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/179">Convert submodule SSH URL to HTTPS, when not using SSH</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/157">Add submodule support</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/144">Follow proxy settings</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/141">Fix ref for pr closed event when a pr is merged</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/128">Fix issue checking detached when git less than 2.22</a></li>
</ul>
<h2>v2.0.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/108">Do not pass cred on command line</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/107">Add input persist-credentials</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/104">Fallback to REST API to download repo</a></li>
</ul>
<h2>v2 (beta)</h2>
<ul>
<li>Improved fetch performance
<ul>
<li>The default behavior now fetches only the SHA being checked-out</li>
</ul>
</li>
<li>Script authenticated git commands
<ul>
<li>Persists <code>with.token</code> in the local git config</li>
<li>Enables your scripts to run authenticated git commands</li>
<li>Post-job cleanup removes the token</li>
<li>Coming soon: Opt out by setting <code>with.persist-credentials</code> to <code>false</code></li>
</ul>
</li>
<li>Creates a local branch
<ul>
<li>No longer detached HEAD when checking out a branch</li>
<li>A local branch is created with the corresponding upstream branch set</li>
</ul>
</li>
<li>Improved layout</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/actions/checkout/commit/a12a3943b4bdde767164f792f33f40b04645d846"><code>a12a394</code></a> update readme for v3 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/708">#708</a>)</li>
<li><a href="https://github.com/actions/checkout/commit/8f9e05e482293f862823fcca12d9eddfb3723131"><code>8f9e05e</code></a> Update to node 16 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/689">#689</a>)</li>
<li><a href="https://github.com/actions/checkout/commit/230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7"><code>230611d</code></a> Change secret name for PAT to not start with GITHUB_ (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/623">#623</a>)</li>
<li>See full diff in <a href="https://github.com/actions/checkout/compare/v2.4.0...v3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=2.4.0&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

* call packet.GetSequence() rather than passing the func as argument (#995)

* Add counterpartyChannelID param to IBCModule.OnChanOpenAck (#1086)

* add counterpartyChannelID param to IBCModule OnChanOpenAck()

* change testing mock

* change ica IBCModules ChannelOpenAck

* change transfer IBCModules ChannelOpenAck

* change core keeper ChannelOpenAck()

* CHANGELOG.md

* update v2-to-v3 migration doc

* Update docs/migrations/v2-to-v3.md

Co-authored-by: Carlos Rodriguez <[email protected]>

Co-authored-by: Carlos Rodriguez <[email protected]>

* fix mirgation docs (#1091)

* fix: handle testing update client errors (#1094)

* replace channel keeper with IBC keeper in AnteDecorator (#950)

* replace channel keeper with IBC keeper in AnteDecorator and pass message to rpc handler

* fix error checking condition

* fix for proper way of getting go context

* refactor tests for ante handler

* review comment

* review comments and some fixes

* review comments

* execute message for update client as well

* add migration

Co-authored-by: Carlos Rodriguez <[email protected]>

* add backport rules for v1.4.x and v2.2.x (#1085)

* ibctesting: custom voting power reduction for testing (#939)

* ibctesting: custom voting power reduction for testing

* changelog

* fix

* make T public

* fix

* revert changes

* fix test

* merging Header & Misbehavior interfaces into ClientMessage & fixing associated 02-client helpers

* fix: update related functions

* chore: comments

* Update modules/core/02-client/types/encoding.go

Co-authored-by: Damian Nolan <[email protected]>

* chore: changelog

* chore: comment

Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: Aditya <[email protected]>
Co-authored-by: Tim Lind <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Damian Nolan <[email protected]>
Co-authored-by: daeMOn <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joe Bowman <[email protected]>
Co-authored-by: khanh <[email protected]>
* adding VerifyClientMessage and tests

* splitting tests for verify header and misbehaviour

* cleaning up error handling

* adding additional test for old misbehaviour is sucessful

* split type switch logic into verifyHeader and verifyMisbehaviour priv funcs

* updating godoc for VerifyClientMessage
…nd consensus state (#598)

* modify VerifyUpgradeAndUpdateState interface function to remove returned client and consensus state

removes the client and consensus state from the return values in VerifyUpgradeAndUpdateState client state interface function
Updates light client implementations to set client and consensus state in client store
Fixes and updates tests

* add changelog entry

* add migration docs

* use upgraded client to emit height in events
* adding VerifyClientMessage and tests

* splitting tests for verify header and misbehaviour

* rename update to UpdateState

* cleaning up error handling

* adding additional test for old misbehaviour is sucessful

* split type switch logic into verifyHeader and verifyMisbehaviour priv funcs

* adding in place test function for solomachine UpdateState

* rename update to UpdateState

* adding in place test function for solomachine UpdateState
…sbehaviour (#1111)

* adding VerifyClientMessage and tests

* splitting tests for verify header and misbehaviour

* rename update to UpdateState

* adding CheckForMisbehaviour and UpdateStateOnMisbehaviour

* adding misbehaviour checks

* updating CheckForMisbehaviour codestyle and adding basic test cases
* refactor: allow the mock module to be used multiple times as base ibc application in middleware stack (#892)

## Description

Currently the `AppModule` assumes a single scoped keeper. This doesn't allow the mock module to be used as a base application for different middleware stack (ica stack, fee stack, etc)

I broke the API because I think it is cleaner. If we want this to be non API breaking, I can try to readjust

ref: #891 

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* feat: adding Pack/Unpack acknowledgement helper fns (#895)

* feat: adding Pack/Unpack acknowledgement helper fns

* chore: changelog

* fix: docs

* Update modules/core/04-channel/types/codec.go

Co-authored-by: colin axnér <[email protected]>

Co-authored-by: colin axnér <[email protected]>

* imp: support custom keys for testing (#893)

* chore: add ParsePacketFromEvents testing helper function (#904)

## Description



ref: #891

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* fix: correctly claim capability for mock module, handle genesis exports (#921)

## Description

This contains two fixes:
- the capability being claimed by the scoped keeper was incorrect (mock.ModuleName -> port ID)
- the mock module wasn't accounting for non empty genesis state in capabilities (after genesis export, capability will create the bound ports so rebinding doesn't need to happen)

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* docs: update migration docs for upgrade proposal in relation to ICS27 (#920)

## Description



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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* chore(ica): add trail of bits audit report (#903)

* chore(ica): add trail of bits audit report

* relocate the audit report for ICA

Co-authored-by: Carlos Rodriguez <[email protected]>

* testing: adding multiple sender accounts for testing purposes (#935)

* testing: adding multiple sender accounts for testing puproses

* fix genesis setup (#936)

* Update testing/chain.go

Co-authored-by: colin axnér <[email protected]>

* refactor: code hygiene

* Update testing/chain.go

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

* fix: setting totalySupply to empty

* nit: CamelCase not UPPERCASE

Co-authored-by: Aditya <[email protected]>
Co-authored-by: colin axnér <[email protected]>

* Create test chain with multiple validators (#942)

* testing: adding multiple sender accounts for testing puproses

* fix genesis setup (#936)

* Update testing/chain.go

Co-authored-by: colin axnér <[email protected]>

* refactor: code hygiene

* Update testing/chain.go

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

* multi validator commit taken from @Saione

* add function to pass custom valset

* add changelog

Co-authored-by: Sean King <[email protected]>
Co-authored-by: Sean King <[email protected]>
Co-authored-by: colin axnér <[email protected]>

* add changelog entry for SDK bump

* fix: classify client states without consensus states as expired (#941)

## Description



closes: #850 

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* chore: fix broken link (#972)

* add backport actions for v1.3.x and v2.1.x (#958)

* Revert "feat: adding Pack/Unpack acknowledgement helper fns (#895)" (#973)

This reverts commit 843b459.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* chore: update migration docs (#985)

* chore: update migration docs

* Update docs/migrations/v2-to-v3.md

Co-authored-by: Damian Nolan <[email protected]>

Co-authored-by: Damian Nolan <[email protected]>

* chore: fix mispelled words (#991)

* fix: remove go mod tidy from proto-gen script (#989)

* bug: support base denoms with slashes (#978)

* bug: support base denoms with slashes

* add changelog entry

Co-authored-by: Carlos Rodriguez <[email protected]>

* upgrade ics23 to v0.7 (#948)

* upgrade ics23 to v0.7-rc

* add changelog entry

* update ics23 to final 0.7

Co-authored-by: Carlos Rodriguez <[email protected]>

* ibctesting: make `testing.T` public (#1020)

* add changelog entry for #941

* fix package import (#1007)

* feat: Add a function to initialize the ICS27 module via an upgrade proposal (#1037)

## Description



closes: #1034 

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* docs: add missing args to NewKeeper in integration docs (#1038)

## Description



This add some missing arguments to `ibckeeper.NewKeeper` and `ibctransferkeeper.NewKeeper` in integration docs

---

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/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* small fixes for v2 to v3 migration (#1016)

* small fixes for v2 to v3 migration

* review comment

* Update v2-to-v3.md

* add store upgrade documentation

Co-authored-by: Carlos Rodriguez <[email protected]>

* add missing slash

* build(deps): bump actions/checkout from 2.4.0 to 3 (#1045)

Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<ul>
<li>Update default runtime to node16</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v2.3.1</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/284">Fix default branch resolution for .wiki and when using SSH</a></li>
</ul>
<h2>v2.3.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/278">Fallback to the default branch</a></li>
</ul>
<h2>v2.2.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/258">Fetch all history for all tags and branches when fetch-depth=0</a></li>
</ul>
<h2>v2.1.1</h2>
<ul>
<li>Changes to support GHES (<a href="https://github-redirect.dependabot.com/actions/checkout/pull/236">here</a> and <a href="https://github-redirect.dependabot.com/actions/checkout/pull/248">here</a>)</li>
</ul>
<h2>v2.1.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/191">Group output</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/199">Changes to support GHES alpha release</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/184">Persist core.sshCommand for submodules</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/163">Add support ssh</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/179">Convert submodule SSH URL to HTTPS, when not using SSH</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/157">Add submodule support</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/144">Follow proxy settings</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/141">Fix ref for pr closed event when a pr is merged</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/128">Fix issue checking detached when git less than 2.22</a></li>
</ul>
<h2>v2.0.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/108">Do not pass cred on command line</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/107">Add input persist-credentials</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/104">Fallback to REST API to download repo</a></li>
</ul>
<h2>v2 (beta)</h2>
<ul>
<li>Improved fetch performance
<ul>
<li>The default behavior now fetches only the SHA being checked-out</li>
</ul>
</li>
<li>Script authenticated git commands
<ul>
<li>Persists <code>with.token</code> in the local git config</li>
<li>Enables your scripts to run authenticated git commands</li>
<li>Post-job cleanup removes the token</li>
<li>Coming soon: Opt out by setting <code>with.persist-credentials</code> to <code>false</code></li>
</ul>
</li>
<li>Creates a local branch
<ul>
<li>No longer detached HEAD when checking out a branch</li>
<li>A local branch is created with the corresponding upstream branch set</li>
</ul>
</li>
<li>Improved layout</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/actions/checkout/commit/a12a3943b4bdde767164f792f33f40b04645d846"><code>a12a394</code></a> update readme for v3 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/708">#708</a>)</li>
<li><a href="https://github.com/actions/checkout/commit/8f9e05e482293f862823fcca12d9eddfb3723131"><code>8f9e05e</code></a> Update to node 16 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/689">#689</a>)</li>
<li><a href="https://github.com/actions/checkout/commit/230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7"><code>230611d</code></a> Change secret name for PAT to not start with GITHUB_ (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/623">#623</a>)</li>
<li>See full diff in <a href="https://github.com/actions/checkout/compare/v2.4.0...v3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=2.4.0&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

* call packet.GetSequence() rather than passing the func as argument (#995)

* Add counterpartyChannelID param to IBCModule.OnChanOpenAck (#1086)

* add counterpartyChannelID param to IBCModule OnChanOpenAck()

* change testing mock

* change ica IBCModules ChannelOpenAck

* change transfer IBCModules ChannelOpenAck

* change core keeper ChannelOpenAck()

* CHANGELOG.md

* update v2-to-v3 migration doc

* Update docs/migrations/v2-to-v3.md

Co-authored-by: Carlos Rodriguez <[email protected]>

Co-authored-by: Carlos Rodriguez <[email protected]>

* fix mirgation docs (#1091)

* fix: handle testing update client errors (#1094)

* replace channel keeper with IBC keeper in AnteDecorator (#950)

* replace channel keeper with IBC keeper in AnteDecorator and pass message to rpc handler

* fix error checking condition

* fix for proper way of getting go context

* refactor tests for ante handler

* review comment

* review comments and some fixes

* review comments

* execute message for update client as well

* add migration

Co-authored-by: Carlos Rodriguez <[email protected]>

* add backport rules for v1.4.x and v2.2.x (#1085)

* ibctesting: custom voting power reduction for testing (#939)

* ibctesting: custom voting power reduction for testing

* changelog

* fix

* make T public

* fix

* revert changes

* fix test

* build(deps): bump github.com/spf13/cobra from 1.3.0 to 1.4.0 (#1105)

* build(deps): bump google.golang.org/grpc from 1.44.0 to 1.45.0 (#1098)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.44.0 to 1.45.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.44.0...v1.45.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

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

* fix: adjust InitModule to account for empty controller and host keepers (#1120)

## Description



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.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/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/ibc-go/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

* Merge pull request from GHSA-j658-c98j-fww4

Co-authored-by: Carlos Rodriguez <[email protected]>

* fixes for the documentation about handling ack for SDK <= 0.45 (#1122)

* fixes for documentation

* review comment

Co-authored-by: Carlos Rodriguez <[email protected]>

* Allow testing to update ValidatorSet (#1003)

* testing: adding multiple sender accounts for testing puproses

* fix genesis setup (#936)

* Update testing/chain.go

Co-authored-by: colin axnér <[email protected]>

* refactor: code hygiene

* Update testing/chain.go

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

* multi validator commit taken from @Saione

* add function to pass custom valset

* create simplest failing test

* progress

* fix changevalset test

* fix errors in tendermint package

* fix client types test

* fix client keeper

* fix cap functions

* fix genesis core tests

* fix ica tests

* fix doc

* CHANGELOG

* replace signer array with signer map

* add documentation

* fix merge

* documentation

* ordered signer array doc

* add new delegation and comment to change valset test

Co-authored-by: Sean King <[email protected]>
Co-authored-by: Sean King <[email protected]>
Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>

* imp: create codeql-analysis action (#1128)

## Description



Noticed that [CodeQL](https://codeql.github.com/) wasn't enabled on the IBC-go repo

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] 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

* update changelog (#1131)

* update changelog

* fix typo

* build(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1 (#1134)

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Damian Nolan <[email protected]>

* call packet.GetSequence() rather than passing the func as argument (#1130)

* call packet.GetSequence() rather than passing the func as argument

* add changelog entry

Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: Aditya <[email protected]>
Co-authored-by: Tim Lind <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Damian Nolan <[email protected]>
Co-authored-by: daeMOn <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joe Bowman <[email protected]>
Co-authored-by: khanh <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
…1117)

* rename update to UpdateState

rename 07-tendermint update function to UpdateState
add pruneOldestConsensusState function
add check for duplicate update

* fix: duplicate update check was performing incorrect logic

* update godoc

* add UpdateState tests

* update godoc

* chore: fix code spacing

Co-authored-by: Sean King <[email protected]>
* adding UpdateStateOnMisbehaviour with basic test

* removing redundant return values

* removing unnecessary CommitBlock in test func

* Update modules/light-clients/07-tendermint/types/update.go

Co-authored-by: colin axnér <[email protected]>

Co-authored-by: colin axnér <[email protected]>
* WIP: solomachine UpdateState now handles storage of ClientState and ConsensusState

* applying suggestions for review

* removing unnecessary consensus state storage

* updating tests to use store in favour of return values
* adding CheckForMisbehaviour to tendermint ClientState

* adding initial testcases for CheckForMisbehaviour

* updating tests

* updating tests

* cleaning up code comments

* updating godocs

* fixing logic and updating tests

* removing Misbehaviour verification and tests

* fixing code structure after merge conflict
* refactor: Adding VerifyClientMessage helper fn to ClientState

* refactor: creating verifyHeader priv fn and respective test

* refactor: adding initial test cases

* refactor: add more test cases

* nit: move fns

* remove clientState var

* refactor: adding different val set test case

* refactor: add test case for header with next height and diff validator set

* refactor: adding remaining test cases

* chore: uncomment previous tests:

* fix: chainA -> chainB

* chore: comment

* refactor: remove consState from api + fix tests

* refactor: add verifyHeader to clientState

* fix: incorret trusted validators for concensus state test

* Update modules/light-clients/07-tendermint/types/update_test.go

Co-authored-by: colin axnér <[email protected]>

* chore: add comment

* fix: params

* refactor: remove timestamp from api

* refactor: switch and type

* fix: remove height+1

* 02-client refactor: add tests for verifyMisbehaviour (#1166)

* refactor: move misbehaviour validation into verifyMisbehaviour function

* begin writing misbehaviour tests

* fix misbehaviour test

* continue adding misbehaviour test cases

* add more test cases to verifyMisbehaviour test

* add changing validator set tests

* finish rest of tests except revision height testing

* Update modules/light-clients/07-tendermint/types/misbehaviour_handle_test.go

Co-authored-by: Damian Nolan <[email protected]>

* add back misbehaviour type assertion

Co-authored-by: Damian Nolan <[email protected]>

Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Damian Nolan <[email protected]>
* refactor: removing GetRoot from ConsensusState interface

* refactor: remove unnecessary GetRoot definitions

* chore: changelog
* feat: adding VerifyClientMessage to ClientState interface

* fix: legacy

* remove todo + fix test

* Update modules/core/exported/client.go

Co-authored-by: colin axnér <[email protected]>

* Update modules/core/02-client/legacy/v100/solomachine.go

Co-authored-by: Damian Nolan <[email protected]>

* chore: changelog

Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Damian Nolan <[email protected]>
…nts impl (#1170)

* set client state in store in lightclient

* adding changelog entry
* adding storage ops to 07-tendermint UpdateState, updating tests

* use clientMessage.GetHeight() as per review suggestions

* updating tests to obtain previous client/consensus state in malleate
…or (#1180)

* updating 07-tendermint GetConsensusState to return bool over error

* panic on unmarshal and type assertion failure, update tests

* updating to use MustUnmarshalConsensusState directly

* Update modules/light-clients/07-tendermint/types/misbehaviour_handle.go

Co-authored-by: colin axnér <[email protected]>

* Update modules/light-clients/07-tendermint/types/misbehaviour_handle.go

Co-authored-by: colin axnér <[email protected]>

* removing comments and updating godoc

Co-authored-by: colin axnér <[email protected]>
* feat: adding UpdateStateOnMisbehaviour to ClientState interface

* Update modules/core/exported/client.go

Co-authored-by: colin axnér <[email protected]>

* fix: return values

* chore: changelog

Co-authored-by: colin axnér <[email protected]>
* refactor: remove localhost light client implementation

* chore: readding CreateLocalhost field

* chore: readding createLocalhost field

* chore: changelog

* fix: BeginBlocker

* fix: removing CreateLocalhost

* chore: remove unused code

* refactor: keeper tests

* refactor: genesis type test add case for invalid client type

* fix: add back tests

* fix: remove unncessary if statement
* adding UpdateState to ClientState interface and updating surrounds

* updating godoc

* adding changelog entry

* Update modules/core/exported/client.go

Co-authored-by: colin axnér <[email protected]>

* fixing typo in changelog

Co-authored-by: colin axnér <[email protected]>
* feat: adding CheckForMisbehaviour to ClientState interface

* fix: comment

* nit: fix todo

* chore: changelog
* refactor: replace CheckHeaderAndUpdateState with VerifyClientMessage, CheckForMisbehaviour, UpdateStateOnMisbehaviour, and UpdateState

* add changelog entry

* fix tests
* refactor: removing CheckHeaderAndUpdateState from ClientState interface & light client implementations

* chore: fix changelog
)

* refactor: routing MsgSubmitMisbehaviour to UpdateClient keeper fn

* chore: updating changelog and comment for deprecated notice

* fix: channel proto file linter issue + adding deprecated flag to MsgSubmitMisbehavior

* chore: fix changelog
@codecov-commenter
Copy link

codecov-commenter commented Aug 4, 2022

Codecov Report

Merging #1871 (87bae33) into main (e5ec801) will increase coverage by 0.15%.
The diff coverage is 82.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1871      +/-   ##
==========================================
+ Coverage   79.92%   80.07%   +0.15%     
==========================================
  Files         166      167       +1     
  Lines       12432    11750     -682     
==========================================
- Hits         9936     9409     -527     
+ Misses       2028     1925     -103     
+ Partials      468      416      -52     
Impacted Files Coverage Δ
modules/core/02-client/genesis.go 16.66% <0.00%> (-0.48%) ⬇️
modules/core/02-client/legacy/v100/solomachine.go 5.47% <0.00%> (-1.08%) ⬇️
modules/core/02-client/types/genesis.go 74.28% <ø> (+7.85%) ⬆️
...es/light-clients/06-solomachine/consensus_state.go 88.00% <ø> (ø)
modules/light-clients/06-solomachine/header.go 89.65% <ø> (ø)
modules/light-clients/06-solomachine/module.go 0.00% <0.00%> (ø)
...odules/light-clients/06-solomachine/solomachine.go 100.00% <ø> (ø)
...les/light-clients/07-tendermint/consensus_state.go 100.00% <ø> (ø)
modules/light-clients/07-tendermint/fraction.go 100.00% <ø> (ø)
modules/light-clients/07-tendermint/genesis.go 70.00% <ø> (ø)
... and 48 more

Timestamp: timestamp,
Diversifier: cs.ConsensusState.Diversifier,
Path: []byte(merklePath.String()),
Data: nil,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a difference in verification if this is nil or []byte?

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 it would be good to test this but I'd imagine there is a difference

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opened #1914

modules/light-clients/06-solomachine/client_state.go Outdated Show resolved Hide resolved
Sequence: header.Sequence,
Timestamp: header.Timestamp,
Diversifier: cs.ConsensusState.Diversifier,
Path: []byte{},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe we should define a path for this? also noting the diff between nil and []byte{}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I wondered this myself when changing around the code. Maybe we could at least define a constant of some sort if we don't use a specific path

Copy link
Contributor Author

Choose a reason for hiding this comment

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

opened #1915 and #1916

modules/light-clients/06-solomachine/update.go Outdated Show resolved Hide resolved
modules/light-clients/07-tendermint/update.go Outdated Show resolved Hide resolved
@colin-axner
Copy link
Contributor Author

I've done a self review, addressed all issues that required immediate action and opened up issues for the others. My remaining questions are commented above. Specifically interested in construction of sign bytes for header/verify non membership

Copy link
Member

@AdityaSripal AdityaSripal left a comment

Choose a reason for hiding this comment

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

Amazing work team 🚀

CHANGELOG.md Outdated Show resolved Hide resolved
@@ -100,7 +100,7 @@ packaged inside a payload which is json serialized and passed to `callContract`
array of bytes returned by the smart contract. This data is deserialized and passed as return argument.

```go
func (c *ClientState) CheckProposedHeaderAndUpdateState(context sdk.Context, marshaler codec.BinaryMarshaler, store sdk.KVStore, header exported.Header) (exported.ClientState, exported.ConsensusState, error) {
func (c *ClientState) CheckProposedHeaderAndUpdateState(context sdk.Context, marshaler codec.BinaryMarshaler, store sdk.KVStore, header exported.ClientMessage) (exported.ClientState, exported.ConsensusState, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be split up into two functions or we will allow the ADR authors to update?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we should change the status of the ADR to "needs update"

docs/migrations/v5-to-v6.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants