Bitcoin Forum
May 14, 2024, 12:18:28 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Forcing Electrum to search deeper into change addresses  (Read 158 times)
idsyours (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
November 04, 2018, 04:52:31 PM
 #1

I'm questioning whether I can force Electrum to search deeper into the derived change-address range for utxos.

Reason: Wasabi wallet seems to send mixed utxos back to a change address in a random index range of m/84'/0'/0'/1 and I'd like to watch the wallet with the zpub in Electrum.

I would additionally be interested in the default settings in Electrum regarding "searching" for utxos. Something like "last index with utxo +5" or so?
1715689108
Hero Member
*
Offline Offline

Posts: 1715689108

View Profile Personal Message (Offline)

Ignore
1715689108
Reply with quote  #2

1715689108
Report to moderator
1715689108
Hero Member
*
Offline Offline

Posts: 1715689108

View Profile Personal Message (Offline)

Ignore
1715689108
Reply with quote  #2

1715689108
Report to moderator
"I'm sure that in 20 years there will either be very large transaction volume or no volume." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715689108
Hero Member
*
Offline Offline

Posts: 1715689108

View Profile Personal Message (Offline)

Ignore
1715689108
Reply with quote  #2

1715689108
Report to moderator
1715689108
Hero Member
*
Offline Offline

Posts: 1715689108

View Profile Personal Message (Offline)

Ignore
1715689108
Reply with quote  #2

1715689108
Report to moderator
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
November 04, 2018, 08:09:11 PM
Last edit: November 04, 2018, 08:21:25 PM by Abdussamad
 #2

Is it really random? There are over 2 billion possibilities for non-hardened addresses. How many do you plan to look through?

You can generate 20 new change addresses using the code below on the console tab (view > show console if you can't see it) but it'll only create them sequentially starting from the index of the last generated address not randomly in the chain:

Code:
for thing in range(0,20): wallet.create_new_address(True)
wallet.synchronize()


BTW default gap limit (last used+) is 6 for change addresses. AFAIK you can't change the gap limit for change addresses only generate new addresses manually.
idsyours (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
November 04, 2018, 08:27:15 PM
 #3

Is it really random? There are over 2 billion possibilities for non-hardened addresses. How many do you plan to search them all?
I was in touch with the lead dev of Wasabi Wallet and he told me "random within a range". I assume they set an upper limit for that range. Was interesting to see - first wallet I came across who randomized this allocation. However, I can't see really think of any benefit to this process. They don't generate the addresses when you initialize but you have to request (and label) a new address every time you want to receive.

I'll probably search through the first couple hundred max. So far they been in the lower two digit range. Thanks very much for the code!

BTW default gap limit (last used+) is 6 for change addresses. AFAIK you can't change the gap limit for change addresses only generate new addresses manually.

Awesome! Thanks for that info.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
November 05, 2018, 03:29:38 AM
 #4

I was in touch with the lead dev of Wasabi Wallet and he told me "random within a range". I assume they set an upper limit for that range. Was interesting to see - first wallet I came across who randomized this allocation.
And what happens when you want to restore your wallet?  If it is randomising the index... how is the wallet supposed to know where the previous wallet randomized the index to? Huh

Or will it simply just search every address in the "limited" range?


Quote
However, I can't see really think of any benefit to this process. They don't generate the addresses when you initialize but you have to request (and label) a new address every time you want to receive.
Nor me... it doesn't seem like that will create any sort of additional privacy... the range would have to be limited to make restoring the wallet a possibility without ridiculous wait times... which would then make it trivial for anyone interested (and in possession of your xpub) to simply search that whole range.  Undecided Huh

I must be missing something obvious... (not unusual! Tongue)

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10562



View Profile
November 05, 2018, 04:46:58 AM
 #5

i have to open both projects in my visual studio and go through the code thoroughly to be sure but as far as i can tell it is not random. when you requests a new key it gets the path and increments it[1] by calling this function from NBitcoin[2] which is simply adding 1 to the last index.

[1] https://github.com/zkSNACKs/WalletWasabi/blob/413de9132a4fa62cae71d85442be02afb0ca9713/WalletWasabi/KeyManagement/KeyManager.cs#L170
[2] https://github.com/MetacoSA/NBitcoin/blob/63580bde6da6e77df686776e0cd16695a3dc40d1/NBitcoin/BIP32/KeyPath.cs#L110-L117

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
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!