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

Replace "ferveo-tpke" feature guards that are only being used to prevent wasm build breakages #802

Closed
Tracked by #2529
james-chf opened this issue Nov 17, 2022 · 2 comments
Assignees
Labels
pre-mainnet Must happen before mainnet. refactor / code quality

Comments

@james-chf
Copy link
Contributor

The shared namada crate is used by code that is compiled to wasm and also by code that is compiled to native binaries (e.g. namadac, namadan). Sometimes, things get pulled in to wasm builds via this shared crate that cause breakages. The ferveo-tpke feature is sometimes (ab)used to guard code which should only be used in native builds because it would otherwise break wasm builds e.g.

#[cfg(all(not(feature = "abcipp"), feature = "ferveo-tpke"))]
pub use tendermint_rpc;
#[cfg(all(feature = "abcipp", feature = "ferveo-tpke"))]
pub use tendermint_rpc_abcipp as tendermint_rpc;

  • "ferveo-tpke" should only be used to guard code that is actually relevant to Ferveo functionality
  • we could introduce a new dedicated feature for guarding code that shouldn't ever be included in wasm builds and use that instead of "ferveo-tpke". Even if this is only an interim solution until wasm-breaking functionality could be split out from the namada crate altogether.
@james-chf james-chf moved this to Todo in Namada-Old Nov 17, 2022
@james-chf james-chf changed the title Remove "ferveo-tpke" feature guards that are only being used to prevent wasm build breakages Replace "ferveo-tpke" feature guards that are only being used to prevent wasm build breakages Nov 17, 2022
@james-chf
Copy link
Contributor Author

"ferveo-tpke" pulls in rand and rand_core dependencies, which is probably what leads to the breakages.

ferveo-tpke = [
  "ferveo",
  "tpke",
  "ark-ec",
  "rand_core",
  "rand",
]

The "testing" feature does this also (which means things guarded by the "testing" flag cannot currently be used within e.g. test wasms).

@tzemanovic
Copy link
Member

this has been removed with abcipp feature flag

@github-project-automation github-project-automation bot moved this from Todo to Tested in Devnet in Namada-Old Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pre-mainnet Must happen before mainnet. refactor / code quality
Projects
No open projects
Status: Tested in Devnet
Development

No branches or pull requests

4 participants