Find a good solution to tree_hash's getrandom dependency #155
Labels
deps
Concerning dependencies
ethereum-light-client
Issues related to the 08-wasm ethereum light client
good practices
Good code practices
One of the libraries we use in the 08-wasm ethereum light client,
tree_hash
, has a downstream dependency on the librarygetrandom
. The dependency graph we are talking about istree_hash -> ethereum_hashing -> ring -> getrandom
.The reason
getrandom
is problematic is because it doesn't compile to CosmWasm (error at the bottom of the issue). Enabling "js" somehow would not solve the problem since CosmWasm doesn't have support for that either.The current solution solved the problem at the ´tree_hash` level by forking and removing the ethereum_hashing dependency, which just does Sha256 with either sha2 or ring, depending on the platform.
Some potential solutions include:
tree_hash
like we do today - potentially finding a less invasive solution than the current one that makes changes from upstream easier to integrate.Error from running:
cargo build --release --lib --target wasm32-unknown-unknown -p cw-08-wasm-etheruem-light-client
The text was updated successfully, but these errors were encountered: