libbitcoin / libbitcoin-explorer

Bitcoin Command Line Tool
Other
598 stars 176 forks source link

Question: Which library to install to connect to a node? #739

Closed moznc closed 1 year ago

moznc commented 1 year ago

Questions: Which library to install to connect to a node

Hi

I have several questions about libbitcoin.

I want to learn about libbitcoin, many websites mention about the old repo where there's only one libbitcoin library (e.g. http://aaronjaramillo.org/getting-started-with-libbitcoin), which is libbitcoin, but now there are seven (?) repos, and I'm still not quite sure which is which.

  1. The old repo seemed to be straight forward: clone, checkout, autogen, configure, make, and make install (add prefix to install it somewhere else). But now there's a warning, for ex. for libbitcoin-system: "Autotools (advanced users)"? What's that supposed to mean?

  2. The boost version for libbitcoin-system is 1.72, while explorer is 1.73. Why different?

  3. Building with Boost 1.72/1.73 gives an error which will stop the build, and the subsequent build attempt will redo the process from the beginning because there's a line in the script that deletes the build-* directory. Pain. PAIN. Did you not experience this error when creating the install script?

  4. In all repos, there's this sentence: "It is recommended to use a prefix directory when building these components." Why? Why is it not recommended to install the libs in the default/system dir (/usr/..)?

  5. In libbitcoin-explorer, there's this sentence: "Boost (Not Recommended)". Then few paragraphs down it says "Building ICU, Boost and/or ZMQ. Using these builds ensures compiler and configuration compatibility across all of the build components" Which build method that's recommended?

  6. I've installed lib-system previously. Now I just learned that I need to install lib-explroer. Since lib-explorer depends on lib-system, does it mean that previous lib-system lib will be overwritten by lib-system that's built by lib-explorer?

  7. Each libbitcoin- repo has its own install.sh. It'll create it's own build-libbitcoin- directory. It'll download and build ALL dependencies in that directory. Is there an install script where it includes ALL of libbitcoin libraries, the one where I can choose which libraries I want to build/install instead of downloading all seven repos with each has it's own build-* directory to download and build all dependencies separately?

  8. Is there a documentation about connecting to a (local/public) node? I've read https://libbitcoin.dyne.org/doc/index.html, but which command that's similar to '$ bitcoin-cli getinfoblock xxx'? Is there a documentation that maps between Bitcoin Core CLI command with libbitcoin method/class?

Thank you.

pmienk commented 1 year ago

@moznc, an arbitrary bitcoin node is communicated with via the peer-to-peer protocol. As such, the libbitcoin-node project provides bn an implementation of said node, the libbitcoin-server project provides bs an extended bitcoin node also supporting a ZeroMQ query protocol, and libbitcoin-explorer provides bx a command line interface which can facilitate communication with a libbitcoin-protocol implementing ZeroMQ query protocol or some limited Bitcoin protocol node messaging. Documentation for bx can be found in the wiki.

The above should address the initial question provided. The follow on 8 parts do not appear to be primarily relevant to the issue and may be complicated by user error that would be difficult to tease out. I would be happy to address them over slack.

evoskuil commented 1 year ago

image

evoskuil commented 1 year ago

https://github.com/libbitcoin/libbitcoin-server/wiki/Quick-Start