Skip to content

Commit

Permalink
merge to main
Browse files Browse the repository at this point in the history
  • Loading branch information
charleenfei committed Aug 29, 2023
2 parents efa5e43 + 5916683 commit 3d627a9
Show file tree
Hide file tree
Showing 117 changed files with 2,440 additions and 1,072 deletions.
3 changes: 1 addition & 2 deletions .github/compatibility-test-matrices/main/client-chain-b.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
],
"test": [
"TestClientUpdateProposal_Succeeds",
"TestClient_Update_Misbehaviour",
"TestAllowedClientsParam"
"TestClient_Update_Misbehaviour"
],
"relayer-type": [
"rly"
Expand Down
3 changes: 1 addition & 2 deletions .github/compatibility-test-matrices/main/ica-chain-a.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"TestMsgSendTx_SuccessfulTransfer",
"TestMsgSendTx_FailedTransfer_InsufficientFunds",
"TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA",
"TestControllerEnabledParam",
"TestHostEnabledParam"
"TestControllerEnabledParam"
],
"relayer-type": [
"rly"
Expand Down
1 change: 0 additions & 1 deletion .github/compatibility-test-matrices/main/ica-chain-b.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"TestMsgSendTx_SuccessfulTransfer",
"TestMsgSendTx_FailedTransfer_InsufficientFunds",
"TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA",
"TestControllerEnabledParam",
"TestHostEnabledParam"
],
"relayer-type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
"TestMsgTransfer_Succeeds_Nonincentivized",
"TestMsgTransfer_Fails_InvalidAddress",
"TestMsgTransfer_Timeout_Nonincentivized",
"TestMsgTransfer_WithMemo",
"TestSendEnabledParam",
"TestReceiveEnabledParam"
"TestMsgTransfer_WithMemo"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"TestMsgTransfer_Succeeds_Nonincentivized",
"TestMsgTransfer_Fails_InvalidAddress",
"TestMsgTransfer_Timeout_Nonincentivized",
"TestMsgTransfer_WithMemo",
"TestSendEnabledParam",
"TestReceiveEnabledParam"
"TestMsgTransfer_WithMemo"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"TestMsgTransfer_Succeeds_Nonincentivized",
"TestMsgTransfer_Fails_InvalidAddress",
"TestMsgTransfer_Timeout_Nonincentivized",
"TestMsgTransfer_WithMemo",
"TestSendEnabledParam",
"TestReceiveEnabledParam"
"TestMsgTransfer_WithMemo"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"TestMsgTransfer_Succeeds_Nonincentivized",
"TestMsgTransfer_Fails_InvalidAddress",
"TestMsgTransfer_Timeout_Nonincentivized",
"TestMsgTransfer_WithMemo",
"TestSendEnabledParam",
"TestReceiveEnabledParam"
"TestMsgTransfer_WithMemo"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
],
"test": [
"TestClientUpdateProposal_Succeeds",
"TestClient_Update_Misbehaviour",
"TestAllowedClientsParam"
"TestClient_Update_Misbehaviour"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"TestMsgSendTx_SuccessfulTransfer",
"TestMsgSendTx_FailedTransfer_InsufficientFunds",
"TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA",
"TestControllerEnabledParam",
"TestHostEnabledParam"
"TestControllerEnabledParam"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"TestMsgSendTx_SuccessfulTransfer",
"TestMsgSendTx_FailedTransfer_InsufficientFunds",
"TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA",
"TestControllerEnabledParam",
"TestHostEnabledParam"
],
"relayer-type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"TestMsgTransfer_Succeeds_Nonincentivized",
"TestMsgTransfer_Fails_InvalidAddress",
"TestMsgTransfer_Timeout_Nonincentivized",
"TestMsgTransfer_WithMemo",
"TestSendEnabledParam",
"TestReceiveEnabledParam"
"TestMsgTransfer_WithMemo"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
],
"test": [
"TestClientUpdateProposal_Succeeds",
"TestClient_Update_Misbehaviour",
"TestAllowedClientsParam"
"TestClient_Update_Misbehaviour"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"TestMsgSendTx_SuccessfulTransfer",
"TestMsgSendTx_FailedTransfer_InsufficientFunds",
"TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA",
"TestControllerEnabledParam",
"TestHostEnabledParam"
"TestControllerEnabledParam"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"TestMsgSendTx_SuccessfulTransfer",
"TestMsgSendTx_FailedTransfer_InsufficientFunds",
"TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA",
"TestControllerEnabledParam",
"TestHostEnabledParam"
],
"relayer-type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"TestMsgTransfer_Succeeds_Nonincentivized",
"TestMsgTransfer_Fails_InvalidAddress",
"TestMsgTransfer_Timeout_Nonincentivized",
"TestMsgTransfer_WithMemo",
"TestSendEnabledParam",
"TestReceiveEnabledParam"
"TestMsgTransfer_WithMemo"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
],
"test": [
"TestClientUpdateProposal_Succeeds",
"TestClient_Update_Misbehaviour",
"TestAllowedClientsParam"
"TestClient_Update_Misbehaviour"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"TestMsgSendTx_SuccessfulTransfer",
"TestMsgSendTx_FailedTransfer_InsufficientFunds",
"TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA",
"TestControllerEnabledParam",
"TestHostEnabledParam"
"TestControllerEnabledParam"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"TestMsgSendTx_SuccessfulTransfer",
"TestMsgSendTx_FailedTransfer_InsufficientFunds",
"TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA",
"TestControllerEnabledParam",
"TestHostEnabledParam"
],
"relayer-type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"TestMsgTransfer_Succeeds_Nonincentivized",
"TestMsgTransfer_Fails_InvalidAddress",
"TestMsgTransfer_Timeout_Nonincentivized",
"TestMsgTransfer_WithMemo",
"TestSendEnabledParam",
"TestReceiveEnabledParam"
"TestMsgTransfer_WithMemo"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
],
"test": [
"TestClientUpdateProposal_Succeeds",
"TestClient_Update_Misbehaviour",
"TestAllowedClientsParam"
"TestClient_Update_Misbehaviour"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"TestMsgSendTx_SuccessfulTransfer",
"TestMsgSendTx_FailedTransfer_InsufficientFunds",
"TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA",
"TestControllerEnabledParam",
"TestHostEnabledParam"
"TestControllerEnabledParam"
],
"relayer-type": [
"rly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"TestMsgSendTx_SuccessfulTransfer",
"TestMsgSendTx_FailedTransfer_InsufficientFunds",
"TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA",
"TestControllerEnabledParam",
"TestHostEnabledParam"
],
"relayer-type": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"TestMsgTransfer_Succeeds_Nonincentivized",
"TestMsgTransfer_Fails_InvalidAddress",
"TestMsgTransfer_Timeout_Nonincentivized",
"TestMsgTransfer_WithMemo",
"TestSendEnabledParam",
"TestReceiveEnabledParam"
"TestMsgTransfer_WithMemo"
],
"relayer-type": [
"rly"
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/build-callbacks-simd-image-from-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build Callbacks Simd Image
on:
workflow_dispatch:
inputs:
tag:
description: 'The tag of the image to build'
required: true
type: string

env:
REGISTRY: ghcr.io
ORG: cosmos
IMAGE_NAME: ibc-go-callbacks-simd
GIT_TAG: "${{ inputs.tag }}"

jobs:
build-image-at-tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: "${{ env.GIT_TAG }}"
fetch-depth: 0
- name: Log in to the Container registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
run: |
# remove any `/` characters from the docker tag and replace them with a -
docker_tag="$(echo $GIT_TAG | sed 's/\//-/')"
docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:${docker_tag}" -f modules/apps/callbacks/Dockerfile
docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:${docker_tag}"
2 changes: 1 addition & 1 deletion .github/workflows/callbacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v3
- uses: golangci/[email protected]
with:
version: v1.53.3
version: v1.54.2
args: --timeout 5m
working-directory: modules/apps/callbacks

Expand Down
37 changes: 37 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,43 @@ module.exports = {
},
],
},
{
title: "Callbacks Middleware",
directory: true,
path: "/middleware",
children: [
{
title: "Overview",
directory: false,
path: "/middleware/callbacks/overview.html",
},
{
title: "Integration",
directory: false,
path: "/middleware/callbacks/integration.html",
},
{
title: "Interfaces",
directory: false,
path: "/middleware/callbacks/interfaces.html",
},
{
title: "Events",
directory: false,
path: "/middleware/callbacks/events.html",
},
{
title: "End Users",
directory: false,
path: "/middleware/callbacks/end-users.html",
},
{
title: "Gas Management",
directory: false,
path: "/middleware/callbacks/gas.html",
},
],
},
],
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/apps/transfer/params.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ To change the parameter values, you must make a governance proposal that execute
// MsgUpdateParams is the Msg/UpdateParams request type.
message MsgUpdateParams {
// authority is the address that controls the module (defaults to x/gov unless overwritten).
string authority = 1;
// signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten).
string signer = 1;
// params defines the transfer parameters to update.
//
Expand Down
43 changes: 43 additions & 0 deletions docs/assets/callbacks-mw/callbackflow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions docs/assets/callbacks-mw/ics4-callbackflow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions docs/ibc/apps/ibcmodule.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,3 +347,26 @@ func (im IBCModule) OnTimeoutPacket(
// do custom timeout logic
}
```

### Optional interfaces

The following interface are optional and MAY be implemented by an IBCModule.

#### PacketDataUnmarshaler

The `PacketDataUnmarshaler` interface is defined as follows:

```go
// PacketDataUnmarshaler defines an optional interface which allows a middleware to
// request the packet data to be unmarshaled by the base application.
type PacketDataUnmarshaler interface {
// UnmarshalPacketData unmarshals the packet data into a concrete type
UnmarshalPacketData([]byte) (interface{}, error)
}
```

The implementation of `UnmarshalPacketData` should unmarshal the bytes into the packet data type defined for an IBC stack.
The base application of an IBC stack should unmarshal the bytes into its packet data type, while a middleware may simply defer the call to the underlying application.

This interface allows middlewares to unmarshal a packet data in order to make use of interfaces the packet data type implements.
For example, the callbacks middleware makes use of this function to access packet data types which implement the `PacketData` and `PacketDataProvider` interfaces.
Loading

0 comments on commit 3d627a9

Please sign in to comment.