-
Notifications
You must be signed in to change notification settings - Fork 332
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
Use a stateless light client #783
Conversation
This comment has been minimized.
This comment has been minimized.
…s for each request
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.
Looks great! Also tested with the hub to make sure, all good!
operations, | ||
state::State as LightClientState, | ||
store::{memory::MemoryStore, LightStore}, | ||
types::Height as TMHeight, |
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.
nit: why don't we get a clippy on TMHeight
?
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.
Because it's a type alias (I think), will fix it in #793.
* Use stateless light client API * Use peer id and timeout for light client config * Update changelog * Add LightClient::fetch method * Remove LightClient::verify_to_latest * Simply mock light client types * Allow specifying a client state to derive light client security params for each request * Fix mock light client * Fix import name
See: #673
Description
This PR introduces a stateless light client implementation, where we do not use a persistent store to hold the latest trusted block but rather supply the trusted block height at each use site.
The light client security parameters are now derived from the client state supplied to the light client at each request.
Moreover, this PR makes use of the light client instance directly instead of spawning a supervisor runtime. The latter is indeed redundant since misbehavior monitoring and evidence submission are now the direct responsibility of the relayer (cf. #632).
For contributor use:
docs/
) and code comments.Files changed
in the Github PR explorer.