user129437: I know there are a lot of posts on this issue but the majority of them are quite old.
Is there a more modern and "simple" solution for the address gap limit problem? For what I've read, the best one is to use Electrum and set the gap limit to something like 5000. Is there the possibility to set it up to infinity?
If instead of generating new addresses each time, would importing external private keys to my wallet, without scanning, and generating a single address per private key solve the gap limit dilema (in a Bitcoin Core wallet, for example)?
Thanks a lot for any input!

user51948: The gap limit is used because there are practically infinite addresses you can generate via Hierarchical Deterministic generation. If you didn't have a limit, the wallet would have to generate all of them, just in case, to see if any where used in transactions. That is impossible, there are just way, way too many possible child addresses.

Is there the possibility to set it up to infinity?

This is the same as having no limit, and it's impossible, as above.

would importing external private keys to my wallet, without scanning, and generating a single address per private key solve the gap limit dilema (in a Bitcoin Core wallet, for example)?

The gap limit is specific to Hierarchical Deterministic wallets, where you can deterministically generate many addresses from a single short seed. This makes backups super easy - backing up the seed means you've backed up all past and future addresses your wallet will generate. The seed is short so you can even write it down by hand. And HD has other benefits like being able to generate child public keys without access to the secret keys (useful for security, to avoid having secret keys "hot" on internet-connected devices).
If you just imported a few individual keys, you wouldn't need a gap limit, but you'd lose all the benefits of HD wallets. That's how Bitcoin Core's wallet used to work - colloquially known as the "bag of keys" model. HD is definitely the better way to manage keys.

129437: <p>I know there are a lot of posts on this issue but the majority of them are quite old.</p>
<p>Is there a more modern and &quot;simple&quot; solution for the address gap limit problem? For what I've read, the best one is to use Electrum and set the gap limit to something like 5000. Is there the possibility to set it up to infinity?</p>
<p>If instead of generating new addresses each time, would importing external private keys to my wallet, without scanning, and generating a single address per private key solve the gap limit dilema (in a Bitcoin Core wallet, for example)?</p>
<p>Thanks a lot for any input!</p>
 51948: <p>The gap limit is used because there are practically infinite addresses you can generate via Hierarchical Deterministic generation. If you didn't have a limit, the wallet would have to generate <em>all of them</em>, just in case, to see if any where used in transactions. That is impossible, there are just way, way too many possible child addresses.</p>
<blockquote>
<p>Is there the possibility to set it up to infinity?</p>
</blockquote>
<p>This is the same as having no limit, and it's impossible, as above.</p>
<blockquote>
<p>would importing external private keys to my wallet, without scanning, and generating a single address per private key solve the gap limit dilema (in a Bitcoin Core wallet, for example)?</p>
</blockquote>
<p>The gap limit is specific to Hierarchical Deterministic wallets, where you can deterministically generate many addresses from a single short seed. This makes backups super easy - backing up the seed means you've backed up all past <em>and future</em> addresses your wallet will generate. The seed is short so you can even write it down by hand. And HD has other benefits like being able to generate child public keys without access to the secret keys (useful for security, to avoid having secret keys &quot;hot&quot; on internet-connected devices).</p>
<p>If you just imported a few individual keys, you wouldn't need a gap limit, but you'd lose all the benefits of HD wallets. That's how Bitcoin Core's wallet used to work - colloquially known as the &quot;bag of keys&quot; model. HD is definitely the better way to manage keys.</p>
