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

[WIP] Light client wasm browser support #951

Closed
wants to merge 6 commits into from

Conversation

shravanshetty1
Copy link

@shravanshetty1 shravanshetty1 commented Aug 23, 2021

closes #809

Summary:

  • Io, EvidenceReporter and ForkDetector are now async traits. Conditionally compiling this would be tedious.
  • Removed Send + Sync assertion from above traits since wasm futures can never return Send+Sync since they use Rc (unless I am wrong). This means supervisor cannot be shared between threads, currently using tokio to run supervisor in the main thread as an async task.
    This can probably be conditionally compiled, when not in wasm Send+Sync will be enabled.
  • Disabled a few contracts to allow setting a peer as both a primary and witness, this is useful for testing.

TODO:

  • Port tendermint-rpc from hyper to reqwest for wasm compatibility
  • Conditionally compile as many features as possible
  • Make tests use tokio to avoid panic

@shravanshetty1 shravanshetty1 changed the title [WIP] Light client network support [WIP] Wasm browser support Aug 23, 2021
@shravanshetty1 shravanshetty1 changed the title [WIP] Wasm browser support [WIP] Light client wasm browser support Aug 24, 2021
@shravanshetty1
Copy link
Author

@thanethomson Does this make sense? If there is a better approach please let me know so I dont want to waste time on this.

@thanethomson
Copy link
Contributor

@shravanshetty1 thanks for this! Yes, it's something we've been thinking of.

For context, we would need to coordinate this work with the ibc-rs team, because the relayer (Hermes) relies on the Light Client code, so I can't guarantee we'd be able to incorporate this code in the next month or two, given our current roadmap, priorities and resources. I'll chat to the team and get back to you here.

Secondly, I've modified #809 to try to break it up a little, so implementing WASM support doesn't end up being one massive PR (such PRs usually take a long time to review and are difficult to incorporate given other changes we have planned for the Light Client; see #956, for example).

@shravanshetty1
Copy link
Author

@shravanshetty1 thanks for this! Yes, it's something we've been thinking of.

For context, we would need to coordinate this work with the ibc-rs team, because the relayer (Hermes) relies on the Light Client code, so I can't guarantee we'd be able to incorporate this code in the next month or two, given our current roadmap, priorities and resources. I'll chat to the team and get back to you here.

Secondly, I've modified #809 to try to break it up a little, so implementing WASM support doesn't end up being one massive PR (such PRs usually take a long time to review and are difficult to incorporate given other changes we have planned for the Light Client; see #956, for example).

I just modified the current client in a hacky way, to make it compatible with my application. I probably dont have the time to invest into making this production ready which will take alot more work.

Feel free to recommend anyone to use my fork for browser compatibility if they dont mind a hacky solution till a production ready solution is available, will be closing this PR, thanks!

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.

Full Light Client WASM support
2 participants