Post
Topic
Board Development & Technical Discussion
Re: Block intervals and decentralization
by
XertroV
on 09/06/2014, 23:09:04 UTC
Thanks for the responses. I still don't understand how people cannot cheat p2p pool or getblocktemplate . One can't just simply participate to get shared profit but once finds the block submits it seperately by itself to get the full block.

Also what is GHOST? Only thing I can find is a movie

getblocktemplate just provides detailed information which can be used to create a block. It hides less relevant details (like transactions) but allows the miner to alter other things that matter, like the coinbase sigscript, the nonce, etc. This doesn't stop anyone changing parts of the block, but getblocktemplate doesn't give them all the information they'd need, and then they'd be solo mining anyway. When you submit shares to a pool, you're actually submitting the information used to create a valid block of a lower target. By validating where the coinbase spends to, the pool can check if you're mining for yourself or them. If you're mining for yourself they don't credit you with any shares, but if you mine according to their rules you are attributed shares. Occasionally someone submits a solution that also happens to be a valid block on mainnet, and then it is distributed.

P2Pool works in a similar manner. Instead of providing your solution to the centralised pool, you provide your solution to the whole P2Pool network. The P2Pool network is mined against a much smaller target than the mainnet, like centralised pools, and each potential block is valid on the Bitcoin network and P2Pool network, provided the PoW validates. You distribute your potential solutions to the rest of the network and show you're rewarding them according to the rules agreed upon. They then include you in their calculations, and when you receive their shares, you include them in your calculations. In this way, anyone who attempts to cheat is not able to convince others to reward them for their efforts, since their blocks don't validate against the pool's rule-set.

It's a little more complex than that in reality, since the blocks produced for P2Pool also form a share-chain and they have a low target time (seconds). This chain is used to calculate rewards, and a valid P2Pool block is added to the share chain (though could potentially be orphaned). Each of those blocks would be a valid Bitcoin block if they happened to validate against Bitcoin-mainnet's target (but they don't). There's more information about that on the wiki.

GHOST stands for Greedy Heaviest-Observed Sub-Tree, which basically says the chain with the most PoW behind it. It's a theoretical modification to blockchain design that would protect against some attacks and also allow us to produce blocks much faster as all valid PoW can be incorporated into the chain. The paper can be found here: https://eprint.iacr.org/2013/881.pdf