namada
namada copied to clipboard
Replace "ferveo-tpke" feature guards that are only being used to prevent wasm build breakages
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. https://github.com/anoma/namada/blob/2604a91cd23c6d542abab9502ec446502adfbee2/shared/src/lib.rs#L9-L12
- "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
namadacrate altogether.
"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).
this has been removed with abcipp feature flag