summaryrefslogtreecommitdiff
path: root/75/a36f91ce352dcc352898b7c796b63bcc9ad308
blob: 680029a7e0a4d064c30d091be2347d8b3daebe49 (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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
Return-Path: <guido.dassori@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id D8E19D70
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 28 Aug 2018 17:51:23 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-oi0-f53.google.com (mail-oi0-f53.google.com
	[209.85.218.53])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 2D4277D6
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 28 Aug 2018 17:51:23 +0000 (UTC)
Received: by mail-oi0-f53.google.com with SMTP id c190-v6so4401259oig.6
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 28 Aug 2018 10:51:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:references:in-reply-to:from:date:message-id:subject:to; 
	bh=YmttWvgQ1wN9mnOh78CpbeN6OGJguVa878EXoKF5zU4=;
	b=a5LaMJVvOlg2t3ZiEneS3P/gdohT6FupwcWrAij9WCU3t3MwWVGqeK6zByd9UgrVGj
	c3KTYK+wK9qDe0QLnNK2hz5CblRqgrcnVfU62fdJ6NJ3fMWxdn6E58r6wKbEsOiHJeeo
	uYQW5K39C14Fg0dx6hOMmmTBoR+K5a3cOUPUwZ0mq678AWmLWINL3cQ0TPm0xzJsMv5w
	zqebz/8ecXpJO489FYNySFarZGs+fG059zX+Z0wLS3qdMqgdfnW/OlCG5ZKoC6X7djYf
	F0ZEh24wsDj0pczXAQJ2k/ExoxYe8d7XhYrJn01TJGKcidW+WiiJ0xC1Yf090FnlivUV
	iB8A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:references:in-reply-to:from:date
	:message-id:subject:to;
	bh=YmttWvgQ1wN9mnOh78CpbeN6OGJguVa878EXoKF5zU4=;
	b=pPgX5qSwVnXoNhMdcsQAPCik9U+FbzqZjL+G60XPky9o+z0XgHMYwvDGK1a1TXF+cq
	ZSOUQchVC4tmTQH3+IhLndq/YoAOq/wOPE/smwQg9oQMbQfuLrLbWIi+5ERfcPOPn18d
	RnfBD+q23yDeH1lfeP1CpmeI7SkAJkVad0xh1RXehnTm2zViQNWOnWAJ8EjODDVIUz8l
	22WCagXYoF26TAu89pZZSaGI4f7XhoV+s8G9my6TVfOy+XCZaV3gZQZ6ElWo5C0rcCB/
	idcRHfiSkCW7doLLk5mr9p1WFwQvLJQG4+17e8CesNEMu5qO0Xg0Ih+ZR8aKVuJJO7+p
	41mg==
X-Gm-Message-State: APzg51CFUsNpvru64cm9vNktLDwJgInVi1QmVXuJyT0WZaPeb2WoyWy1
	Xt0ff4sDIRet1vii0nQk9Iq9Mc7DkoWZi9X5xCasaM7e
X-Google-Smtp-Source: ANB0Vda8AdpMSG4C1qGb95Rg1idEZz4w+XO9AjWEtH9GuZ0EBPAQsXQBG0prhTHgxd/PDmCWchgIMJ3uXMmoS3y/J5A=
X-Received: by 2002:aca:100f:: with SMTP id
	15-v6mr1898326oiq.110.1535478682249; 
	Tue, 28 Aug 2018 10:51:22 -0700 (PDT)
MIME-Version: 1.0
References: <CA+9w0-77oP3rmW37R6ty4fF_LhaOtQaL52yQUKynXEmZhQ9MeA@mail.gmail.com>
	<CA+ASnrGo8HovRSEDSmFaUcC2mV7Cwjy8eXvaBzCFnuiAHVT5zA@mail.gmail.com>
	<CA+vKqYeW9oi5bk8ZtZEvSJnoVzYdZ2+YXoLCSoe=PPCBhzMuvg@mail.gmail.com>
	<CA+9w0-4NHoWZ8zbB06OvhWL5Y51jP3P10Hz3K=G85NCPfKj2Cw@mail.gmail.com>
In-Reply-To: <CA+9w0-4NHoWZ8zbB06OvhWL5Y51jP3P10Hz3K=G85NCPfKj2Cw@mail.gmail.com>
From: Guido Dassori <guido.dassori@gmail.com>
Date: Tue, 28 Aug 2018 19:51:11 +0200
Message-ID: <CAJ_Ap8iO6-ugd49JvyjiE6Ke0e9CfMwV50rOH1Bao2whufO-gA@mail.gmail.com>
To: bitcoin-dev@lists.linuxfoundation.org
Content-Type: multipart/alternative; boundary="0000000000006a6fb20574827d97"
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE,
	RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
X-Mailman-Approved-At: Tue, 28 Aug 2018 17:52:50 +0000
Subject: Re: [bitcoin-dev] Building a Bitcoin API and query system.
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2018 17:51:24 -0000

--0000000000006a6fb20574827d97
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Sumit,

There's no protocol api to fetch a single transaction over the p2p network.
You can query peers for mempool transactions, but once there are into a
block, no way to obtain them without fetching the entire block.

Also, you may want to take a look to spruned (
https://github.com/gdassori/spruned), it uses both the electrum & the p2p
network to do the same job you are researching on. It serves the data by
emulating some of the bitcoind rpc api, to be suitable by bitcoind backed
applications.

Guido

Il giorno mar 28 ago 2018 alle ore 19:41 Blockchain Group via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> ha scritto:

> Thanks, I'll check it out.
>
> On Tue, Aug 28, 2018, 9:17 PM Matias Alejo Garcia <ematiu@gmail.com>
> wrote:
>
>> Hi Sumit,
>>
>> Take a look at https://github.com/bitpay/bitcore/tree/v8.0.0, it is a
>> bitcoin indexing API server, with several modules, like a block explorer=
, a
>> wallet module, etc. It is built using Node.js.
>>
>> mat=C3=ADas
>>
>> On Tue, Aug 28, 2018 at 12:43 PM Joseph Gleason =E2=91=88 via bitcoin-de=
v <
>> bitcoin-dev@lists.linuxfoundation.org> wrote:
>>
>>> For what it is worth, electrum has a lot or possibly all of what you ar=
e
>>> talking about since the electrum servers are designed to quickly answer=
 the
>>> queries of light clients.  So right now, you could sync up an electrum
>>> server or use an existing public one and send queries to it with json-r=
pc.
>>>
>>>
>>> https://github.com/kyuupichan/electrumx/blob/master/docs/protocol-metho=
ds.rst
>>>
>>>
>>> On Tue, Aug 28, 2018 at 5:36 AM Blockchain Group via bitcoin-dev <
>>> bitcoin-dev@lists.linuxfoundation.org> wrote:
>>>
>>>> Hello everyone,
>>>>
>>>> I am C++ & Node.js developer. I want to propose making a new Bitcoin
>>>> API that supports fast quering of Bitcoin blocks and transactions with=
out
>>>> the need for syncing with all previous nodes.
>>>>
>>>> In a typical case where I want to build a full fleged Bitcoin explorer
>>>> cum wallet system on my end with external APIs, I need to sync my node=
 and
>>>> then query for the information I need to show separately. I am proposi=
ng a
>>>> unified method of finding/quering the blockchain data with a standardi=
zed
>>>> template containing minimal information about the actual mined block o=
r
>>>> transaction yet satify the need of what I want to query.
>>>>
>>>> I am working on making a template and a support mechanism on Node.js. =
I
>>>> want to propose it as an improvement (BIP). It will be a great help to
>>>> future web developers who want to make something similar.
>>>>
>>>> Thanks
>>>> Sumit Lahiri.
>>>> _______________________________________________
>>>> bitcoin-dev mailing list
>>>> bitcoin-dev@lists.linuxfoundation.org
>>>> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>>>>
>>> _______________________________________________
>>> bitcoin-dev mailing list
>>> bitcoin-dev@lists.linuxfoundation.org
>>> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>>>
>>
>>
>> --
>> Mat=C3=ADas Alejo Garcia
>> @ematiu
>> Roads? Where we're going, we don't need roads!
>>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>

--0000000000006a6fb20574827d97
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Sumit,=C2=A0</div><div><br></div><div>There&#39;s =
no protocol api to fetch a single transaction over the p2p network.=C2=A0</=
div><div>You can query peers for mempool transactions, but once there are i=
nto a block, no way to obtain them without fetching the entire block.</div>=
<div><br></div><div>Also, you may want to take a look to spruned (<a href=
=3D"https://github.com/gdassori/spruned">https://github.com/gdassori/sprune=
d</a>), it uses both the electrum &amp; the p2p network to do the same job =
you are researching on. It serves the data by emulating some of the bitcoin=
d rpc api, to be suitable by bitcoind backed applications.</div><div><br></=
div><div>Guido</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">I=
l giorno mar 28 ago 2018 alle ore 19:41 Blockchain Group via bitcoin-dev &l=
t;<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@list=
s.linuxfoundation.org</a>&gt; ha scritto:<br></div><blockquote class=3D"gma=
il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef=
t:1ex"><div dir=3D"auto">Thanks, I&#39;ll check it out.=C2=A0</div><br><div=
 class=3D"gmail_quote"><div dir=3D"ltr">On Tue, Aug 28, 2018, 9:17 PM Matia=
s Alejo Garcia &lt;<a href=3D"mailto:ematiu@gmail.com" target=3D"_blank">em=
atiu@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div =
dir=3D"ltr">Hi Sumit,<div><br></div><div>Take a look at=C2=A0<a href=3D"htt=
ps://github.com/bitpay/bitcore/tree/v8.0.0" rel=3D"noreferrer" target=3D"_b=
lank">https://github.com/bitpay/bitcore/tree/v8.0.0</a>, it is a bitcoin in=
dexing API server, with several modules, like a block explorer, a wallet mo=
dule, etc. It is built using Node.js.</div><div><br></div><div>mat=C3=ADas<=
/div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Tue, Aug 28, =
2018 at 12:43 PM Joseph Gleason =E2=91=88 via bitcoin-dev &lt;<a href=3D"ma=
ilto:bitcoin-dev@lists.linuxfoundation.org" rel=3D"noreferrer" target=3D"_b=
lank">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:<br></div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex"><div dir=3D"ltr">For what it is worth, electrum has=
 a lot or possibly all of what you are talking about since the electrum ser=
vers are designed to quickly answer the queries of light clients.=C2=A0 So =
right now, you could sync up an electrum server or use an existing public o=
ne and send queries to it with json-rpc.<div><br></div><div><a href=3D"http=
s://github.com/kyuupichan/electrumx/blob/master/docs/protocol-methods.rst" =
rel=3D"noreferrer" target=3D"_blank">https://github.com/kyuupichan/electrum=
x/blob/master/docs/protocol-methods.rst</a><br></div><div><br></div></div><=
br><div class=3D"gmail_quote"><div dir=3D"ltr">On Tue, Aug 28, 2018 at 5:36=
 AM Blockchain Group via bitcoin-dev &lt;<a href=3D"mailto:bitcoin-dev@list=
s.linuxfoundation.org" rel=3D"noreferrer" target=3D"_blank">bitcoin-dev@lis=
ts.linuxfoundation.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_q=
uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e=
x"><div dir=3D"auto">Hello everyone,<div dir=3D"auto"><br></div><div dir=3D=
"auto">I am C++ &amp; Node.js developer. I want to propose making a new Bit=
coin API that supports fast quering of Bitcoin blocks and transactions with=
out the need for syncing with all previous nodes.=C2=A0</div><div dir=3D"au=
to"><br></div><div dir=3D"auto">In a typical case where I want to build a f=
ull fleged Bitcoin explorer cum wallet system on my end with external APIs,=
 I need to sync my node and then query for the information I need to show s=
eparately. I am proposing a unified method of finding/quering the blockchai=
n data with a standardized template containing minimal information about th=
e actual mined block or transaction yet satify the need of what I want to q=
uery.=C2=A0</div><div dir=3D"auto"><br></div><div dir=3D"auto">I am working=
 on making a template and a support mechanism on Node.js. I want to propose=
 it as an improvement (BIP). It will be a great help to future web develope=
rs who want to make something similar.=C2=A0</div><div dir=3D"auto"><br></d=
iv><div dir=3D"auto">Thanks=C2=A0</div><div dir=3D"auto">Sumit Lahiri.=C2=
=A0</div></div>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" rel=3D"noreferrer"=
 target=3D"_blank">bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer noreferrer" target=3D"_blank">https://lists.linuxfoundati=
on.org/mailman/listinfo/bitcoin-dev</a><br>
</blockquote></div>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" rel=3D"noreferrer"=
 target=3D"_blank">bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer noreferrer" target=3D"_blank">https://lists.linuxfoundati=
on.org/mailman/listinfo/bitcoin-dev</a><br>
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
 class=3D"m_-5351541024847585838m_5598967342637625863gmail_signature" data-=
smartmail=3D"gmail_signature"><div dir=3D"ltr">Mat=C3=ADas Alejo Garcia<br>=
@ematiu<br>Roads? Where we&#39;re going, we don&#39;t need roads!</div></di=
v>
</blockquote></div>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank">=
bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.org/mail=
man/listinfo/bitcoin-dev</a><br>
</blockquote></div>

--0000000000006a6fb20574827d97--