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

Shared Sdk #921

Closed
wants to merge 51 commits into from
Closed

Shared Sdk #921

wants to merge 51 commits into from

Conversation

mariari
Copy link
Member

@mariari mariari commented Dec 19, 2022

Followup of #918 and succeeds #916

An attempt to move functionality from tx.rs, rpc.rs, and signing.rs by means of parameterization by concrete clients. More concretely, the following changes were made:

  • Parameterized the tx.rs and rpc.rs argument types so that they can be used with or without a Context
  • Separated the pure from the impure part of Wallet and moved the pure part into the shared crate
  • Moved the function implementations in rpc.rs and tx.rs into the shared crate leaving behind function wrappers in apps (that could then be used to capture Results and print them out in the CLI)
  • Simplified the ShieldedContext trait by removing those functions in it that have been moved into the shared crate

With this approach, for each platform ShieldedContext, WalletUtils, and just the perform function of Tendermint's Client trait would have to be implemented (since the rest of Client has default implementations specified in terms of perform) for each client.

The only dependencies added to the shared crate are toml, bimap, orion, tokio, and serde. Hopefully this should not cause issues when building WASM targets.

The integration branch corresponding to this branch is #925

@mariari mariari mentioned this pull request Dec 19, 2022
@mariari mariari changed the base branch from murisi/parameterized_tx2 to main December 19, 2022 13:42
@mariari
Copy link
Member Author

mariari commented Dec 20, 2022

If you are wanting to use this branch now #925 is the integration branch

@mariari mariari changed the title Mariari/paramererized tx2 Shared Sdk Dec 20, 2022
@adrianbrink
Copy link
Member

@memasdeligeorgakis @mateuszjasiuk @jurevans Can you verify that the last sentence The only dependencies added to the shared crate are toml, bimap, orion, tokio, and serde. Hopefully this should not cause issues when building WASM targets. is true?

@mateuszjasiuk
Copy link
Contributor

mateuszjasiuk commented Dec 20, 2022

Tokio with features = ["full'] does not compile. It looks like support for wasm is still in progress.
Some features are working since v1.21.0 PR sync,macros,io-util,rt,time
discussion here and here

Rest of the dependencies are fine from what I can tell.

@adrianbrink
Copy link
Member

Can we compile this without tokio = full?

@mariari @cwgoes

@adrianbrink
Copy link
Member

I'm closing this in favor of #925

@mariari mariari mentioned this pull request Jan 16, 2023
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.

None yet

5 participants