Bitcoin Forum

Bitcoin => Mining => Topic started by: grndzero on April 28, 2011, 01:36:30 AM



Title: Long Polling Questions
Post by: grndzero on April 28, 2011, 01:36:30 AM
It looks like every time a new block is generated on www.bitcoinmonitor.com Long Polling kicks in on mining clients and the pool start working on the most current block. Is this correct?

That seems to be extremely inefficient constantly dumping work every time a new block is created. If a new block is generated every 10 minutes then each block only gets 10 minutes of work (abeit from each long polling pool) before it's dumped and moves onto the next block. I've seen 3 new block created within 2-3 minutes of each other, and as many as 12 in an hour.

Wouldn't it be more efficient to skip x number of new blocks, relative to pool speed, while working on a block until the pool solves it, or detect that someone else has claimed/solved it?

I haven't been able to tell from looking at blockexplorer.com how to find out if a block has been claimed/solved.



Title: Re: Long Polling Questions
Post by: xenon481 on April 28, 2011, 02:24:32 AM
The block you are working on contains a link to the previous block in the block chain.

If somebody else finds a block and you don't drop the block you are working on, then the block you are working on is invalid because it is pointing to the wrong previous block. Pointing to the wrong previous block means that you might (likely) have duplicated transactions compared to the previous one that somebody else found.


Title: Re: Long Polling Questions
Post by: grndzero on April 28, 2011, 02:40:39 AM
The block you are working on contains a link to the previous block in the block chain.

If somebody else finds a block and you don't drop the block you are working on, then the block you are working on is invalid because it is pointing to the wrong previous block. Pointing to the wrong previous block means that you might (likely) have duplicated transactions compared to the previous one that somebody else found.

If all the long polling pools are leapfrogging the block chain, how can we tell that all the blocks are being solved?
Do the non long polling pools and solo miners come behind that and find the blocks that aren't solved and work on them?


Title: Re: Long Polling Questions
Post by: xenon481 on April 28, 2011, 03:38:04 AM
The block you are working on contains a link to the previous block in the block chain.

If somebody else finds a block and you don't drop the block you are working on, then the block you are working on is invalid because it is pointing to the wrong previous block. Pointing to the wrong previous block means that you might (likely) have duplicated transactions compared to the previous one that somebody else found.

If all the long polling pools are leapfrogging the block chain, how can we tell that all the blocks are being solved?
Do the non long polling pools and solo miners come behind that and find the blocks that aren't solved and work on them?

What?

Where did this leapfrogging come from? There aren't just like a set of blocks that need to be solved and you can solve them in any order. You have to CREATE a valid block. A valid block points to the most recently created (previous) block.

Somebody created block#1, and then somebody created block#2, #3 and so on.

Now, everybody is working on creating a new block (that will eventually be called block#4) that points to block#3 as the previous block.

If somebody other than you created block#4, the new block that you are trying to create needs to point to block#4 as the previous, not block#3, otherwise it will be invalid.


Title: Re: Long Polling Questions
Post by: grndzero on April 28, 2011, 03:56:09 AM

What?

Where did this leapfrogging come from? There aren't just like a set of blocks that need to be solved and you can solve them in any order. You have to CREATE a valid block. A valid block points to the most recently created (previous) block.

Somebody created block#1, and then somebody created block#2, #3 and so on.

Now, everybody is working on creating a new block (that will eventually be called block#4) that points to block#3 as the previous block.

If somebody other than you created block#4, the new block that you are trying to create needs to point to block#4 as the previous, not block#3, otherwise it will be invalid.

Not leapfrogging for creating blocks, for verifying them and getting the coins. If 3 blocks are made within 2 minutes, which I have seen happen more than a few times, LP will be sent from the server pool to the clients and they will start working on the last one. My question is what happens to the previous 2. When do they get worked on if they get worked on and how can I tell whether they ever get claimed.


Title: Re: Long Polling Questions
Post by: xenon481 on April 28, 2011, 04:07:11 AM

What?

Where did this leapfrogging come from? There aren't just like a set of blocks that need to be solved and you can solve them in any order. You have to CREATE a valid block. A valid block points to the most recently created (previous) block.

Somebody created block#1, and then somebody created block#2, #3 and so on.

Now, everybody is working on creating a new block (that will eventually be called block#4) that points to block#3 as the previous block.

If somebody other than you created block#4, the new block that you are trying to create needs to point to block#4 as the previous, not block#3, otherwise it will be invalid.

Not leapfrogging for creating blocks, for verifying them and getting the coins. If 3 blocks are made within 2 minutes, which I have seen happen more than a few times, LP will be sent from the server pool to the clients and they will start working on the last one. My question is what happens to the previous 2. When do they get worked on if they get worked on and how can I tell whether they ever get claimed.

What???

Somebody creates block#1, somebody creates block#2, somebody creates block#3. What happens to the previous 2 blocks is that people created them. There aren't just blocks sitting out there that need to be worked; people create blocks and add them to the end of the chain.


Title: Re: Long Polling Questions
Post by: grndzero on April 28, 2011, 04:17:51 AM

What???

Somebody creates block#1, somebody creates block#2, somebody creates block#3. What happens to the previous 2 blocks is that people created them. There aren't just blocks sitting out there that need to be worked; people create blocks and add them to the end of the chain.

OK ... I think I'm missing the logic of creating a new block and long polling.

So long polling detects when a new blocks is made and start working on making the next block?


Title: Re: Long Polling Questions
Post by: xenon481 on April 28, 2011, 04:25:19 AM

What???

Somebody creates block#1, somebody creates block#2, somebody creates block#3. What happens to the previous 2 blocks is that people created them. There aren't just blocks sitting out there that need to be worked; people create blocks and add them to the end of the chain.

OK ... I think I'm missing the logic of creating a new block and long polling.

So long polling detects when a new blocks is made and start working on making the next block?

Before Long Polling, your miners didn't know when somebody else created Block#3, they just kept going on their merry way until it was time for them to ask the pool for more work. This causes a higher percentage of stale results and thus wasted work.

With Long Polling, the pool actively notifies the miners that somebody else created Block#3 and so start working to create Block#4 right away.


Title: Re: Long Polling Questions
Post by: grndzero on April 28, 2011, 04:35:29 AM

Before Long Polling, your miners didn't know when somebody else created Block#3, they just kept going on their merry way until it was time for them to ask the pool for more work. This causes a higher percentage of stale results and thus wasted work.

With Long Polling, the pool actively notifies the miners that somebody else created Block#3 and so start working to create Block#4 right away.

Ok, that's what I was missing.