diff --git a/modules/src/clients/ics07_tendermint/client_state.rs b/modules/src/clients/ics07_tendermint/client_state.rs index 3f478a2229..039a780154 100644 --- a/modules/src/clients/ics07_tendermint/client_state.rs +++ b/modules/src/clients/ics07_tendermint/client_state.rs @@ -1,7 +1,6 @@ use crate::core::ics02_client::context::ClientReader; use crate::core::ics03_connection::connection::ConnectionEnd; use crate::core::ics04_channel::commitment::{AcknowledgementCommitment, PacketCommitment}; -use crate::core::ics04_channel::context::ChannelReaderLightClient; use crate::core::ics04_channel::packet::Sequence; use crate::core::ics23_commitment::commitment::{ CommitmentPrefix, CommitmentProofBytes, CommitmentRoot, @@ -38,6 +37,7 @@ use crate::core::ics02_client::client_type::ClientType; use crate::core::ics02_client::consensus_state::ConsensusState; use crate::core::ics02_client::error::{Error as Ics02Error, ErrorDetail as Ics02ErrorDetail}; use crate::core::ics02_client::trust_threshold::TrustThreshold; +use crate::core::ics04_channel::context::ChannelReader; use crate::core::ics23_commitment::specs::ProofSpecs; use crate::core::ics24_host::identifier::{ChainId, ChannelId, ClientId, ConnectionId, PortId}; use crate::timestamp::{Timestamp, ZERO_DURATION}; @@ -533,7 +533,7 @@ impl Ics2ClientState for ClientState { fn verify_packet_data( &self, - ctx: &dyn ChannelReaderLightClient, + ctx: &dyn ChannelReader, height: Height, connection_end: &ConnectionEnd, proof: &CommitmentProofBytes, @@ -565,7 +565,7 @@ impl Ics2ClientState for ClientState { fn verify_packet_acknowledgement( &self, - ctx: &dyn ChannelReaderLightClient, + ctx: &dyn ChannelReader, height: Height, connection_end: &ConnectionEnd, proof: &CommitmentProofBytes, @@ -596,7 +596,7 @@ impl Ics2ClientState for ClientState { fn verify_next_sequence_recv( &self, - ctx: &dyn ChannelReaderLightClient, + ctx: &dyn ChannelReader, height: Height, connection_end: &ConnectionEnd, proof: &CommitmentProofBytes, @@ -628,7 +628,7 @@ impl Ics2ClientState for ClientState { fn verify_packet_receipt_absence( &self, - ctx: &dyn ChannelReaderLightClient, + ctx: &dyn ChannelReader, height: Height, connection_end: &ConnectionEnd, proof: &CommitmentProofBytes, @@ -698,7 +698,7 @@ fn verify_non_membership( } fn verify_delay_passed( - ctx: &dyn ChannelReaderLightClient, + ctx: &dyn ChannelReader, height: Height, connection_end: &ConnectionEnd, ) -> Result<(), Ics02Error> { diff --git a/modules/src/core/ics02_client/client_state.rs b/modules/src/core/ics02_client/client_state.rs index 48b1cc6687..1128c22210 100644 --- a/modules/src/core/ics02_client/client_state.rs +++ b/modules/src/core/ics02_client/client_state.rs @@ -12,7 +12,7 @@ use crate::core::ics02_client::error::Error; use crate::core::ics03_connection::connection::ConnectionEnd; use crate::core::ics04_channel::channel::ChannelEnd; use crate::core::ics04_channel::commitment::{AcknowledgementCommitment, PacketCommitment}; -use crate::core::ics04_channel::context::ChannelReaderLightClient; +use crate::core::ics04_channel::context::ChannelReader; use crate::core::ics04_channel::packet::Sequence; use crate::core::ics23_commitment::commitment::{ CommitmentPrefix, CommitmentProofBytes, CommitmentRoot, @@ -151,7 +151,7 @@ pub trait ClientState: #[allow(clippy::too_many_arguments)] fn verify_packet_data( &self, - ctx: &dyn ChannelReaderLightClient, + ctx: &dyn ChannelReader, height: Height, connection_end: &ConnectionEnd, proof: &CommitmentProofBytes, @@ -166,7 +166,7 @@ pub trait ClientState: #[allow(clippy::too_many_arguments)] fn verify_packet_acknowledgement( &self, - ctx: &dyn ChannelReaderLightClient, + ctx: &dyn ChannelReader, height: Height, connection_end: &ConnectionEnd, proof: &CommitmentProofBytes, @@ -181,7 +181,7 @@ pub trait ClientState: #[allow(clippy::too_many_arguments)] fn verify_next_sequence_recv( &self, - ctx: &dyn ChannelReaderLightClient, + ctx: &dyn ChannelReader, height: Height, connection_end: &ConnectionEnd, proof: &CommitmentProofBytes, @@ -195,7 +195,7 @@ pub trait ClientState: #[allow(clippy::too_many_arguments)] fn verify_packet_receipt_absence( &self, - ctx: &dyn ChannelReaderLightClient, + ctx: &dyn ChannelReader, height: Height, connection_end: &ConnectionEnd, proof: &CommitmentProofBytes, diff --git a/modules/src/core/ics04_channel/context.rs b/modules/src/core/ics04_channel/context.rs index ec59e4fc74..3d901235ee 100644 --- a/modules/src/core/ics04_channel/context.rs +++ b/modules/src/core/ics04_channel/context.rs @@ -138,48 +138,6 @@ pub trait ChannelReader { } } -/// Defines a subset of the `ChannelReader`'s methods that a light-client implementation can access. -/// A blanket implementation of this trait is provided for all types that implement `ChannelReader`. -pub trait ChannelReaderLightClient { - /// Returns the current height of the local chain. - fn host_height(&self) -> Height; - - /// Returns the current timestamp of the local chain. - fn host_timestamp(&self) -> Timestamp; - - /// Returns the time when the client state for the given [`ClientId`] was updated with a header for the given [`Height`] - fn client_update_time(&self, client_id: &ClientId, height: Height) -> Result; - - /// Returns the height when the client state for the given [`ClientId`] was updated with a header for the given [`Height`] - fn client_update_height(&self, client_id: &ClientId, height: Height) -> Result; - - /// Calculates the block delay period using the connection's delay period and the maximum - /// expected time per block. - fn block_delay(&self, delay_period_time: Duration) -> u64; -} - -impl ChannelReaderLightClient for T { - fn host_height(&self) -> Height { - ChannelReader::host_height(self) - } - - fn host_timestamp(&self) -> Timestamp { - ChannelReader::host_timestamp(self) - } - - fn client_update_time(&self, client_id: &ClientId, height: Height) -> Result { - ChannelReader::client_update_time(self, client_id, height) - } - - fn client_update_height(&self, client_id: &ClientId, height: Height) -> Result { - ChannelReader::client_update_height(self, client_id, height) - } - - fn block_delay(&self, delay_period_time: Duration) -> u64 { - ChannelReader::block_delay(self, delay_period_time) - } -} - /// A context supplying all the necessary write-only dependencies (i.e., storage writing facility) /// for processing any `ChannelMsg`. pub trait ChannelKeeper { diff --git a/modules/src/core/ics04_channel/handler/acknowledgement.rs b/modules/src/core/ics04_channel/handler/acknowledgement.rs index c10b613189..b338a165a6 100644 --- a/modules/src/core/ics04_channel/handler/acknowledgement.rs +++ b/modules/src/core/ics04_channel/handler/acknowledgement.rs @@ -1,7 +1,6 @@ use crate::core::ics03_connection::connection::State as ConnectionState; use crate::core::ics04_channel::channel::State; use crate::core::ics04_channel::channel::{Counterparty, Order}; -use crate::core::ics04_channel::context::ChannelReaderLightClient; use crate::core::ics04_channel::events::AcknowledgePacket; use crate::core::ics04_channel::handler::verify::verify_packet_acknowledgement_proofs; use crate::core::ics04_channel::msgs::acknowledgement::MsgAcknowledgement; @@ -20,7 +19,7 @@ pub struct AckPacketResult { pub seq_number: Option, } -pub fn process( +pub fn process( ctx: &Ctx, msg: &MsgAcknowledgement, ) -> HandlerResult { diff --git a/modules/src/core/ics04_channel/handler/chan_close_confirm.rs b/modules/src/core/ics04_channel/handler/chan_close_confirm.rs index 28a1b57043..29b33b245e 100644 --- a/modules/src/core/ics04_channel/handler/chan_close_confirm.rs +++ b/modules/src/core/ics04_channel/handler/chan_close_confirm.rs @@ -1,7 +1,7 @@ //! Protocol logic specific to ICS4 messages of type `MsgChannelCloseConfirm`. use crate::core::ics03_connection::connection::State as ConnectionState; use crate::core::ics04_channel::channel::{ChannelEnd, Counterparty, State}; -use crate::core::ics04_channel::context::{ChannelReader, ChannelReaderLightClient}; +use crate::core::ics04_channel::context::ChannelReader; use crate::core::ics04_channel::error::Error; use crate::core::ics04_channel::events::Attributes; use crate::core::ics04_channel::handler::verify::verify_channel_proofs; @@ -11,7 +11,7 @@ use crate::events::IbcEvent; use crate::handler::{HandlerOutput, HandlerResult}; use crate::prelude::*; -pub(crate) fn process( +pub(crate) fn process( ctx: &Ctx, msg: &MsgChannelCloseConfirm, ) -> HandlerResult { diff --git a/modules/src/core/ics04_channel/handler/chan_close_init.rs b/modules/src/core/ics04_channel/handler/chan_close_init.rs index 11ad04d1cd..3d428bf5fc 100644 --- a/modules/src/core/ics04_channel/handler/chan_close_init.rs +++ b/modules/src/core/ics04_channel/handler/chan_close_init.rs @@ -1,7 +1,7 @@ //! Protocol logic specific to ICS4 messages of type `MsgChannelCloseInit`. use crate::core::ics03_connection::connection::State as ConnectionState; use crate::core::ics04_channel::channel::State; -use crate::core::ics04_channel::context::{ChannelReader, ChannelReaderLightClient}; +use crate::core::ics04_channel::context::ChannelReader; use crate::core::ics04_channel::error::Error; use crate::core::ics04_channel::events::Attributes; use crate::core::ics04_channel::handler::{ChannelIdState, ChannelResult}; @@ -9,7 +9,7 @@ use crate::core::ics04_channel::msgs::chan_close_init::MsgChannelCloseInit; use crate::events::IbcEvent; use crate::handler::{HandlerOutput, HandlerResult}; -pub(crate) fn process( +pub(crate) fn process( ctx: &Ctx, msg: &MsgChannelCloseInit, ) -> HandlerResult { diff --git a/modules/src/core/ics04_channel/handler/chan_open_ack.rs b/modules/src/core/ics04_channel/handler/chan_open_ack.rs index 2a7c693a31..9c76e816d3 100644 --- a/modules/src/core/ics04_channel/handler/chan_open_ack.rs +++ b/modules/src/core/ics04_channel/handler/chan_open_ack.rs @@ -1,7 +1,7 @@ //! Protocol logic specific to ICS4 messages of type `MsgChannelOpenAck`. use crate::core::ics03_connection::connection::State as ConnectionState; use crate::core::ics04_channel::channel::{ChannelEnd, Counterparty, State}; -use crate::core::ics04_channel::context::{ChannelReader, ChannelReaderLightClient}; +use crate::core::ics04_channel::context::ChannelReader; use crate::core::ics04_channel::error::Error; use crate::core::ics04_channel::events::Attributes; use crate::core::ics04_channel::handler::verify::verify_channel_proofs; @@ -11,7 +11,7 @@ use crate::events::IbcEvent; use crate::handler::{HandlerOutput, HandlerResult}; use crate::prelude::*; -pub(crate) fn process( +pub(crate) fn process( ctx: &Ctx, msg: &MsgChannelOpenAck, ) -> HandlerResult { diff --git a/modules/src/core/ics04_channel/handler/chan_open_confirm.rs b/modules/src/core/ics04_channel/handler/chan_open_confirm.rs index 7ad7ab5317..9e5bec6dd8 100644 --- a/modules/src/core/ics04_channel/handler/chan_open_confirm.rs +++ b/modules/src/core/ics04_channel/handler/chan_open_confirm.rs @@ -1,7 +1,7 @@ //! Protocol logic specific to ICS4 messages of type `MsgChannelOpenConfirm`. use crate::core::ics03_connection::connection::State as ConnectionState; use crate::core::ics04_channel::channel::{ChannelEnd, Counterparty, State}; -use crate::core::ics04_channel::context::{ChannelReader, ChannelReaderLightClient}; +use crate::core::ics04_channel::context::ChannelReader; use crate::core::ics04_channel::error::Error; use crate::core::ics04_channel::events::Attributes; use crate::core::ics04_channel::handler::verify::verify_channel_proofs; @@ -11,7 +11,7 @@ use crate::events::IbcEvent; use crate::handler::{HandlerOutput, HandlerResult}; use crate::prelude::*; -pub(crate) fn process( +pub(crate) fn process( ctx: &Ctx, msg: &MsgChannelOpenConfirm, ) -> HandlerResult { diff --git a/modules/src/core/ics04_channel/handler/chan_open_init.rs b/modules/src/core/ics04_channel/handler/chan_open_init.rs index 3dcb8f2117..228a9ca510 100644 --- a/modules/src/core/ics04_channel/handler/chan_open_init.rs +++ b/modules/src/core/ics04_channel/handler/chan_open_init.rs @@ -1,7 +1,7 @@ //! Protocol logic specific to ICS4 messages of type `MsgChannelOpenInit`. use crate::core::ics04_channel::channel::{ChannelEnd, State}; -use crate::core::ics04_channel::context::{ChannelReader, ChannelReaderLightClient}; +use crate::core::ics04_channel::context::ChannelReader; use crate::core::ics04_channel::error::Error; use crate::core::ics04_channel::events::Attributes; use crate::core::ics04_channel::handler::{ChannelIdState, ChannelResult}; @@ -11,7 +11,7 @@ use crate::events::IbcEvent; use crate::handler::{HandlerOutput, HandlerResult}; use crate::prelude::*; -pub(crate) fn process( +pub(crate) fn process( ctx: &Ctx, msg: &MsgChannelOpenInit, ) -> HandlerResult { diff --git a/modules/src/core/ics04_channel/handler/chan_open_try.rs b/modules/src/core/ics04_channel/handler/chan_open_try.rs index 3d858992d5..28d8f6ded3 100644 --- a/modules/src/core/ics04_channel/handler/chan_open_try.rs +++ b/modules/src/core/ics04_channel/handler/chan_open_try.rs @@ -2,7 +2,7 @@ use crate::core::ics03_connection::connection::State as ConnectionState; use crate::core::ics04_channel::channel::{ChannelEnd, Counterparty, State}; -use crate::core::ics04_channel::context::{ChannelReader, ChannelReaderLightClient}; +use crate::core::ics04_channel::context::ChannelReader; use crate::core::ics04_channel::error::Error; use crate::core::ics04_channel::events::Attributes; use crate::core::ics04_channel::handler::verify::verify_channel_proofs; @@ -13,7 +13,7 @@ use crate::events::IbcEvent; use crate::handler::{HandlerOutput, HandlerResult}; use crate::prelude::*; -pub(crate) fn process( +pub(crate) fn process( ctx: &Ctx, msg: &MsgChannelOpenTry, ) -> HandlerResult { diff --git a/modules/src/core/ics04_channel/handler/recv_packet.rs b/modules/src/core/ics04_channel/handler/recv_packet.rs index d7a09d3383..f5822313f0 100644 --- a/modules/src/core/ics04_channel/handler/recv_packet.rs +++ b/modules/src/core/ics04_channel/handler/recv_packet.rs @@ -1,6 +1,6 @@ use crate::core::ics03_connection::connection::State as ConnectionState; use crate::core::ics04_channel::channel::{Counterparty, Order, State}; -use crate::core::ics04_channel::context::{ChannelReader, ChannelReaderLightClient}; +use crate::core::ics04_channel::context::ChannelReader; use crate::core::ics04_channel::error::Error; use crate::core::ics04_channel::events::ReceivePacket; use crate::core::ics04_channel::handler::verify::verify_packet_recv_proofs; @@ -27,7 +27,7 @@ pub enum RecvPacketResult { }, } -pub fn process( +pub fn process( ctx: &Ctx, msg: &MsgRecvPacket, ) -> HandlerResult { diff --git a/modules/src/core/ics04_channel/handler/timeout.rs b/modules/src/core/ics04_channel/handler/timeout.rs index b66ff8529b..c1a8693bdc 100644 --- a/modules/src/core/ics04_channel/handler/timeout.rs +++ b/modules/src/core/ics04_channel/handler/timeout.rs @@ -1,6 +1,5 @@ use crate::core::ics04_channel::channel::State; use crate::core::ics04_channel::channel::{ChannelEnd, Counterparty, Order}; -use crate::core::ics04_channel::context::ChannelReaderLightClient; use crate::core::ics04_channel::events::TimeoutPacket; use crate::core::ics04_channel::handler::verify::{ verify_next_sequence_recv, verify_packet_receipt_absence, @@ -27,7 +26,7 @@ pub struct TimeoutPacketResult { /// counterparty chain without the packet being committed, to prove that the /// packet can no longer be executed and to allow the calling module to safely /// perform appropriate state transitions. -pub fn process( +pub fn process( ctx: &Ctx, msg: &MsgTimeout, ) -> HandlerResult { diff --git a/modules/src/core/ics04_channel/handler/timeout_on_close.rs b/modules/src/core/ics04_channel/handler/timeout_on_close.rs index 0e25bcf5eb..e5255abf6a 100644 --- a/modules/src/core/ics04_channel/handler/timeout_on_close.rs +++ b/modules/src/core/ics04_channel/handler/timeout_on_close.rs @@ -1,6 +1,5 @@ use crate::core::ics04_channel::channel::State; use crate::core::ics04_channel::channel::{ChannelEnd, Counterparty, Order}; -use crate::core::ics04_channel::context::ChannelReaderLightClient; use crate::core::ics04_channel::events::TimeoutOnClosePacket; use crate::core::ics04_channel::handler::verify::verify_channel_proofs; use crate::core::ics04_channel::handler::verify::{ @@ -16,7 +15,7 @@ use crate::handler::{HandlerOutput, HandlerResult}; use crate::prelude::*; use crate::proofs::{ProofError, Proofs}; -pub fn process( +pub fn process( ctx: &Ctx, msg: &MsgTimeoutOnClose, ) -> HandlerResult { diff --git a/modules/src/core/ics04_channel/handler/verify.rs b/modules/src/core/ics04_channel/handler/verify.rs index e1ead258c0..7ae31dc1f9 100644 --- a/modules/src/core/ics04_channel/handler/verify.rs +++ b/modules/src/core/ics04_channel/handler/verify.rs @@ -1,6 +1,6 @@ use crate::core::ics03_connection::connection::ConnectionEnd; use crate::core::ics04_channel::channel::ChannelEnd; -use crate::core::ics04_channel::context::{ChannelReader, ChannelReaderLightClient}; +use crate::core::ics04_channel::context::ChannelReader; use crate::core::ics04_channel::error::Error; use crate::core::ics04_channel::msgs::acknowledgement::Acknowledgement; use crate::core::ics04_channel::packet::{Packet, Sequence}; @@ -9,7 +9,7 @@ use crate::proofs::Proofs; use crate::Height; /// Entry point for verifying all proofs bundled in any ICS4 message for channel protocols. -pub fn verify_channel_proofs( +pub fn verify_channel_proofs( ctx: &Ctx, height: Height, channel_end: &ChannelEnd, @@ -45,7 +45,7 @@ pub fn verify_channel_proofs( } /// Entry point for verifying all proofs bundled in a ICS4 packet recv. message. -pub fn verify_packet_recv_proofs( +pub fn verify_packet_recv_proofs( ctx: &Ctx, height: Height, packet: &Packet, @@ -87,7 +87,7 @@ pub fn verify_packet_recv_proofs( } /// Entry point for verifying all proofs bundled in an ICS4 packet ack message. -pub fn verify_packet_acknowledgement_proofs( +pub fn verify_packet_acknowledgement_proofs( ctx: &Ctx, height: Height, packet: &Packet, @@ -126,7 +126,7 @@ pub fn verify_packet_acknowledgement_proofs( +pub fn verify_next_sequence_recv( ctx: &Ctx, height: Height, connection_end: &ConnectionEnd, @@ -161,7 +161,7 @@ pub fn verify_next_sequence_recv( Ok(()) } -pub fn verify_packet_receipt_absence( +pub fn verify_packet_receipt_absence( ctx: &Ctx, height: Height, connection_end: &ConnectionEnd, diff --git a/modules/src/core/ics04_channel/handler/write_acknowledgement.rs b/modules/src/core/ics04_channel/handler/write_acknowledgement.rs index 33a7c400df..b6f9bcc6cd 100644 --- a/modules/src/core/ics04_channel/handler/write_acknowledgement.rs +++ b/modules/src/core/ics04_channel/handler/write_acknowledgement.rs @@ -1,6 +1,5 @@ use crate::core::ics04_channel::channel::State; use crate::core::ics04_channel::commitment::AcknowledgementCommitment; -use crate::core::ics04_channel::context::ChannelReaderLightClient; use crate::core::ics04_channel::events::WriteAcknowledgement; use crate::core::ics04_channel::msgs::acknowledgement::Acknowledgement; use crate::core::ics04_channel::packet::{Packet, PacketResult, Sequence}; @@ -20,7 +19,7 @@ pub struct WriteAckPacketResult { pub ack_commitment: AcknowledgementCommitment, } -pub fn process( +pub fn process( ctx: &Ctx, packet: Packet, ack: Acknowledgement, diff --git a/modules/src/core/ics26_routing/context.rs b/modules/src/core/ics26_routing/context.rs index 04c2391cb5..9ef437d4be 100644 --- a/modules/src/core/ics26_routing/context.rs +++ b/modules/src/core/ics26_routing/context.rs @@ -10,7 +10,7 @@ use serde::{Deserialize, Serialize}; use crate::core::ics02_client::context::{ClientKeeper, ClientReader}; use crate::core::ics03_connection::context::{ConnectionKeeper, ConnectionReader}; use crate::core::ics04_channel::channel::{Counterparty, Order}; -use crate::core::ics04_channel::context::{ChannelKeeper, ChannelReader, ChannelReaderLightClient}; +use crate::core::ics04_channel::context::{ChannelKeeper, ChannelReader}; use crate::core::ics04_channel::error::Error; use crate::core::ics04_channel::msgs::acknowledgement::Acknowledgement as GenericAcknowledgement; use crate::core::ics04_channel::packet::Packet; @@ -31,7 +31,6 @@ pub trait Ics26Context: + ConnectionKeeper + ChannelKeeper + ChannelReader - + ChannelReaderLightClient + PortReader { type Router: Router; diff --git a/modules/src/mock/client_state.rs b/modules/src/mock/client_state.rs index 7cd88617d4..be43112bac 100644 --- a/modules/src/mock/client_state.rs +++ b/modules/src/mock/client_state.rs @@ -2,7 +2,7 @@ use crate::core::ics02_client::context::ClientReader; use crate::core::ics03_connection::connection::ConnectionEnd; use crate::core::ics04_channel::channel::ChannelEnd; use crate::core::ics04_channel::commitment::{AcknowledgementCommitment, PacketCommitment}; -use crate::core::ics04_channel::context::ChannelReaderLightClient; +use crate::core::ics04_channel::context::ChannelReader; use crate::core::ics04_channel::packet::Sequence; use crate::core::ics23_commitment::commitment::{ CommitmentPrefix, CommitmentProofBytes, CommitmentRoot, @@ -257,7 +257,7 @@ impl ClientState for MockClientState { fn verify_packet_data( &self, - _ctx: &dyn ChannelReaderLightClient, + _ctx: &dyn ChannelReader, _height: Height, _connection_end: &ConnectionEnd, _proof: &CommitmentProofBytes, @@ -272,7 +272,7 @@ impl ClientState for MockClientState { fn verify_packet_acknowledgement( &self, - _ctx: &dyn ChannelReaderLightClient, + _ctx: &dyn ChannelReader, _height: Height, _connection_end: &ConnectionEnd, _proof: &CommitmentProofBytes, @@ -287,7 +287,7 @@ impl ClientState for MockClientState { fn verify_next_sequence_recv( &self, - _ctx: &dyn ChannelReaderLightClient, + _ctx: &dyn ChannelReader, _height: Height, _connection_end: &ConnectionEnd, _proof: &CommitmentProofBytes, @@ -301,7 +301,7 @@ impl ClientState for MockClientState { fn verify_packet_receipt_absence( &self, - _ctx: &dyn ChannelReaderLightClient, + _ctx: &dyn ChannelReader, _height: Height, _connection_end: &ConnectionEnd, _proof: &CommitmentProofBytes, diff --git a/relayer/src/client_state.rs b/relayer/src/client_state.rs index 7ba197b7e6..99d9986739 100644 --- a/relayer/src/client_state.rs +++ b/relayer/src/client_state.rs @@ -21,7 +21,7 @@ use ibc::core::ics02_client::trust_threshold::TrustThreshold; use ibc::core::ics03_connection::connection::ConnectionEnd; use ibc::core::ics04_channel::channel::ChannelEnd; use ibc::core::ics04_channel::commitment::{AcknowledgementCommitment, PacketCommitment}; -use ibc::core::ics04_channel::context::ChannelReaderLightClient; +use ibc::core::ics04_channel::context::ChannelReader; use ibc::core::ics04_channel::packet::Sequence; use ibc::core::ics23_commitment::commitment::{ CommitmentPrefix, CommitmentProofBytes, CommitmentRoot, @@ -293,7 +293,7 @@ impl ClientState for AnyClientState { fn verify_packet_data( &self, - _ctx: &dyn ChannelReaderLightClient, + _ctx: &dyn ChannelReader, _height: Height, _connection_end: &ConnectionEnd, _proof: &CommitmentProofBytes, @@ -308,7 +308,7 @@ impl ClientState for AnyClientState { fn verify_packet_acknowledgement( &self, - _ctx: &dyn ChannelReaderLightClient, + _ctx: &dyn ChannelReader, _height: Height, _connection_end: &ConnectionEnd, _proof: &CommitmentProofBytes, @@ -323,7 +323,7 @@ impl ClientState for AnyClientState { fn verify_next_sequence_recv( &self, - _ctx: &dyn ChannelReaderLightClient, + _ctx: &dyn ChannelReader, _height: Height, _connection_end: &ConnectionEnd, _proof: &CommitmentProofBytes, @@ -337,7 +337,7 @@ impl ClientState for AnyClientState { fn verify_packet_receipt_absence( &self, - _ctx: &dyn ChannelReaderLightClient, + _ctx: &dyn ChannelReader, _height: Height, _connection_end: &ConnectionEnd, _proof: &CommitmentProofBytes,