Bitcoin Forum
May 03, 2024, 12:13:30 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Please help me understand mining.  (Read 806 times)
litehacker (OP)
Member
**
Offline Offline

Activity: 67
Merit: 10


View Profile
January 04, 2013, 01:12:13 AM
 #1

1. From what I understand, bitcoin miners find a hash code. For each hash code they find they are rewarded 50 BTC. (Now it's 25 BTC and it will continue to decrease at an exact rate.) How exactly are these newly found hash codes converted to bitcoins?

2. In the weusecoins bitcoin video, it was said that 'every transaction is verified by a miner.' I'm not sure of that was an analagy. From what I understand, miners just find hashes. I thought everyone in the network verfies the transaction, not just miners. Is this correct?

hi
1714738410
Hero Member
*
Offline Offline

Posts: 1714738410

View Profile Personal Message (Offline)

Ignore
1714738410
Reply with quote  #2

1714738410
Report to moderator
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714738410
Hero Member
*
Offline Offline

Posts: 1714738410

View Profile Personal Message (Offline)

Ignore
1714738410
Reply with quote  #2

1714738410
Report to moderator
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
January 04, 2013, 01:16:26 AM
 #2

Miners don't just find hashcodes.

Miners solve blocks.  They take unconfirmed tx, validated them, pack them into a block and then find a hash which "solves"* the block.  As part of the block creation they are allowed to add a special coinbase tx which mints a certain number of new coins (it was 50 and now is 25) called the block subsidy along with any tx fees included in the tx which are part of the block to an address the miner/pool controls.  This serves two purposes, first it provides a financial incentive to keep the network secure and second it slowly increases the supply of coins.  Once a miner solves a block it broadcasts the block to other nodes who validate it and add it to the blockchain.  Miners then start working on the next block in the chain including more unconfirmed transactions and looking for a solution to that block.  The process never ends.  Miners ARE transactions validators.  Not only do they validate that transactions are valid the blockchain they produce provides a record which prevents someone from spending the same coins twice. The network is designed so that no matter how many miners there are one block will be found roughly once every ten minutes.   M ining is intentionally difficult to make it very very expensive for someone to try and rewrite history.  Without miners the coins would have no value.   People could spend the same coin over and over and over, not just twice (double spend) but hundreds or thousands or millions of times.  If you could spend the same dollar bill a million times you likely wouldn't need any more money.  Smiley  If everyone could do that then a dollar would be worthless.   Without miners there are no blocks, without blocks there is no blockchain, without the blockchain the coins have no value.

TL/DR version:
Miners secure the network.  Miners validate transactions and create the permanent record (the blockchain) which prevent double spends.



* By "solve" the miner must randomly try hashes to find one which is smaller than the target which is based on current difficulty.  difficulty adjusts every 2016 blocks in order to make the process of solving a block harder or easier and thus keep the generation rate roughly stable.
litehacker (OP)
Member
**
Offline Offline

Activity: 67
Merit: 10


View Profile
January 04, 2013, 02:08:14 AM
 #3

If the amount of bitcoins will stop at 21 million, when the system reaches that limit, won't the miners stop mining?
Miners are supposed to keep this whole thing running, right? Am I missing something here?

hi
21after2
Member
**
Offline Offline

Activity: 112
Merit: 16



View Profile
January 04, 2013, 02:09:54 AM
 #4

If the amount of bitcoins will stop at 21 million, when the system reaches that limit, won't the miners stop mining?
Miners are supposed to keep this whole thing running, right? Am I missing something here?

Nope, you're not missing anything. That's one of the worries about the future of BTC. It seems that transaction fees will have to become more common to encourage miners to keep up the network. That's my understanding of the bit I've read about it, at any rate. I'm sure more knowledgable board members will provide a better response.
litehacker (OP)
Member
**
Offline Offline

Activity: 67
Merit: 10


View Profile
January 04, 2013, 02:27:46 AM
 #5

What? Transaction fees are optional by the sender correct?
You are saying that people will be voluntarily adding transaction fees in the future, or otherwise be at risk of miners not supporting them?
People currently try to stop transaction fees. A lot of them don't understand why they are there..

hi
21after2
Member
**
Offline Offline

Activity: 112
Merit: 16



View Profile
January 04, 2013, 02:33:04 AM
 #6

Transaction fees are optional now, but there will be no incentive to mine once all the BTC has been mined except for the purposes of earning transaction fees. Some miners may not feel that the small amount of fees to be worth the effort. A lot of people try to speculate how this will be worked around. You might be able to find more info on the wiki as well.
odolvlobo
Legendary
*
Offline Offline

Activity: 4298
Merit: 3214



View Profile
January 04, 2013, 03:52:25 AM
Last edit: January 04, 2013, 04:04:02 AM by odolvlobo
 #7

Mining is the process of adding transactions to the official record, the "block chain". When a miner adds a "block" of transactions, she gets the reward plus the fees. The hash that miners compute is part of the process of adding a block. Miners compete to be the first to find an acceptable value that allows them to add the block to the block chain. Adding a block is intentionally made more difficult so that a block is added every 10 minutes on average, no matter how many miners there are.

Miners can also exclude transactions with no fees attached. So, in order to make sure that your transaction goes through, you will want to pay a fee even though you don't have to.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
mitty
Sr. Member
****
Offline Offline

Activity: 359
Merit: 250



View Profile
January 04, 2013, 03:54:38 AM
 #8

I think the basic idea right now is that larger transactions (such as ones that send coins from/to multiple addresses) should include a fee due to the fact that their larger size makes them propagate through the network slower than a smaller transaction, and that they take more resources (i.e., disk space) to store.

Miners can choose which transactions to include in a block, and a transaction needs to be included in a block to be confirmed.  A block has a specific size limit, so miners would most likely choose which transactions to include based on the transaction fee amount if the currently unconfirmed transactions are larger than the maximum allowed block size.

Higher transaction fee = associated transaction confirmed more quickly due to higher incentive to include in block.

Mining is required to keep Bitcoin working, and no one will mine if there's no financial incentive to do so.  Therefore, transaction fees will essentially be required once the block reward significantly diminishes.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
January 04, 2013, 04:06:06 AM
 #9

What? Transaction fees are optional by the sender correct?
You are saying that people will be voluntarily adding transaction fees in the future, or otherwise be at risk of miners not supporting them?

You can voluntarily pay a tx fee now or otherwise be at "risk" of a miner not including your tx in the next block.  It is freedom on both sides.  You are free to not include a fee, or choose the amount of the fee to include and likewise miners are free to choose which tx to include in a block.  A miner can (and some do) refuse your tx if it has no or insufficient fee.  Now most miners are rational and know that while the subsidy exists it makes sense to create value for the overall network and thus will include free or low paying transactions but many limit how many free transaction they include in each block.

Over time the subsidy will decline and tx fees will rise.  The goal is for the network to be supported completely be fees eventually.   One way to look at it is that the subsidy is a form of indirect fee.  It is additional coins added to the "coin supply" and thus they devalue the existing coins.  1% more coins (making all your coins worth 1% less) has the the same economic effect as paying 1% in fees for the year.
RyNinDaCleM
Legendary
*
Offline Offline

Activity: 2408
Merit: 1009


Legen -wait for it- dary


View Profile
January 04, 2013, 04:28:32 AM
 #10

What? Transaction fees are optional by the sender correct?
You are saying that people will be voluntarily adding transaction fees in the future, or otherwise be at risk of miners not supporting them?

You can voluntarily pay a tx fee now or otherwise be at "risk" of a miner not including your tx in the next block.  It is freedom on both sides.  You are free to not include a fee, or choose the amount of the fee to include and likewise miners are free to choose which tx to include in a block.  A miner can (and some do) refuse your tx if it has no or insufficient fee.  Now most miners are rational and know that while the subsidy exists it makes sense to create value for the overall network and thus will include free or low paying transactions but many limit how many free transaction they include in each block.

Over time the subsidy will decline and tx fees will rise.  The goal is for the network to be supported completely be fees eventually.   One way to look at it is that the subsidy is a form of indirect fee.  It is additional coins added to the "coin supply" and thus they devalue the existing coins.  1% more coins (making all your coins worth 1% less) has the the same economic effect as paying 1% in fees for the year.


With the newer clients, isn't there a minimum amount of time the coins must sit to have that option? It may be the size of the payment, though I recall reading something like 8 days, or a number of blocks or something. I occasionally make a payment and am forced to pay a fee (BTC0.0005).  It's a very cheap fee at anyway. By far cheaper than any other payment method.

DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
January 04, 2013, 04:32:49 AM
 #11

There are anti-spam rules but the rules are somewhat complex so I left them out of the basic economics.  The anti-spam rules really aren't intended to benefit miners, they are more to protect the network from denial of service attack (generating terabytes upon terabytes of transactions by sending tiny amounts back and forth between addresses).

The complete mandatory fee rules are here:
https://en.bitcoin.it/wiki/Transaction_fees

The simple version is
"one bitcoin day".  If the input for your tx (the output doesn't matter) is one bitcoin day old it can avoid the anti-spam rule.  So if you receive 1 BTC you could spend it without fee in 1 day.  If you received 10 BTC you could sepnd it in ~2.4 hours without a fee.  If you received 0.1 BTC you could spend it in 10 days without a fee.  If your coins are too young you can either pay the mandatory fee, send it anyways using a hacked client (and hope someone includes it in a block) or wait until the coins are older.
RyNinDaCleM
Legendary
*
Offline Offline

Activity: 2408
Merit: 1009


Legen -wait for it- dary


View Profile
January 04, 2013, 04:36:10 AM
 #12

There are anti-spam rules but the rules are somewhat complex so I left them out of the basic economics.  The anti-spam rules really aren't intended to benefit miners, they are more to protect the network from denial of service attack (generating terabytes upon terabytes of transactions by sending tiny amounts back and forth between addresses).

The complete mandatory fee rules are here:
https://en.bitcoin.it/wiki/Transaction_fees

The simple version is
"one bitcoin day".  If the input for your tx (the output doesn't matter) is one bitcoin day old it can avoid the anti-spam rule.  So if you receive 1 BTC you could spend it without fee in 1 day.  If you received 10 BTC you could sepnd it in ~2.4 hours without a fee.  If you received 0.1 BTC you could spend it in 10 days without a fee.  If your coins are too young you can either pay the mandatory fee, send it anyways using a hacked client (and hope someone includes it in a block) or wait until the coins are older.

Ahh, yes! 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!