Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id D8E19D70 for ; 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 ; Tue, 28 Aug 2018 17:51:23 +0000 (UTC) Received: by mail-oi0-f53.google.com with SMTP id c190-v6so4401259oig.6 for ; 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: In-Reply-To: From: Guido Dassori Date: Tue, 28 Aug 2018 19:51:11 +0200 Message-ID: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 > 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
Hi Sumit,=C2=A0

There's = no protocol api to fetch a single transaction over the p2p network.=C2=A0
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.
=

Also, you may want to take a look to spruned (https://github.com/gdassori/sprune= d), 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 bitcoin= d rpc api, to be suitable by bitcoind backed applications.

Guido

I= l giorno mar 28 ago 2018 alle ore 19:41 Blockchain Group via bitcoin-dev &l= t;bitcoin-dev@list= s.linuxfoundation.org> ha scritto:
Thanks, I'll check it out.=C2=A0

On Tue, Aug 28, 2018, 9:17 PM Matia= s Alejo Garcia <em= atiu@gmail.com> wrote:
Hi Sumit,

Take a look at=C2=A0https://github.com/bitpay/bitcore/tree/v8.0.0, 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.

mat=C3=ADas<= /div>

On Tue, Aug 28, = 2018 at 12:43 PM Joseph Gleason =E2=91=88 via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wrote:
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.


<= br>
On Tue, Aug 28, 2018 at 5:36= AM Blockchain Group via bitcoin-dev <bitcoin-dev@lis= ts.linuxfoundation.org> wrote:
Hello everyone,

I am C++ & 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

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

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

Thanks=C2=A0
Sumit Lahiri.=C2= =A0
_______________________________________________
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundati= on.org/mailman/listinfo/bitcoin-dev
_______________________________________________
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundati= on.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/mail= man/listinfo/bitcoin-dev
--0000000000006a6fb20574827d97--