Post
Topic
Board Mining software (miners)
Re: Fully P2P protocol for mining with tunable variance.
by
jojkaart
on 03/10/2012, 19:25:30 UTC
The payout algorithm in this case would be an emergent property arising from the tit for tat principle being used between individual miners. There is tracking of shares, but that's not used for the purpose of calculating the payment amount. Instead, it's used for calculating the expected value you received from the other miner's share. With this algorithm, there's no need to remember received shares, the miner can just toss them after parsing them and noting the expected value received.

A pool that pays with the PPS payment algorithm calculates the value of a share at difficulty of 1 as follows:
<Block Reward> / <difficulty> = <value of one share>
Currently: 50 BTC / 3054627 = 0.00001637 BTC

This is the expected value for a difficulty 1 share. A more generally useful form that calculates the expected value a share has for you looks like this:
<Payment in BTC> / <difficulty> * <share difficulty> = <expected value>

Here Payment in BTC stands for the amount of BTC you'd have been paid had the share been a valid block.

A simplified version of the tit for tat algorithm goes as follows:
  • Receive a share from another miner
  • Calculate the expected value for you from the share.
  • Include the other miner's address in the block you're trying to create with equivalent expected value.
  • Once you find a share, send the share to the other miner and remove their address from the block you're creating.

The result of two miners both using this strategy would be something like:
1. Miner A tries to mine 1 BTC for miner B and sends miner B a share proving this.
2. Miner B tries to mine 1 BTC for miner A and sends miner A a share proving this.
3. Jump to 1.

In practise, the algorithm would need to be more complex since modifying the coinbase transaction too often hurts your hashing speed. However, in this simple form, you can easily understand the basic principles behind it.

One way to usefully visualize this is to compare this with a regular pool. In a regular pool, You have the pool in the middle linked to every miner where the pool receives all the shares and calculates the corresponding balances with some method. With this p2p model I described, all miners would be linked to each other and send shares to each other proving to each other (as opposed to just the pool) that they're playing fair.