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 TLS support for the Light Client #842

Merged
merged 24 commits into from
Mar 29, 2021
Merged

Conversation

thanethomson
Copy link
Member

@thanethomson thanethomson commented Mar 25, 2021

Closes #835.

It additionally introduces a little more info-level logging in the Light Node.

I've successfully manually tested the Light Node against two different Cosmos Hub validators, both accessed via HTTPS.

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG.md

Signed-off-by: Thane Thomson <connect@thanethomson.com>
This commit adds pagination to the `validators` method on the `Client`
trait (BREAKING).

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
… string (like page numbers/per page counts)

Signed-off-by: Thane Thomson <connect@thanethomson.com>
…from strings first

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
@thanethomson thanethomson changed the base branch from master to thane/831-validators-hash March 25, 2021 23:57
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
@thanethomson thanethomson marked this pull request as ready for review March 26, 2021 00:59
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (thane/831-validators-hash@ff81071). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@                     Coverage Diff                     @@
##             thane/831-validators-hash    #842   +/-   ##
===========================================================
  Coverage                             ?   28.8%           
===========================================================
  Files                                ?     196           
  Lines                                ?   10886           
  Branches                             ?    4495           
===========================================================
  Hits                                 ?    3136           
  Misses                               ?    4773           
  Partials                             ?    2977           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff81071...62830cc. Read the comment docs.

Copy link
Member

@romac romac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Just left a single request.

light-node/src/config.rs Outdated Show resolved Hide resolved
Base automatically changed from thane/831-validators-hash to master March 29, 2021 15:07
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
@thanethomson thanethomson requested a review from romac March 29, 2021 16:26
@thanethomson thanethomson merged commit e4eb6b9 into master Mar 29, 2021
@thanethomson thanethomson deleted the thane/835-light-client-tls branch March 29, 2021 16:45
thanethomson added a commit that referenced this pull request Mar 30, 2021
* Remove unused file

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Refactor validators RPC endpoint interface

This commit adds pagination to the `validators` method on the `Client`
trait (BREAKING).

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Ensure "total" response field is a string

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add serializer for optional types that need to be converted to/from a string (like page numbers/per page counts)

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Refactor to ensure page numbers and per-page values are converted to/from strings first

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Convert tcp:// scheme to http:// for RPC addresses

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add Light Client support for RPC URLs instead of net::Address

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Revert 14ad69f for now

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Revert f0c26f7

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add CHANGELOG

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Convert tcp:// scheme to http:// for RPC addresses

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add Light Client support for RPC URLs instead of net::Address

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Comment not needed

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Expose rpc::Url type

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update kvstore integration test to use rpc::Url

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update CHANGELOG

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove debug output from height log

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Attach serialization directly to tendermint_rpc::Url

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add some happy path tests for tendermint_rpc::Url parsing

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TLS support for Light Client
3 participants