Trait ibc::core::context::ExecutionContext
source · pub trait ExecutionContext: ValidationContext {
Show 22 methods
// Required methods
fn store_client_type(
&mut self,
client_type_path: ClientTypePath,
client_type: ClientType
) -> Result<(), ContextError>;
fn store_client_state(
&mut self,
client_state_path: ClientStatePath,
client_state: Box<dyn ClientState>
) -> Result<(), ContextError>;
fn store_consensus_state(
&mut self,
consensus_state_path: ClientConsensusStatePath,
consensus_state: Box<dyn ConsensusState>
) -> Result<(), ContextError>;
fn increase_client_counter(&mut self);
fn store_update_time(
&mut self,
client_id: ClientId,
height: Height,
timestamp: Timestamp
) -> Result<(), ContextError>;
fn store_update_height(
&mut self,
client_id: ClientId,
height: Height,
host_height: Height
) -> Result<(), ContextError>;
fn store_connection(
&mut self,
connection_path: &ConnectionPath,
connection_end: ConnectionEnd
) -> Result<(), ContextError>;
fn store_connection_to_client(
&mut self,
client_connection_path: &ClientConnectionPath,
conn_id: ConnectionId
) -> Result<(), ContextError>;
fn increase_connection_counter(&mut self);
fn store_packet_commitment(
&mut self,
commitment_path: &CommitmentPath,
commitment: PacketCommitment
) -> Result<(), ContextError>;
fn delete_packet_commitment(
&mut self,
commitment_path: &CommitmentPath
) -> Result<(), ContextError>;
fn store_packet_receipt(
&mut self,
receipt_path: &ReceiptPath,
receipt: Receipt
) -> Result<(), ContextError>;
fn store_packet_acknowledgement(
&mut self,
ack_path: &AckPath,
ack_commitment: AcknowledgementCommitment
) -> Result<(), ContextError>;
fn delete_packet_acknowledgement(
&mut self,
ack_path: &AckPath
) -> Result<(), ContextError>;
fn store_channel(
&mut self,
channel_end_path: &ChannelEndPath,
channel_end: ChannelEnd
) -> Result<(), ContextError>;
fn store_next_sequence_send(
&mut self,
seq_send_path: &SeqSendPath,
seq: Sequence
) -> Result<(), ContextError>;
fn store_next_sequence_recv(
&mut self,
seq_recv_path: &SeqRecvPath,
seq: Sequence
) -> Result<(), ContextError>;
fn store_next_sequence_ack(
&mut self,
seq_ack_path: &SeqAckPath,
seq: Sequence
) -> Result<(), ContextError>;
fn increase_channel_counter(&mut self);
fn emit_ibc_event(&mut self, event: IbcEvent);
fn log_message(&mut self, message: String);
// Provided method
fn execute(&mut self, msg: MsgEnvelope) -> Result<(), RouterError>
where Self: Sized { ... }
}
Required Methods§
sourcefn store_client_type(
&mut self,
client_type_path: ClientTypePath,
client_type: ClientType
) -> Result<(), ContextError>
fn store_client_type( &mut self, client_type_path: ClientTypePath, client_type: ClientType ) -> Result<(), ContextError>
Called upon successful client creation
sourcefn store_client_state(
&mut self,
client_state_path: ClientStatePath,
client_state: Box<dyn ClientState>
) -> Result<(), ContextError>
fn store_client_state( &mut self, client_state_path: ClientStatePath, client_state: Box<dyn ClientState> ) -> Result<(), ContextError>
Called upon successful client creation and update
sourcefn store_consensus_state(
&mut self,
consensus_state_path: ClientConsensusStatePath,
consensus_state: Box<dyn ConsensusState>
) -> Result<(), ContextError>
fn store_consensus_state( &mut self, consensus_state_path: ClientConsensusStatePath, consensus_state: Box<dyn ConsensusState> ) -> Result<(), ContextError>
Called upon successful client creation and update
sourcefn increase_client_counter(&mut self)
fn increase_client_counter(&mut self)
Called upon client creation. Increases the counter which keeps track of how many clients have been created. Should never fail.
sourcefn store_update_time(
&mut self,
client_id: ClientId,
height: Height,
timestamp: Timestamp
) -> Result<(), ContextError>
fn store_update_time( &mut self, client_id: ClientId, height: Height, timestamp: Timestamp ) -> Result<(), ContextError>
Called upon successful client update. Implementations are expected to use this to record the specified time as the time at which this update (or header) was processed.
sourcefn store_update_height(
&mut self,
client_id: ClientId,
height: Height,
host_height: Height
) -> Result<(), ContextError>
fn store_update_height( &mut self, client_id: ClientId, height: Height, host_height: Height ) -> Result<(), ContextError>
Called upon successful client update. Implementations are expected to use this to record the specified height as the height at at which this update (or header) was processed.
sourcefn store_connection(
&mut self,
connection_path: &ConnectionPath,
connection_end: ConnectionEnd
) -> Result<(), ContextError>
fn store_connection( &mut self, connection_path: &ConnectionPath, connection_end: ConnectionEnd ) -> Result<(), ContextError>
Stores the given connection_end at path
sourcefn store_connection_to_client(
&mut self,
client_connection_path: &ClientConnectionPath,
conn_id: ConnectionId
) -> Result<(), ContextError>
fn store_connection_to_client( &mut self, client_connection_path: &ClientConnectionPath, conn_id: ConnectionId ) -> Result<(), ContextError>
Stores the given connection_id at a path associated with the client_id.
sourcefn increase_connection_counter(&mut self)
fn increase_connection_counter(&mut self)
Called upon connection identifier creation (Init or Try process). Increases the counter which keeps track of how many connections have been created. Should never fail.
fn store_packet_commitment( &mut self, commitment_path: &CommitmentPath, commitment: PacketCommitment ) -> Result<(), ContextError>
fn delete_packet_commitment( &mut self, commitment_path: &CommitmentPath ) -> Result<(), ContextError>
fn store_packet_receipt( &mut self, receipt_path: &ReceiptPath, receipt: Receipt ) -> Result<(), ContextError>
fn store_packet_acknowledgement( &mut self, ack_path: &AckPath, ack_commitment: AcknowledgementCommitment ) -> Result<(), ContextError>
fn delete_packet_acknowledgement( &mut self, ack_path: &AckPath ) -> Result<(), ContextError>
sourcefn store_channel(
&mut self,
channel_end_path: &ChannelEndPath,
channel_end: ChannelEnd
) -> Result<(), ContextError>
fn store_channel( &mut self, channel_end_path: &ChannelEndPath, channel_end: ChannelEnd ) -> Result<(), ContextError>
Stores the given channel_end at a path associated with the port_id and channel_id.
fn store_next_sequence_send( &mut self, seq_send_path: &SeqSendPath, seq: Sequence ) -> Result<(), ContextError>
fn store_next_sequence_recv( &mut self, seq_recv_path: &SeqRecvPath, seq: Sequence ) -> Result<(), ContextError>
fn store_next_sequence_ack( &mut self, seq_ack_path: &SeqAckPath, seq: Sequence ) -> Result<(), ContextError>
sourcefn increase_channel_counter(&mut self)
fn increase_channel_counter(&mut self)
Called upon channel identifier creation (Init or Try message processing). Increases the counter which keeps track of how many channels have been created. Should never fail.
sourcefn emit_ibc_event(&mut self, event: IbcEvent)
fn emit_ibc_event(&mut self, event: IbcEvent)
Ibc events
sourcefn log_message(&mut self, message: String)
fn log_message(&mut self, message: String)
Logging facility
Provided Methods§
sourcefn execute(&mut self, msg: MsgEnvelope) -> Result<(), RouterError>where
Self: Sized,
fn execute(&mut self, msg: MsgEnvelope) -> Result<(), RouterError>where Self: Sized,
Execution entrypoint