summaryrefslogtreecommitdiff
path: root/b7/333ccf6d5a0f5cf9bc82d904373ac5cea8ede9
blob: 254311d2c3191e036acc64c3d6ebf96292c328f8 (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
100
101
102
103
104
105
106
107
108
109
110
Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193]
	helo=mx.sourceforge.net)
	by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <jgarzik@bitpay.com>) id 1UiPN5-0003eP-PD
	for bitcoin-development@lists.sourceforge.net;
	Fri, 31 May 2013 13:27:55 +0000
Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of bitpay.com
	designates 209.85.128.41 as permitted sender)
	client-ip=209.85.128.41; envelope-from=jgarzik@bitpay.com;
	helo=mail-qe0-f41.google.com; 
Received: from mail-qe0-f41.google.com ([209.85.128.41])
	by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1UiPN4-000750-Um
	for bitcoin-development@lists.sourceforge.net;
	Fri, 31 May 2013 13:27:55 +0000
Received: by mail-qe0-f41.google.com with SMTP id b4so900480qen.14
	for <bitcoin-development@lists.sourceforge.net>;
	Fri, 31 May 2013 06:27:49 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=google.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding:x-gm-message-state;
	bh=tRqNwtxbGjQP0oggIkQ1yhhJnjgBeTuSULSzdpvBsd8=;
	b=F4ZSgkOBaqhelF9XHHoIphV6uFV48lg3QbWDIWQmSM4Px7pVCnS+WOGqTsj6yU4RsT
	lhbXrscyrQH+4ofxP7LZSA3C1OIIBK2BLLv2sX3cmdetMB4ZiE4mJpKv1vXpa0ACrfhD
	u7/FAH3ICEq8aQawL34bjnPZdT2Bz0e/VgAZBxoQqhi7SzP64kfs2+laOWQDQb39Ss3X
	PLodDbtfQj3HcTjGZs0g8zr6NC87QKoXyESEyKHjF0Xvau7GroyBO+cGWlpEin7cMY8Z
	PH6gNJis2PHhyHF4COFdMmsuTHnAovDGkbWxXRjNnvqRzMt3HYErpYinEFDaqGno7dyn
	RsIg==
MIME-Version: 1.0
X-Received: by 10.49.81.147 with SMTP id a19mr6203642qey.47.1370005554774;
	Fri, 31 May 2013 06:05:54 -0700 (PDT)
Received: by 10.49.2.102 with HTTP; Fri, 31 May 2013 06:05:54 -0700 (PDT)
In-Reply-To: <CAH2=CKzW41TYbX6c1F8oknA_LttOaA8vmDPmojuowXgEADY61g@mail.gmail.com>
References: <CAH2=CKzW41TYbX6c1F8oknA_LttOaA8vmDPmojuowXgEADY61g@mail.gmail.com>
Date: Fri, 31 May 2013 09:05:54 -0400
Message-ID: <CAJHLa0PQD46KLhGpB0W1F0JXkwD+ChC4EPb9jw1ULJU4zABdJQ@mail.gmail.com>
From: Jeff Garzik <jgarzik@bitpay.com>
To: =?ISO-8859-1?Q?Rune_Kj=E6r_Svendsen?= <runesvend@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Gm-Message-State: ALoCoQmFQjKaWf8agE3HaLmlYPrUMeyxAiyyq8GkGSUs3PZDHkb2hrXj+rd+0v0L1gXywPgVwQTh
X-Spam-Score: -1.6 (-)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
	-1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for
	sender-domain
	-0.0 SPF_PASS               SPF: sender matches SPF record
	-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	author's domain
	0.1 DKIM_SIGNED            Message has a DKIM or DK signature,
	not necessarily valid
	-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Headers-End: 1UiPN4-000750-Um
Cc: bitcoin-development@lists.sourceforge.net
Subject: Re: [Bitcoin-development] Implementing batch processing for
	-blocknotify
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: Fri, 31 May 2013 13:27:55 -0000

On Fri, May 31, 2013 at 7:56 AM, Rune Kj=E6r Svendsen <runesvend@gmail.com>=
 wrote:
> Hello dear list
>
> I have an application that wants to keep up with new blocks as they come =
in.
> For that I can use the -blocknotify option with bitcoind, which will exec=
ute
> my application for each new block.
>
> The problem is that my app isn't necessarily quick enough to finish its w=
ork
> before a new block comes in and the app is executed again. This means the
> that bitcoind might keep executing my application even though the previou=
s
> instance hasn't finished, and that's fairly inefficient resource-wise, as
> many instances of the application will be running simultaneously.
>
> I've discussed this with wumpus on bitcoin-dev, and we figured out a
> solution that might be better. It could replace -blocknotify or we could =
put
> it in a new function called -batchblocknotify

Similar to other suggestions in this thread,

If your -blocknotify execution is too slow, then create a solution
that simply queues work.  There is no need to add this code to
bitcoind itself.

Another solution is modifying pynode to directly listen to a trusted
node (bitcoind), and monitor blocks as they arrive and are announced.
That does not fix the problem of slow block processing on your side,
but is another way to implement -blocknotify-like behavior.

--=20
Jeff Garzik
Senior Software Engineer and open source evangelist
BitPay, Inc.      https://bitpay.com/