Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transactions sent to high AddressIndex addresses are not visible in wallet. #8138

Closed
3h5t4tvz8etx1op2 opened this issue Jan 9, 2022 · 13 comments

Comments

@3h5t4tvz8etx1op2
Copy link

I run a site, which generate every address for each visitor. So many addresses are left unused. And after checking my view only wallet on the server I've seen many transactions coming to addresses with AddressIndex around 200, 400, 500 but none of that can be seen in my monero-gui wallet (nor in monerujo and cake)

@ndorf
Copy link
Contributor

ndorf commented Jan 9, 2022

Not sure how one would accomplish this in the GUI, but if you can open the wallet in the CLI, the following commands should fix it:

set subaddress-lookahead 50:1000
rescan_bc

@3h5t4tvz8etx1op2
Copy link
Author

thanks @ndorf! Could you please tell me what does 50 and 1000 mean in that command?

@3h5t4tvz8etx1op2
Copy link
Author

Sadly - after even changing the numebrs to 50 and 2000 transactions send to address with account id ~1300 are have not been seen.

@JustFranz
Copy link

50 is account and 2000 is subaddress. With that command you will not see transactions in accounts 51 and up and it will not see transactions in accounts 1-50 if they do not have transactions in the first 2000 subaddresses or if there is a gap of 2000 subadrersses with no transactions on any of the 50 accounts.

I would generate the subaddresses and assign them to your visitors when they need them. Each time a visitor sends XMR it should be to a new subaddress. You save on scanning time, database size and will not have this issue.

@selsta
Copy link
Collaborator

selsta commented Jan 10, 2022

@3h5t4tvz8etx1op2 do you generate a new account or a new address for each user?

if it's account then try set subaddress-lookahead 1000:10 and then rescan_bc.

@3h5t4tvz8etx1op2
Copy link
Author

@JustFranz sadly I can't do that, the UX tradeoff is too big in my case, and I do use old addresses when they expire, but gaps of ~2k are frequent.

@selsta that was addresses. I've just re-coded the program to move the funds directly to my main address so there will be no problem with huge indexes.

@SamsungGalaxyPlayer
Copy link
Collaborator

SamsungGalaxyPlayer commented Jan 10, 2022

You can fiddle with the lookahead values to raise/reduce the number of accounts/addresses as needed. If this is an outrageously huge number, take some steps to reduce the display of subaddresses unless a user is more likely to send funds to it. If you only need 1 account and you need a bunch of subaddresses, set the lookahead to 1:10000 on desktop CLI for roughly similar performance as the default afaik, and then you can set up the auto-forward to the main address so it will appear in Cake Wallet.

Edit: at that point I would recommend just using a separate seed for that Cake Wallet if possible for security reasons.

@selsta
Copy link
Collaborator

selsta commented Jan 10, 2022

Performance generally should stay the same, only RAM usage increases with more subaddresses.

@3h5t4tvz8etx1op2
Copy link
Author

@SamsungGalaxyPlayer that's what I ended up with, just swaping the funds whenever certain amount is there, this is not the ideal solution for me - but it for sure works.

@3h5t4tvz8etx1op2
Copy link
Author

However, I think that there should be option to specify the subaddress-lookahead in all wallets, or at least in the gui wallet

@SamsungGalaxyPlayer
Copy link
Collaborator

I've added a note on the Cake Wallet side to support different lookahead values 👍

@3h5t4tvz8etx1op2
Copy link
Author

according to @selsta - how big is the memory footprint? I remember that in core bitcoin wallet the wallet.dat file was growing bigger and bigger with more addresses.

@selsta
Copy link
Collaborator

selsta commented Jan 11, 2022

@3h5t4tvz8etx1op2 I don't have any numbers, you'll have to try it out

@selsta selsta closed this as completed Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants