Skip to content

Commit

Permalink
clarify not supported functions
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele committed Nov 10, 2024
1 parent 32f4c34 commit 1e81ef7
Showing 1 changed file with 36 additions and 34 deletions.
70 changes: 36 additions & 34 deletions crates/ibc/src/client_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,6 @@ impl<const SYNC_COMMITTEE_SIZE: usize> ClientState<SYNC_COMMITTEE_SIZE> {
}

impl<const SYNC_COMMITTEE_SIZE: usize> Ics2ClientState for ClientState<SYNC_COMMITTEE_SIZE> {
fn chain_id(&self) -> ChainId {
todo!()
}

fn client_type(&self) -> ClientType {
eth_client_type()
}
Expand All @@ -295,15 +291,6 @@ impl<const SYNC_COMMITTEE_SIZE: usize> Ics2ClientState for ClientState<SYNC_COMM
self.frozen_height
}

#[allow(unused_variables)]
fn expired(&self, elapsed: Duration) -> bool {
todo!()
}

fn zero_custom_fields(&mut self) {
todo!()
}

fn initialise(
&self,
consensus_state: Any,
Expand Down Expand Up @@ -446,27 +433,6 @@ impl<const SYNC_COMMITTEE_SIZE: usize> Ics2ClientState for ClientState<SYNC_COMM
.into_box())
}

#[allow(unused_variables)]
fn verify_upgrade_client(
&self,
upgraded_client_state: Any,
upgraded_consensus_state: Any,
proof_upgrade_client: ibc_proto::ibc::core::commitment::v1::MerkleProof,
proof_upgrade_consensus_state: ibc_proto::ibc::core::commitment::v1::MerkleProof,
root: &ibc::core::ics23_commitment::commitment::CommitmentRoot,
) -> Result<(), ClientError> {
todo!()
}

#[allow(unused_variables)]
fn update_state_with_upgrade_client(
&self,
upgraded_client_state: Any,
upgraded_consensus_state: Any,
) -> Result<UpdatedState, ClientError> {
todo!()
}

fn verify_client_consensus_state(
&self,
proof_height: ibc::Height,
Expand Down Expand Up @@ -653,6 +619,42 @@ impl<const SYNC_COMMITTEE_SIZE: usize> Ics2ClientState for ClientState<SYNC_COMM
receipt_path.clone(),
)
}

// `chain_id`, `expired`, `zero_custom_fields`, `verify_upgrade_client`, `update_state_with_upgrade_client` are not supported for Ethereum client

fn chain_id(&self) -> ChainId {
unimplemented!()
}

#[allow(unused_variables)]
fn expired(&self, elapsed: Duration) -> bool {
unimplemented!()
}

fn zero_custom_fields(&mut self) {
unimplemented!()
}

#[allow(unused_variables)]
fn verify_upgrade_client(
&self,
upgraded_client_state: Any,
upgraded_consensus_state: Any,
proof_upgrade_client: ibc_proto::ibc::core::commitment::v1::MerkleProof,
proof_upgrade_consensus_state: ibc_proto::ibc::core::commitment::v1::MerkleProof,
root: &ibc::core::ics23_commitment::commitment::CommitmentRoot,
) -> Result<(), ClientError> {
unimplemented!()
}

#[allow(unused_variables)]
fn update_state_with_upgrade_client(
&self,
upgraded_client_state: Any,
upgraded_consensus_state: Any,
) -> Result<UpdatedState, ClientError> {
unimplemented!()
}
}

fn validate_state_timestamp_within_trusting_period(
Expand Down

0 comments on commit 1e81ef7

Please sign in to comment.