Skip to content

Commit

Permalink
Merge branch 'main' of github.com:cosmos/ibc-go
Browse files Browse the repository at this point in the history
  • Loading branch information
charleenfei committed Jun 16, 2022
2 parents 250e45f + 681a558 commit bf3b96b
Show file tree
Hide file tree
Showing 45 changed files with 1,427 additions and 1,014 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- 'v[0-9]+.[0-9]+.[0-9]+' # Push events to matching v*, i.e. v1.0.0, v20.15.10
- 'v[0-9]+.[0-9]+.[0-9]+-?[a-z0-9]+' # Push events to matching v*-[alpha/beta/rc], i.e. v3.0.0-alpha1, v3.0.0-beta1, v3.0.0-rc0

env:
REGISTRY: ghcr.io
IMAGE_NAME: ibc-go-simd

jobs:
goreleaser:
runs-on: ubuntu-latest
Expand All @@ -27,3 +31,24 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to the Container registry
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a
with:
images: ${{ env.REGISTRY }}/cosmos/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
184 changes: 166 additions & 18 deletions CHANGELOG.md

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,15 @@ For example, if the current major release series is v1 and was released on Janua
Only the following major release series have a stable release status:

|Release|End of Life Date|
|-------|-------|
|-------|----------------|
|`v1.3.x`|July 01, 2022|
|`v1.4.x`|July 01, 2022|
|`v1.5.x`|July 01, 2022|
|`v2.1.x`|February 01, 2023|
|`v2.2.x`|February 01, 2023|
|`v2.3.x`|February 01, 2023|
|`v3.0.x`|March 15, 2023|
|`v3.1.x`|March 15, 2023|

**Note**: The v1 major release series will reach end of life 6 months after merging this policy. v2 will reach end of life one year after merging this policy.

Expand Down
56 changes: 55 additions & 1 deletion docs/apps/interchain-accounts/auth-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,67 @@ func (im IBCModule) OnRecvPacket(
The authentication module can begin registering interchain accounts by calling `RegisterInterchainAccount`:

```go
if err := keeper.icaControllerKeeper.RegisterInterchainAccount(ctx, connectionID, owner.String()); err != nil {
if err := keeper.icaControllerKeeper.RegisterInterchainAccount(ctx, connectionID, owner.String(), version); err != nil {
return err
}

return nil
```

The `version` argument is used to support ICS29 fee middleware for relayer incentivization of ICS27 packets. Consumers of the `RegisterInterchainAccount` are expected to build the appropriate JSON encoded version string themselves and pass it accordingly.

The following code snippet illustrates how to construct an appropriate interchain accounts `Metadata` and encode it as a JSON bytestring:

```go
icaMetadata := icatypes.Metadata{
Version: icatypes.Version,
ControllerConnectionId: controllerConnectionID,
HostConnectionId: hostConnectionID,
Encoding: icatypes.EncodingProtobuf,
TxType: icatypes.TxTypeSDKMultiMsg,
}

appVersion, err := icatypes.ModuleCdc.MarshalJSON(&icaMetadata)
if err != nil {
return err
}

if err := keeper.icaControllerKeeper.RegisterInterchainAccount(ctx, controllerConnectionID, owner.String(), string(appVersion)); err != nil {
return err
}
```

Similarly, if the application stack is configured to route through ICS29 fee middleware and a fee enabled channel is desired, construct the appropriate ICS29 `Metadata` type:

```go
icaMetadata := icatypes.Metadata{
Version: icatypes.Version,
ControllerConnectionId: controllerConnectionID,
HostConnectionId: hostConnectionID,
Encoding: icatypes.EncodingProtobuf,
TxType: icatypes.TxTypeSDKMultiMsg,
}

appVersion, err := icatypes.ModuleCdc.MarshalJSON(&icaMetadata)
if err != nil {
return err
}

feeMetadata := feetypes.Metadata{
AppVersion: string(appVersion),
FeeVersion: feetypes.Version,
}

feeEnabledVersion, err := feetypes.ModuleCdc.MarshalJSON(&feeMetadata)
if err != nil {
return err
}

if err := keeper.icaControllerKeeper.RegisterInterchainAccount(ctx, controllerConnectionID, owner.String(), string(feeEnabledVersion)); err != nil {
return err
}
```

## `SendTx`

The authentication module can attempt to send a packet by calling `SendTx`:
Expand Down
34 changes: 18 additions & 16 deletions docs/client/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1046,24 +1046,26 @@ paths:
format: uint64
tags:
- Query
'/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer_address}/counterparty_address':
'/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/counterparty_payee':
get:
summary: >-
CounterpartyAddress returns the registered counterparty address for
forward relaying
operationId: CounterpartyAddress
CounterpartyPayee returns the registered counterparty payee for forward
relaying
operationId: CounterpartyPayee
responses:
'200':
description: A successful response.
schema:
type: object
properties:
counterparty_address:
counterparty_payee:
type: string
title: the counterparty address used to compensate forward relaying
title: >-
the counterparty payee address used to compensate forward
relaying
title: >-
QueryCounterpartyAddressResponse defines the response type for the
CounterpartyAddress rpc
QueryCounterpartyPayeeResponse defines the response type for the
CounterpartyPayee rpc
default:
description: An unexpected error response
schema:
Expand Down Expand Up @@ -1259,14 +1261,14 @@ paths:
in: path
required: true
type: string
- name: relayer_address
- name: relayer
description: the relayer address to which the counterparty is registered
in: path
required: true
type: string
tags:
- Query
'/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer_address}/payee':
'/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/payee':
get:
summary: >-
Payee returns the registered payee address for a specific channel given
Expand Down Expand Up @@ -1477,7 +1479,7 @@ paths:
in: path
required: true
type: string
- name: relayer_address
- name: relayer
description: the relayer address to which the distribution address is registered
in: path
required: true
Expand Down Expand Up @@ -13524,15 +13526,15 @@ definitions:
title: >-
PacketFee contains ICS29 relayer fees, refund address and optional list of
permitted relayers
ibc.applications.fee.v1.QueryCounterpartyAddressResponse:
ibc.applications.fee.v1.QueryCounterpartyPayeeResponse:
type: object
properties:
counterparty_address:
counterparty_payee:
type: string
title: the counterparty address used to compensate forward relaying
title: the counterparty payee address used to compensate forward relaying
title: >-
QueryCounterpartyAddressResponse defines the response type for the
CounterpartyAddress rpc
QueryCounterpartyPayeeResponse defines the response type for the
CounterpartyPayee rpc
ibc.applications.fee.v1.QueryFeeEnabledChannelResponse:
type: object
properties:
Expand Down
Loading

0 comments on commit bf3b96b

Please sign in to comment.