10

https://github.com/monero-project/monero/pull/1753 is a pull request for disposable addresses and sub-addresses but what is a sub-address? Kind of like bip32 wallets in bitcoin?

1
  • 1
    For future viewers: the pull request was not merged, therefore do not think any information provided is even useful. Disposable addresses do not exist and do not confuse them with stealth addresses or the merged subaddresses. I hope this question is deleted as it only adds confusion.
    – Elijah
    Commented Aug 15, 2021 at 20:15

2 Answers 2

6

There are disposable addresses and subaddresses. Subaddresses are cool because you can have different addresses and still have them go to the same wallet. But they wouldn't be linked together. As pebx mentioned, there is a limit on the amount of subaddresses. You can generate as many subaddresses as you want, but the wallet cache file size gets bigger and bigger as you generate more because all subaddresses need to be stored in the file. For example, 10000 subaddresses (the default setting) consume 400kb, and 100k subaddresses consume 4MB.

That's where the disposable addresses come in. Because you could say "what's the point of a disposable address, I'll just create a subaddress every time!" which would be fine in theory but since there is a limit, it makes more sense to use a disposable. Especially when you are only using it for one transaction.

At least that is how I understood it.

1
  • 2
    You should use disposable addresses only for one transaction, since they have to include an unencrypted payment ID, which will be visible for everyone on the blockchain. So if you use a disposable address for multiple transactions like donations or other referring payments, even with RingCT anyone can trace at least how many payments you got. Subaddresses however act like any other normal address and have their payment IDs encrypted on the blockchain.
    – janowitz
    Commented Feb 23, 2017 at 20:00
6

I will quote some comments from kenshi84 (who submitted the pull request).

Subaddresses are just like the standard address that you can use for receiving funds repeatedly. For example, you can use subaddress of index=1 for receiving your salary and index=2 for raising funds for your secret project, and no one can find the link between them.

The number of subaddresses that you can generate for your wallet is limited due to storage requirement (currently the limit is 10000 addresses and they are precomputed during wallet generation).

The number of the precomputed subaddresses is set to 10000 by default, and can be changed via set command.

2
  • @kenshi84 good to see you here and thx for clarification! Would it be possible to remove subaddresses from the cache after using it once or doesn't it make any sense? I mean, even a large online shop with millions of customers could create one for each customer, since 1M subaddresses would be 40MB? I think it's reasonable...
    – janowitz
    Commented Feb 24, 2017 at 9:24
  • 1
    Thanks for answering the question on behalf of me! It does make sense to remove certain subaddresses from the hashtable when you know for sure that those subaddresses won't every be used anymore. In order to correctly recognize incoming funds while restoring the wallet from the seed, you need to have a separate record of which indices are in actual use. And yes, 1M subaddresses would be 40MB, which doesn't seem like a big deal for major online shops :)
    – kenshi84
    Commented Feb 24, 2017 at 9:34

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.