Hot answers tagged

36

The wiki is correct, it is a technicality. Bitcoin "balances" are actually just unspent transaction outputs (UTXOs, from previous transactions) which you have the ability to spend. In most cases, that means knowing the private key corresponding to an address which the transaction was sent to. But the address itself doesn't have a balance, it just "locks up" ...


25

There is no such thing as a transaction "balance". I am going to assume if I jump right to the answer it won't make much sense so the first two sections are to make sure we are how Bitcoin "really works" (at a very high level abstracted view). We need to speak the same language for the answer to make any sense. For this question the two required concepts ...


17

If your business partner knows your address, they can learn the transaction history and balance of that address. Often it is possible to guess or deduce that other addresses also belong to you, but this requires a bit more effort and is less reliable. However, this certainly doesn't translate to your complete wallet's balance and activity to be known. This ...


16

Bitcoin addresses do not actually exist on the Bitcoin network. They are an abstraction for humans to be able to easily send money to each other. What Bitcoin actually uses are transaction outputs. A transaction creates outputs which consist of the value and the output script. When you send money to someone, you are spending from an Unspent Transaction ...


15

If I'm sending someone my wallet-address, am I making my account balance visible to him? Yes. all transactions are public, means if I know the wallet address, I can reconstruct the current account balance Yes. All transactions of that address are in the blockchain, so they're public. Owners of bitcoin addresses are not explicitly identified, but all ...


12

The balance will return as soon as the client catches up with the network.


10

The network doesn't know your current balance. The bitcoin network doesn't use the concept of "balances". Instead the Bitcoin ledger tracks assignments of value. So every bitcoin that exists was initially claimed by a miner, and then there have been assignments of value ever since. Now a bitcoin client can show a "balance" for an address but that ...


10

This guy wanted to do the same thing. You can find a solution there. in short: get a Linux Box/VM with >=8GB RAM download blockparser compile it run "./parser allBalances -w 250000 >allBalances.txt" the parser run take around 2 minutes on my vSphere VM (2x3Ghz Xeon, 16GB of RAM) now you have a list of the top 250.000 adresses ...


9

In this scenario, neither address A nor address B had a sufficient balance to pay 0.5 BTC by itself. The two together did have enough. So, the clients are intelligent enough combine the amounts of two addresses together in order to meet the desired transaction amount. Unfortunately, the combination has the effect of sending bitcoins to yourself as "change" ...


8

Bitcoin addresses are 160-bit numbers. Hence, randomly finding a private key corresponding to an address takes on average 2^160 attempts. If 4 billion computers work on cracking a key doing 1 billion calculations per second for 15 billion years, they will find a total of 1.8*10^36 keys, so their chance to hit a right one is (1.8*10^36)/(2^160) = 1.23 * 10^(...


7

You are correct that anyone can see the balance of bitcoins in any address at any time. So a better way to keep your total balance private is to make a new address and ask your friend to send the coins to that address. Then, don't transfer the money to another existing address of yours. Any reasonable wallet software is capable of handling coins divided ...


7

If you are not going to use a 3rd party API, you'll need to run a node and add each address you want to query as a watch only address. If you are looking to create a database with all addresses, similar to a block explorer website, you'll need to parse the blockchain using something like abe, and then continually update your database for each new transaction....


6

The blockchain defines your balance, but it doesn't have a specific field in which your balance is stored. Yes, it needs to be analyzed to find your balance. However, it doesn't have to be analyzed all over again, just to check for the balance of a new address. Instead, checking the UTXO set (which only has to be created once and then to be updated every ...


5

Those are quite some widespread questions. Tracking of account balances There are two parts that keep track of an accounts balance: each node keeps track of the transaction history a node keeps track of the private keys for the accounts it owns Bitcoin at its core is a distributed ledger that keeps track of every transaction ever executed. Every node in ...


5

It depends on what data structure you have put the UTXO set into. Different implementations do this in different ways, there is no one way to have the UTXO set. For instance, one implementation may not maintain a UTXO set but rather iterates through the entire blockchain. This would be O(n) where n is the number of TXOs in the blockchain. Other ...


5

Nope. Not 1 bit. A balance (in this context) is the sum of all UTXO's for a given address. There is no limit on the number of UTXO's or their total amount (from the perspective of how the blockchain works and the blockchains limitations). Software interpreting the balance may have limitations on consuming, processing and/or displaying a number beyond a ...


4

Say your 1 BTC balance was the output of a single transaction. To pay someone .5 BTC, you have to claim the output of that transaction. Then you have to pay the .0005 BTC fee. That leaves .4995 BTC which need to be left as an unclaimed transaction output for you to spend later. To perform another transaction, you need to claim that .4995 BTC output from ...


4

You would need to use a client node that has a different architecture, from the satoshi's client. Specifically, the client must be able to quickly browse through all the unspent outputs. You may want to check this table for clients that support Multi-wallet. Among them, there is a new client Gocoin. It is currently in a testing phase, and you need to build ...


4

Either one of the factors may affect either balance: There is a double spend against one of your accounts Some transaction might not have yet been included in a block and one program does not see it yet There can be an error in one of the programs that skipped over some transactions. In case of the client, you should try rescanning the blockchain to make ...


4

You only see the balance of blocks that have at least another 100 on top. This is because coinbase outputs only become spendable after 101 confirmations (the maturity period). After the nodes reconnect, and one block is mined by node0, node1's previous chain is reorganized away, and from that point on, both nodes work on the same chain. However, whenever a ...


4

I found the solution for this question. I used this class: /** * This class implements a {@link org.bitcoinj.wallet.CoinSelector} which attempts to select all outputs * from a designated address. Outputs are selected in order of highest priority. Note that this means we may * end up "spending" more priority than would be required to get the ...


4

Your balance is the sum of UTXO (unspent transaction output) values in the blockchain since genesis block (block#0). UTXO is the coins that the addresses' you control (by having their private keys) received and you haven't spend. Your wallet keep reference to your UTXOs. So, no need to scan blockchain every time you spend.


4

You cannot because Bitcoin Core does not store such information. Bitcoin Core does not store all information for all addresses, it only stores information for its own addresses and the lower level information needed for verifying transactions (addresses are a higher level abstraction). There are no commands that allow you to get the balances or transactions ...


3

You are trying to use addresses for accounting, but they aren't designed for that. What you actually want is the accounts feature of bitcoind, though I doubt any mobile wallet implements such a thing. If you say explicitly why do you think you need to do that, someone might have an answer. Meanwhile, just use the whole balance, and create a new address for ...


3

This is probably not a full solution, but maybe a possible optimization. Since you send all BTC out of the address in every send transaction, you should only have to look at the transactions that happen after the last sending transaction to calculate the value at an address.


3

Try this: start bitcoin-qt with the command line switch "-rescan". That should re-download all transactions, including those in and out of your wallet. I can't guarantee this will work, but I had to do this when I upgraded to the newest version of Bitcoin-qt after a long time of not updating.


3

If you are only using Bitcoin through RPC commands, you might want to look into accounts. Using those you can just call getbalance and you will know how much Bitcoins are in each of the accounts. If you are using only addresses, you can only see how many Bitcoins you received with it through listreceivedbyaddress, which can be not reliable if you spend any ...


3

That would not work because the way the system is designed, accounts do not have a pile of coins to spend. Spendable coins exist in the form of transaction outputs that have not yet been used as the input of a subsequent transaction. To form a valid transaction, you must pull in coins from specific transaction outputs, not from specific accounts. One could ...


3

When you create a Bitcoin transaction, your client will broadcast that information to peer nodes and generally within seconds every node that is connected will know of that transaction. That's likely why the recipient wallet's balance rose. That transaction though must be included in a mined block before the client you are using will allow those funds to ...


3

If you live in the states the only service that comes close to this would be https://www.xmlgold.eu/ - you can even order a pre-paid credit card that you are able to top up with bitcoins. https://www.okpay.com/en/index.html - Okpay used to offer the same service but due to regulatory reasons they have ceased offering thier services to US citizens. The ...


Only top voted, non community-wiki answers of a minimum length are eligible