public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: "Luke-Jr" <luke@dashjr•org>
To: bitcoin-development@lists•sourceforge.net
Subject: Re: [Bitcoin-development] getmemorypool BIP process
Date: Sat, 3 Mar 2012 20:04:29 -0500	[thread overview]
Message-ID: <201203032004.31048.luke@dashjr.org> (raw)
In-Reply-To: <4F52AE86.2060102@bitminter.com>

On Saturday, March 03, 2012 6:51:34 PM Geir Harald Hansen wrote:
> Long polling as currently implemented in pools has a race condition.
> Does the miner reconnect first or does another block change happen
> first? "Double" block changes are common with merged mining and I'm
> doing all sorts of tricks in my pool backend to reduce this problem.

How would you suggest addressing this? I presume if a share solves blocks on 
multiple chains, you just longpoll once when that's successful?

> How about another entry "longpollid" in long poll responses. The last
> seen longpollid should be included by the client in future long poll
> requests. This enables the server to see if the client has missed any
> block changes. The ID could perhaps be submitted in an HTTP header
> (X-LongPollID?) if we wish to keep the JSON-RPC params empty, or params
> could hold an object with a key "longpollid". Could be a string or
> number, like "workid".

Hmm, the problem is that adding any parameters to getmemorypool itself breaks 
compatibility with bitcoind 0.5, and using HTTP headers makes it HTTP-specific 
again. Any ideas?

> Another useful value in the getmemorypool response would be "height", so
> the miner can include the correct height in the coinbase. I would like
> that in bitcoind as well. One JSON-RPC call instead of two, and no race
> condition between getmemorypool and getblocknumber.

Good catch. Should this be required (since it might be necessary for future 
Bitcoin blocks), or just "should" for compatibility?

> It should be explained how target vs. fulltarget works.

What is unclear about this?

> Perhaps some things should be optional for a client to implement?

Doing this safely needs some way for clients to communicate capabilities to 
the server, which has the problem of passing parameters to getmemorypool.

> I think "noncerange" is of limited use and there's a good chance of getting
> the endianness wrong.

There is no mining hardware to date that exhausts even half the nonce space, 
so I'd really prefer to see this as a required feature on the miner side. On 
the other hand, it's merely an extension for getwork, so I can see the problem 
so long as we're using getwork proxies.

Luke



  reply	other threads:[~2012-03-04  1:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28 22:06 Luke-Jr
2012-03-03 14:23 ` Stefan Thomas
2012-03-03 15:00   ` Luke-Jr
2012-03-03 17:08     ` Michael Grønager
2012-03-04  0:18       ` Stefan Thomas
2012-03-03 23:51 ` Geir Harald Hansen
2012-03-04  1:04   ` Luke-Jr [this message]
2012-03-04 17:49     ` Geir Harald Hansen
2012-03-03 15:44 Luke-Jr
2012-03-04  0:18 ` Stefan Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201203032004.31048.luke@dashjr.org \
    --to=luke@dashjr$(echo .)org \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox