-
Notifications
You must be signed in to change notification settings - Fork 648
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: ica tx atomicity docs and code snippet updates (#719)
* adding parameters.md to ica docs * updating interchain accounts docs, adding parameters.md and transactions.md * updating formatting * correcting wording * adding diagram to docs/assets/ * fixing ChanOpenTry api in code snippet * fixing broken image link * updating wording * Update docs/app-modules/interchain-accounts/transactions.md Co-authored-by: Sean King <seantking@users.noreply.github.com> * Update docs/app-modules/interchain-accounts/transactions.md Co-authored-by: Sean King <seantking@users.noreply.github.com> * Update docs/app-modules/interchain-accounts/parameters.md Co-authored-by: Sean King <seantking@users.noreply.github.com> * updating as per review discussion * removing capitals in heading as per review Co-authored-by: Sean King <seantking@users.noreply.github.com>
- Loading branch information
1 parent
87b058d
commit bfcf9ab
Showing
9 changed files
with
1,012 additions
and
772 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!-- | ||
order: 4 | ||
--> | ||
|
||
# Parameters | ||
|
||
The Interchain Accounts module contains the following on-chain parameters, logically separated for each distinct submodule: | ||
|
||
### Controller Submodule Parameters | ||
|
||
| Key | Type | Default Value | | ||
|------------------------|------|---------------| | ||
| `ControllerEnabled` | bool | `true` | | ||
|
||
#### ControllerEnabled | ||
|
||
The `ControllerEnabled` parameter controls a chains ability to service ICS-27 controller specific logic. This includes the sending of Interchain Accounts packet data as well as the following ICS-26 callback handlers: | ||
- `OnChanOpenInit` | ||
- `OnChanOpenAck` | ||
- `OnChanCloseConfirm` | ||
- `OnAcknowledgementPacket` | ||
- `OnTimeoutPacket` | ||
|
||
### Host Submodule Parameters | ||
|
||
| Key | Type | Default Value | | ||
|------------------------|----------|---------------| | ||
| `HostEnabled` | bool | `true` | | ||
| `AllowMessages` | []string | `[]` | | ||
|
||
#### HostEnabled | ||
|
||
The `HostEnabled` parameter controls a chains ability to service ICS27 host specific logic. This includes the following ICS-26 callback handlers: | ||
- `OnChanOpenTry` | ||
- `OnChanOpenConfirm` | ||
- `OnChanCloseConfirm` | ||
- `OnRecvPacket` | ||
|
||
#### AllowMessages | ||
|
||
The `AllowMessages` parameter provides the ability for a chain to limit the types of messages or transactions that hosted interchain accounts are authorized to execute by defining an allowlist using the Protobuf message TypeURL format. | ||
|
||
For example, a Cosmos SDK based chain that elects to provide hosted Interchain Accounts with the ability of governance voting and staking delegations will define its parameters as follows: | ||
|
||
``` | ||
"params": { | ||
"host_enabled": true, | ||
"allow_messages": ["/cosmos.staking.v1beta1.MsgDelegate", "/cosmos.gov.v1beta1.MsgVote"] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- | ||
order: 5 | ||
--> | ||
|
||
# Transactions | ||
|
||
Learn about Interchain Accounts transaction execution {synopsis} | ||
|
||
## Executing a transaction | ||
|
||
As described in [Authentication Modules](./auth-modules.md#trysendtx) transactions are executed using the interchain accounts controller API and require a `Base Application` as outlined in [ICS30 IBC Middleware](https://github.com/cosmos/ibc/tree/master/spec/app/ics-030-middleware) to facilitate authentication. The method of authentication remains unspecified to provide flexibility for the authentication module developer. | ||
|
||
Transactions are executed via the ICS27 [`TrySendTx` API](./auth-modules.md#trysendtx). This must be invoked through an Interchain Accounts authentication module and follows the outlined path of execution below. Packet relaying semantics provided by the IBC core transport, authentication, and ordering (IBC/TAO) layer are omitted for brevity. | ||
|
||
![send-tx-flow](../../assets/send-interchain-tx.png "Transaction Execution") | ||
|
||
## 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/master/core/store.html#cachemultistore) architecture provided by the [`Context`](https://docs.cosmos.network/master/core/context.html) type. | ||
|
||
This provides atomic execution of transactions when using Interchain Accounts, where state changes are only committed if all `Msg`s succeed. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.