1

I have a secret key pair (from a wallet.keys file or derived from a seed-phrase).

I'm researching the subaddress recovery process from those keys.

I heard about BIP32-similar methods in Bitcoin. I know the gap-limit concept.

How does the Monero recovery process work? Does my Monero node go over every subaddress until it found N empty (without transaction) addresses in a row?

How does it work if I have 10000 empty addresses and use the 10001-th? How does it work if I use multiple accounts? Should I save anything else for backing up my wallet in this scenario?

5
  • When you say "masterkeys", do you mean "private key"?
    – jtgrassie
    Commented Apr 9, 2019 at 13:52
  • This question is possibly a duplicate of: monero.stackexchange.com/questions/7232/…. Please check that, and if your question is different, could you please rephrase?
    – jtgrassie
    Commented Apr 9, 2019 at 13:56
  • I found answer for first question: subaddress-lookahead-major/minor parameters are good for one account. And what about multiple accounts? Will 10-th account be restored from seed?
    – ca6
    Commented Apr 10, 2019 at 6:38
  • Accounts are just groups of subaddresses, thus they fall under the same process. E.g. address (1,0) is a subaddress (account 1, sub 0).
    – jtgrassie
    Commented Apr 10, 2019 at 11:40
  • Possible duplicate of How to determine number of used subaddresses after restoring from seed?
    – jtgrassie
    Commented Apr 10, 2019 at 13:09

1 Answer 1

2

First off, the node does not do anything about addresses, the wallet does. The node never gets your secret keys.

Next, the Monero wallet will always cache/calculate the next 200 addresses for the next 50 accounts. Every time you receive monero in one of these, the Monero wallet will cache/calculate more of these to always keep a buffer of 200/50 beyond the "furthest" you've used.

For this reason, if you decide to use a subaddress more than 200 away from the highest you've currently precached, it will not be seen. To prevent this, either use a larger lookahead (that option you've found already), or generate them manually in monero-wallet-cli by creating new addresses until you get in range.

Those addresses are deterministic, so you don't need to back them up. They can always be restored in the same way from your seed.

3
  • Hi, can you please tell me how to increase lookahead in Monero Wallet GUI? Cannot seem to find this option anywhere
    – michnovka
    Commented Feb 1, 2021 at 17:11
  • For monero-wallet-cli or -rpc, it's --subaddress-lookahead X:Y (X is the lookahead for major (account number), Y is the lookahead for minor (addresses within an account)) on the command line or "set subaddress-lookahead X:Y" in the monero-wallet-cli console. For the GUI, I don't know if it's settable, but if you set it with monero-walet-cli, it's saved in the wallet file so will be remembered and used by the GUI next time you load it.
    – user36303
    Commented Feb 1, 2021 at 23:28
  • Yes, there seems to be no way to change with GUI, but I did manage to change it with cli wallet. Thanks!
    – michnovka
    Commented Feb 2, 2021 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.