-
Notifications
You must be signed in to change notification settings - Fork 228
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
lite: impl Requester, Store, and a basic syncing daemon #116
Conversation
At least for now, FWIW, I was interested in |
it's not actually a hash! it's whatever is returned by the application, which can be arbitrary bytes.
Merged in master and fixed conflicts. Also did some minor cleanup. We can probably merge this more or less as is for now but we'll want to follow up with:
|
|
||
[dependencies] | ||
tendermint = { path = "../tendermint" } | ||
tokio = "0.2" |
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.
Cool that there is (again) a light client crate now. Is the plan to move everything from tendermint/src/lite
into this crate too?
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.
I'm starting to think the tendermint/src/lite
should be its own crate and the non main stuff here should be in the tendermint
crate
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.
OK, I see. For binaries it is good practice to add the Cargo.lock
to the repo, too.
tendermint-lite/src/requester.rs
Outdated
assert_eq!(r1.hash(), r2.header().validators_hash()); | ||
} | ||
} | ||
*/ |
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.
What's up with this? Why is it commented out?
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.
It's an integration test requiring a full node and i wasn't sure how to indicate that ...
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.
I think adding a #[ignore]
to the test and adding one sentence about why this is disabled and what it needs to be able to run would be cool.
An example of this is:
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
tendermint = { path = "../tendermint" } |
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.
Shouldn't this be a proper dependency instead of a local path?
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.
You can do both...
tendermint = { path = "../tendermint" } | |
tendermint = { version = "0.11", path = "../tendermint" } |
Co-Authored-By: Ismail Khoffi <Ismail.Khoffi@gmail.com>
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.
Awesome work! We should merge this as is and address the following in follow-up work; e.g., in the PR that deals with making the consts config params (using abssicca):
- add a comment about why the integration test is commented out (and what is needed to run it)
- update Cargo.toml of the binary crate to point to specific tm version
- add Cargo.lock
Started in a new crate as per #110 #110 (comment)
Includes a basic test for the Requester against a running tendermint node.
Not really sure how to use async stuff yet so I just copied the
block_on
thing from the integration tests for now ...Also includes a basic daemon that uses bisection to sync against a local node from hard coded values - this is working against a my local node.