Bitcoin Forum

Bitcoin => Mining => Topic started by: Stampbit on April 12, 2013, 05:25:55 PM



Title: How do miners communicate through the network?
Post by: Stampbit on April 12, 2013, 05:25:55 PM
I'd like to know more about how miners communicate, for instance is it like bittorrent where nodes in the swarm connect to a small number of other nodes, or are miners connected to every other miner? What sort of information do they exchange? What sort of information can they collect on eachother or broadcast about themselves?


Title: Re: How do miners communicate through the network?
Post by: eleight on April 12, 2013, 05:28:10 PM
check this out https://www.btcguild.com/new_protocol.php


Title: Re: How do miners communicate through the network?
Post by: Stampbit on April 12, 2013, 05:30:53 PM
check this out https://www.btcguild.com/new_protocol.php

Is that to solve the blocksize bandwidth problem? I wanted to know how the current system works, this appears to be something else.


Title: Re: How do miners communicate through the network?
Post by: Moonchopper on April 12, 2013, 06:57:05 PM
Stratum is currently in use and I believe it's being used more and more. I believe this means that miners operate/communicate several different ways, not just 'one' way.


Title: Re: How do miners communicate through the network?
Post by: Stampbit on April 12, 2013, 07:08:51 PM
So its really up to the developers of the bitcoin clients how and what information gets passed. And there are different system where clients connect to all other clients and other where clients to connect to only some other clients, and some like stratum where clients connect to a server?


Title: Re: How do miners communicate through the network?
Post by: Moonchopper on April 12, 2013, 07:35:29 PM
That seems like a correct statement - but I'm fairly new to all of this myself, so it may not be exactly as you describe.


Title: Re: How do miners communicate through the network?
Post by: A Meteorite on April 12, 2013, 10:44:45 PM
Except for p2pool, pool mining is centralized - meaning they connect to a pool server (which usually gets work from bitcoind) and get work from that server. They find shares and submit it to the pool server.

In the case of p2pool, there's software you run in addition to bitcoind. p2pool gets work from bitcoind, messes with the coinbase, and then gives work to miners. Miners submit shares and if it's above the p2pool difficulty, it goes into the sharechain. The sharechain is very much like the blockchain, except average time between shares is 10 seconds. This is used to determine how much each miner should get paid out. It also makes pool mining decentralized.

As for as protocols between mining software and the servers (whether centralized or a p2pool daemon), there are a few. There is getblocktemplate, Stratum, getwork, BlkPrep, and UBBP. GBT and Stratum are becoming the most popular, while getwork is being phased out (lots of bandwidth, less flexible, and very hard on bitcoind). BlkPrep and UBBP are niche protocols - I'm not sure if any pools still use them.

Except for p2pool, miners do not communicate peer to peer like you thought. Even with p2pool, it's only the p2pool software that is communicating with other p2pool nodes (like bitcoind does), the mining software itself is practically oblivious.