LearnBitcoin

Bitcoin Dev Archive 2014

bitcoind as a library

6 messages, 27 to 30 Nov 2014. Started by Mem Wallet.

Mem Wallet, Wladimir J. van der Laan, Odinn Cyberguerrilla, Oliver Egginger, Btc Drak, Jeff Garzik

Permalink Original thread on gnusha.org

Mem Wallet permalink original

Two minor observations:

DecodeBase58Check is listed as inline, but isnt actually inlined in the header. This makes it both non-present in libbitcoin_common.a and unavailable to other code that would use libbitcoin_common.a as a library. (bug?)

In general, the hierarchy of tools is poor/weak. for example base58.h could be a fairly independent low level math/string library, but it includes caddress, which requires chainparams, and makes the whole dependency tree quite involved...

Is there an intention that the various internal libraries could/should be strengthened and heirachicalized such that they would be suitable for 3rd party development of bitcoin related services and tools, or is that not a goal, and some other project would have to fill such a role ?

Wladimir J. van der Laan in reply to Mem Wallet permalink original

On Thu, Nov 27, 2014 at 5:27 PM, Mem Wallet <memwallet.info@gmail•com> wrote:

Quoted text (4 lines)
> Is there an intention that the various internal libraries could/should
> be strengthened and heirachicalized such that they would be suitable for
> 3rd party development of bitcoin related services and tools, or is that not
> a goal, and some other project would have to fill such a role ?

The plan is to provide the consensus functionality as a library, the essential parts that make bitcoin bitcoin. 0.10 will have a basic transaction/script verifier available. In the version after that, I expect this will be extended to further utxo set management, but no API has been worked out for that yet. There are also plans to add a library for transaction signing.

However there is no goal to expose *everything* as a library. Certainly not wallet- or user interface related functionality. Specialized utility libraries would fill this purpose better. See for example https://github.com/bitcoin/libbase58 for base58 processing.

Wladimir

Odinn Cyberguerrilla in reply to Wladimir J. van der Laan permalink original

A recent comment on this (I think)...

https://github.com/bitcoin/bitcoin/issues/4564#issuecomment-49558760

Reflecting on an approach from a different but related project, as a result of an issue discussion in DW, stealth and coinjoin from that project were broken out as distinct repositories - see:

https://github.com/darkwallet/stealth.js and https://github.com/darkwallet/coinjoin.js

installable using npm

I'm probably missing something here, but it seems to me like breaking things out as distinct repositories might be a good approach. The question is what would be in a distinct repository or repositories? Currently if someone is looking at core, everything is seen here: https://github.com/bitcoin/bitcoin/

<slips away for holidays>

Wladimir:

Quoted text (27 lines)
> On Thu, Nov 27, 2014 at 5:27 PM, Mem Wallet
> <memwallet.info@gmail•com> wrote:
>
>> Is there an intention that the various internal libraries
>> could/should be strengthened and heirachicalized such that they
>> would be suitable for 3rd party development of bitcoin related
>> services and tools, or is that not a goal, and some other project
>> would have to fill such a role ?
>
> The plan is to provide the consensus functionality as a library,
> the essential parts that make bitcoin bitcoin. 0.10 will have a
> basic transaction/script verifier available. In the version after
> that, I expect this will be extended to further utxo set
> management, but no API has been worked out for that yet. There are
> also plans to add a library for transaction signing.
>
> However there is no goal to expose *everything* as a library.
> Certainly not wallet- or user interface related functionality.
> Specialized utility libraries would fill this purpose better. See
> for example https://github.com/bitcoin/libbase58 for base58
> processing.
>
> Wladimir
>
> ------------------------------------------------------------------------------
>
>

Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server

Quoted text (7 lines)
> from Actuate! Instantly Supercharge Your Business Reports and
> Dashboards with Interactivity, Sharing, Native Excel Exports, App
> Integration & more Get technology previously reserved for
> billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
>
>
Oliver Egginger in reply to Wladimir J. van der Laan permalink original

On Thu, Nov 27, 2014 at 6:54 PM, Wladimir <laanwj@gmail•com> wrote:

Quoted text (18 lines)
> On Thu, Nov 27, 2014 at 5:27 PM, Mem Wallet <memwallet.info@gmail•com> wrote:
>
>> Is there an intention that the various internal libraries could/should
>> be strengthened and heirachicalized such that they would be suitable for
>> 3rd party development of bitcoin related services and tools, or is that not
>> a goal, and some other project would have to fill such a role ?
>
> The plan is to provide the consensus functionality as a library, the
> essential parts that make bitcoin bitcoin.
> 0.10 will have a basic transaction/script verifier available.
> In the version after that, I expect this will be extended to further
> utxo set management, but no API has been worked out for that yet.
> There are also plans to add a library for transaction signing.
>
> However there is no goal to expose *everything* as a library.
> Certainly not wallet- or user interface related functionality.
> Specialized utility libraries would fill this purpose better.
> See for example https://github.com/bitcoin/libbase58 for base58 processing.

Sorry for the off-topic but while reading this I like to ask you for picocoin, see:

https://github.com/jgarzik/picocoin

For a research project I'm looking for a C library to operate some block chain analysis (parsing raw blocks and transactions). Has anyone of you experience with picocoin for that? Are there any relevant limitations?

- oliver
Btc Drak in reply to Oliver Egginger permalink original

On Fri, Nov 28, 2014 at 5:22 PM, Oliver Egginger <bitcoin@olivere•de> wrote:

Quoted text (7 lines)
> Sorry for the off-topic but while reading this I like to ask you for
> picocoin, see:
>
> https://github.com/jgarzik/picocoin
>
> For a research project I'm looking for a C library to operate some block
> chain analysis (parsing raw blocks and transactions).

This might be useful for you https://github.com/MatthewLM/cbitcoin

Jeff Garzik in reply to Btc Drak permalink original

Though I am highly biased :) Compared to cbitcoin, picocoin's library (libccoin) is valgrind-clean, can parse and index the blockchain, and supports all core and P2P data structures.

On Fri, Nov 28, 2014 at 12:49 PM, Btc Drak <btcdrak@gmail•com> wrote:

Quoted text (28 lines)
> On Fri, Nov 28, 2014 at 5:22 PM, Oliver Egginger <bitcoin@olivere•de>
> wrote:
>
>> Sorry for the off-topic but while reading this I like to ask you for
>> picocoin, see:
>>
>> https://github.com/jgarzik/picocoin
>>
>> For a research project I'm looking for a C library to operate some block
>> chain analysis (parsing raw blocks and transactions).
>
>
> This might be useful for you https://github.com/MatthewLM/cbitcoin
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists•sourceforge•net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>
>