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

Add commands to initialize light client for given chain and start verifying headers #26

Merged
merged 43 commits into from
Mar 20, 2020
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
41720f9
Add function to initialize lite client without trusted state
romac Mar 10, 2020
ff255e8
Make LightClient generic over chain type via a generic store
romac Mar 10, 2020
dc07271
Add stub to initialize the light client with trust options
romac Mar 10, 2020
bc34fc3
Use custom sum type for store heights
romac Mar 10, 2020
c2a6c8a
Rename LiteClient to LightClient
romac Mar 10, 2020
c2fc234
Add stub command `light init`
romac Mar 10, 2020
991cd02
Implement LightClient::init_with_node_trusted_state
romac Mar 11, 2020
cf3a2a9
Implement LightClient::init_with_trusted_state
romac Mar 11, 2020
1905e14
Refactor light client
romac Mar 11, 2020
9f8e0f8
Verify trusted state on light client initialization
romac Mar 12, 2020
f45fc07
Remove unused file
romac Mar 12, 2020
883362a
Add stub for Client::check_trusted_header
romac Mar 12, 2020
9e02e89
Fail when needed in Client::update_trusted_state
romac Mar 12, 2020
fb360ef
Partially implement Client::update
romac Mar 12, 2020
e1c93e3
Implement LightClient::verify_header
romac Mar 12, 2020
348168e
Update comment
romac Mar 12, 2020
023a695
Fix clippy warnings
romac Mar 12, 2020
13f9ab6
Use serde-humantime to parse trusting_period
romac Mar 12, 2020
afd6cd3
Move config defaults into their own module
romac Mar 12, 2020
0ea569c
Create light client and display last trusted state
romac Mar 12, 2020
b157162
Use checked arithmetic when incrementing height
romac Mar 12, 2020
272f681
Update trusted store in Client::update
romac Mar 12, 2020
3853042
Fix clippy warnings
romac Mar 12, 2020
179a844
Rename StoreHeight:GivenHeight to Given
romac Mar 13, 2020
39a9d94
Simplify verify_header signature
romac Mar 13, 2020
dc4bfc7
Spawn empty relayer, and one client per configured chain
romac Mar 16, 2020
cf78a1f
Update tendermint-rs repository
romac Mar 16, 2020
3578515
Remove dep on tendermint-rs/light_node by copying RpcRequester code over
romac Mar 16, 2020
d328d92
Improve reporting a bit
romac Mar 16, 2020
084f215
Fix RpcRequester unit test
romac Mar 16, 2020
0699ed7
Add persistent trusted store implementation
romac Mar 16, 2020
60e0066
Use persistent trusted store in commands
romac Mar 16, 2020
ba6235f
Ignore database folders in Git
romac Mar 16, 2020
ddeffb0
Fix clippy warnings
romac Mar 16, 2020
c47247d
Remove superfluous Tendermint type struct
romac Mar 17, 2020
180b253
Add some doc comments
romac Mar 17, 2020
e75b5a1
Document the relayer::client::Client struct
romac Mar 17, 2020
73ce4bf
More doc comments
romac Mar 17, 2020
d24f5fb
Ignore .db and .sh files in cli folder
romac Mar 19, 2020
0692408
Fix misleading doc comment
romac Mar 19, 2020
af7bf63
Update README and LICENSE file
romac Mar 20, 2020
602aa10
Remove verbose flag in README
romac Mar 20, 2020
ab13ede
Add status info to `light init` command
romac Mar 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update comment
  • Loading branch information
romac committed Mar 12, 2020
commit 348168ea6d207ccdef36ecca60d31e4596a7c892
6 changes: 4 additions & 2 deletions relayer/relay/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ where
trusting_period: Duration,
trust_threshold: TrustThresholdFraction,

// FIXME: Use a custom type, because TrustedState requires
// header at height H and validator set at height H + 1
// FIXME: Use a custom type, because TrustedState states
// it holds a header at height H and validator set at height H + 1,
// whereas this trusted state holds both header and validator set at
// same height H
last_trusted_state: Option<TrustedState<Chain::Commit, Chain::Header>>,
}

Expand Down