Bitcoin Forum
May 12, 2024, 11:18:29 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: getting balance of xpub key using bitcoind  (Read 1973 times)
btc_enigma (OP)
Hero Member
*****
Offline Offline

Activity: 688
Merit: 567


View Profile
July 31, 2015, 09:59:59 AM
Last edit: July 31, 2015, 10:21:54 AM by btc_enigma
 #1

I want to know how https://blockchain.info/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz
works ?

How does it calculate the balance from utxo  ? Does it match each address in utxo to check if it is a child of given xpub key (I don't think so), or it always computes say 10 child addresses and shows their balance.

Sorry, couldn't find answer in other places. Feel free to point me it post if its already answered.

Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715555909
Hero Member
*
Offline Offline

Posts: 1715555909

View Profile Personal Message (Offline)

Ignore
1715555909
Reply with quote  #2

1715555909
Report to moderator
1715555909
Hero Member
*
Offline Offline

Posts: 1715555909

View Profile Personal Message (Offline)

Ignore
1715555909
Reply with quote  #2

1715555909
Report to moderator
1715555909
Hero Member
*
Offline Offline

Posts: 1715555909

View Profile Personal Message (Offline)

Ignore
1715555909
Reply with quote  #2

1715555909
Report to moderator
Muhammed Zakir
Hero Member
*****
Offline Offline

Activity: 560
Merit: 506


I prefer Zakir over Muhammed when mentioning me!


View Profile WWW
July 31, 2015, 11:01:54 AM
 #2

AFAIK it derives tree and scan external chain addresses to see transactions.

btc_enigma (OP)
Hero Member
*****
Offline Offline

Activity: 688
Merit: 567


View Profile
July 31, 2015, 11:06:22 AM
 #3

AFAIK it derives tree and scan external chain addresses to see transactions.

Do you know  how far does it derive the tree(depth and breath) ?

Muhammed Zakir
Hero Member
*****
Offline Offline

Activity: 560
Merit: 506


I prefer Zakir over Muhammed when mentioning me!


View Profile WWW
July 31, 2015, 11:53:44 AM
 #4

AFAIK it derives tree and scan external chain addresses to see transactions.

Do you know  how far does it derive the tree(depth and breath) ?

It stops searching until "X" number of consecutive unused addresses is found, where X is gap limit. By default, gap limit is 20 but it depends on wallet software. I think you can also go with 20 as gap limit.

btc_enigma (OP)
Hero Member
*****
Offline Offline

Activity: 688
Merit: 567


View Profile
August 01, 2015, 07:11:22 AM
Last edit: August 01, 2015, 07:21:52 AM by btc_enigma
 #5

AFAIK it derives tree and scan external chain addresses to see transactions.

Do you know  how far does it derive the tree(depth and breath) ?

It stops searching until "X" number of consecutive unused addresses is found, where X is gap limit. By default, gap limit is 20 but it depends on wallet software. I think you can also go with 20 as gap limit.

Thanks MZ,  now I had a look at Account discovery in  https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki and it seems to match what you described. Also had a look at HD wallets

I  see wallets using m/44'/0'/0'/c/i , and also m/0/0'/a'/c/i . I would assume https://blockchain.info/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz is searching using m/c/i .

I think its easiest for blockonomics  to ask user to enter wallet name so that we use the appropriate path to import addresses.

Muhammed Zakir
Hero Member
*****
Offline Offline

Activity: 560
Merit: 506


I prefer Zakir over Muhammed when mentioning me!


View Profile WWW
August 01, 2015, 12:03:27 PM
 #6

-snip-
I think its easiest for blockonomics  to ask user to enter wallet name so that we use the appropriate path to import addresses.

That is a good idea. Feel free to ask if you have any doubt/problem. Good luck!

btc_enigma (OP)
Hero Member
*****
Offline Offline

Activity: 688
Merit: 567


View Profile
August 11, 2015, 04:56:54 AM
 #7

HI MZ,

Would it possible for you to help us test xpub search in blockonomics, find details here https://bitcointalk.org/index.php?topic=880995.msg12105873#msg12105873


Thanks

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!