Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: morantis on April 07, 2016, 02:45:06 PM



Title: Finding Primary Address for Wallet
Post by: morantis on April 07, 2016, 02:45:06 PM
Let me explain what I am trying to find.

I download bitcoin client/server, whichever.  The very first time it is run a bitcoin address is generated and that is the actual address for that wallet.  I can then, through the console or a GUI generate more addresses that refer to the same wallet.  They are typically all based on a variant of the original key.  Because the wallet is mine, I can search through and there are several ways to find that first address, most very easy.

What I want to do is find the first address for a server/client that is not mine.  Specifically, I want to get an idea of the volume of BTC or another coin traded on an exchange.  Not a specific exchange, I am going to do this for several and try to get a real idea of the volume of trading that is done in a 24 hours period.  I will use YoBit for an example.  If I go to my wallet on their site, I can create an address for deposit, I assume that this address refers back to their current hot wallet and it is really an address of theirs that I am using.  I deposit BTC there and it shifts into their wallet as part of the hot wallet pool.  They use a MySQL database to associate both the bitcoin address they gave me and my transactions with my account.  If I deposit a single Bitcoin, it is in their hot wallet and their website database tells the website I have a BTC to play with, withdraw, whatever.

Now, if I take the address they gave me and search the blockchain, I will see the single go in and then take off into cyberspace, as part of their hot wallet.  I can watch and track where it goes from there, I can see the address I sent it from originally, but I cannot see any info about the hot wallet and addresses above that address.  I can only see the volume that is on one side of my specific address.  I want to find the hot wallet master original address.  That would show all the volume for the entire wallet.  I am not stupid and do not think that one wallet is all they have and all they ever use or used.  But, I am trying for a simple 24 trading volume and it is very possible that an exchange will only have that one hot wallet in use during that time period.  At least one wallet for exchanges, maybe another for other types of transactions.

So, to summarize, using only a generated address, how do I find the master address for a wallet.  I have a small play wallet for gambling, a generated address for it is 1EGQKsjUL4A8GG4tX26dBPFdcRMTDK545R the blockchain shows a small amount in and out for a single transaction I did using that address.  Can anyone here get the addresses above that address.  I can verify them, if so, how did you do it?


Title: Re: Finding Primary Address for Wallet
Post by: cr1776 on April 07, 2016, 05:14:58 PM
Let me explain what I am trying to find.

I download bitcoin client/server, whichever.  The very first time it is run a bitcoin address is generated and that is the actual address for that wallet.  I can then, through the console or a GUI generate more addresses that refer to the same wallet.  They are typically all based on a variant of the original key.  Because the wallet is mine, I can search through and there are several ways to find that first address, most very easy.

What I want to do is find the first address for a server/client that is not mine.  Specifically, I want to get an idea of the volume of BTC or another coin traded on an exchange.  Not a specific exchange, I am going to do this for several and try to get a real idea of the volume of trading that is done in a 24 hours period.  I will use YoBit for an example.  If I go to my wallet on their site, I can create an address for deposit, I assume that this address refers back to their current hot wallet and it is really an address of theirs that I am using.  I deposit BTC there and it shifts into their wallet as part of the hot wallet pool.  They use a MySQL database to associate both the bitcoin address they gave me and my transactions with my account.  If I deposit a single Bitcoin, it is in their hot wallet and their website database tells the website I have a BTC to play with, withdraw, whatever.

Now, if I take the address they gave me and search the blockchain, I will see the single go in and then take off into cyberspace, as part of their hot wallet.  I can watch and track where it goes from there, I can see the address I sent it from originally, but I cannot see any info about the hot wallet and addresses above that address.  I can only see the volume that is on one side of my specific address.  I want to find the hot wallet master original address.  That would show all the volume for the entire wallet.  I am not stupid and do not think that one wallet is all they have and all they ever use or used.  But, I am trying for a simple 24 trading volume and it is very possible that an exchange will only have that one hot wallet in use during that time period.  At least one wallet for exchanges, maybe another for other types of transactions.

So, to summarize, using only a generated address, how do I find the master address for a wallet.  I have a small play wallet for gambling, a generated address for it is 1EGQKsjUL4A8GG4tX26dBPFdcRMTDK545R the blockchain shows a small amount in and out for a single transaction I did using that address.  Can anyone here get the addresses above that address.  I can verify them, if so, how did you do it?

If you are talking about Bitcoin Core, there is no "master address" for a wallet and are not "all based on a variant of the original key." 

If you are talking about a different Wallet, you'll have to ask in the subsection for that particular wallet. 

There are a number of misconceptions above for Bitcoin Core, btw.  ;-)



Title: Re: Finding Primary Address for Wallet
Post by: morantis on April 07, 2016, 05:36:55 PM
Let me explain what I am trying to find.

I download bitcoin client/server, whichever.  The very first time it is run a bitcoin address is generated and that is the actual address for that wallet.  I can then, through the console or a GUI generate more addresses that refer to the same wallet.  They are typically all based on a variant of the original key.  Because the wallet is mine, I can search through and there are several ways to find that first address, most very easy.

What I want to do is find the first address for a server/client that is not mine.  Specifically, I want to get an idea of the volume of BTC or another coin traded on an exchange.  Not a specific exchange, I am going to do this for several and try to get a real idea of the volume of trading that is done in a 24 hours period.  I will use YoBit for an example.  If I go to my wallet on their site, I can create an address for deposit, I assume that this address refers back to their current hot wallet and it is really an address of theirs that I am using.  I deposit BTC there and it shifts into their wallet as part of the hot wallet pool.  They use a MySQL database to associate both the bitcoin address they gave me and my transactions with my account.  If I deposit a single Bitcoin, it is in their hot wallet and their website database tells the website I have a BTC to play with, withdraw, whatever.

Now, if I take the address they gave me and search the blockchain, I will see the single go in and then take off into cyberspace, as part of their hot wallet.  I can watch and track where it goes from there, I can see the address I sent it from originally, but I cannot see any info about the hot wallet and addresses above that address.  I can only see the volume that is on one side of my specific address.  I want to find the hot wallet master original address.  That would show all the volume for the entire wallet.  I am not stupid and do not think that one wallet is all they have and all they ever use or used.  But, I am trying for a simple 24 trading volume and it is very possible that an exchange will only have that one hot wallet in use during that time period.  At least one wallet for exchanges, maybe another for other types of transactions.

So, to summarize, using only a generated address, how do I find the master address for a wallet.  I have a small play wallet for gambling, a generated address for it is 1EGQKsjUL4A8GG4tX26dBPFdcRMTDK545R the blockchain shows a small amount in and out for a single transaction I did using that address.  Can anyone here get the addresses above that address.  I can verify them, if so, how did you do it?

If you are talking about Bitcoin Core, there is no "master address" for a wallet and are not "all based on a variant of the original key."  

If you are talking about a different Wallet, you'll have to ask in the subsection for that particular wallet.  

There are a number of misconceptions above for Bitcoin Core, btw.  ;-)



Fair enough, let us say that you are using an API like coinbase, are not all the addresses that you generate based in some way on your original?  Or, if I am locally running bitcoin core and ask the daemon to create another address, how does all of the balance end up in the first address, how are the two addresses linked?


Title: Re: Finding Primary Address for Wallet
Post by: DannyHamilton on April 07, 2016, 06:17:04 PM
Fair enough, let us say that you are using an API like coinbase, are not all the addresses that you generate based in some way on your original?

Please ask your coinbase.info API questions in the Service Discussion sub-forum.  You'll find people that understand that API much better over there than you will here.  I'm not going to try to guess for you how blockchain.info *might* choose to operate.

Or, if I am locally running bitcoin core and ask the daemon to create another address, how does all of the balance end up in the first address, how are the two addresses linked?

The balance does NOT end up in the first address.

The two addresses are NOT linked.

The wallet generates a completely random address every time.  Then it stores the information about that new address in the wallet.dat file (along with all the other addresses that it has previously generated).  The wallet maintains a list of ALL unspent transaction outputs (UTXO) in the entire bitcoin system, and can compare this list of UTXO to the list of addresses stored in the wallet.dat.  It can then sum up all the values associated with all the matching UTXO and display this sum to you as a "balance".


Title: Re: Finding Primary Address for Wallet
Post by: morantis on April 07, 2016, 09:01:00 PM
I guess that makes sense. I was thinking with a local wallet there is no database, but I was not considering the use of an old fashioned flat file database. The system you described is how I imagined the exchange sites working.


Title: Re: Finding Primary Address for Wallet
Post by: Patatas on April 07, 2016, 09:08:23 PM
Not sure if I have understood your post completely.But if you're looking for a particular address and which wallet it belongs to including other addresses in the same wallet,you can use www.walletexplorer.com .The address should have been used at least one time in the block to be analyzed and not in very recent solved blocks.


Title: Re: Finding Primary Address for Wallet
Post by: morantis on April 07, 2016, 09:11:25 PM
Not sure if I have understood your post completely.But if you're looking for a particular address and which wallet it belongs to including other addresses in the same wallet,you can use www.walletexplorer.com .The address should have been used at least one time in the block to be analyzed and not in very recent solved blocks.

I will take a look.


Title: Re: Finding Primary Address for Wallet
Post by: shorena on April 07, 2016, 09:11:37 PM
I guess that makes sense. I was thinking with a local wallet there is no database, but I was not considering the use of an old fashioned flat file database. The system you described is how I imagined the exchange sites working.

What you described are so called HD (hierarchically deterministic) wallets. They use a seed or master private key from which all other private keys are derived. Examples for wallets/services that use this method are: Electrum 1.x and 2.x, Multibit HD, Armory, blockchain.info v2/v3 (its named v3 in their git repo, but commonly refered to as v2 as Im not sure which is correct), mycelium and many others. Many wallets however do generate private keys non-deterministic like Danny described above, examples are Multibit Classic, Bitcoin Core, blockchain.info and many others. The biggest difference for the user is that HD wallets need a single backup.


Title: Re: Finding Primary Address for Wallet
Post by: morantis on April 09, 2016, 03:23:03 PM
I guess that makes sense. I was thinking with a local wallet there is no database, but I was not considering the use of an old fashioned flat file database. The system you described is how I imagined the exchange sites working.

What you described are so called HD (hierarchically deterministic) wallets. They use a seed or master private key from which all other private keys are derived. Examples for wallets/services that use this method are: Electrum 1.x and 2.x, Multibit HD, Armory, blockchain.info v2/v3 (its named v3 in their git repo, but commonly refered to as v2 as Im not sure which is correct), mycelium and many others. Many wallets however do generate private keys non-deterministic like Danny described above, examples are Multibit Classic, Bitcoin Core, blockchain.info and many others. The biggest difference for the user is that HD wallets need a single backup.

So in the HD wallets, would there be a way to determine the master key using only a child key and without any of the private keys that are associated with the above?


Title: Re: Finding Primary Address for Wallet
Post by: cr1776 on April 09, 2016, 04:08:35 PM
I guess that makes sense. I was thinking with a local wallet there is no database, but I was not considering the use of an old fashioned flat file database. The system you described is how I imagined the exchange sites working.

What you described are so called HD (hierarchically deterministic) wallets. They use a seed or master private key from which all other private keys are derived. Examples for wallets/services that use this method are: Electrum 1.x and 2.x, Multibit HD, Armory, blockchain.info v2/v3 (its named v3 in their git repo, but commonly refered to as v2 as Im not sure which is correct), mycelium and many others. Many wallets however do generate private keys non-deterministic like Danny described above, examples are Multibit Classic, Bitcoin Core, blockchain.info and many others. The biggest difference for the user is that HD wallets need a single backup.

So in the HD wallets, would there be a way to determine the master key using only a child key and without any of the private keys that are associated with the above?


You should be able to find the answers you are looking for here for BIP 32 HD Wallets

https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki

and more in general:

https://en.bitcoin.it/wiki/Deterministic_wallet


And some more here for more discussions:
https://bitcoinmagazine.com/articles/deterministic-wallets-advantages-flaw-1385450276
http://bitcoin.stackexchange.com/questions/36383/hd-wallets-with-an-exposed-child-private-key
https://aois.blob.core.windows.net/public/Blockchain%20Programming%20in%20CSharp.pdf


Title: Re: Finding Primary Address for Wallet
Post by: morantis on April 09, 2016, 04:09:46 PM
I guess that makes sense. I was thinking with a local wallet there is no database, but I was not considering the use of an old fashioned flat file database. The system you described is how I imagined the exchange sites working.

What you described are so called HD (hierarchically deterministic) wallets. They use a seed or master private key from which all other private keys are derived. Examples for wallets/services that use this method are: Electrum 1.x and 2.x, Multibit HD, Armory, blockchain.info v2/v3 (its named v3 in their git repo, but commonly refered to as v2 as Im not sure which is correct), mycelium and many others. Many wallets however do generate private keys non-deterministic like Danny described above, examples are Multibit Classic, Bitcoin Core, blockchain.info and many others. The biggest difference for the user is that HD wallets need a single backup.

So in the HD wallets, would there be a way to determine the master key using only a child key and without any of the private keys that are associated with the above?


You should be able to find the answers you are looking for here for BIP 32 HD Wallets

https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki

and more in general:

https://en.bitcoin.it/wiki/Deterministic_wallet


And some more here for more discussions:
https://bitcoinmagazine.com/articles/deterministic-wallets-advantages-flaw-1385450276
http://bitcoin.stackexchange.com/questions/36383/hd-wallets-with-an-exposed-child-private-key
https://aois.blob.core.windows.net/public/Blockchain%20Programming%20in%20CSharp.pdf


Alright, thanks, that will take a little time to look over.


Title: Re: Finding Primary Address for Wallet
Post by: luv2drnkbr on April 23, 2016, 03:11:12 PM
So in the HD wallets, would there be a way to determine the master key using only a child key and without any of the private keys that are associated with the above?

The short answer is no.  If you are only ever shown addresses, it will not be possible to determine what the master address is.  You need more information than just the list of addresses.


Title: Re: Finding Primary Address for Wallet
Post by: morantis on April 23, 2016, 06:24:12 PM
So in the HD wallets, would there be a way to determine the master key using only a child key and without any of the private keys that are associated with the above?

The short answer is no.  If you are only ever shown addresses, it will not be possible to determine what the master address is.  You need more information than just the list of addresses.

Yeah, I got to that conclusion pretty quick.  The idea was originally to break down the 24 stats for something like an exchange, but that would require a look at that master key and the site may have more than one hot wallet for the main exchange purposes.  Really, in the end, it would be nice to see for just about any site that is using Bitcoins where the money you send them ultimately ends up.  Following the chain can be pretty hard sometimes.  But thanks for the info.


Title: Re: Finding Primary Address for Wallet
Post by: cjmoles on April 29, 2016, 11:26:41 AM
So in the HD wallets, would there be a way to determine the master key using only a child key and without any of the private keys that are associated with the above?

The short answer is no.  If you are only ever shown addresses, it will not be possible to determine what the master address is.  You need more information than just the list of addresses.

Yeah, I got to that conclusion pretty quick.  The idea was originally to break down the 24 stats for something like an exchange, but that would require a look at that master key and the site may have more than one hot wallet for the main exchange purposes.  Really, in the end, it would be nice to see for just about any site that is using Bitcoins where the money you send them ultimately ends up.  Following the chain can be pretty hard sometimes.  But thanks for the info.

Have you thought about asking the site for proof of liquidity, then tracing the transactions backwards from that address???  It might be easier to go down through the chain than up....right?


Title: Re: Finding Primary Address for Wallet
Post by: QuestionQuest on April 29, 2016, 10:31:34 PM
So in the HD wallets, would there be a way to determine the master key using only a child key and without any of the private keys that are associated with the above?

The short answer is no.  If you are only ever shown addresses, it will not be possible to determine what the master address is.  You need more information than just the list of addresses.

Yeah, I got to that conclusion pretty quick.  The idea was originally to break down the 24 stats for something like an exchange, but that would require a look at that master key and the site may have more than one hot wallet for the main exchange purposes.  Really, in the end, it would be nice to see for just about any site that is using Bitcoins where the money you send them ultimately ends up.  Following the chain can be pretty hard sometimes.  But thanks for the info.

Have you thought about asking the site for proof of liquidity, then tracing the transactions backwards from that address???  It might be easier to go down through the chain than up....right?

Yes 100% with this and I top it with this secret site which is just mentioned the 2nd time in this post ... https://blockchain.info   :o ;D ;)


Title: Re: Finding Primary Address for Wallet
Post by: morantis on May 11, 2016, 10:30:25 AM
Just got back from vacation.  This was more of something that we wanted to use as a script, rather than requesting info.  Not that the site has anything to hide, nor us, just a project we are working on.