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

Feature: Interchain accounts v1 #380

Merged
merged 80 commits into from
Dec 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
f6303dd
migrate ibc-account module to ibc-go
colin-axner Jul 15, 2021
c27653a
Add @seantking to CODEOWNERS for interchain accounts module
colin-axner Jul 15, 2021
0148576
rename ibc-account -> interchain-accounts (#280)
colin-axner Jul 21, 2021
b870be4
Integrate ICA into testing package, add simple keeper tests (#282)
colin-axner Jul 22, 2021
c3be169
Add interchain account OnChanOpenInit and InitInterchainAccount tests…
colin-axner Jul 23, 2021
a9cdf5a
feat: ica proto (#305)
seantking Jul 29, 2021
2a160ed
ICA OnChanOpenTry update + tests (#299)
colin-axner Aug 5, 2021
38ebbff
test: adding test for OnChanOpenConfirm (#312)
seantking Aug 5, 2021
881276f
fix: updating port-id & fixing OnChanOpenInit bug (#321)
seantking Aug 9, 2021
9d3f02c
Add counterparty port ID to controller portID (#319)
colin-axner Aug 9, 2021
b4d82a2
test: check active channel is correct (#324)
seantking Aug 13, 2021
8acf6e6
Removed memkey from ICA keeper (#342)
lukerhoads Aug 24, 2021
1bf7930
moving stateless GenerateAddress func to types (#352)
damiannolan Aug 27, 2021
599ad7f
update ica branch codeowners (#353)
colin-axner Aug 27, 2021
0174855
move Get/SetInterchainAccount to keeper.go, add tests (#355)
damiannolan Aug 30, 2021
01bb9bf
chore: interchain accounts cleanup, cli alias (#362)
damiannolan Aug 31, 2021
2a3e526
updating interchain accounts pkg naming (#364)
damiannolan Sep 1, 2021
74fb34e
adding ica grpc query tests (#368)
damiannolan Sep 2, 2021
d37f2ec
updating grpc query tests, removing queryClient on KeeperTestSuite (#…
damiannolan Sep 6, 2021
e8d0dde
ICA: Adding tests for relay.go (#337)
seantking Sep 13, 2021
e0cef86
Update ICA on main + add app version negotiation stub (#403)
seantking Sep 14, 2021
b5ad323
Merge branch 'main' into interchain-accounts
seantking Sep 15, 2021
7c7bf8e
Merge pull request #407 from cosmos/sean/chore-merge-conflicts-ica
seantking Sep 15, 2021
3517def
fix err message (#419)
colin-axner Sep 20, 2021
e7cf4d3
feat: ica app version negotiation (#410)
damiannolan Sep 20, 2021
e64fb25
test: adding tests for OnRecvPacket (#412)
seantking Sep 23, 2021
bf9f20a
Merge branch 'main' into interchain-accounts
colin-axner Sep 23, 2021
7fb133e
chore: merge latest main to interchain-accounts (#435)
damiannolan Sep 23, 2021
c149317
chore: update ica prefix for port identifiers (#434)
damiannolan Sep 23, 2021
581ca29
test: account/keeper tests for ICA (#420)
seantking Sep 24, 2021
c4fcc0e
feat: module account address derivation (#428)
damiannolan Sep 24, 2021
df1aa03
ICA: tests for module.go (#424)
seantking Sep 24, 2021
77b7869
additional code cov and clean up (#440)
damiannolan Sep 27, 2021
3271da8
Merge branch 'main' into interchain-accounts
colin-axner Sep 29, 2021
0db5c95
split ica module.go into ibc_module.go (#453)
colin-axner Sep 29, 2021
e24294c
Rename IBCAccountPacketData, Remove TxRaw (#456)
colin-axner Oct 4, 2021
064aa42
Rename DeserializeTx, enforce []sdk.Msg usage in SerializeCosmosTx (#…
colin-axner Oct 6, 2021
1f87f2e
remove computeVirtualTxHash (#473)
colin-axner Oct 7, 2021
f129376
chore: ctrl port connection id validation (#454)
damiannolan Oct 7, 2021
e072e67
chore: correctly set/delete active channels (#463)
damiannolan Oct 7, 2021
9595948
remove ica hooks (#480)
colin-axner Oct 8, 2021
9450085
chore: minor nits - renaming and error msgs (#464)
damiannolan Oct 11, 2021
0ae4a75
chore: update portkey to include port ID (#467)
damiannolan Oct 11, 2021
3e9afcb
ICA: Rename TxBody, Remove serialization logic from controller, intro…
colin-axner Oct 12, 2021
c5ac29c
chore(spec): remove old specification
seantking Oct 13, 2021
300f133
Merge pull request #486 from cosmos/sean/ica/chore-remove-old-spec
seantking Oct 13, 2021
cd263c7
ica: unspecified type enum for interchain account packet data (#487)
damiannolan Oct 13, 2021
4db5c83
chore: ica audit nitpicks (#483)
damiannolan Oct 13, 2021
bd10403
fixed typo (#507)
crodriguezvega Nov 1, 2021
03ada27
ica: move Serialize/DeserializeCosmosTx to package types (#493)
damiannolan Nov 2, 2021
9fc8b82
Merge branch 'main' of github.com:cosmos/ibc-go into colin/update-int…
colin-axner Nov 2, 2021
cc2c3c9
ica: TrySendTx error handling nits (#491)
damiannolan Nov 3, 2021
afb4132
Merge branch 'interchain-accounts' of github.com:cosmos/ibc-go into c…
colin-axner Nov 3, 2021
df9ec49
chore: adding damo to codeowners (#520)
seantking Nov 3, 2021
977c889
Merge branch 'interchain-accounts' of github.com:cosmos/ibc-go into c…
colin-axner Nov 3, 2021
7c662cb
Merge pull request #518 from cosmos/colin/update-interchain-accounts
colin-axner Nov 3, 2021
cb478a1
Merge branch 'main' of github.com:cosmos/ibc-go into interchain-accounts
colin-axner Nov 3, 2021
f88b4d7
ica: AuthenticateTx/executeTx clean up (#490)
damiannolan Nov 4, 2021
a8d5d79
Merge branch 'interchain-accounts' of github.com:cosmos/ibc-go into c…
colin-axner Nov 4, 2021
05d434e
update interchain accounts (#521)
colin-axner Nov 4, 2021
cd2f81d
ICA Controller Side Middleware (#417)
colin-axner Nov 5, 2021
3ff5bf8
ica: genesis state implementation (#481)
damiannolan Nov 5, 2021
b8bc1a8
test: relay tests for TrySendTx/OnRecvPacket (#531)
damiannolan Nov 12, 2021
7efc384
ICA controller/host submodules (#541)
damiannolan Nov 18, 2021
b87b806
chore: ica submodules minor improvements and cleanup
damiannolan Nov 19, 2021
3a06187
test: adding test for RegisterInterchainAccount & adding check to rel…
seantking Nov 19, 2021
37f5c9f
ICA Code Hygiene (#553)
seantking Nov 19, 2021
009cbec
ica: wrong handshake flow tests (#538)
colin-axner Nov 26, 2021
5bed1d7
ica: genesis state validation (#554)
damiannolan Nov 29, 2021
e6a5583
Rename imports within host/controller (#571)
colin-axner Nov 30, 2021
d681c0d
Add Enable/Disable controller/host on-chain params (#566)
colin-axner Dec 1, 2021
eedb0cb
Disable usage of controller and host submodules based on on-chain par…
colin-axner Dec 1, 2021
e6e4caa
add grpc query for controller and host params (#574)
colin-axner Dec 1, 2021
eac5ade
modify ica portid to be interchain-account instead of ibcaccount (#577)
colin-axner Dec 1, 2021
4fed4a7
feat: allowlist host param using msg typeURLs (#576)
damiannolan Dec 1, 2021
f77f4be
Add cli query for host and controller params (#578)
colin-axner Dec 1, 2021
7fc714f
renmaing ModuleName to SubModuleName for ica controller/host (#579)
damiannolan Dec 1, 2021
2583421
Merge branch 'main' into interchain-accounts
colin-axner Dec 1, 2021
22e87de
add tests/code coverage for OnRecv, OnTimeout and OnAck for controlle…
colin-axner Dec 3, 2021
a617025
Merge branch 'main' into interchain-accounts
colin-axner Dec 7, 2021
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
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@

# CODEOWNERS for interchain-accounts module

/modules/apps/27-interchain-accounts/ @seantking @colin-axner @AdityaSripal
/proto/applications/interchain_accounts/ @seantking @colin-axner @AdityaSripal
/modules/apps/27-interchain-accounts/ @seantking @colin-axner @AdityaSripal @damiannolan
/proto/applications/interchain_accounts/ @seantking @colin-axner @AdityaSripal @damiannolan
209 changes: 209 additions & 0 deletions docs/ibc/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@

## Table of Contents

- [ibc/applications/interchain_accounts/v1/account.proto](#ibc/applications/interchain_accounts/v1/account.proto)
- [InterchainAccount](#ibc.applications.interchain_accounts.v1.InterchainAccount)

- [ibc/applications/interchain_accounts/v1/genesis.proto](#ibc/applications/interchain_accounts/v1/genesis.proto)
- [ActiveChannel](#ibc.applications.interchain_accounts.v1.ActiveChannel)
- [ControllerGenesisState](#ibc.applications.interchain_accounts.v1.ControllerGenesisState)
- [GenesisState](#ibc.applications.interchain_accounts.v1.GenesisState)
- [HostGenesisState](#ibc.applications.interchain_accounts.v1.HostGenesisState)
- [RegisteredInterchainAccount](#ibc.applications.interchain_accounts.v1.RegisteredInterchainAccount)

- [ibc/applications/interchain_accounts/v1/types.proto](#ibc/applications/interchain_accounts/v1/types.proto)
- [CosmosTx](#ibc.applications.interchain_accounts.v1.CosmosTx)
- [InterchainAccountPacketData](#ibc.applications.interchain_accounts.v1.InterchainAccountPacketData)

- [Type](#ibc.applications.interchain_accounts.v1.Type)

- [ibc/applications/transfer/v1/transfer.proto](#ibc/applications/transfer/v1/transfer.proto)
- [DenomTrace](#ibc.applications.transfer.v1.DenomTrace)
- [Params](#ibc.applications.transfer.v1.Params)
Expand Down Expand Up @@ -254,6 +270,199 @@



<a name="ibc/applications/interchain_accounts/v1/account.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## ibc/applications/interchain_accounts/v1/account.proto



<a name="ibc.applications.interchain_accounts.v1.InterchainAccount"></a>

### InterchainAccount
An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `base_account` | [cosmos.auth.v1beta1.BaseAccount](#cosmos.auth.v1beta1.BaseAccount) | | |
| `account_owner` | [string](#string) | | |





<!-- end messages -->

<!-- end enums -->

<!-- end HasExtensions -->

<!-- end services -->



<a name="ibc/applications/interchain_accounts/v1/genesis.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## ibc/applications/interchain_accounts/v1/genesis.proto



<a name="ibc.applications.interchain_accounts.v1.ActiveChannel"></a>

### ActiveChannel
ActiveChannel contains a pairing of port ID and channel ID for an active interchain accounts channel


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `port_id` | [string](#string) | | |
| `channel_id` | [string](#string) | | |






<a name="ibc.applications.interchain_accounts.v1.ControllerGenesisState"></a>

### ControllerGenesisState
ControllerGenesisState defines the interchain accounts controller genesis state


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `active_channels` | [ActiveChannel](#ibc.applications.interchain_accounts.v1.ActiveChannel) | repeated | |
| `interchain_accounts` | [RegisteredInterchainAccount](#ibc.applications.interchain_accounts.v1.RegisteredInterchainAccount) | repeated | |
| `ports` | [string](#string) | repeated | |
| `params` | [ibc.applications.interchain_accounts.controller.v1.Params](#ibc.applications.interchain_accounts.controller.v1.Params) | | |






<a name="ibc.applications.interchain_accounts.v1.GenesisState"></a>

### GenesisState
GenesisState defines the interchain accounts genesis state


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `controller_genesis_state` | [ControllerGenesisState](#ibc.applications.interchain_accounts.v1.ControllerGenesisState) | | |
| `host_genesis_state` | [HostGenesisState](#ibc.applications.interchain_accounts.v1.HostGenesisState) | | |






<a name="ibc.applications.interchain_accounts.v1.HostGenesisState"></a>

### HostGenesisState
HostGenesisState defines the interchain accounts host genesis state


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `active_channels` | [ActiveChannel](#ibc.applications.interchain_accounts.v1.ActiveChannel) | repeated | |
| `interchain_accounts` | [RegisteredInterchainAccount](#ibc.applications.interchain_accounts.v1.RegisteredInterchainAccount) | repeated | |
| `port` | [string](#string) | | |
| `params` | [ibc.applications.interchain_accounts.host.v1.Params](#ibc.applications.interchain_accounts.host.v1.Params) | | |






<a name="ibc.applications.interchain_accounts.v1.RegisteredInterchainAccount"></a>

### RegisteredInterchainAccount
RegisteredInterchainAccount contains a pairing of controller port ID and associated interchain account address


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `port_id` | [string](#string) | | |
| `account_address` | [string](#string) | | |





<!-- end messages -->

<!-- end enums -->

<!-- end HasExtensions -->

<!-- end services -->



<a name="ibc/applications/interchain_accounts/v1/types.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## ibc/applications/interchain_accounts/v1/types.proto



<a name="ibc.applications.interchain_accounts.v1.CosmosTx"></a>

### CosmosTx
CosmosTx contains a list of sdk.Msg's. It should be used when sending transactions to an SDK host chain.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `messages` | [google.protobuf.Any](#google.protobuf.Any) | repeated | |






<a name="ibc.applications.interchain_accounts.v1.InterchainAccountPacketData"></a>

### InterchainAccountPacketData
InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `type` | [Type](#ibc.applications.interchain_accounts.v1.Type) | | |
| `data` | [bytes](#bytes) | | |
| `memo` | [string](#string) | | |





<!-- end messages -->


<a name="ibc.applications.interchain_accounts.v1.Type"></a>

### Type
Type defines a classification of message issued from a controller chain to its associated interchain accounts
host

| Name | Number | Description |
| ---- | ------ | ----------- |
| TYPE_UNSPECIFIED | 0 | Default zero value enumeration |
| TYPE_EXECUTE_TX | 1 | Execute a transaction on an interchain accounts host chain |


<!-- end enums -->

<!-- end HasExtensions -->

<!-- end services -->



<a name="ibc/applications/transfer/v1/transfer.proto"></a>
<p align="right"><a href="#top">Top</a></p>

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ require (
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
github.com/regen-network/cosmos-proto v0.3.1
github.com/spf13/cast v1.4.1
github.com/spf13/cobra v1.2.1
github.com/spf13/viper v1.9.0
Expand All @@ -23,6 +24,7 @@ require (
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71
google.golang.org/grpc v1.42.0
google.golang.org/protobuf v1.27.1
gopkg.in/yaml.v2 v2.4.0
)

require (
Expand Down Expand Up @@ -92,7 +94,6 @@ require (
github.com/prometheus/common v0.29.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect
github.com/regen-network/cosmos-proto v0.3.1 // indirect
github.com/rs/cors v1.7.0 // indirect
github.com/rs/zerolog v1.23.0 // indirect
github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect
Expand All @@ -113,7 +114,6 @@ require (
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
golang.org/x/text v0.3.6 // indirect
gopkg.in/ini.v1 v1.63.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
nhooyr.io/websocket v1.8.6 // indirect
)
26 changes: 26 additions & 0 deletions modules/apps/27-interchain-accounts/client/cli/cli.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package cli

import (
"github.com/spf13/cobra"

controllercli "github.com/cosmos/ibc-go/v2/modules/apps/27-interchain-accounts/controller/client/cli"
hostcli "github.com/cosmos/ibc-go/v2/modules/apps/27-interchain-accounts/host/client/cli"
)

// GetQueryCmd returns the query commands for the interchain-accounts submodule
func GetQueryCmd() *cobra.Command {
icaQueryCmd := &cobra.Command{
Use: "interchain-accounts",
Aliases: []string{"ica"},
Short: "interchain-accounts subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
}

icaQueryCmd.AddCommand(
controllercli.GetQueryCmd(),
hostcli.GetQueryCmd(),
)

return icaQueryCmd
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package cli

import (
"github.com/spf13/cobra"
)

// GetQueryCmd returns the query commands for the ICA controller submodule
func GetQueryCmd() *cobra.Command {
queryCmd := &cobra.Command{
Use: "controller",
Short: "interchain-accounts controller subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
}

queryCmd.AddCommand(
GetCmdParams(),
)

return queryCmd
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package cli

import (
"fmt"

"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/version"
"github.com/cosmos/ibc-go/v2/modules/apps/27-interchain-accounts/controller/types"
)

// GetCmdParams returns the command handler for the controller submodule parameter querying.
func GetCmdParams() *cobra.Command {
cmd := &cobra.Command{
Use: "params",
Short: "Query the current interchain-accounts controller submodule parameters",
Long: "Query the current interchain-accounts controller submodule parameters",
Args: cobra.NoArgs,
Example: fmt.Sprintf("%s query interchain-accounts controller params", version.AppName),
RunE: func(cmd *cobra.Command, _ []string) error {
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}
queryClient := types.NewQueryClient(clientCtx)

res, _ := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{})
return clientCtx.PrintProto(res.Params)
},
}

flags.AddQueryFlagsToCmd(cmd)

return cmd
}
Loading