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

WASM-compatible networking layer for the Light Client #957

Open
Tracked by #809
thanethomson opened this issue Aug 25, 2021 · 3 comments
Open
Tracked by #809

WASM-compatible networking layer for the Light Client #957

thanethomson opened this issue Aug 25, 2021 · 3 comments
Labels
enhancement New feature or request light-client Issues/features which involve the light client wasm

Comments

@thanethomson
Copy link
Contributor

Requires #953

At present, we only have one implementation of the Io trait in the Light Client, which makes use of the tendermint-rpc to fetch light blocks (over HTTP/WebSocket).

To be able to support a full WASM build of the Light Client, we need to implement a fetch API-compatible version of the Io trait.

What's the definition of "done" for this issue?

When we can compile the tendermint-light-client crate to WASM and make use of its full API (including networking) from JavaScript.

@thanethomson thanethomson added enhancement New feature or request light-client Issues/features which involve the light client wasm labels Aug 25, 2021
@celsobonutti
Copy link

Hey @thanethomson, I'd like to work on that. I was previous working on adding wasm support for tendermint-rpc (as it was specified in the previous issue). Was there any reason behind moving the implementation from the rpc to the Io trait?

@thanethomson
Copy link
Contributor Author

Hey @thanethomson, I'd like to work on that. I was previous working on adding wasm support for tendermint-rpc (as it was specified in the previous issue). Was there any reason behind moving the implementation from the rpc to the Io trait?

Cool! Yes the main reason was that:

  1. We're going to probably end up renaming that Io trait to something like LightBlockFetcher, since its primary purpose is not general I/O but is very specifically to provide LightBlocks.
  2. As a result, we don't need the entire RPC to be able to build to WASM - we only need something WASM-compatible that's going to fetch and deserialize light blocks.

I'd be interested, however, to know if you feel like you'd want a more general-purpose Tendermint RPC client that compiles to WASM? I know that CosmJS provides a TypeScript implementation: https://github.com/cosmos/cosmjs/tree/main/packages/tendermint-rpc

@celsobonutti
Copy link

celsobonutti commented Sep 3, 2021

Nice, that makes a lot of sense!

I'd be interested, however, to know if you feel like you'd want a more general-purpose Tendermint RPC client that compiles to WASM?

Not at all, we'll only need the Light Client to compile to WASM, so I started working on the RPC compilation.
I'll start working on WASM Io, then. Thanks for your attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request light-client Issues/features which involve the light client wasm
Projects
None yet
Development

No branches or pull requests

2 participants