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 update inefficiency with multiple relayers #152

Open
rnbguy opened this issue Apr 24, 2024 · 0 comments
Open

client update inefficiency with multiple relayers #152

rnbguy opened this issue Apr 24, 2024 · 0 comments

Comments

@rnbguy
Copy link
Member

rnbguy commented Apr 24, 2024

Currently, the trusted height of the sovereign light client header must be the latest height at the stored client state.

let client_height_in_da = client_latest_height.add(genesis_da_height.revision_height());
let header_trusted_height = self.da_header.trusted_height;
if client_height_in_da != header_trusted_height {
return Err(ClientError::Other {

This was required because the zk-prover didn't have recursive support. So, the sov component of the headers must be consecutive. Recently, recursive support was added to the zk-prover. Now, the header updates can skip intermediate slots.

Considering this new change, the above restriction creates inefficiency with multiple relayers (race condition). If relayer-A and relayer-B are trying to update the latest slot height 2 to slot height 4 and 5, respectively, only one of them will succeed. Whichever transaction goes first will update the latest slot. This fails the second transaction, as it will not have the updated trusted height. So, the failed relayer has to regenerate the client update for the updated slot.

Therefore, we can remove the above restriction to allow non-sequential light client updates - similar to native Tendermint light client updates - where the trusted height can be any previous height with an accepted consensus state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📥 To Do
Development

No branches or pull requests

1 participant