Bitcoin Forum
December 03, 2026, 08:20:57 AM *
News: Latest Bitcoin Core release: 32.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Generating new receive addresses  (Read 69 times)
NotATether (OP)
Legendary
*
Offline

Activity: 2534
Merit: 10809


┻┻ ︵㇏(°□°㇏)


View Profile WWW
December 02, 2026, 01:14:45 PM
 #1

Is it a deliberate design decision to only generate new receiving addresses only after the corresponding inbound transactions have gotten three confirmations on the blockchain?

It's a bit annoying, but I wonder if there is a user setting to customize this behavior. It would be useful to people making a large amount of transactions at once.

▄▄████████████████████▄▄
▄███████▀▀██████▀▀███████▄
█████▀██████████████▀█████
████████▄▄██████▄▄████▀███

██████████████████████████
██▄▄██████████████▄▄██████
██▀▀██████████████████▄▄██
██████▀▀██████████████▀▀██
██████████████████████████
███▄████▀▀██████▀▀████████
█████▄██████████████▄█████
▀███████▄▄██████▄▄███████▀
▀▀████████████████████▀▀
 
 DΞX.fo 
▄▄██████
█████████
██████████
██████████
██████████
█████████
▀▀██████

▄███████
▄██████████
████████████
█████████████
█████████████
|
▄▄█
▄████▀
▄███▀█▄
▄██▀█▄██
█████▀▀█
████████
████████
▀██▄████
▄████▄▄█
▄█████▀███
▄█████▀████▀
█████▀███████
▀██▀█████████
|..BTC......XMR...
..USDT.....LTC...
....Fees  0.8%.....
Zaguru12
Legendary
*
Offline

Activity: 1624
Merit: 1347



View Profile WWW
December 02, 2026, 03:36:48 PM
 #2

Is it a deliberate design decision to only generate new receiving addresses only after the corresponding inbound transactions have gotten three confirmations on the blockchain?

I think it’s a deliberate design but it seems it’s in accordance with the most common consensus of transactions that with less than three confirmations the transaction is more likely to been dropped due to probably chain reorg and if that happens that address(es) go back to been unused.

It's a bit annoying, but I wonder if there is a user setting to customize this behavior. It would be useful to people making a large amount of transactions at once.

I don’t think there is a command to actually change this design AFAIK but my advice to someone actually running large transactions and needs more Recieving addresses is to simply just increase the gap limit.

Or best option would be to pre generate the addresses without having to wait until the wallet generates it itself, you can pre generate address using this command; 

Code:
 [wallet.create_new_address(False) for i in range(X)]

With X= the number of addresses you wish to pre generate

.◼.◼.Vega.bet.◼.◼.██
██
██
██
██
██
██
██
██
██
██
██
██

...100 FS + 750% BONUS..MAX.WIN.$5,000...

███...FAST PAYOUTS  |  NO KYC  |  10% LOSSBACK...███
██
██
██
██
██
██
██
██
██
██
██
██
██

...Play Now...
Charles-Tim
Legendary
*
Offline

Activity: 2478
Merit: 6631


Leading Crypto Sports Betting & Casino Platform


View Profile
December 02, 2026, 05:16:19 PM
 #3

If I get you right, Electrum generate new address after 3 confirmations when coin has been sent to the new generated address? This is very new to me.

You can see lists of your addresses on Electrum. You can also see all the addresses that have been used before and also see the number of times they have been used before. You can see the receiving addresses and copy any of it on the address tab which I am very sure you know about.

██████████████████████████████████████████████████████████████
████████████
▀▀███████▀████████████████████████████████████████
██████████
▀██▄▄████▄██▐████▀▀███████████▀▀████████████████████
█████████
▌██▐██████▌██████▌█▐█████████████▐███████████████████
█████████
▌█████████▄▄▄██████▀▀▀▀███████▌█████▀████████████████
██████████
▄███▀███████▀▀██████▄██████████▐█▀█▄███▀▀███████████
████████████
▄▄███▀▀██▄▄▄▄██▐███▀██▄█▐█▌██▀█▄██▀██▄▄███████████
████████████████
▄▄███▀██▌███████▄█▌███████▐██▌███▀█▄██████████
██████████
▀███▄███████████▐██▌█▐████████▐██▐████▄██▀██████████
█████████
▌██▄███████████▄████▄████▄██▄██████▀▄█████▄▀█████████
█████████
▌██▀███▀▀███▄█████████████████████▄██▀▀▀▀▀█▄█████████
██████████
▄██████▄▄██████████████████████████▄▄▄▄▄▄███████████
██████████████████████████████████████████████████████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██

 🎰  🎲 ..Play Smarter.. 🏀  ⚽ ..Play Now..
hosemary
Legendary
*
Offline

Activity: 3332
Merit: 7501



View Profile
December 02, 2026, 06:51:17 PM
Merited by NotATether (1)
 #4

If I get you right, Electrum generate new address after 3 confirmations when coin has been sent to the new generated address? This is very new to me.
I think OP is talking about the new addresses that appear in the "Addresses" tab.
By default, the gap limit is 20, which means that Electrum generates the 21st address after the first address receives funds. OP is saying that the 21st address isn't generated until the transaction received by the first address has three confirmations.

Am I right, NotATether?

nc50lc
Legendary
*
Offline

Activity: 3346
Merit: 9409


Self-proclaimed Genius


View Profile
Today at 04:28:22 AM
 #5

Is it a deliberate design decision to only generate new receiving addresses only after the corresponding inbound transactions have gotten three confirmations on the blockchain?
Yes.
But this is the only reference that I can provide that suggests that it's working as intended: github.com/spesmilo/electrum/pull/5010#issuecomment-455263595

It also has the benefit of preventing a set of unused addresses that can get past the default gap_limit.
In old cases where 20s of invoices aren't actually used or 20 unconfirmed transactions for 20 consecutive addresses are all dropped for whatever reason.
The former historically caused restore wallet attempts to result with zero balance.

pooya87
Legendary
*
Offline

Activity: 4298
Merit: 12838



View Profile
Today at 05:07:09 AM
 #6

It's a bit annoying, but I wonder if there is a user setting to customize this behavior.
I don't think so, at least not without changing the fundamental definitions of a confirmed transaction in Electrum.

In SPV clients the wallet should not consider transactions with low number of confirmations "final" and that's how Electrum treats things too. If you see your History tab you'll see the clock-face icons showing that progression. Under the hood the wallet considers any tx with less than 4 confirmation (<=3) as "not SPV verified".

So whenever the wallet is trying to generate new batch of addresses based on the gap_limit, it checks if the transactions in the top addresses have received enough confirmation (ie. are SPV verified) or in other words calls the address_is_old method with the default value of req_conf: int = 3.

I don't know python but as far as I can tell the only way to change this behavior is to change line 4318 in wallet.py file to call the address_is_old method with req_conf:0 (I wouldn't change address_is_old itself, it may break other behavior. But test things out yourself).

▄▄████████████████████▄▄
▄███████▀▀██████▀▀███████▄
█████▀██████████████▀█████
████████▄▄██████▄▄████▀███

██████████████████████████
██▄▄██████████████▄▄██████
██▀▀██████████████████▄▄██
██████▀▀██████████████▀▀██
██████████████████████████
███▄████▀▀██████▀▀████████
█████▄██████████████▄█████
▀███████▄▄██████▄▄███████▀
▀▀████████████████████▀▀
 
 DΞX.fo 
▄▄██████
█████████
██████████
██████████
██████████
█████████
▀▀██████

▄███████
▄██████████
████████████
█████████████
█████████████
|
▄▄█
▄████▀
▄███▀█▄
▄██▀█▄██
█████▀▀█
████████
████████
▀██▄████
▄████▄▄█
▄█████▀███
▄█████▀████▀
█████▀███████
▀██▀█████████
|..BTC......XMR...
..USDT.....LTC...
....Fees  0.8%.....
NotATether (OP)
Legendary
*
Offline

Activity: 2534
Merit: 10809


┻┻ ︵㇏(°□°㇏)


View Profile WWW
Today at 05:26:53 AM
 #7

I think OP is talking about the new addresses that appear in the "Addresses" tab.
By default, the gap limit is 20, which means that Electrum generates the 21st address after the first address receives funds. OP is saying that the 21st address isn't generated until the transaction received by the first address has three confirmations.

Am I right, NotATether?

Yes.

There is a way to change the gap limit using scary scripting functions, but I’d rather have a GUI button for that.

▄▄████████████████████▄▄
▄███████▀▀██████▀▀███████▄
█████▀██████████████▀█████
████████▄▄██████▄▄████▀███

██████████████████████████
██▄▄██████████████▄▄██████
██▀▀██████████████████▄▄██
██████▀▀██████████████▀▀██
██████████████████████████
███▄████▀▀██████▀▀████████
█████▄██████████████▄█████
▀███████▄▄██████▄▄███████▀
▀▀████████████████████▀▀
 
 DΞX.fo 
▄▄██████
█████████
██████████
██████████
██████████
█████████
▀▀██████

▄███████
▄██████████
████████████
█████████████
█████████████
|
▄▄█
▄████▀
▄███▀█▄
▄██▀█▄██
█████▀▀█
████████
████████
▀██▄████
▄████▄▄█
▄█████▀███
▄█████▀████▀
█████▀███████
▀██▀█████████
|..BTC......XMR...
..USDT.....LTC...
....Fees  0.8%.....
nc50lc
Legendary
*
Offline

Activity: 3346
Merit: 9409


Self-proclaimed Genius


View Profile
Today at 07:57:14 AM
 #8

There is a way to change the gap limit using scary scripting functions, but I’d rather have a GUI button for that.
That isn't safe to expose to newbies though.
Since the addresses can be displayed, letting them play with the gap_limit could lead them to fund an address way beyond the default gap_limit.
Since it's only saved in the wallet file, they'll have to either manually generate the address or increase the gap_limit whenever they need to restore it from seed.

Speaking of which, if it's not fully encrypted, you can open it as text and add this line to set it without using a command: "gap_limit": 50,

In the GUI, the only way to bypass it is by creating 20 invoices in the receive tab until it warns you that the rest will be out of range.
Click "Yes" and you'll get more addresses past your gap limit.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!