Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client impl #3

Merged
merged 17 commits into from
Oct 24, 2024
Merged

Client impl #3

merged 17 commits into from
Oct 24, 2024

Conversation

dorin-iancu
Copy link
Collaborator

No description provided.

Copy link

github-actions bot commented Sep 18, 2024

Coverage Summary

Totals

Count Covered %
Lines 769 24 3.12
Regions 567 6 1.06
Functions 240 2 0.83
Instantiations 631 2 0.32

Files

Expand
File Lines Regions Functions Instantiations
/client-impls/client-common/src/lib.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/local-host/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/local-host/src/client_logic.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/local-host/src/lib.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/local-host/src/local_host_types.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/local-host/src/views.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/mock/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/mock/src/client_logic.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/mock/src/lib.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/mock/src/mock_types.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/mock/src/views.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/qbft/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/qbft/src/client_logic.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/qbft/src/lib.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/qbft/src/qbft_types.rs 0.00% 0.00% 0.00% 0.00%
/client-impls/qbft/src/views.rs 0.00% 0.00% 0.00% 0.00%
/client/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/client/src/create_and_update_clients.rs 0.00% 0.00% 0.00% 0.00%
/client/src/events.rs 0.00% 0.00% 0.00% 0.00%
/client/src/lib.rs 0.00% 0.00% 0.00% 0.00%
/client/src/merkle_proof.rs 0.00% 0.00% 0.00% 0.00%
/common/common-modules/src/client_lib.rs 0.00% 0.00% 0.00% 0.00%
/common/common-modules/src/host_lib.rs 0.00% 0.00% 0.00% 0.00%
/common/common-modules/src/utils.rs 0.00% 0.00% 0.00% 0.00%
/common/common-types/src/channel_types.rs 31.58% 4.72% 4.17% 3.23%
/common/common-types/src/connection_types.rs 0.00% 0.00% 0.00% 0.00%
/host/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/host/src/commitment.rs 0.00% 0.00% 0.00% 0.00%
/host/src/host_config.rs 0.00% 0.00% 0.00% 0.00%
/host/src/host_views.rs 0.00% 0.00% 0.00% 0.00%
/host/src/lib.rs 0.00% 0.00% 0.00% 0.00%
/host/src/module_manager.rs 0.00% 0.00% 0.00% 0.00%
/host/src/storage.rs 0.00% 0.00% 0.00% 0.00%

Base automatically changed from first-ibc-impl to main October 1, 2024 07:39
@CostinCarabas CostinCarabas self-requested a review October 3, 2024 06:47
@dorin-iancu dorin-iancu marked this pull request as ready for review October 3, 2024 07:32
@@ -9,4 +13,11 @@ pub trait UtilsModule {
"Invalid address"
);
}

fn checked_timestamp_to_unix_mul(&self, timestamp: Timestamp) -> Timestamp {
match timestamp.checked_mul(NANO_SECONDS_MULT) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is just a value in nanoseconds rounded to seconds. If precision is needed, we need framework support. Still figuring it out if it's important

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like we will need the precision. As far as I'm aware, these timestamps are used to give a timeout for transactions.

fn update_client_commitments(
&self,
client_id: ClientId<Self::Api>,
encoded_heights: ManagedBuffer,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a ManagedVec<height::Data> should be here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Didn't realize it at the time. Will keep a list of all these things and fix them in a future PR, don't want to merge all the branches again.

let ibc_handler = self.ibc_handler().get();
let _: () = self
.client_proxy(ibc_handler)
.update_client_commitments(client_id, ManagedBuffer::new())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO data about block height

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nah, this is just a test contract as far as I'm aware.

@dorin-iancu dorin-iancu merged commit 8e32b21 into main Oct 24, 2024
6 checks passed
@dorin-iancu dorin-iancu deleted the client-impl branch October 24, 2024 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants