Post
Topic
Board Service Discussion
Re: [Question] Max Account of Metamask and Ronin Wallet
by
vv181
on 05/09/2021, 04:08:03 UTC
To know how many addresses you can generate from one seed you can refer to below quotation:

In order to understand, how many address could be generated from one seed we should go to the process of address generation in HD wallets.
As bitmover said, there are 4 billion children possible:

From antonopoulos mastering bitcoin:
Quote
https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch05.asciidoc#navigating-the-hd-wallet-tree-structure
The HD wallet tree structure offers tremendous flexibility. Each parent extended key can have 4 billion children: 2 billion normal children and 2 billion hardened children. Each of those children can have another 4 billion children, and so on. The tree can be as deep as you want, with an infinite number of generations.

To be exact, the 4 billions means 2^32 - 1 = 4 294 967 295 (this was a limit designed in HD wallets).

The path format of HD wallets is m / purpose' / coin_type' / account' / change / address_index, where account, change and address_index are dependnecies for address creation based on master private key (SHA of the seed).
Let's say for bitcoin it is m/44' /0 / account' / change / address_index

account and address_index could be in the range from 0 to 2^32-1 (2^32 total combinations), change could be 0 or 1 (change address or not), so 2 total combinations.

Hence, the total number of possible combinatins is 2^32 * 2^32 * 2*1 = 2^(32+32+1) = 2^65 which is 2^191 less than the total possible private keys and 2^95 less than the total possible addresses (cinsidering hash160 function) for every address type (legacy, segwit, bech32)

So, considering the HD wallet limitation (2^32 for child and address index), we need at leat 2^95 different seeds in order to generate all possible addresses (withount collisions).

So I'm pretty sure that those wallet does not set a limit of maximum generated address in term of within the wallet itself.