-
Notifications
You must be signed in to change notification settings - Fork 345
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
Add commands to initialize light client for given chain and start verifying headers #26
Conversation
6203a0e
to
a8c4389
Compare
a8c4389
to
348168e
Compare
9c3e326
to
cf78a1f
Compare
Codecov Report
@@ Coverage Diff @@
## master #26 +/- ##
=======================================
Coverage ? 8.6%
=======================================
Files ? 34
Lines ? 876
Branches ? 114
=======================================
Hits ? 76
Misses ? 773
Partials ? 27
Continue to review full report at Codecov.
|
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 good, let's merge this. As we discussed, the change to call the bisection/ sequential based on config will be added later.
…ifying headers (informalsystems#26) * Add function to initialize lite client without trusted state * Make LightClient generic over chain type via a generic store * Add stub to initialize the light client with trust options * Use custom sum type for store heights * Rename LiteClient to LightClient * Add stub command `light init` * Implement LightClient::init_with_node_trusted_state * Implement LightClient::init_with_trusted_state * Refactor light client * Verify trusted state on light client initialization * Remove unused file * Add stub for Client::check_trusted_header * Fail when needed in Client::update_trusted_state * Partially implement Client::update * Implement LightClient::verify_header * Update comment * Fix clippy warnings * Use serde-humantime to parse trusting_period * Move config defaults into their own module * Create light client and display last trusted state * Use checked arithmetic when incrementing height * Update trusted store in Client::update * Fix clippy warnings * Rename StoreHeight:GivenHeight to Given * Simplify verify_header signature * Spawn empty relayer, and one client per configured chain * Update tendermint-rs repository * Remove dep on tendermint-rs/light_node by copying RpcRequester code over * Improve reporting a bit * Fix RpcRequester unit test * Add persistent trusted store implementation * Use persistent trusted store in commands * Ignore database folders in Git * Fix clippy warnings * Remove superfluous Tendermint type struct * Add some doc comments * Document the relayer::client::Client struct * More doc comments * Ignore .db and .sh files in cli folder * Fix misleading doc comment * Update README and LICENSE file * Remove verbose flag in README * Add status info to `light init` command
Closes: #17
Description
This PR implements the following:
sled
database library.tendermint-rs
crate.light init
command which allows to set the trust options for a given chain.start
command which starts a light client per configured chain, which continuously pulls and verify headers. Also starts a dummy thread for the relayer itself.For contributor use:
docs/
) and code commentsFiles changed
in the Github PR explorer