Author

Topic: A couple of things I don't get about Bitcoin, please help :) (Read 1279 times)

donator
Activity: 1218
Merit: 1079
Gerald Davis
Questions to DeathAndTaxes: If you broadcast a double spend, and 2 txs are added into memory pool, how could system tell there is a double spend and deny one of them? And what is the strategy used here? Randomly select one of them to deny? I think this must be done before the next block generated

The memory pool is not consistent across nodes. If A & B are a pair of tx which both use the same unspent outputs as inputs,  in a 0-confirm double spend some nodes see tx A first and will drop tx B as a double spend.  Some nodes see tx B first and drop tx A.  

The network will be out of consensus.  Some nodes believe tx A is valid and some believe tx B is valid.  Eventually a miner will solve a block which contains either A OR B (but never both as that would be an invalid block).  At that point both A & B are both removed from the memory pool.

To think of it on a higher/meta level the purpose of mining is to force the network to agree upon a consensus view of the current ownership of coins (unspent outputs).
legendary
Activity: 1148
Merit: 1008
If you want to walk on water, get out of the boat
Easy, it refuse the second transaction.
The node receive the first connection. Then receive the second one, it is a doublespend, so it is invalid and refused. The node will only keep the first one.
legendary
Activity: 1988
Merit: 1012
Beyond Imagination
I also have some unclearness regarding the memory pool: Seems the transactions are queued in the memory pool of miners to be added into the next block and that puts higher and higher requirement of the memory and bandwidth of miner's machine

Questions to DeathAndTaxes: If you broadcast a double spend, and 2 txs are added into memory pool, how could system tell there is a double spend and deny one of them? And what is the strategy used here? Randomly select one of them to deny? I think this must be done before the next block generated

legendary
Activity: 2142
Merit: 1010
Newbie
Your opinion is irrelevant if the facts don't support it. I only stated the facts.

OK. Never mind.
donator
Activity: 1218
Merit: 1079
Gerald Davis
Right now, whether people like it or not, people are in for the money mostly, not the graceful allowance of silkroad customers to be able to hide behind something Smiley I really do hope that the difficulty increases won't cause mass departures to LTC, even if they do, it'll be really interesting to see, how this pans out.

There is nothing wrong with that.  Bitcoin doesn't need people to be altruistic (and system that does is doomed to fail).  The financial incentive creates the difficulty which keeps the network secure.  If someone thinks Bitcoins are stupid but mines to convert the reward into fiat it still secures the network.

Also mining isn't Bitcoin.  It is just one part of it.  Not everyone will mine much like not everyone who buys Gold mines it themselves. 
legendary
Activity: 1078
Merit: 1003
First of all, if you don't mine, but just install a client, does it take part in the confirmation as well, or it is just a dumb wallet, which gets the broadcasted new, ever increasing blockchain?

Just a dumb wallet.

Incorrect.

If you install the full node client called Bitcoin-Qt (http://bitcoin.org/) it's not just a dumb wallet because it also checks that every block you receive and every transaction that block contains follow the agreed upon rules. If it they do not it does not matter if miners validated that block and those transactions, your client will ignore them and ensure it is following strictly the rules you agreed to by downloading it. It's a big reason why even though a minority of users "mine", Bitcoin is still completely decentralized and no one or no one group of people can force any changes (like some would like to) on everyone else.


I disagree. "Confirmation" in our context is exactly as this - https://en.bitcoin.it/wiki/Confirmation. And "dumb" means the client does nothing to confirm transactions.

Bitcoin concept is quite sophisticated, we would better stick to "official" terminology without our supposition.

A confirmation is irrelevant if a full client cannot validate a block or one of the transactions inside of it because such a confirmed block would simply get ignored.

Your opinion is irrelevant if the facts don't support it. I only stated the facts.
donator
Activity: 1218
Merit: 1079
Gerald Davis
I disagree. "Confirmation" in our context is exactly as this - https://en.bitcoin.it/wiki/Confirmation. And "dumb" means the client does nothing to confirm transactions.

Bitcoin concept is quite sophisticated, we would better stick to "official" terminology without our supposition.

While non mining nodes aren't involved in the confirmation process (mining) they aren't "dumb wallets".  Had you just said "no non miners don't confirm tx but they do validate them" it would be a correct statement.  Saying they are dumb wallets is false.

Bitcoin would be far easier to manipulate if non mining nodes weren't part of the trust model. 
member
Activity: 84
Merit: 10
Funny quote
So far, transaction costs are just a fraction compared to the 25btc given.

Electricity drives everything. In a perfect world, everyone would have windmills in the backyard, to keep up mining. But what happens, if tomorrow, althoug demand is high, but with the difficulty increase, the price jump seems to be evening out, and we'll reach in a few months the state where difficulty is so high, that electricity costs will reach the mining income.

Right now, whether people like it or not, people are in for the money mostly, not the graceful allowance of silkroad customers to be able to hide behind something Smiley I really do hope that the difficulty increases won't cause mass departures to LTC, even if they do, it'll be really interesting to see, how this pans out.

Thanks for the detailed info!
legendary
Activity: 2142
Merit: 1010
Newbie
First of all, if you don't mine, but just install a client, does it take part in the confirmation as well, or it is just a dumb wallet, which gets the broadcasted new, ever increasing blockchain?

Just a dumb wallet.

Incorrect.

If you install the full node client called Bitcoin-Qt (http://bitcoin.org/) it's not just a dumb wallet because it also checks that every block you receive and every transaction that block contains follow the agreed upon rules. If it they do not it does not matter if miners validated that block and those transactions, your client will ignore them and ensure it is following strictly the rules you agreed to by downloading it. It's a big reason why even though a minority of users "mine", Bitcoin is still completely decentralized and no one or no one group of people can force any changes (like some would like to) on everyone else.


I disagree. "Confirmation" in our context is exactly as this - https://en.bitcoin.it/wiki/Confirmation. And "dumb" means the client does nothing to confirm transactions.

Bitcoin concept is quite sophisticated, we would better stick to "official" terminology without our supposition.
donator
Activity: 1218
Merit: 1079
Gerald Davis
hazek nailed it.  I would expand to say that if you are a full node* the model is trustless.  Your node doesn't trust anything it receives from any other node.  Using the blockchain your node can independently verify that a tx is valid.  It only relays that tx to another nodes it knows about after it validates them.  Those nodes will then independently validate the tx.

The purpose of mining is more than just "getting some coinz".  It is using a proof of work to create a consensus.  Imagine I sent the same coin (technically an unspent output of a prior tx) to you and simultaneously to hazek.  Both of your nodes would verify the tx is 100% valid but the network is no longer in consensus. But only one of you can have the "coin" otherwise I just figured out a way to create coins from nothing.  Only one of you can have "the coin" but the network is currently in disagreement over who has it.  Mining is the method to "force a consensus".

Miners take unconfirmed (but validated) tx and put them into a block. It is important to understand the block solution (hash below current difficulty target) is only valid for a specific block.  Tx aren't added to a "solved block" a block is constructed and then miners looks for a solution to that exact specific block.   When the block is solved the block is broadcast to all nodes and who then independently verify both the block and all tx in the block.  The block is then added to the blockchain.  

In the case of the double spend to you and hazek, only one of your tx will get added to the next block and the other one will become worthless.  Mining is intentionally hard (all miners in the entire world collectively need to work an average of 10 minutes nonstop to solve a single block) to create an economic cost.  That cost protects the network from creating a false/alternative history.   Miners are compensated for that protection.  In a perfect world there would be no inflation and miners would be paid by fees.  However that creates two challenges  a) how does the network "pay for itself" when the tx volume is low and b) how do you distribute the initial coins.  The block subsidy (initially 50 BTC per block, now 25 BTC per block, and falling to 12.5 BTC per block in ~ 4 years) solves both of those problems.  It subsidizes the cost of securing the network while the network grows AND provides a fair mechanism for the INITIAL distribution of coins.


* If you don't want to be a full node (which requires validating and storing all txs and blocks) you can opt to use an eWallet or light client however those require some level of implicit trust.  Only full nodes are true peers in the peer to peer network known as Bitcoin.  This doesn't mean light clients and eWallets don't have value, they do they just aren't full peers.
member
Activity: 84
Merit: 10
Funny quote
Awesome pawesome Smiley
legendary
Activity: 1078
Merit: 1003
First of all, if you don't mine, but just install a client, does it take part in the confirmation as well, or it is just a dumb wallet, which gets the broadcasted new, ever increasing blockchain?

Just a dumb wallet.

Incorrect.

If you install the full node client called Bitcoin-Qt (http://bitcoin.org/) it's not just a dumb wallet because it also checks that every block you receive and every transaction that block contains follow the agreed upon rules. If it they do not it does not matter if miners validated that block and those transactions, your client will ignore them and ensure it is following strictly the rules you agreed to by downloading it. It's a big reason why even though a minority of users "mine", Bitcoin is still completely decentralized and no one or no one group of people can force any changes (like some would like to) on everyone else.
member
Activity: 84
Merit: 10
Funny quote
Appreciated, thanks Smiley  Grin
legendary
Activity: 2142
Merit: 1010
Newbie
...but the confirmations are done by...? because I highly doubt that mining power would be wasted on, while searching for a new block to verify" previously found blocks. If you could, can you tell me WHAT confirms the block I just found for example? Or the transaction I just made for eg?

...by miners who found nonces for all next blocks. Blocks are verified when they are received from other peers. Each block contains a part of the previous block (hash), you don't need to check all previous blocks every time you get a new one.
member
Activity: 84
Merit: 10
Funny quote
...but the confirmations are done by...? because I highly doubt that mining power would be wasted on, while searching for a new block to verify" previously found blocks. If you could, can you tell me WHAT confirms the block I just found for example? Or the transaction I just made for eg?
legendary
Activity: 2142
Merit: 1010
Newbie
First of all, if you don't mine, but just install a client, does it take part in the confirmation as well, or it is just a dumb wallet, which gets the broadcasted new, ever increasing blockchain?

Just a dumb wallet.


If I DO mine, then how does the procedure works? Every 10 minutes let's say a pool finds a block, that is ok. What happens to that block? Does it get filled with waiting transactions immediately? Who stores the queueing transactions? Even if it's p2p, how can the information safely be stored somewhere until it gets filled in a block? Is there a server somewhere for that? How does that block gets confirmed? Is it done by other miners/bitcoin clients?

First u fill a block with transactions and then u must find a nonce. Transactions are stored by a mining software and there is no a special server. A block is confirmed when u find a nonce. Nonce is a number that changes double-SHA256 hash of essential block data in a way that leads to a lot of zeros at the beginning of the hash. Higher difficulty - more zeros must be at the beginning.

What I don't get essentially is that mining solely seems to be just there to find new blocks, not confirming transactions, so I don't see how miners are the one, securing the network, when they are just mining.

It's hard to find a block, u need a lot of computing power for that. And it's unfeasable to revert the blockchain few blocks back to rewrite the history. More confirmations - higher safety of a transaction already included into the blockchain.
member
Activity: 84
Merit: 10
Funny quote
Hi!

I have been following Bitcoin since quite a while, and I have read thousands of articles and forum posts already, but there is something I still don't get. Actually two Smiley

First of all, if you don't mine, but just install a client, does it take part in the confirmation as well, or it is just a dumb wallet, which gets the broadcasted new, ever increasing blockchain?

If I DO mine, then how does the procedure works? Every 10 minutes let's say a pool finds a block, that is ok. What happens to that block? Does it get filled with waiting transactions immediately? Who stores the queueing transactions? Even if it's p2p, how can the information safely be stored somewhere until it gets filled in a block? Is there a server somewhere for that? Are the miners, when finding the block hash it into it, or not? How does that block gets confirmed by other clients/miners? Is it done by other miners/bitcoin clients?

What I don't get essentially is that mining solely seems to be just there to find new blocks, not confirming transactions, so I don't see how miners are the one, securing the network, when they are just mining.

Most probably I missed a step somewhere, if someone could describe the process, that'd be awesome. Trust me, I searched for it.

Because the thing is, if a bitcoin client on it's own IS indeed helping confirming transactions, then the network need clients, not miners...(for confirmations that is of course...)

So? Smiley
Jump to: