Author

Topic: Bitcoin Core -Gap Limit (Read 92 times)

hero member
Activity: 1120
Merit: 540
Duelbits - Play for Free | Win for Real
October 22, 2024, 05:22:47 PM
#4
When you created this wallet in Bitcoin Core, what version of Bitcoin Core were you using? I ask this because depending on the version, before v0.21 for example, Bitcoin Core generated wallets in legacy format, where a bunch of keys were stored. After v21.0 of Bitcoin Core, new wallets created in Bitcoin Core became descriptors by default, the ways in which keys are generated and managed rely on descriptors to describe how a wallet is generated and the spending conditions.

Try to follow the tips suggested above, you can also "refresh" new addresses from your xpub/descriptor in Bitcoin Core with the keypoolrefill command in Bitcoin Core.

To understand how output descriptors work and an example of how to use them, you can access this topic: https://bitcointalksearch.org/topic/m.63603357

Optionally, to better suit your case, you can define a "range" variable in the descriptor to generate, for example, 5000 addresses, e.g.: ..."range:"[0,5000]... this must be added in the descriptor to be imported, for example:

Importing a BIP32 Extended Private Key:

Code:
importdescriptors '[{"desc":"wpkh(xprv9s21ZrQH143K3QSWqukfLKQDxVUPmk2WuS7etkznSZcRVBZcKhV4m7MhEnrHKW3Dq5vjHXXSoyS13K4JqmRuKRquH3bV9eNU9p781DMeyC3/84h/0h/0h/0/*)#4qqw9c4q","timestamp":"now","active":true,"range":[0,5000]},{"desc":"wpkh(xprv9s21ZrQH143K3QSWqukfLKQDxVUPmk2WuS7etkznSZcRVBZcKhV4m7MhEnrHKW3Dq5vjHXXSoyS13K4JqmRuKRquH3bV9eNU9p781DMeyC3/84h/0h/0h/1/*)#y590cd9c","timestamp":"now","active":true,"internal":true,"range":[0,5000]}]'

{
      "desc": "wpkh([c90d8a1f/84h/0h/0h]xpub6Cyu9toACShWh9YdQTcwquoyGByEnUZCGWiywsvzzvKfQipjdbyLJzCWxBjspyiu18DhZ6hp2hxTmxDuZvR1GuXEVd28CuTUKcA9nYQwKuw/0/*)#tyyve29j",
      "timestamp": 1729633211,
      "active": true,
      "internal": false,
      "range": [
        0,
        5000
      ],
      "next": 0,
      "next_index": 0
    },
    {
      "desc": "wpkh([c90d8a1f/84h/0h/0h]xpub6Cyu9toACShWh9YdQTcwquoyGByEnUZCGWiywsvzzvKfQipjdbyLJzCWxBjspyiu18DhZ6hp2hxTmxDuZvR1GuXEVd28CuTUKcA9nYQwKuw/1/*)#6spdyl42",
      "timestamp": 1729633211,
      "active": true,
      "internal": true,
      "range": [
        0,
        5000
      ],
      "next": 0,
      "next_index": 0
    }
  ]
}
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
October 21, 2024, 10:40:59 PM
#3
Description of the problem: I  am running a store and i keep creating invoices, each one has a new address, some of them are paid and some of them are noit paid. I have noticed that some bitcoins are missing and I started the investigations. Soon i found out that there can be a problem called the gap limit, which means theoretically that i have generated to many addresses and because of that, my wallet is not "taking into consideration" all my addresses. Because of this gap limit some bitcoins from some addresses might not be taken into consideration. I am still a beginner in using Bitcoin Core can somemone please guide me and teach me
If you're using a recent descriptor wallet; you can indirectly check each of your parent descriptor's gap limit with listdescriptors command.

Within the results, check the "range" of each of the descriptors. (indicating the derivation path's address_index range)
That represents how many keys/addresses to "look ahead".

Take note that each of your wallet's descriptors have their own range but the gap limit is set to 1000 per descriptor by default.
e.g.: Range: [0,999] by default, higher than 999 could mean that you've generated a few addresses since it's created.
You can set your preferred range by reimporting the descriptor with higher range setting.

If you're using a legacy wallet, there should be 1000 unused receiving/change addresses/keys.
legendary
Activity: 3472
Merit: 3217
Playbet.io - Crypto Casino and Sportsbook
October 21, 2024, 06:37:06 PM
#2
I don't think there's a gap limit on Bitcoin Core. Usually, every time you request to a new addresses from Bitcoin Core, all of them are recorded under window> Receiving address.

Can you check if the descriptor is enabled in your wallet by using this command "bitcoin-cli getwalletinfo" you should be able to see "descriptors": true if its enabled.

You can may be able to reimport it to with custom ranges try the command from this thread below

- https://bitcointalksearch.org/topic/help-with-change-address-on-bitcoin-core-via-psbts-5458139

Optional, it's better to switch to a payment gateway called BTCpay server it's way easier to use for invoices, and you can host it on your own.
newbie
Activity: 1
Merit: 1
October 21, 2024, 05:52:13 PM
#1
Bitcoin Client and Software Version : Bitcoin Core 25.0
Operating system:  Ubuntu 22.04.4 LTS
System Hardware Specs: I am running it on a externeal server on Digital Ocean
Description of the problem: I  am running a store and i keep creating invoices, each one has a new address, some of them are paid and some of them are noit paid. I have noticed that some bitcoins are missing and I started the investigations. Soon i found out that there can be a problem called the gap limit, which means theoretically that i have generated to many addresses and because of that, my wallet is not "taking into consideration" all my addresses. Because of this gap limit some bitcoins from some addresses might not be taken into consideration. I am still a beginner in using Bitcoin Core can somemone please guide me and teach me about this issue and tell me how to solve it?
Any related addresses: No
Any related transactions iDs: No
Screenshot of the problem: No
Log files from the bitcoin client : No
Jump to: