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?


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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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