-
Notifications
You must be signed in to change notification settings - Fork 3.7k
feat(lightclient): add CommitClientStatus message to persist client s… #4859
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
base: main
Are you sure you want to change the base?
Conversation
Someone is attempting to deploy a commit to the unionbuild Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work! this also needs to be implemented in the solidity ibc stack for feature parity.
also please verify your commits as per our contributing guide. |
55a5626
to
8e70297
Compare
) -> RpcResult<Option<u8>> { | ||
let status = self | ||
.query_smart::<_, u8>( | ||
&ibc_union_msg::query::QueryMsg::GetStatus { client_id }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the wrong query; you need to use GetCommittedStatus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do the rename in the following PR.
client_id: msg.client_id, | ||
} | ||
.key(), | ||
&commit(status_bytes), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
store the bytes directly, as a U256
value
&self, | ||
height: Height, | ||
client_id: ClientId, | ||
) -> RpcResult<Option<u8>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should return Option<Status>
&self, | ||
height: Height, | ||
client_id: ClientId, | ||
) -> RpcResult<Option<u8>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Option<Status>
%client_id | ||
) | ||
)] | ||
async fn query_client_status( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename this to query_committed_client_status
(in the evm impl as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove your merge commit and rebase off of main
client_id: msg.client_id, | ||
} | ||
.key(), | ||
&commit(U256::from(status as u32).to_le_bytes()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't store the commit, but the u256 value directly
GetStatus { client_id: ClientId }, | ||
#[cfg_attr(feature = "cw-orch-interface", returns(Option<H256>))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return status here
5641ae7
to
b3cb34c
Compare
Adds a new 'CommitClientStatus' message to explicitly commit the client's status (Active, Expired, or Frozen) into state storage as a hashed commitment using 'store_commit'.
Closes #4842