substrate
substrate copied to clipboard
`sign(...)` in `sr25519` requires randomness
Is there an existing issue?
- [X] I have searched the existing issues
Description of bug
When I tried to use sr25519::Pair::sign
function from sp-core with default-features = false, features = ["full_crypto"]
I ran into an error like
thread 'delegated_approve_success' panicked at 'Attempted to use functionality that requires system randomness!!', .../schnorrkel-0.9.1/src/lib.rs:244:55
Then I added "getrandom" in the sp-core's cargo.toml
and added rand
to full_crypto
dependencies and it started working.
Maybe I did something wrong, please give me a solution to this problem.
If there are no hacks here, I suggest two solutions, to do something like above or remove sign
function from full_crypto
feature.