Bitcoin Forum

Other => Beginners & Help => Topic started by: BitCoinDream on April 08, 2014, 03:21:37 PM



Title: Blockchain Address data
Post by: BitCoinDream on April 08, 2014, 03:21:37 PM
Does wallet.dat contain the all the address balances in Bitcoin network ?


Update: I changed the title as it was misleading to my basic query.


Title: Re: Wallet.dat data
Post by: Chrithu on April 08, 2014, 03:38:30 PM
Nope, the wallet.dat contains the private/public key pairs that belong to your bitcoin addresses. The balance on those addresses is extracted from the blockchain, by incremently adding and substracting all transactions to and from said addresses.

Simply put the private key is THE single proof that an address belongs to you. Without providing it no funds can be sent from the address.


Title: Re: Wallet.dat data
Post by: BitCoinDream on April 08, 2014, 03:57:53 PM
Nope, the wallet.dat contains the private/public key pairs that belong to your bitcoin addresses. The balance on those addresses is extracted from the blockchain, by incremently adding and substracting all transactions to and from said addresses.

Simply put the private key is THE single proof that an address belongs to you. Without providing it no funds can be sent from the address.

When I update the bitcoin-QT, it takes long to be updated because all the current blockchain info gets downloaded. Is not it ? Then where that data is stored ? Not it wallet.dat ?


Title: Re: Wallet.dat data
Post by: shorena on April 08, 2014, 04:16:07 PM
Nope, the wallet.dat contains the private/public key pairs that belong to your bitcoin addresses. The balance on those addresses is extracted from the blockchain, by incremently adding and substracting all transactions to and from said addresses.

Simply put the private key is THE single proof that an address belongs to you. Without providing it no funds can be sent from the address.

When I update the bitcoin-QT, it takes long to be updated because all the current blockchain info gets downloaded. Is not it ? Then where that data is stored ? Not it wallet.dat ?

Default is

Code:
win: %APPDATA%\Bitcoin
linux: ~/.bitcoin/
max: ~/Library/Application Support/Bitcoin/

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

There is your wallet.dat and in the subdir "blocks" are all the blocks.


Title: Re: Wallet.dat data
Post by: Wusolini on April 08, 2014, 04:17:55 PM
Nope, the wallet.dat contains the private/public key pairs that belong to your bitcoin addresses. The balance on those addresses is extracted from the blockchain, by incremently adding and substracting all transactions to and from said addresses.

Simply put the private key is THE single proof that an address belongs to you. Without providing it no funds can be sent from the address.

When I update the bitcoin-QT, it takes long to be updated because all the current blockchain info gets downloaded. Is not it ? Then where that data is stored ? Not it wallet.dat ?

check size of your bitcoin folder. it's all in it.
blockchain should be in folder "blocks" (buch of files blk*.dat)


Title: Re: Wallet.dat data
Post by: Injust on April 08, 2014, 04:18:49 PM
Nope, the wallet.dat contains the private/public key pairs that belong to your bitcoin addresses. The balance on those addresses is extracted from the blockchain, by incremently adding and substracting all transactions to and from said addresses.

Simply put the private key is THE single proof that an address belongs to you. Without providing it no funds can be sent from the address.

When I update the bitcoin-QT, it takes long to be updated because all the current blockchain info gets downloaded. Is not it ? Then where that data is stored ? Not it wallet.dat ?

Default is

Code:
win: %APPDATA%\Bitcoin
linux: ~/.bitcoin/
max: ~/Library/Application Support/Bitcoin/

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

There is your wallet.dat and in the subdir "blocks" are all the blocks.

Not quite exactly. The blk*.dat files in the "blocks" subdirectory are the raw Bitcoin blocks, and the files in the "index" subdirectory is just the LevelDB database with the block metadata.


Title: Re: Wallet.dat data
Post by: BitCoinDream on April 08, 2014, 04:27:36 PM
Nope, the wallet.dat contains the private/public key pairs that belong to your bitcoin addresses. The balance on those addresses is extracted from the blockchain, by incremently adding and substracting all transactions to and from said addresses.

Simply put the private key is THE single proof that an address belongs to you. Without providing it no funds can be sent from the address.

When I update the bitcoin-QT, it takes long to be updated because all the current blockchain info gets downloaded. Is not it ? Then where that data is stored ? Not it wallet.dat ?

Default is

Code:
win: %APPDATA%\Bitcoin
linux: ~/.bitcoin/
max: ~/Library/Application Support/Bitcoin/

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

There is your wallet.dat and in the subdir "blocks" are all the blocks.

Not quite exactly. The blk*.dat files in the "blocks" subdirectory are the raw Bitcoin blocks, and the files in the "index" subdirectory is just the LevelDB database with the block metadata.

Well well well ...thanx for all your reply ...but I'm getting more confused. I have already downloaded the blockchain. So all address data of the last time I synced should be in my machine. I just need a very simple thing now. I want the addresses which has more than n bitcoin. Cant I get it without connecting to the internet ?


Title: Re: Wallet.dat data
Post by: Injust on April 08, 2014, 04:29:02 PM
Nope, the wallet.dat contains the private/public key pairs that belong to your bitcoin addresses. The balance on those addresses is extracted from the blockchain, by incremently adding and substracting all transactions to and from said addresses.

Simply put the private key is THE single proof that an address belongs to you. Without providing it no funds can be sent from the address.

When I update the bitcoin-QT, it takes long to be updated because all the current blockchain info gets downloaded. Is not it ? Then where that data is stored ? Not it wallet.dat ?

Default is

Code:
win: %APPDATA%\Bitcoin
linux: ~/.bitcoin/
max: ~/Library/Application Support/Bitcoin/

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

There is your wallet.dat and in the subdir "blocks" are all the blocks.

Not quite exactly. The blk*.dat files in the "blocks" subdirectory are the raw Bitcoin blocks, and the files in the "index" subdirectory is just the LevelDB database with the block metadata.

Well well well ...thanx for all your reply ...but I'm getting more confused. I have already downloaded the blockchain. So all address data should be in my machine. I just need a very simple thing now. I want the addresses which has more than n bitcoin. Cant I get it without connecting to the internet ?

If you start Bitcoin Core, with the already downloaded blockchain data, you can view the balance of the addresses in your wallet accurate up to the time of the last block that you have downloaded.
Without internet access, you cannot have totally up-to-date balance information.


Title: Re: Wallet.dat data
Post by: BitCoinDream on April 08, 2014, 04:31:37 PM
Nope, the wallet.dat contains the private/public key pairs that belong to your bitcoin addresses. The balance on those addresses is extracted from the blockchain, by incremently adding and substracting all transactions to and from said addresses.

Simply put the private key is THE single proof that an address belongs to you. Without providing it no funds can be sent from the address.

When I update the bitcoin-QT, it takes long to be updated because all the current blockchain info gets downloaded. Is not it ? Then where that data is stored ? Not it wallet.dat ?

Default is

Code:
win: %APPDATA%\Bitcoin
linux: ~/.bitcoin/
max: ~/Library/Application Support/Bitcoin/

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

There is your wallet.dat and in the subdir "blocks" are all the blocks.

Not quite exactly. The blk*.dat files in the "blocks" subdirectory are the raw Bitcoin blocks, and the files in the "index" subdirectory is just the LevelDB database with the block metadata.

Well well well ...thanx for all your reply ...but I'm getting more confused. I have already downloaded the blockchain. So all address data should be in my machine. I just need a very simple thing now. I want the addresses which has more than n bitcoin. Cant I get it without connecting to the internet ?

If you start Bitcoin Core, with the already downloaded blockchain data, you can view the balance of the addresses in your wallet accurate up to the time of the last block that you have downloaded.
Without internet access, you cannot have totally up-to-date balance information.

Why addresses in my wallet ? I want the balance of everyone's wallet. I understand they'll be up to date till I last synced.


Title: Re: Wallet.dat data
Post by: mprep on April 08, 2014, 04:35:28 PM
Nope, the wallet.dat contains the private/public key pairs that belong to your bitcoin addresses. The balance on those addresses is extracted from the blockchain, by incremently adding and substracting all transactions to and from said addresses.

Simply put the private key is THE single proof that an address belongs to you. Without providing it no funds can be sent from the address.

When I update the bitcoin-QT, it takes long to be updated because all the current blockchain info gets downloaded. Is not it ? Then where that data is stored ? Not it wallet.dat ?

Default is

Code:
win: %APPDATA%\Bitcoin
linux: ~/.bitcoin/
max: ~/Library/Application Support/Bitcoin/

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

There is your wallet.dat and in the subdir "blocks" are all the blocks.

Not quite exactly. The blk*.dat files in the "blocks" subdirectory are the raw Bitcoin blocks, and the files in the "index" subdirectory is just the LevelDB database with the block metadata.

Well well well ...thanx for all your reply ...but I'm getting more confused. I have already downloaded the blockchain. So all address data should be in my machine. I just need a very simple thing now. I want the addresses which has more than n bitcoin. Cant I get it without connecting to the internet ?

If you start Bitcoin Core, with the already downloaded blockchain data, you can view the balance of the addresses in your wallet accurate up to the time of the last block that you have downloaded.
Without internet access, you cannot have totally up-to-date balance information.

Why addresses in my wallet ? I want the balance of everyone's wallet. I understand they'll be up to date till I last synced.
Wallet.dat is like your wallet. It shows your balance. Block files are the data files with everyone else's balances, a.k.a. the blockchain.


Title: Re: Wallet.dat data
Post by: BitCoinDream on April 08, 2014, 04:38:19 PM
Nope, the wallet.dat contains the private/public key pairs that belong to your bitcoin addresses. The balance on those addresses is extracted from the blockchain, by incremently adding and substracting all transactions to and from said addresses.

Simply put the private key is THE single proof that an address belongs to you. Without providing it no funds can be sent from the address.

When I update the bitcoin-QT, it takes long to be updated because all the current blockchain info gets downloaded. Is not it ? Then where that data is stored ? Not it wallet.dat ?

Default is

Code:
win: %APPDATA%\Bitcoin
linux: ~/.bitcoin/
max: ~/Library/Application Support/Bitcoin/

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

There is your wallet.dat and in the subdir "blocks" are all the blocks.

Not quite exactly. The blk*.dat files in the "blocks" subdirectory are the raw Bitcoin blocks, and the files in the "index" subdirectory is just the LevelDB database with the block metadata.

Well well well ...thanx for all your reply ...but I'm getting more confused. I have already downloaded the blockchain. So all address data should be in my machine. I just need a very simple thing now. I want the addresses which has more than n bitcoin. Cant I get it without connecting to the internet ?

If you start Bitcoin Core, with the already downloaded blockchain data, you can view the balance of the addresses in your wallet accurate up to the time of the last block that you have downloaded.
Without internet access, you cannot have totally up-to-date balance information.

Why addresses in my wallet ? I want the balance of everyone's wallet. I understand they'll be up to date till I last synced.
Wallet.dat is like your wallet. It shows your balance. Block files are the data files with everyone else's balances, a.k.a. the blockchain.

Exactly, so how do I retrieve the address balances in descending order from the block files ?


Title: Re: Wallet.dat data
Post by: DannyHamilton on April 08, 2014, 04:50:24 PM
Exactly, so how do I retrieve the address balances in descending order from the block files ?

The blockchain doesn't store "balances". It stores "transactions".

You have to write a program that will search for all the unspent outputs in the blockchain and add them all up for each output script to determine what the total "balance" is for each one.

Note that not all bitcoins are sent to addresses, so your program will need to deal with the possibility that some bitcoins are sent to various other hashes, public keys, puzzles, or a variety of other types of scripts.


Title: Re: Wallet.dat data
Post by: BitCoinDream on April 08, 2014, 09:55:31 PM
Exactly, so how do I retrieve the address balances in descending order from the block files ?

The blockchain doesn't store "balances". It stores "transactions".

You have to write a program that will search for all the unspent outputs in the blockchain and add them all up for each output script to determine what the total "balance" is for each one.

Note that not all bitcoins are sent to addresses, so your program will need to deal with the possibility that some bitcoins are sent to various other hashes, public keys, puzzles, or a variety of other types of scripts.

Whenever I query blockchain.info or blockr.io I immediately get the address balance...

i. https://blockchain.info/address/12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX

ii. http://blockr.io/address/info/12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX

So internally, every time they are doing what u have said ?


Title: Re: Wallet.dat data
Post by: DannyHamilton on April 08, 2014, 11:17:24 PM
Exactly, so how do I retrieve the address balances in descending order from the block files ?

The blockchain doesn't store "balances". It stores "transactions".

You have to write a program that will search for all the unspent outputs in the blockchain and add them all up for each output script to determine what the total "balance" is for each one.

Note that not all bitcoins are sent to addresses, so your program will need to deal with the possibility that some bitcoins are sent to various other hashes, public keys, puzzles, or a variety of other types of scripts.

Whenever I query blockchain.info or blockr.io I immediately get the address balance...

i. https://blockchain.info/address/12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX

ii. http://blockr.io/address/info/12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX

So internally, every time they are doing what u have said ?

They have already scanned the entire blockchain ahead of time.  They have created their own database on their servers that have some analysis already completed.

They probably don't store the total balance in their database, but they have probably indexed a table of transactions that allows them to select all transactions for a given address.  Then they sum the total of all the transactions to display a balance.


Title: Re: Blockchain Address data
Post by: Chrithu on April 09, 2014, 07:27:31 AM
What I wonder is why does a Full Member with more activity than me not know this already? And secondly what do you want to do with that info? Create a leaderboard of who are the richest mofos in the world of bitcoin?


Title: Re: Blockchain Address data
Post by: BitCoinDream on April 09, 2014, 01:36:44 PM
What I wonder is why does a Full Member with more activity than me not know this already? And secondly what do you want to do with that info? Create a leaderboard of who are the richest mofos in the world of bitcoin?

A full member may not run a full node till date and suddenly decide running one is required ;)

I have already stated why I need this info... but now it seems it is not as easy as I thought :-\

Quote
I just need a very simple thing now. I want the addresses which has more than n bitcoin.

By the way, the leaderboard u r talking about already exists => http://bitcoinrichlist.com/top100



Title: Re: Blockchain Address data
Post by: Loophole on April 09, 2014, 01:56:48 PM
Quote
I just need a very simple thing now. I want the addresses which has more than n bitcoin.

By the way, the leaderboard u r talking about already exists => http://bitcoinrichlist.com/top100

Do I understand the situation correctly, that you are answering your own question?  ???
EDIT: Looks like you are indeed answering the third question from Chrithu, my bad :)


Title: Re: Blockchain Address data
Post by: Bitcoin Fiction on April 09, 2014, 02:00:49 PM
Quote
I just need a very simple thing now. I want the addresses which has more than n bitcoin.

By the way, the leaderboard u r talking about already exists => http://bitcoinrichlist.com/top100

Do I understand the situation correctly, that you are answering your own question?  ???

He is answering Chrithu's question. :)

Edit: okay you got it :)