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

Commit

Permalink
fix: allow to set genesis_da_height on upgrades + some tech debts (#…
Browse files Browse the repository at this point in the history
…148)

* fix: allow genesis_da_height to be upgraded

* chore: update basecoin rev
  • Loading branch information
Farhad-Shabani authored Apr 21, 2024
1 parent 09a818d commit 43de9b2
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ibc-primitives = { git = "https://github.com/cosmos/ibc-rs.git"
ibc-query = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }
ibc-testkit = { git = "https://github.com/cosmos/ibc-rs.git", rev = "d5e3887770" }

basecoin = { git = "https://github.com/informalsystems/basecoin-rs.git", rev = "b934e57" }
basecoin = { git = "https://github.com/informalsystems/basecoin-rs.git", rev = "61256f9" }
jmt = { git = "https://github.com/penumbra-zone/jmt.git", rev = "1d007e11cb68aa5ca13e9a5af4a12e6439d5f7b6" }

sov-modules-api = { path = "vendor/sovereign-sdk/module-system/sov-modules-api" }
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions clients/sov-celestia/types/src/client_message/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ pub const SOV_TENDERMINT_HEADER_TYPE_URL: &str = "/ibc.lightclients.sovereign.te

#[derive(Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Header<H: Clone> {
pub struct Header<H> {
pub aggregated_proof: AggregatedProof,
pub da_header: H,
}

impl<H: Clone> Debug for Header<H> {
impl<H> Debug for Header<H> {
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), FmtError> {
write!(f, "Header {{...}}")
}
Expand Down
6 changes: 3 additions & 3 deletions clients/sov-celestia/types/src/client_message/misbehaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ pub const SOV_TENDERMINT_MISBEHAVIOUR_TYPE_URL: &str =
/// Sovereign light client's misbehaviour type
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, PartialEq, Eq)]
pub struct Misbehaviour<H: Clone> {
pub struct Misbehaviour<H> {
client_id: ClientId,
header_1: Box<Header<H>>,
header_2: Box<Header<H>>,
}

impl<H: Clone> Misbehaviour<H> {
impl<H> Misbehaviour<H> {
/// Creates a new misbehaviour
pub fn new(client_id: ClientId, header_1: Header<H>, header_2: Header<H>) -> Self {
Self {
Expand All @@ -52,7 +52,7 @@ impl<H: Clone> Misbehaviour<H> {
}
}

impl<H: Clone> Debug for Misbehaviour<H> {
impl<H> Debug for Misbehaviour<H> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
Expand Down
3 changes: 2 additions & 1 deletion clients/sov-types/src/client_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ impl SovereignClientParams {
/// client upgrade process with the given upgraded client parameters.
pub fn update_on_upgrade(self, upgraded: Self) -> Self {
Self {
frozen_height: None,
genesis_da_height: upgraded.genesis_da_height,
code_commitment: upgraded.code_commitment,
latest_height: upgraded.latest_height,
frozen_height: None,
upgrade_path: upgraded.upgrade_path,
..self
}
Expand Down
21 changes: 13 additions & 8 deletions modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Here is an overview of the RPC methods available for each module:

### `sov-ibc` RPC Methods

### Client
#### Client

- `ibc_clientState`
- `ibc_clientStates`
Expand All @@ -55,7 +55,7 @@ Here is an overview of the RPC methods available for each module:
- `ibc_upgradedClientState`
- `ibc_upgradedConsensusState`

### Connection
#### Connection

- `ibc_connection`
- `ibc_connections`
Expand All @@ -64,7 +64,7 @@ Here is an overview of the RPC methods available for each module:
- `ibc_connectionConsensusState`
- `ibc_connectionParams`

### Channel
#### Channel

- `ibc_channel`
- `ibc_channels`
Expand All @@ -80,10 +80,15 @@ Here is an overview of the RPC methods available for each module:
- `ibc_unreceivedAcks`
- `ibc_nextSequenceReceive`

#### Example

```bash
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"ibc_clientState","params":{"request":{"client_id": "100-sov-celestia-0"}},"id":1}' http://127.0.0.1:12345
```

### `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.
- `transfer_mintedTokenName`: Queries the minted tokens by provided token ID
and returns the corresponding token name.
- `transfer_mintedTokenId`: Queries the minted tokens by provided token name and
returns the corresponding token ID.

0 comments on commit 43de9b2

Please sign in to comment.