witnet / witnet-rust

Open source Rust implementation of the Witnet decentralized oracle protocol, including full node and wallet backend 👁️🦀
https://docs.witnet.io
GNU General Public License v3.0
180 stars 56 forks source link

Wallet serialization blocks update to secp256k1 0.24.0 #2282

Open tmpolaczyk opened 2 years ago

tmpolaczyk commented 2 years ago

After updating to secp256k1 0.24.0, the wallet does not allow to unlock previously created wallets with this error:

[2022-10-17T15:37:24Z ERROR witnet_wallet::actors::app::error] Internal Error: repository failed: database failed: bincode failed: io error: unexpected end of file

We need to find out why is that happening, and implement some workaround to allow us to update to secp256k1 0.24.0 or greater.

tmpolaczyk commented 2 years ago

This seems to be because of the ExtendedSK type, it is used to store the master key, and the derived internal and external keys.

See the master_key and account_key functions here: https://github.com/witnet/witnet-rust/blob/8304d479a1d78ad6b3266af30d468004384086ac/wallet/src/repository/keys.rs