Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
docs: add README for modules (#127)
Browse files Browse the repository at this point in the history
* docs: add README for modules

* chore: clean-ups + fix name of IbcTransfer methods
  • Loading branch information
Farhad-Shabani authored Apr 8, 2024
1 parent e7dbad5 commit 1b005f6
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 6 deletions.
89 changes: 89 additions & 0 deletions modules/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<div align="center">
<h1>Sovereign IBC Modules</h1>
</div>

## Overview

The Sovereign IBC modules form a comprehensive suite that integrates `ibc-rs`
with the Sovereign SDK rollups. These modules are purpose-built to empower
Sovereign SDK rollups with a range of essential IBC components and
functionalities, including:

- `sov-ibc`: Serving as the central entrypoint and hub, this module orchestrates
the integration of IBC core layers such as client, connection, and channel,
while also managing integrated light clients and applications.

- `sov-ibc-transfer`: This module is dedicated to integrating ICS-20 application
and handling the intricate IBC transfer functionalities within Sovereign SDK
rollups. It works hand in hand with the `sov-bank` module for executing ICS-20
packets.

- `sov-consensus-state-tracker`: Serving as a custom "kernel" module, focuses on
tracking the consensus state of the Data Availability (DA) layer. This module
is not an IBC module per se, but it is essential for consistently retrieving
the DA's consensus state, along with the rollup's latest height and timestamp
during each slot execution. This ensures that the `sov-ibc` module remains
synchronized with the latest states, which is vital for `ibc-rs` handlers to
accurately process incoming packets.
- **Note**: Currently, this module supports `mock-da` and `celestia-da`.
Depending on which DA layer is used, the corresponding DA feature flag
should be enabled.

## Available RPC Methods

The RPC method implementations for the Sovereign IBC modules can be found in
their respective `rpc.rs` file within each module. Additionally, each "normal"
module exposes a set of methods for fetching their Id and status, as follows:

- `ibc_moduleId`
- `ibc_health`
- `transfer_moduleId`
- `transfer_health`

Here is an overview of the RPC methods available for each module:

### `sov-ibc` RPC Methods

### Client

- `ibc_clientState`
- `ibc_clientStates`
- `ibc_consensusState`
- `ibc_consensusStates`
- `ibc_consensusStateHeights`
- `ibc_clientStatus`
- `ibc_upgradedClientState`
- `ibc_upgradedConsensusState`

### Connection

- `ibc_connection`
- `ibc_connections`
- `ibc_clientConnections`
- `ibc_connectionClientState`
- `ibc_connectionConsensusState`
- `ibc_connectionParams`

### Channel

- `ibc_channel`
- `ibc_channels`
- `ibc_connectionChannels`
- `ibc_channelClientState`
- `ibc_channelConsensusState`
- `ibc_packetCommitment`
- `ibc_packetCommitments`
- `ibc_packetReceipt`
- `ibc_packetAcknowledgement`
- `ibc_packetAcknowledgements`
- `ibc_unreceivedPackets`
- `ibc_unreceivedAcks`
- `ibc_nextSequenceReceive`

### `sov-ibc-transfer` RPC Methods

- `transfer_escrowedToken`: Searches the list of escrowed tokens based on the
provided token denomination and returns the corresponding token ID, if
available.
- `transfer_mintedToken` : Searches the list of minted tokens based on the provided
token denomination and returns the corresponding token ID, if available.
4 changes: 2 additions & 2 deletions modules/sov-consensus-state-tracker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ rust-version = { workspace = true }
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
readme = "./../README.md"
publish = false
readme = "README.md"

[lints]
workspace = true
Expand All @@ -28,7 +28,7 @@ uint = "0.9"
# ibc dependencies
ibc-app-transfer = { workspace = true, features = ["borsh", "schema"] }
ibc-core = { workspace = true }
tendermint = { workspace = true } # Temporary dependency used for implementing the consensus_state method
tendermint = { workspace = true } # Temporary dependency used for implementing the consensus_state method

# sovereign dependencies
sov-mock-da = { workspace = true, features = ["native"], optional = true }
Expand Down
2 changes: 1 addition & 1 deletion modules/sov-ibc-transfer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ rust-version = { workspace = true }
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
readme = "./../README.md"
publish = false
readme = "README.md"

[lints]
workspace = true
Expand Down
1 change: 0 additions & 1 deletion modules/sov-ibc-transfer/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion modules/sov-ibc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = { workspace = true }
repository = { workspace = true }
rust-version = { workspace = true }
version = { workspace = true }
readme = "README.md"
readme = "./../README.md"
publish = false

[lints]
Expand Down
1 change: 0 additions & 1 deletion modules/sov-ibc/README.md

This file was deleted.

0 comments on commit 1b005f6

Please sign in to comment.