Bitcoin Forum
December 14, 2017, 11:44:32 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: pow and incentives  (Read 545 times)
bitterbug
Member
**
Offline Offline

Activity: 71


View Profile
May 04, 2017, 09:08:13 PM
 #1

Hey,

Just still trying to get my head around some of the moving parts in bitcoin.

I've heard many people talk about current hashrate being X, and I've heard that miners 'secure the network'.

What I'd like to know is what is it that is unique to miners other than finding the solution to the maths problem, which makes them secure the network?

As I understand it, all fullnodes verify transactions. So what do miners do to secure the network that is unique to them?
"This isn't the kind of software where we can leave so many unresolved bugs that we need a tracker for them." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1246


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


View Profile WWW
May 04, 2017, 10:33:40 PM
 #2

Miners create the blockchain. They add transactions to blocks and then hash the block headers to find one that is less than the target. That is the proof of work.

Miners secure the network by creating the blockchain which in turn is the "authority" which says which transactions are "real". The blockchain is really just a defense against double spending transactions. If two legitimate transactions exist but spend the same inputs and send to different outputs, those two transactions are said to double spend each other. Miners are the ones who choose which of those two gets to be included in the blockchain and is thus the "real" transaction. That is how miners secure the network.

bitterbug
Member
**
Offline Offline

Activity: 71


View Profile
May 05, 2017, 09:34:40 AM
 #3

Miners create the blockchain. They add transactions to blocks and then hash the block headers to find one that is less than the target. That is the proof of work.

Right, I follow you, so far.

Miners secure the network by creating the blockchain which in turn is the "authority" which says which transactions are "real". The blockchain is really just a defense against double spending transactions. If two legitimate transactions exist but spend the same inputs and send to different outputs, those two transactions are said to double spend each other. Miners are the ones who choose which of those two gets to be included in the blockchain and is thus the "real" transaction. That is how miners secure the network.

Right, now here is where I have a question:

"Miners are the ones who choose which of those two gets to be included in the blockchain"

This appears to me to have nothing to do with actual mining. This selection process is done by whomever is given the role, if I'm correct on this. It is more a matter of policy that at this point in time at least, it be the miners.

But if there were an automated way of deciding which of the available transactions were included, couldn't the miners' unique role in the ecosystem disappear?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1246


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


View Profile WWW
May 05, 2017, 01:14:58 PM
 #4

Right, now here is where I have a question:

"Miners are the ones who choose which of those two gets to be included in the blockchain"

This appears to me to have nothing to do with actual mining. This selection process is done by whomever is given the role, if I'm correct on this. It is more a matter of policy that at this point in time at least, it be the miners.
It is a matter of policy, but choosing transactions does actually affect the block hash itself. The block header contains a field called the Merkle root. That Merkle root is the hash of all of the transactions in the block. One way that miners change the block header in order to try another hash is to change the transactions selected or just change the order of transactions so that they get another Merkle root.

But if there were an automated way of deciding which of the available transactions were included, couldn't the miners' unique role in the ecosystem disappear?
Sure, but what is that "automated way"? Transaction selection is automated; it's not like some guy is sitting at a computer and manually choosing what transactions he wants to mine next. Transaction selection is typically done by choosing the transactions from the miner's node's pool of unconfirmed transactions (aka the mempool) that pay the highest fee rate. In the case of two conflicting transactions, the mempool will only accept the transaction that it heard of first, but that may not necessarily be the transaction that was actually sent first. The network is also asynchronous so we need mining in order to have everyone know what the blockchain is and what transactions are considered final and settled.

bitterbug
Member
**
Offline Offline

Activity: 71


View Profile
May 05, 2017, 02:27:10 PM
 #5

Quote
One way that miners change the block header in order to try another hash is to change the transactions selected or just change the order of transactions so that they get another Merkle root.

This I was unaware of.

So you're saying it is an optional part of the mining process. If I were a miner and I wanted only to use asics(or whatever the latest hashing hardware) to stumble upon the magic solution to the math problem, there would be nothing to stop me from doing that... correct?

Quote
Transaction selection is automated; it's not like some guy is sitting at a computer and manually choosing what transactions he wants to mine next.

Ok. I was under the impression a miner could do just this i.e. apply a filter for the transactions he includes in his block. Whether that filter is applied manually or automated is besides the point I suppose. The main thing is that this selection process is currently carried out only by miners. And so my follow on question is IF there was a way to randomly select eligible transactions from the pool, what else would there be for the miner to do that is unique to him and not something that other full nodes can/do do?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1246


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


View Profile WWW
May 05, 2017, 03:20:38 PM
 #6

This I was unaware of.

So you're saying it is an optional part of the mining process. If I were a miner and I wanted only to use asics(or whatever the latest hashing hardware) to stumble upon the magic solution to the math problem, there would be nothing to stop me from doing that... correct?
Kind of. A block must still contain at least one transaction, the coinbase transaction. That transaction is what generates the Bitcoin and, IIRC, every block must have this transaction. It is not a transaction that is in the mempool; it is one created by the miner and added as the first transaction of their block. However, there is nothing stopping a miner from having just the coinbase transaction.

[
Ok. I was under the impression a miner could do just this i.e. apply a filter for the transactions he includes in his block. Whether that filter is applied manually or automated is besides the point I suppose. The main thing is that this selection process is currently carried out only by miners. And so my follow on question is IF there was a way to randomly select eligible transactions from the pool, what else would there be for the miner to do that is unique to him and not something that other full nodes can/do do?
Miners are the ones who generate Bitcoin. Without mining, we would need some other way to pay out the block subsidy. Currently miners create the coinbase transaction which creates an output but spends no inputs. The Bitcoin created by that transaction goes to whomever the miner wants it to go to, typically himself.

bitterbug
Member
**
Offline Offline

Activity: 71


View Profile
May 05, 2017, 05:12:25 PM
 #7

Let's say the winner of the block reward is decided by a lottery of some kind that forms part of the protocol. And in order to claim the reward he needs to do all the other - existing - things, which are currently external to the hashing process, yet considered part of the mining process.

Would that be a bad idea? If so, why?
DannyHamilton
Legendary
*
Offline Offline

Activity: 2002



View Profile
May 05, 2017, 05:19:19 PM
 #8

Let's say the winner of the block reward is decided by a lottery of some kind that forms part of the protocol. And in order to claim the reward he needs to do all the other - existing - things, which are currently external to the hashing process, yet considered part of the mining process.

Would that be a bad idea? If so, why?

Who runs the lottery? How is the decision made about who the winner is?

This is what mining solves.  You don't need anyone to operate the lottery. The mining process IS the lottery.  The process of hashing results in an unpredictable value.  The miner repeats the process with a different input each time until he gets a winning ticket (a hash value that is lower than the the current target difficulty).

Additionally, by using the hashing work, it becomes impossible for an attacker to offer a different blockchain and claim that it is the real one.

Remember...  When a node comes online after being offline for a while, that node needs to get the blocks it missed from its peers.  If a node is offered two different blocks from two different peers, how does it know which is the "real" block?  Mining allows the node to figure that out. It just chooses the chain of blocks that has the largest proof-of-work (which typically means the longest valid chain). To overcome this, an attacker needs to have access to more hashpower than the entire rest of the world combined.

Do you have an idea on how to run a better decentralized lottery?

gatra
Hero Member
*****
Offline Offline

Activity: 581


CTO @ Flixxo, Riecoin dev


View Profile WWW
May 05, 2017, 07:40:51 PM
 #9

Let's say the winner of the block reward is decided by a lottery of some kind that forms part of the protocol. And in order to claim the reward he needs to do all the other - existing - things, which are currently external to the hashing process, yet considered part of the mining process.

Would that be a bad idea? If so, why?

Proof of stake attempts to do that.
It's a good idea because it avoids all the energy consumption required by brute force mining. It's a bad idea because all implementations up to date suck and are not as secure as Bitcoin's proof of work mining.
There's a lot of literature on that, search for proof of stake and "nothing at stake".

But it doesn't belong to "technical support" section, look in the altcoins section


           ▄▄▄██████████▄▄▄
       ▄▄██
██████████████████▄▄
     ▄█
█████▀████████████▀██████▄
   ▄█
█████████████████████████████▄
  ▄█
█████████▄█▀▀██████████████████▄
 ▄█
███████████▀██████▄▄█████▄███████▄
▄█
██████████▀██▄▄▄▄██▀▀▀▀▀███████████▄
█████████████▀▀██▀████████▀▀████████
█████████████▄█▀████████████████████
████████▀▀▀▀██▀▀▀▀██████████████████
▀█
██████▀▀▀▀██▀▀▀▀███████████████████▀
 ▀█
███████▄████▄▄███████████████████▀
  ▀█
███████████████████████████████▀
   ▀█
█████████████████████████████▀
     ▀█
█████▄████████████▄██████▀
       ▀▀██
██████████████████▀▀
           ▀▀▀██████████▀▀▀
riecoin       ▄▄█████████▄▄
    ▄██▀▀         ▀▀██▄
  ▄██▀              ▀██▄
 ▄██     ██▄▄          ██▄
▄██      █████▄▄        ██▄
██       ████████▄▄      ██
██       ███████████▄    ██
██       ██████████▀     ██
▀██      ███████▀       ██▀
 ▀██     ████▀         ██▀
  ▀██▄   █▀          ▄██▀
    ▀██▄▄         ▄▄██▀
       ▀▀█████████▀▀
.flixxo   
bitterbug
Member
**
Offline Offline

Activity: 71


View Profile
May 05, 2017, 09:29:05 PM
 #10

Quote
Do you have an idea on how to run a better decentralized lottery?

Quote
There's a lot of literature on that, search for proof of stake and "nothing at stake".

I will do some reading and get back to you.

Thanks
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!