scrtlabs / secret-toolkit

A collection of Rust packages that contain common tools used in development of Secret Contracts
GNU Affero General Public License v3.0
73 stars 29 forks source link

Use a pure rust secp256k1 implementation #89

Open luca992 opened 1 year ago

luca992 commented 1 year ago

secp256k1 depends on secp256k1-sys a c wrapper. It has caused me build issues like having to update clang on my mac as well as being incompatible with rust-optimizer. Is there any reason to not use a pure rust implementation like k256? Plus it would be one less dependency since k256 is already a dependency of secret-cosmwasm-crypto

KennySwayzee93 commented 1 year ago

Same problem here, would much appreciate a pure rust implementation

luca992 commented 2 days ago

Fyi contracts with secret-cosmwasm-crypto can't be uploaded on chain anymore after a cargo update

after version 1.1.10 of cc they added shlex which causes:

Err(StaticValidationErr { msg: "Wasm contract requires unsupported import: \\"env.rustsecp256k1_v0_8_1_context_preallocated_size\\"

cc is a dependency of secp256k1-sys

You have to force cc to a lower version now:

cc = { version = "=1.1.10" }

example