Trait ClientRecoveryExt

Source
pub trait ClientRecoveryExt: StateWrite + ConsensusStateWriteExt {
    // Provided methods
    fn validate_recover_client<'life0, 'life1, 'life2, 'async_trait, HI>(
        &'life0 self,
        subject_client_id: &'life1 ClientId,
        substitute_client_id: &'life2 ClientId,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where HI: 'async_trait + HostInterface,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn recover_client<'life0, 'life1, 'life2, 'async_trait, HI>(
        &'life0 mut self,
        subject_client_id: &'life1 ClientId,
        substitute_client_id: &'life2 ClientId,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where HI: 'async_trait + HostInterface,
             Self: Send + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}
Available on crate feature component only.
Expand description

Extension trait for IBC client recovery operations.

This trait provides privileged operations for recovering frozen/expired IBC clients by substituting them with active clients. This is typically used during chain upgrades or emergency recovery scenarios.

Provided Methods§

Source

fn validate_recover_client<'life0, 'life1, 'life2, 'async_trait, HI>( &'life0 self, subject_client_id: &'life1 ClientId, substitute_client_id: &'life2 ClientId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where HI: 'async_trait + HostInterface, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Validate a client recovery operation

Source

fn recover_client<'life0, 'life1, 'life2, 'async_trait, HI>( &'life0 mut self, subject_client_id: &'life1 ClientId, substitute_client_id: &'life2 ClientId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where HI: 'async_trait + HostInterface, Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Recover a frozen or expired client by substituting it with an active client.

This operation will:

  1. Validate both client IDs are well-formed
  2. Verify both clients exist
  3. Check that the subject client is NOT Active
  4. Check that the substitute client IS Active
  5. Verify client parameters match.
  6. Verify substitute client has greater height
  7. Copy the substitute client’s state over the subject client

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§