Bitcoin Forum
May 22, 2024, 02:32:39 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Difference between mining new coins and confirming transactions  (Read 1211 times)
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
February 27, 2014, 10:09:40 AM
Last edit: February 27, 2014, 10:23:03 AM by konradp
 #1

Hi, newbie here:)

I have two questions. After reading a lot of stuff, I still can't find answers to the questions.

1. What's the technical difference between mining new coins and confirming transactions? I know that in case of mining new coins we need to do sha26(sha256(payload+noce)) but what in case of confirming transactions? And why is confirming transactions simpler?

2. In pooling I understand that people participate in solving problems, but exactly what do they solve (per person) and what is that bigger thing they solve? And, is it true, that miners do both things: mining new coins and confirming transactions?

In general I'm supposed to create a pooling service, and after a few days I came from "don't know what bitcoin is" to "I still don't know how it precisely works"Sad
Rannasha
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


View Profile
February 27, 2014, 10:42:10 AM
 #2

Hi, newbie here:)

I have two questions. After reading a lot of stuff, I still can't find answers to the questions.

1. What's the technical difference between mining new coins and confirming transactions? I know that in case of mining new coins we need to do sha26(sha256(payload+noce)) but what in case of confirming transactions? And why is confirming transactions simpler?

You don't mine new coins. You mine blocks. Transactions that are included in a new block are considered to be confirmed. So confirming transactions is done by mining new blocks.

As a reward for this effort, new coins are awarded to the miner who finds a new block. So getting new coins is not the purpose of mining, it is just a reward for the effort.

Quote
2. In pooling I understand that people participate in solving problems, but exactly what do they solve (per person) and what is that bigger thing they solve? And, is it true, that miners do both things: mining new coins and confirming transactions?
People mining in a pool do the same as solo-miners, they compute the same things. The difference is that with pool-mining, the many miners report their results to the pool, who then communicates new blocks with the Bitcoin network. The pool is also responsible for keeping track of how performed how much work and will divide the reward of new coins between the miners based on that.

I recently started a blog where I explain some of these matters in more detail than what I posted here. You can have a read at http://bitcoin.rannasha.net/?p=8
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
February 27, 2014, 11:42:25 AM
 #3

Thanks for the answer.

However I don't quite understand it, you say:

Quote
The difference is that with pool-mining, the many miners report their results to the pool, who then communicates new blocks with the Bitcoin network

This part I understand, but still I don't understand what precisely solve pool-miners. I know they solve blocks, but why is pool a better option than solo-mining? I mean I do know, that in case of pool-mining miners solve only part of something, but I don't know what is this "something". Is this that to confirm a transfer or get new coins one needs to mine many blocks for some reason, and in pool-mining they can only solve one block and get a payment for that one block?

Also, I've just finished reading your blog, in the post about pooling you wrote:

Quote
Approximately once every 100 reports will have a hash value that is not only below 10000, but also below 100 and thus makes for a valid block. At this point, the pool reports the block to the network and distributes the reward. The miner who reported this will still only get a single share.

Why would a pool service want hashes below 10000 when difficulty is 100?
spin
Sr. Member
****
Offline Offline

Activity: 362
Merit: 261


View Profile
February 27, 2014, 12:10:24 PM
 #4

This part I understand, but still I don't understand what precisely solve pool-miners. I know they solve blocks, but why is pool a better option than solo-mining? I mean I do know, that in case of pool-mining miners solve only part of something, but I don't know what is this "something". Is this that to confirm a transfer or get new coins one needs to mine many blocks for some reason, and in pool-mining they can only solve one block and get a payment for that one block?

The pool is solving the same problems as regular miners.  The pool helps distribute gains.  If you mine solo it might take weeks or months before you happen to find a block.  With a pool that luck is spread more evenly amongst people (less a fee).  Thus everyone shares the reward everytime someone in the pool gets a block.

How is this sharing done?

Quote
Approximately once every 100 reports will have a hash value that is not only below 10000, but also below 100 and thus makes for a valid block. At this point, the pool reports the block to the network and distributes the reward. The miner who reported this will still only get a single share.
Why would a pool service want hashes below 10000 when difficulty is 100?

You solve a easier solution for the pool.  I.e. below 10000 instead of 100.  Everytime you solve such a simple block the pool counts it as an additional share of the rewards.  One of these easier solutions (i.e. < 10 000) may also be <100 in which case that gets submitted as the block and then the rewards get spread in proportion to the shares (<10 000) submitted.

This is my lay understanding of the process.

If you liked this post buy me a beer.  Beers are quite cheap where I live!
bc1q707guwp9pc73r08jw23lvecpywtazjjk399daa
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
February 27, 2014, 12:20:48 PM
 #5

Quote
The pool is solving the same problems as regular miners.
You mean, that pools are also solving hashes?
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
February 27, 2014, 02:01:44 PM
 #6

One more question.

I started cpuminer yesterday morning, it has a very low hashrate (I don't own a GPU). But from to time I see a message saying "stratum detected new block" - doesn't that mean that I should have received a share already, even very small? I use the bitminter.com pool.
spin
Sr. Member
****
Offline Offline

Activity: 362
Merit: 261


View Profile
February 27, 2014, 02:05:06 PM
 #7

Quote
The pool is solving the same problems as regular miners.
You mean, that pools are also solving hashes?

Yes, just with lower (i.e. easier) difficulty.  These hashes count as shares of the pool.  At some point a low hash is found that meets all requirements (i.e. hash< difficulty < pool difficulty) then the pool collects the block reward and shares it in proportion to number of contributing hashes that are less than the pool difficulty (after deducting fees).

If you liked this post buy me a beer.  Beers are quite cheap where I live!
bc1q707guwp9pc73r08jw23lvecpywtazjjk399daa
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
February 27, 2014, 02:12:00 PM
 #8

Ahh, right, I get it now. I need to find a hash lower than pool difficulty.

Thanks!

Btw, do you think making a pool basing on php is sensible? Since it only collects hashes from users and doesn't mine itself, maybe it isn't so senseless?

Oh, and one more: if a pool service says that it (for example) "hashes 200Gh/s", does that mean that it receives 200 billions of requests with users' hashes per second?
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
March 11, 2014, 10:10:26 AM
 #9

@Rannasha
Quote
You don't mine new coins. You mine blocks. Transactions that are included in a new block are considered to be confirmed. So confirming transactions is done by mining new blocks.

I still don't get it Sad What is precisely the order of operations, when I transfer you some bitcoins? Starting from what the wallet software does at the very beginning.

Please help...



dreamspark
Hero Member
*****
Offline Offline

Activity: 798
Merit: 1000


View Profile
March 11, 2014, 10:27:43 AM
 #10

@Rannasha
Quote
You don't mine new coins. You mine blocks. Transactions that are included in a new block are considered to be confirmed. So confirming transactions is done by mining new blocks.

I still don't get it Sad What is precisely the order of operations, when I transfer you some bitcoins? Starting from what the wallet software does at the very beginning.

Please help...





When you send a transaction you use n number of inputs that were received by you from the transaction that sent you coins. When you send a transaction it is broadcast to the network and miners who are mining to solve blocks can then include it into the next block that they are mining. The whole network sees the transaction broadcast so whoever is you are sending the coins to will see almost immediately that they have received coins and the confirmations come from blocks being built onto the chain. The longer the chain, the more confirmations there are means you can be sure that the coins are safely not a double spend.
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
March 11, 2014, 10:40:53 AM
 #11

OK, maybe I have problems with understanding it, because I noticed that (or maybe I'm wrong) people use the term "block chain" in two different ways.

First I thought that there is only one block chain, a very big one, with all the block ever found. But now you say:

"The longer the chain, the more confirmations there are means you can be sure that the coins are safely not a double spend"

It looks like you talked about a chain being only a part of this big chain.

There are really no good docs about it, I've spent endless hours on en.bitcoin.it but it looks like they also use this term interchangeably.

Now, as I know more about bitcoin generally I'm planning to read everything on en.bitcoin.it again. But for now - what is this chain? Is this a new confirmation == new block attached to the previous one (the one with transaction) and this forms a chain of two blocks?
wheatstone
Member
**
Offline Offline

Activity: 82
Merit: 10


View Profile
March 11, 2014, 12:01:26 PM
 #12

OK, maybe I have problems with understanding it, because I noticed that (or maybe I'm wrong) people use the term "block chain" in two different ways.

First I thought that there is only one block chain, a very big one, with all the block ever found.

That is correct.

However, under certain circumstances the chain can "fork". This happens when two blocks are solved for the same "spot" in the chain.

Say you have a chain of blocks ABC and two different miners find a valid solution for a new block. Let's call these solutions D and E. There are now effectively two chains, ABCD and ABCE, although this is more commonly referred to as a fork (since the two chains are identical up to a point).

Now, which block, D or E, is ultimately accepted depends on which fork gets another block the fastest. This fork would then be the longest chain and everyone would revert to mining that one (miners always mine the longest chain--or the one they got first in the case of chains with identical lengths). The other block is said to be orphaned.

This orphaning happens all the time and is the reason you want to wait until your transaction has a number of confirmations. Each confirmation is another block in the chain which includes your transaction.

Let's say your transaction was included in block E above, but not D.

ABCD --> 0 confirmations
ABCE --> 1 confirmations

Once the next block is solved, the miners will almost always switch, orphaning either D or E. However, there's always the chance that both forks get a new block at right about the same time and the chains will then look like:

ABCDX --> 0 confirmations (assuming your transaction didn't make it in X either)
ABCEF --> 2 confirmations

As you can imagine, the more additional blocks / the longer the chain after your transaction was included, the more unlikely it is that the branch you are depending on is orphaned.
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
March 11, 2014, 12:14:02 PM
 #13


OK, maybe I have problems with understanding it, because I noticed that (or maybe I'm wrong) people use the term "block chain" in two different ways.

First I thought that there is only one block chain, a very big one, with all the block ever found.

That is correct.

However, under certain circumstances the chain can "fork". This happens when two blocks are solved for the same "spot" in the chain.

Say you have a chain (...)

Thank you! Now I get it.

I think I also understood answer to my initial question:)
Quote
Hi, newbie here:)

I have two questions. After reading a lot of stuff, I still can't find answers to the questions.

1. What's the technical difference between mining new coins and confirming transactions? I know that in case of mining new coins we need to do sha26(sha256(payload+noce)) but what in case of confirming transactions? And why is confirming transactions simpler?

And you said:
Quote
You don't mine new coins. You mine blocks. Transactions that are included in a new block are considered to be confirmed. So confirming transactions is done by mining new blocks.

Since in so many docs there are words lilke "mining" and "solving blocks" and "validating transactions" I thought these are different things. And I found somewhere that "people today earn more money for confirming transactions than mining new coins". So I thought a miner software does these two things and they are separate. Now I believe a miner does only one thing - solves a block to validate given transaction. And if it succeeds the miner gets 25 BTC. And by "more money for confirming transactions" the author meant "for transaction fees" right?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
March 11, 2014, 02:15:50 PM
 #14

And by "more money for confirming transactions" the author meant "for transaction fees" right?

Possibly, but if so then the author was wrong.  The block subsidy is 25 BTC.  The average total transaction fees in a block is still less than 0.1 BTC.

If that isn't what the author meant, then I'm unable to guess what else they were trying to say.  Perhaps they were misinformed and were repeating false information?
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
March 11, 2014, 02:21:00 PM
 #15

Thanks.
Quote
Possibly, but if so then the author was wrong.  The block subsidy is 25 BTC.  The average total transaction fees in a block is still less than 0.1 BTC.

If that isn't what the author meant, then I'm unable to guess what else they were trying to say.  Perhaps they were misinformed and were repeating false information?

Well, maybe, but that's not the point, the point is, this sentence led me to completely wrong way of thinking (if this is even close to correct english grammar:) ). So I'm right that miners only validate transactions sent by pool to validate?
wheatstone
Member
**
Offline Offline

Activity: 82
Merit: 10


View Profile
March 11, 2014, 05:27:44 PM
 #16

So I'm right that miners only validate transactions sent by pool to validate?

Yes.

A pool is just a collection of miners with varying rules governing how they operate.

The pool is effectively just one big miner as seen by the bitcoin network, so sometimes the word "miners" is used to mean pools.

Miners/pools can include whatever transactions they want in a block. Some won't include ANY transactions that don't have a fee, while some will. Some will include very, very few transactions, while others include quite a lot.

The transactions miners include have typically been submitted to the bitcoin network, but they could easily include their own or have a "back channel" agreement with e.g. a payment processor to include their transactions without those ever being submitted to the network (i.e. without being relayed).
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
March 12, 2014, 07:36:31 AM
 #17

Now everything is a bit more clear for me, thank you!
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!