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§
Sourcefn 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 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
Sourcefn 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,
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:
- Validate both client IDs are well-formed
- Verify both clients exist
- Check that the subject client is NOT Active
- Check that the substitute client IS Active
- Verify client parameters match.
- Verify substitute client has greater height
- 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.