summaryrefslogtreecommitdiff
path: root/78/18e9a332ce85ed5ba27852adb9abdede6d8415
blob: e5882a75572b9c854f616a6367061159d1f13f4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191]
	helo=mx.sourceforge.net)
	by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <luke@dashjr.org>) id 1S3zsS-0008GA-Kx
	for bitcoin-development@lists.sourceforge.net;
	Sun, 04 Mar 2012 01:04:44 +0000
X-ACL-Warn: 
Received: from zinan.dashjr.org ([173.242.112.54])
	by sog-mx-1.v43.ch3.sourceforge.com with esmtp (Exim 4.76)
	id 1S3zsR-0000dD-OS for bitcoin-development@lists.sourceforge.net;
	Sun, 04 Mar 2012 01:04:44 +0000
Received: from ishibashi.localnet (fl-184-4-164-217.dhcp.embarqhsd.net
	[184.4.164.217]) (Authenticated sender: luke-jr)
	by zinan.dashjr.org (Postfix) with ESMTPSA id 1AC31560548;
	Sun,  4 Mar 2012 01:04:38 +0000 (UTC)
From: "Luke-Jr" <luke@dashjr.org>
To: bitcoin-development@lists.sourceforge.net
Date: Sat, 3 Mar 2012 20:04:29 -0500
User-Agent: KMail/1.13.7 (Linux/3.2.2-gentoo; KDE/4.7.4; x86_64; ; )
References: <201202281706.22650.luke@dashjr.org>
	<4F52AE86.2060102@bitminter.com>
In-Reply-To: <4F52AE86.2060102@bitminter.com>
X-PGP-Key-Fingerprint: CE5A D56A 36CC 69FA E7D2 3558 665F C11D D53E 9583
X-PGP-Key-ID: 665FC11DD53E9583
X-PGP-Keyserver: x-hkp://subkeys.pgp.net
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201203032004.31048.luke@dashjr.org>
X-Spam-Score: -0.0 (/)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
	-0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
	domain
X-Headers-End: 1S3zsR-0000dD-OS
Subject: Re: [Bitcoin-development] getmemorypool BIP process
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Sun, 04 Mar 2012 01:04:44 -0000

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