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 update to latest from main #1106

Merged
merged 36 commits into from
Mar 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8f62a47
refactor: allow the mock module to be used multiple times as base ibc…
colin-axner Feb 10, 2022
843b459
feat: adding Pack/Unpack acknowledgement helper fns (#895)
seantking Feb 10, 2022
fb2f041
imp: support custom keys for testing (#893)
fedekunze Feb 10, 2022
c27d5b5
chore: add ParsePacketFromEvents testing helper function (#904)
colin-axner Feb 14, 2022
afa2d90
fix: correctly claim capability for mock module, handle genesis expor…
colin-axner Feb 15, 2022
d31f92d
docs: update migration docs for upgrade proposal in relation to ICS27…
colin-axner Feb 15, 2022
f442721
chore(ica): add trail of bits audit report (#903)
crodriguezvega Feb 16, 2022
20dd5ca
testing: adding multiple sender accounts for testing purposes (#935)
seantking Feb 17, 2022
98f4d3a
Create test chain with multiple validators (#942)
AdityaSripal Feb 17, 2022
52e3ae5
add changelog entry for SDK bump
crodriguezvega Feb 18, 2022
d48f576
fix: classify client states without consensus states as expired (#941)
timlind Feb 22, 2022
01cd4ad
chore: fix broken link (#972)
colin-axner Feb 22, 2022
9fcf254
add backport actions for v1.3.x and v2.1.x (#958)
crodriguezvega Feb 22, 2022
08d38d4
Revert "feat: adding Pack/Unpack acknowledgement helper fns (#895)" (…
colin-axner Feb 23, 2022
ef34765
chore: update migration docs (#985)
colin-axner Feb 23, 2022
556cc01
chore: fix mispelled words (#991)
seantking Feb 24, 2022
04ab3cb
fix: remove go mod tidy from proto-gen script (#989)
seantking Feb 24, 2022
4545154
bug: support base denoms with slashes (#978)
crodriguezvega Feb 28, 2022
9d8be7c
upgrade ics23 to v0.7 (#948)
crodriguezvega Feb 28, 2022
6d6888b
ibctesting: make `testing.T` public (#1020)
fedekunze Feb 28, 2022
e1be19b
add changelog entry for #941
crodriguezvega Mar 1, 2022
f994d1e
fix package import (#1007)
crodriguezvega Mar 1, 2022
147e0f1
feat: Add a function to initialize the ICS27 module via an upgrade pr…
colin-axner Mar 1, 2022
f71a505
docs: add missing args to NewKeeper in integration docs (#1038)
daeMOn63 Mar 3, 2022
a55ca88
small fixes for v2 to v3 migration (#1016)
crodriguezvega Mar 4, 2022
029c6e9
add missing slash
crodriguezvega Mar 4, 2022
7ae90c2
build(deps): bump actions/checkout from 2.4.0 to 3 (#1045)
dependabot[bot] Mar 7, 2022
fc452ac
call packet.GetSequence() rather than passing the func as argument (#…
Mar 7, 2022
13df199
Add counterpartyChannelID param to IBCModule.OnChanOpenAck (#1086)
catShaark Mar 9, 2022
90a7e5f
fix mirgation docs (#1091)
colin-axner Mar 9, 2022
a7563c9
fix: handle testing update client errors (#1094)
fedekunze Mar 9, 2022
f0b94df
replace channel keeper with IBC keeper in AnteDecorator (#950)
crodriguezvega Mar 10, 2022
d40f1da
add backport rules for v1.4.x and v2.2.x (#1085)
crodriguezvega Mar 10, 2022
c32e4be
ibctesting: custom voting power reduction for testing (#939)
fedekunze Mar 11, 2022
a8e1f1b
Merge branch 'main' into 02-client-refactor
seantking Mar 11, 2022
a1d8680
Merge branch '02-client-refactor' into sean/02-client-update-to-latest
seantking Mar 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,30 @@ pull_request_rules:
backport:
branches:
- release/v1.1.x
- name: backport patches to v1.2x branch
- name: backport patches to v1.2.x branch
conditions:
- base=main
- label=backport-to-v1.2.x
actions:
backport:
branches:
- release/v1.2.x
- name: backport patches to v1.3.x branch
conditions:
- base=main
- label=backport-to-v1.3.x
actions:
backport:
branches:
- release/v1.3.x
- name: backport patches to v1.4.x branch
conditions:
- base=main
- label=backport-to-v1.4.x
actions:
backport:
branches:
- release/v1.4.x
- name: backport patches to v2.0.x branch
conditions:
- base=main
Expand All @@ -42,11 +58,27 @@ pull_request_rules:
backport:
branches:
- release/v2.0.x
- name: backport patches to v2.1.x branch
conditions:
- base=main
- label=backport-to-v2.1.x
actions:
backport:
branches:
- release/v2.1.x
- name: backport patches to v2.2.x branch
conditions:
- base=main
- label=backport-to-v2.2.x
actions:
backport:
branches:
- release/v2.2.x
- name: backport patches to v3.0.x branch
conditions:
- base=main
- label=backport-to-v3.0.x
actions:
backport:
branches:
- release/v3.0.x
- release/v3.0.x
2 changes: 1 addition & 1 deletion .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: '.github/workflows/link-check-config.json'
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
matrix:
go-arch: ["amd64", "arm", "arm64"]
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: actions/setup-go@v2.1.5
with:
go-version: 1.17
Expand All @@ -54,7 +54,7 @@ jobs:
split-test-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- name: Create a file with all the pkgs
run: go list ./... > pkgs.txt
- name: Split pkgs into 4 files
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
matrix:
part: ["00", "01", "02", "03"]
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: actions/setup-go@v2.1.5
with:
go-version: 1.17
Expand All @@ -112,7 +112,7 @@ jobs:
runs-on: ubuntu-latest
needs: tests
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1
with:
PATTERNS: |
Expand Down
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Dependencies

* [\#404](https://github.com/cosmos/ibc-go/pull/404) Bump Go version to 1.17
* [\#851](https://github.com/cosmos/ibc-go/pull/851) Bump SDK version to v0.45.1
* [\#948](https://github.com/cosmos/ibc-go/pull/948) Bump ics23/go to v0.7
* (core) [\#709](https://github.com/cosmos/ibc-go/pull/709) Replace github.com/pkg/errors with stdlib errors

### API Breaking

* (testing) [\#939](https://github.com/cosmos/ibc-go/pull/939) Support custom power reduction for testing.
* (modules/core/05-port) [\#1086](https://github.com/cosmos/ibc-go/pull/1086) Added `counterpartyChannelID` argument to IBCModule.OnChanOpenAck
* (06-solomachine) [\#1100](https://github.com/cosmos/ibc-go/pull/1100) Remove `GetClientID` function from 06-solomachine `Misbehaviour` type.
* (06-solomachine) [\#1100](https://github.com/cosmos/ibc-go/pull/1100) Deprecate `ClientId` field in 06-solomachine `Misbehaviour` type.
* (07-tendermint) [\#1097](https://github.com/cosmos/ibc-go/pull/1097) Remove `GetClientID` function from 07-tendermint `Misbehaviour` type.
Expand All @@ -57,21 +60,27 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (modules/core/02-client) [\#536](https://github.com/cosmos/ibc-go/pull/536) `GetSelfConsensusState` return type changed from bool to error.
* (channel) [\#644](https://github.com/cosmos/ibc-go/pull/644) Removes `CounterpartyHops` function from the ChannelKeeper.
* (testing) [\#776](https://github.com/cosmos/ibc-go/pull/776) Adding helper fn to generate capability name for testing callbacks
* (testing) [\#892](https://github.com/cosmos/ibc-go/pull/892) IBC Mock modules store the scoped keeper and portID within the IBCMockApp. They also maintain reference to the AppModule to update the AppModule's list of IBC applications it references. Allows for the mock module to be reused as a base application in middleware stacks.
* (channel) [\#882](https://github.com/cosmos/ibc-go/pull/882) The `WriteAcknowledgement` API now takes `exported.Acknowledgement` instead of a byte array
* (modules/core/ante) [\#950](https://github.com/cosmos/ibc-go/pull/950) Replaces the channel keeper with the IBC keeper in the IBC `AnteDecorator` in order to execute the entire message and be able to reject redundant messages that are in the same block as the non-redundant messages.

### State Machine Breaking

* (transfer) [\#818](https://github.com/cosmos/ibc-go/pull/818) Error acknowledgements returned from Transfer `OnRecvPacket` now include a deterministic ABCI code and error message.

### Improvements

* (interchain-accounts) [\#1037](https://github.com/cosmos/ibc-go/pull/1037) Add a function `InitModule` to the interchain accounts `AppModule`. This function should be called within the upgrade handler when adding the interchain accounts module to a chain. It should be called in place of InitGenesis (set the consensus version in the version map).
* (testing) [\#942](https://github.com/cosmos/ibc-go/pull/942) `NewTestChain` will create 4 validators in validator set by default. A new constructor function `NewTestChainWithValSet` is provided for test writers who want custom control over the validator set of test chains.
* (testing) [\#904](https://github.com/cosmos/ibc-go/pull/904) Add `ParsePacketFromEvents` function to the testing package. Useful when sending/relaying packets via the testing package.
* (testing) [\#893](https://github.com/cosmos/ibc-go/pull/893) Support custom private keys for testing.
* (testing) [\#810](https://github.com/cosmos/ibc-go/pull/810) Additional testing function added to `Endpoint` type called `RecvPacketWithResult`. Performs the same functionality as the existing `RecvPacket` function but also returns the message result. `path.RelayPacket` no longer uses the provided acknowledgement argument and instead obtains the acknowledgement via MsgRecvPacket events.
* (connection) [\#721](https://github.com/cosmos/ibc-go/pull/721) Simplify connection handshake error messages when unpacking client state.
* (channel) [\#692](https://github.com/cosmos/ibc-go/pull/692) Minimize channel logging by only emitting the packet sequence, source port/channel, destination port/channel upon packet receives, acknowledgements and timeouts.
* [\#383](https://github.com/cosmos/ibc-go/pull/383) Adds helper functions for merging and splitting middleware versions from the underlying app version.
* (modules/core/05-port) [\#288](https://github.com/cosmos/ibc-go/issues/288) Making the 05-port keeper function IsBound public. The IsBound function checks if the provided portID is already binded to a module.
* (channel) [\#644](https://github.com/cosmos/ibc-go/pull/644) Adds `GetChannelConnection` to the ChannelKeeper. This function returns the connectionID and connection state associated with a channel.
* (channel) [\647](https://github.com/cosmos/ibc-go/pull/647) Reorganizes channel handshake handling to set channel state after IBC application callbacks.
* (channel) [\#647](https://github.com/cosmos/ibc-go/pull/647) Reorganizes channel handshake handling to set channel state after IBC application callbacks.
* (client) [\#724](https://github.com/cosmos/ibc-go/pull/724) `IsRevisionFormat` and `IsClientIDFormat` have been updated to disallow newlines before the dash used to separate the chainID and revision number, and the client type and client sequence.

### Features
Expand All @@ -83,6 +92,9 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Bug Fixes

* (testing) [\#884](https://github.com/cosmos/ibc-go/pull/884) Add and use in simapp a custom ante handler that rejects redundant transactions
* (transfer) [\#978](https://github.com/cosmos/ibc-go/pull/978) Support base denoms with slashes in denom validation
* (client) [\#941](https://github.com/cosmos/ibc-go/pull/941) Classify client states without consensus states as expired
* (modules/core/04-channel) [\#994](https://github.com/cosmos/ibc-go/pull/944) Call `packet.GetSequence()` rather than passing func in `AcknowledgePacket` log output

## [v2.0.2](https://github.com/cosmos/ibc-go/releases/tag/v2.0.2) - 2021-12-15

Expand Down
14 changes: 7 additions & 7 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,37 +109,37 @@ module.exports = {
{
title: "Interchain Accounts",
directory: true,
path: "/app-modules",
path: "/apps",
children: [
{
title: "Overview",
directory: false,
path: "/app-modules/interchain-accounts/overview.html"
path: "/apps/interchain-accounts/overview.html"
},
{
title: "Authentication Modules",
directory: false,
path: "/app-modules/interchain-accounts/auth-modules.html"
path: "/apps/interchain-accounts/auth-modules.html"
},
{
title: "Active Channels",
directory: false,
path: "/app-modules/interchain-accounts/active-channels.html"
path: "/apps/interchain-accounts/active-channels.html"
},
{
title: "Integration",
directory: false,
path: "/app-modules/interchain-accounts/integration.html"
path: "/apps/interchain-accounts/integration.html"
},
{
title: "Parameters",
directory: false,
path: "/app-modules/interchain-accounts/parameters.html"
path: "/apps/interchain-accounts/parameters.html"
},
{
title: "Transactions",
directory: false,
path: "/app-modules/interchain-accounts/transactions.html"
path: "/apps/interchain-accounts/transactions.html"
},
]
},
Expand Down
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/ibc/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ func NewApp(...args) *App {

// Create IBC Keeper
app.IBCKeeper = ibckeeper.NewKeeper(
appCodec, keys[ibchost.StoreKey], app.StakingKeeper, scopedIBCKeeper,
appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper,
)

// Create Transfer Keepers
app.TransferKeeper = ibctransferkeeper.NewKeeper(
appCodec, keys[ibctransfertypes.StoreKey],
app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper,
appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName),
app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper,
app.AccountKeeper, app.BankKeeper, scopedTransferKeeper,
)
transferModule := transfer.NewAppModule(app.TransferKeeper)
Expand Down
35 changes: 35 additions & 0 deletions docs/ibc/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@
- [MsgTimeoutOnCloseResponse](#ibc.core.channel.v1.MsgTimeoutOnCloseResponse)
- [MsgTimeoutResponse](#ibc.core.channel.v1.MsgTimeoutResponse)

- [ResponseResultType](#ibc.core.channel.v1.ResponseResultType)

- [Msg](#ibc.core.channel.v1.Msg)

- [ibc/core/client/v1/genesis.proto](#ibc/core/client/v1/genesis.proto)
Expand Down Expand Up @@ -1738,6 +1740,11 @@ MsgAcknowledgement receives incoming IBC acknowledgement
MsgAcknowledgementResponse defines the Msg/Acknowledgement response type.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `result` | [ResponseResultType](#ibc.core.channel.v1.ResponseResultType) | | |





Expand Down Expand Up @@ -1954,6 +1961,11 @@ MsgRecvPacket receives incoming IBC packet
MsgRecvPacketResponse defines the Msg/RecvPacket response type.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `result` | [ResponseResultType](#ibc.core.channel.v1.ResponseResultType) | | |





Expand Down Expand Up @@ -2003,6 +2015,11 @@ MsgTimeoutOnClose timed-out packet upon counterparty channel closure.
MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `result` | [ResponseResultType](#ibc.core.channel.v1.ResponseResultType) | | |





Expand All @@ -2013,11 +2030,29 @@ MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type.
MsgTimeoutResponse defines the Msg/Timeout response type.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `result` | [ResponseResultType](#ibc.core.channel.v1.ResponseResultType) | | |





<!-- end messages -->


<a name="ibc.core.channel.v1.ResponseResultType"></a>

### ResponseResultType
ResponseResultType defines the possible outcomes of the execution of a message

| Name | Number | Description |
| ---- | ------ | ----------- |
| RESPONSE_RESULT_UNSPECIFIED | 0 | Default zero value enumeration |
| RESPONSE_RESULT_NOOP | 1 | The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) |
| RESPONSE_RESULT_SUCCESS | 2 | The message was executed successfully |


<!-- end enums -->

<!-- end HasExtensions -->
Expand Down
2 changes: 1 addition & 1 deletion docs/ibc/relayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ a module event emission with the attribute value `ibc_<submodulename>` (02-clien

### Subscribing with Tendermint

Calling the Tendermint RPC method `Subscribe` via [Tendermint's Websocket](https://docs.tendermint.com/master/rpc/) will return events using
Calling the Tendermint RPC method `Subscribe` via [Tendermint's Websocket](https://docs.tendermint.com/v0.35/rpc/) will return events using
Tendermint's internal representation of them. Instead of receiving back a list of events as they
were emitted, Tendermint will return the type `map[string][]string` which maps a string in the
form `<event_type>.<attribute_key>` to `attribute_value`. This causes extraction of the event
Expand Down
Loading