-
Notifications
You must be signed in to change notification settings - Fork 646
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
docs: documentation for v8.3.x #6311
Changes from all commits
a269881
057d49a
a2ea1d7
c1a284a
c496ea5
370eeff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -72,6 +72,80 @@ type MsgSendTxResponse struct { | |||||
|
||||||
The packet `Sequence` is returned in the message response. | ||||||
|
||||||
### Queries | ||||||
|
||||||
It is possible to use [`MsgModuleQuerySafe`](https://github.com/cosmos/ibc-go/blob/eecfa5c09a4c38a5c9f2cc2a322d2286f45911da/proto/ibc/applications/interchain_accounts/host/v1/tx.proto#L41-L51) to execute a list of queries on the host chain. This message can be included in the list of encoded `sdk.Msg`s of `InterchainPacketData`. The host chain will return on the acknowledgment the responses for all the queries. Please note that only module safe queries can be executed ([deterministic queries that are safe to be called from within the state machine](https://docs.cosmos.network/main/build/building-modules/query-services#calling-queries-from-the-state-machine)). | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the trailing space at the end of the line. - It is possible to use [`MsgModuleQuerySafe`](https://github.com/cosmos/ibc-go/blob/eecfa5c09a4c38a5c9f2cc2a322d2286f45911da/proto/ibc/applications/interchain_accounts/host/v1/tx.proto#L41-L51) to execute a list of queries on the host chain. This message can be included in the list of encoded `sdk.Msg`s of `InterchainPacketData`. The host chain will return on the acknowledgment the responses for all the queries. Please note that only module safe queries can be executed ([deterministic queries that are safe to be called from within the state machine](https://docs.cosmos.network/main/build/building-modules/query-services#calling-queries-from-the-state-machine)).
+ It is possible to use [`MsgModuleQuerySafe`](https://github.com/cosmos/ibc-go/blob/eecfa5c09a4c38a5c9f2cc2a322d2286f45911da/proto/ibc/applications/interchain_accounts/host/v1/tx.proto#L41-L51) to execute a list of queries on the host chain. This message can be included in the list of encoded `sdk.Msg`s of `InterchainPacketData`. The host chain will return on the acknowledgment the responses for all the queries. Please note that only module safe queries can be executed ([deterministic queries that are safe to be called from within the state machine](https://docs.cosmos.network/main/build/building-modules/query-services#calling-queries-from-the-state-machine)). Committable suggestion
Suggested change
|
||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the trailing space at the end of the line. -
+ Committable suggestion
Suggested change
|
||||||
The queries available from Cosmos SDK are: | ||||||
|
||||||
```plaintext | ||||||
/cosmos.auth.v1beta1.Query/Accounts | ||||||
/cosmos.auth.v1beta1.Query/Account | ||||||
/cosmos.auth.v1beta1.Query/AccountAddressByID | ||||||
/cosmos.auth.v1beta1.Query/Params | ||||||
/cosmos.auth.v1beta1.Query/ModuleAccounts | ||||||
/cosmos.auth.v1beta1.Query/ModuleAccountByName | ||||||
/cosmos.auth.v1beta1.Query/AccountInfo | ||||||
/cosmos.bank.v1beta1.Query/Balance | ||||||
/cosmos.bank.v1beta1.Query/AllBalances | ||||||
/cosmos.bank.v1beta1.Query/SpendableBalances | ||||||
/cosmos.bank.v1beta1.Query/SpendableBalanceByDenom | ||||||
/cosmos.bank.v1beta1.Query/TotalSupply | ||||||
/cosmos.bank.v1beta1.Query/SupplyOf | ||||||
/cosmos.bank.v1beta1.Query/Params | ||||||
/cosmos.bank.v1beta1.Query/DenomMetadata | ||||||
/cosmos.bank.v1beta1.Query/DenomMetadataByQueryString | ||||||
/cosmos.bank.v1beta1.Query/DenomsMetadata | ||||||
/cosmos.bank.v1beta1.Query/DenomOwners | ||||||
/cosmos.bank.v1beta1.Query/SendEnabled | ||||||
/cosmos.circuit.v1.Query/Account | ||||||
/cosmos.circuit.v1.Query/Accounts | ||||||
/cosmos.circuit.v1.Query/DisabledList | ||||||
/cosmos.staking.v1beta1.Query/Validators | ||||||
/cosmos.staking.v1beta1.Query/Validator | ||||||
/cosmos.staking.v1beta1.Query/ValidatorDelegations | ||||||
/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations | ||||||
/cosmos.staking.v1beta1.Query/Delegation | ||||||
/cosmos.staking.v1beta1.Query/UnbondingDelegation | ||||||
/cosmos.staking.v1beta1.Query/DelegatorDelegations | ||||||
/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations | ||||||
/cosmos.staking.v1beta1.Query/Redelegations | ||||||
/cosmos.staking.v1beta1.Query/DelegatorValidators | ||||||
/cosmos.staking.v1beta1.Query/DelegatorValidator | ||||||
/cosmos.staking.v1beta1.Query/HistoricalInfo | ||||||
/cosmos.staking.v1beta1.Query/Pool | ||||||
/cosmos.staking.v1beta1.Query/Params | ||||||
``` | ||||||
|
||||||
And the query available from ibc-go is: | ||||||
|
||||||
```plaintext | ||||||
/ibc.core.client.v1.Query/VerifyMembership | ||||||
``` | ||||||
|
||||||
The following code block shows an example of how `MsgModuleQuerySafe` can be used to query the account balance of an account on the host chain. The resulting packet data variable is used to set the `PacketData` of `MsgSendTx`. | ||||||
|
||||||
```go | ||||||
balanceQuery := banktypes.NewQueryBalanceRequest("cosmos1...", "uatom") | ||||||
queryBz, err := balanceQuery.Marshal() | ||||||
|
||||||
// signer of message must be the interchain account on the host | ||||||
queryMsg := icahosttypes.NewMsgModuleQuerySafe("cosmos2...", []*icahosttypes.QueryRequest{ | ||||||
{ | ||||||
Path: "/cosmos.bank.v1beta1.Query/Balance", | ||||||
Data: queryBz, | ||||||
}, | ||||||
}) | ||||||
|
||||||
bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{queryMsg}, icatypes.EncodingProtobuf) | ||||||
|
||||||
packetData := icatypes.InterchainAccountPacketData{ | ||||||
Type: icatypes.EXECUTE_TX, | ||||||
Data: bz, | ||||||
Memo: "", | ||||||
} | ||||||
``` | ||||||
|
||||||
## Atomicity | ||||||
|
||||||
As the Interchain Accounts module supports the execution of multiple transactions using the Cosmos SDK `Msg` interface, it provides the same atomicity guarantees as Cosmos SDK-based applications, leveraging the [`CacheMultiStore`](https://docs.cosmos.network/main/learn/advanced/store#cachemultistore) architecture provided by the [`Context`](https://docs.cosmos.network/main/learn/advanced/context.html) type. | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -11,7 +11,7 @@ The Interchain Accounts module uses either [ORDERED or UNORDERED](https://github | |||||
|
||||||
When using `ORDERED` channels, the order of transactions when sending packets from a controller to a host chain is maintained. | ||||||
|
||||||
When using `UNORDERED` channels, there is no guarantee that the order of transactions when sending packets from the controller to the host chain is maintained. | ||||||
When using `UNORDERED` channels, there is no guarantee that the order of transactions when sending packets from the controller to the host chain is maintained. Since ibc-go v8.3.0, the default ordering for new ICA channels is `UNORDERED`, if no ordering is specified in `MsgRegisterInterchainAccount` (previously the default ordering was `ORDERED`). | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use "cannot" instead of "can not" for better readability. - new channels can not be opened
+ new channels cannot be opened Committable suggestion
Suggested change
|
||||||
|
||||||
> A limitation when using ORDERED channels is that when a packet times out the channel will be closed. | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -25,6 +25,7 @@ Interchain Account authentication modules are the base application of a middlewa | |||||||||
![ica-pre-v6.png](./images/ica-pre-v6.png) | ||||||||||
|
||||||||||
> Please note that since ibc-go v6 the channel capability is claimed by the controller submodule and therefore it is not required for authentication modules to claim the capability in the `OnChanOpenInit` callback. Therefore the custom authentication module does not need a scoped keeper anymore. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use a comma before "and" if it connects two independent clauses. - The channel capability is claimed by the controller submodule and therefore it is not required for authentication modules to claim the capability in the `OnChanOpenInit` callback.
+ The channel capability is claimed by the controller submodule, and therefore it is not required for authentication modules to claim the capability in the `OnChanOpenInit` callback. Committable suggestion
Suggested change
Add a comma after "Therefore" for better readability. - Therefore the custom authentication module does not need a scoped keeper anymore.
+ Therefore, the custom authentication module does not need a scoped keeper anymore. Committable suggestion
Suggested change
|
||||||||||
> Please note that since ibc-go v8.3.0 it is mandatory to register the gRPC query router after the creation of the host submodule's keeper; otherwise, nodes will not start. The query router is used to execute on the host query messages encoded in the ICA packet data. Please check the sample integration code below for more details. | ||||||||||
|
||||||||||
## Example integration | ||||||||||
|
||||||||||
|
@@ -96,6 +97,7 @@ app.ICAHostKeeper = icahostkeeper.NewKeeper( | |||||||||
app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, | ||||||||||
app.AccountKeeper, scopedICAHostKeeper, app.MsgServiceRouter(), | ||||||||||
) | ||||||||||
app.ICAHostKeeper.WithQueryRouter(app.GRPCQueryRouter()) | ||||||||||
|
||||||||||
// Create Interchain Accounts AppModule | ||||||||||
icaModule := ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper) | ||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[ | ||
"v8.2.x", | ||
"v8.3.x", | ||
"v7.5.x", | ||
"v6.3.x", | ||
"v5.4.x", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use "to" instead of "in" for better readability.
Committable suggestion