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

Bootstrap proxy for light-node API #329

Closed
wants to merge 1 commit into from
Closed

Bootstrap proxy for light-node API #329

wants to merge 1 commit into from

Conversation

xla
Copy link
Contributor

@xla xla commented Jun 16, 2020

Introducing a proxy which serves the Tendermint RPC API with the help of a connected RPC client. Later to be extended to add light client functionality. This is in nature equivalent to the Go proxy[0].

Instead of reaching for hyper this change introduces warp to build an HTTP server. This decision should be evaluated very carefully, while warp is a thinly wrapper around hyper, it brings a lot of very important tooling (including Websockets), it also has its own set of dependencies.

Also currently unclear if the module that implements the RPC API with lite client functionality should live in the RPC source tree.

Part of #219

[0] https://github.com/tendermint/tendermint/tree/master/light/proxy


Still under development, open this draft PR for early feedback and course corrections.

Introducing a proxy which serves the Tendermint RPC API with the help of
connect rpc client. Later to be extended to add light client
functionality. This is in nature equivalent to the Go proxy[0].

Instead of reaching for hyper this change introduces warp to build an
http server. This decision should be evaluated very carefully, while
warp is a thinly wrapper around hyper, it brings a lot of very important
tooling (including websockets), it also has its own set of dependencies.

Also currently unclear if the module that implements the rpc API with
lite client functionality should live in the rpc source tree.

Part of #219

[0] https://github.com/tendermint/tendermint/tree/master/light/proxy
@xla xla added light-client Issues/features which involve the light client rpc feature labels Jun 16, 2020
@xla xla requested review from brapse and liamsi June 16, 2020 10:14
@xla xla self-assigned this Jun 16, 2020
@codecov-commenter
Copy link

Codecov Report

Merging #329 into master will increase coverage by 0.6%.
The diff coverage is 19.4%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #329     +/-   ##
========================================
+ Coverage    28.2%   28.8%   +0.6%     
========================================
  Files         130     131      +1     
  Lines        4880    4975     +95     
  Branches     1511    1561     +50     
========================================
+ Hits         1378    1435     +57     
+ Misses       2533    2500     -33     
- Partials      969    1040     +71     
Impacted Files Coverage Δ
tendermint/src/rpc/proxy.rs 19.4% <19.4%> (ø)
tendermint/src/net.rs 30.0% <0.0%> (+1.6%) ⬆️
tendermint/src/test.rs 21.0% <0.0%> (+4.3%) ⬆️
tendermint/src/rpc/client.rs 6.0% <0.0%> (+6.0%) ⬆️
tendermint/src/rpc/method.rs 11.3% <0.0%> (+11.3%) ⬆️
tendermint/src/rpc/error.rs 45.9% <0.0%> (+11.7%) ⬆️
tendermint/src/rpc/version.rs 40.9% <0.0%> (+13.6%) ⬆️
tendermint/src/rpc/endpoint/health.rs 25.0% <0.0%> (+25.0%) ⬆️
tendermint/src/rpc/id.rs 86.3% <0.0%> (+27.2%) ⬆️
... and 1 more

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 1df3ac3...740cd1d. Read the comment docs.

@xla xla requested review from romac and ebuchman June 16, 2020 10:27
@ebuchman
Copy link
Member

Thanks @xla !! But see my comment #219 (comment) - not sure we want to go full proxy yet, probably best to just start with a simple RPC service with two methods and figure out from there how we really want to proceed

@xla
Copy link
Contributor Author

xla commented Jun 16, 2020

@ebuchman Read all your comments thoroughly and promise to jump the shark here. Boostraping here means pretty much the two endpoints you mentioned.

@liamsi
Copy link
Member

liamsi commented Jun 17, 2020

I had to google "jump the shark" and ended up watching this: https://www.youtube.com/watch?v=t4ZGKI8vpcg 😬

This PR, needs to be updated using the new rpc crate: #338

Now that I learned that tendermint (go) actually offers (98%) jsonrpc compatible endpoints, we could use a jsonrpc server crate to expose the endpoints instead.

@xla
Copy link
Contributor Author

xla commented Jun 17, 2020

I had to google "jump the shark" and ended up watching this: https://www.youtube.com/watch?v=t4ZGKI8vpcg grimacing

World-class entertainment.

This PR, needs to be updated using the new rpc crate: #338

Think I gonna ditch this one and start fresh on top of #338.

Now that I learned that tendermint (go) actually offers (98%) jsonrpc compatible endpoints, we could use a jsonrpc server crate to expose the endpoints instead.

Agreed!

@xla
Copy link
Contributor Author

xla commented Jun 23, 2020

Super-seeded by #363

@xla xla closed this Jun 23, 2020
@xla xla deleted the xla/219-rpc-proxy branch July 2, 2020 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature light-client Issues/features which involve the light client rpc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants