web3swift
web3swift copied to clipboard
Keystore Initialization - 100% CPU Usage
The initialization of a Keystore freezes the whole application and apparently throws a load of work onto the CPU - 100%.
let keystore = try! EthereumKeystoreV3(privateKey: dataKey, password: password)!
This line is completely copied from the examples and uses simple strings. The function itself is the cause of the issue.
Experiencing this as well, the whole device locks up. BIP32Keystore suffers from the same issue. I believe the issue is coming from scrypt, line 103 in EthereumKeyStoreV3.swift. Have not found a workaround yet.
Can confirm. Best workaround right now is to run in the background via DispatchQueue. Obviously it would be better if this would happen in the key store classes directly.
confirmed issue is in scrypt and all its calls to the function rotateLeft
This should only be an issue in debug builds when using SPM. Can someone please confirm if this is still an issue using the latest version of web3swift and building/running in release mode?
This should only be an issue in debug builds when using SPM. Can someone please confirm if this is still an issue using the latest version of web3swift and building/running in release mode?
Can confirm. Have no issues for release builds.