Open extra topbar

Wallets lock after a while

If you are new here, please see some information on how to ask for support. Thank you!

Wallets lock after a while

This topic contains 7 replies, has 2 voices, and was last updated by  alexg 2 weeks, 6 days ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #6659

    defunctec
    Participant

    Hello, I’m running an adaptor using “Bitcoin and Altcoin Wallets: Full Node Multi Coin Adapter extension”.
    The wallet keeps locking and I have to manually input the passphrase every 24 hours or so.
    Also seems to happen around user activity.

    Is there something I’m missing?

    Thanks

    #6663

    alexg
    Keymaster

    Hello,

    Please check the setting “Wallets” -> “Cron job” -> “Withdrawal locks” -> “Time to retain secret”. If you want the passphrase to be retained indefinitely, you should keep the value at 0.

    When the value is 0, the passphrase is saved into a WordPress option, while if the value is not 0, the passphrase is simply used to unlock the wallet once for the duration specified, but is not saved: https://github.com/dashed-slug/wallets/blob/4.3.4/includes/coin-adapter-rpc.php#L602-L623

    If the time to retain secret is 0, the wallet is unlocked every time a withdrawal is attempted. https://github.com/dashed-slug/wallets/blob/4.3.4/includes/coin-adapter-rpc.php#L510-L551

    There is nothing else that you are missing. If you have set the time to retain secret to 0, and if afterwards you have set the correct passphrase, then that’s all you need to do.

    Please let me know if you have done this. I am currently double-checking if the passphrase gets deleted on my end, but this will take 24 hours for me too.

    with regards

    #6665

    defunctec
    Participant

    Thanks for reply

    Secret is set to 0 but I still need to manually enter the passphrase to unlock the wallet every day or so.

    Thnaks again

    #6671

    alexg
    Keymaster

    OK thanks for checking.

    I am really not sure why this happens. As mentioned before, if the time to retain is 0 and the correct passphrase is entered afterwards, it is saved as a WordPress option, so that the plugin can unlock the wallet at any time.

    To find the option name, go to the coin adapter’s settings and inspect the wallet passphrase input box. The id and name of the field is the name of the option where the passphrase is saved. For example, for the built-in Bitcoin adapter, the option name is wallets-bitcoin-core-node-settings-rpc-passphrase.

    I wonder if something deletes this option in your system. Can you check? Ideally, attempt to check the option value once after first entering the passphrase, and once more after the wallet is locked.

    To check via the MySQL console:

    SELECT option_name,option_value FROM wp_options WHERE option_name LIKE 'wallets-%-settings-rpc-passphrase';

    To check with wp-cli from the linux command line:

    wp option get wallets-bitcoin-core-node-settings-rpc-passphrase (substitute with your actual option name)

    Apologies for the confusion, but I don’t see any other way to debug this. I am not able to reproduce the problem on my end.

    Please let me know if you need any help with inspecting the passphrase option, and also let me know what you find.

    with regards

    #6680

    defunctec
    Participant

    As a temp fix I could set the wallet to lock every week and see if it holds up after 7days.
    (Edit – I see max is 1440 min’s)
    Everything you suggest is over my head, sorry.

    I will monitor this further

    Thanks for your help 🙂

    • This reply was modified 3 weeks, 2 days ago by  defunctec.
    #6687

    alexg
    Keymaster

    Hello,

    Where did you see a max value of 1440?

    In Bitcoin core the maximum wallet timeout is 100000000 seconds, or about 3 years. Is your wallet different?

    Please keep me posted about whether your fix works.

    If you could tell me which wallet you are connecting to, perhaps I could test with that wallet.

    with regards

    #6694

    defunctec
    Participant

    Hi

    1440 is max for the custom adaptor I’m using (
    Time to retain withdrawal secrets).

    The crypto is Crown(CRW)
    Here’s the adaptor https://github.com/defunctec/crown-adapter/blob/master/wallets-crown/crwadapter.php

    Also, I’ve not needed to enter the passphrase in over 48 hours

    #6696

    alexg
    Keymaster

    Ah, OK 1440 is the maximum allowed in the plugin.

    The coin adapter hook looks good.

    In any case, I will check with the CRW wallet to see if I can reproduce the problem. I will let you know what I find.

    with regards

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.