Bitcoin full node and query server

Jul 18, 2024

View in context in the libbitcoin Slack #general mirror.

P
parsevalbtc22:08
For potential linux testers, I have compiled launching the following command: CFLAGS="-O3" CXXFLAGS="-O3" ./install.sh --prefix=/home/user --build-boost --enable-ndebug --disable-shared --enable-avx2 --enable-sse41
✅ 1🔥 1
30 replies · Tanay Raikhere, parsevalbtc, evoskuil · last Jul 24, 2024
Tanay Raikhere05:08
I should try this on my old machine too! Let's see if this compiles :D
Tanay Raikhere08:38
Just started compiling it!
P
parsevalbtc10:47
Great! How much RAM do you have?
P
parsevalbtc10:53
In my case is 7 GB of physical RAM
evoskuil14:06
The vectorization options need to match the CPU, otherwise the process will crash.
👍 2
Tanay Raikhere21:01
I installed a fresh os (linux mint) in my system, and had a couple of issues with installing the node. firstly had to install build-essentials, lib-tool, and then had to run the script after compilation finally ran into this issue
src/messages/address.cpp:47:40: error: class template argument deduction failed:
   47 |     system::byte_reader reader{ source };
      |                                        ^
In file included from /usr/local/include/bitcoin/system/stream/streamers/bit_reader.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/streamers/bit_flipper.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/stream.hpp:33,
                 from /usr/local/include/bitcoin/system/chain/header.hpp:29,
                 from /usr/local/include/bitcoin/system/chain/block.hpp:26,
                 from /usr/local/include/bitcoin/system/chain/chain.hpp:22,
                 from /usr/local/include/bitcoin/system/settings.hpp:22,
                 from /usr/local/include/bitcoin/system.hpp:29,
                 from ./include/bitcoin/network/messages/address.hpp:23,
                 from src/messages/address.cpp:19:
/usr/local/include/bitcoin/system/stream/streamers/byte_reader.hpp: In function 'byte_reader(IStream&, libbitcoin::arena* const&)-> libbitcoin::system::byte_reader<IStream> [with IStream = libbitcoin::system::istream<>; libbitcoin::system::bytereader::memory_arena = libbitcoin::arena*]':
/usr/local/include/bitcoin/system/stream/streamers/byte_reader.hpp:44:48: error: 'static libbitcoin::arena* libbitcoin::system::byte_reader<IStream>::default_arena() [with IStream = libbitcoin::system::istream<>; libbitcoin::system::bytereader::memory_arena = libbitcoin::arena*]' is private within this context
   44 |         const memory_arena& arena=default_arena()) NOEXCEPT;
      |                                   ~~~~^
In file included from /usr/local/include/bitcoin/system/stream/streamers/byte_reader.hpp:229,
                 from /usr/local/include/bitcoin/system/stream/streamers/bit_reader.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/streamers/bit_flipper.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/stream.hpp:33,
                 from /usr/local/include/bitcoin/system/chain/header.hpp:29,
                 from /usr/local/include/bitcoin/system/chain/block.hpp:26,
                 from /usr/local/include/bitcoin/system/chain/chain.hpp:22,
                 from /usr/local/include/bitcoin/system/settings.hpp:22,
                 from /usr/local/include/bitcoin/system.hpp:29,
                 from ./include/bitcoin/network/messages/address.hpp:23,
                 from src/messages/address.cpp:19:
/usr/local/include/bitcoin/system/impl/stream/streamers/byte_reader.ipp:45:1: note: declared private here
   45 | byte_reader<IStream>::default_arena() NOEXCEPT
      | ^~~~~~~~
In file included from /usr/local/include/bitcoin/system/stream/streamers/bit_reader.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/streamers/bit_flipper.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/stream.hpp:33,
                 from /usr/local/include/bitcoin/system/chain/header.hpp:29,
                 from /usr/local/include/bitcoin/system/chain/block.hpp:26,
                 from /usr/local/include/bitcoin/system/chain/chain.hpp:22,
                 from /usr/local/include/bitcoin/system/settings.hpp:22,
                 from /usr/local/include/bitcoin/system.hpp:29,
                 from ./include/bitcoin/network/messages/address.hpp:23,
                 from src/messages/address.cpp:19:
/usr/local/include/bitcoin/system/stream/streamers/byte_reader.hpp:44:48: error: 'static libbitcoin::arena* libbitcoin::system::byte_reader<IStream>::default_arena() [with IStream = libbitcoin::system::istream<>; libbitcoin::system::bytereader::memory_arena = libbitcoin::arena*]' is private within this context
   44 |         const memory_arena& arena=default_arena()) NOEXCEPT;
      |                                   ~~~~^
In file included from /usr/local/include/bitcoin/system/stream/streamers/byte_reader.hpp:229,
                 from /usr/local/include/bitcoin/system/stream/streamers/bit_reader.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/streamers/bit_flipper.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/stream.hpp:33,
                 from /usr/local/include/bitcoin/system/chain/header.hpp:29,
                 from /usr/local/include/bitcoin/system/chain/block.hpp:26,
                 from /usr/local/include/bitcoin/system/chain/chain.hpp:22,
                 from /usr/local/include/bitcoin/system/settings.hpp:22,
                 from /usr/local/include/bitcoin/system.hpp:29,
                 from ./include/bitcoin/network/messages/address.hpp:23,
                 from src/messages/address.cpp:19:
/usr/local/include/bitcoin/system/impl/stream/streamers/byte_reader.ipp:45:1: note: declared private here
   45 | byte_reader<IStream>::default_arena() NOEXCEPT
      | ^~~~~~~~
src/messages/address.cpp:47:40: note:   when instantiating default argument for call to 'byte_reader(IStream&, libbitcoin::arena* const&)-> libbitcoin::system::byte_reader<IStream> [with IStream = libbitcoin::system::istream<>; libbitcoin::system::bytereader::memory_arena = libbitcoin::arena*]'
   47 |     system::byte_reader reader{ source };
      |                                        ^
  CXX      src/messages/libbitcoin_network_la-alert_item.lo
make: * [Makefile:2352: src/messages/libbitcoin_network_la-address.lo] Error 1
make: * Waiting for unfinished jobs....
src/messages/alert.cpp: In static member function 'static libbitcoin::network::messages::alert::cptr libbitcoin::network::messages::alert::deserialize(uint32_t, const data_chunk&)':
src/messages/alert.cpp:44:40: error: class template argument deduction failed:
   44 |     system::byte_reader reader{ source };
      |                                        ^
In file included from /usr/local/include/bitcoin/system/stream/streamers/bit_reader.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/streamers/bit_flipper.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/stream.hpp:33,
                 from /usr/local/include/bitcoin/system/chain/header.hpp:29,
                 from /usr/local/include/bitcoin/system/chain/block.hpp:26,
                 from /usr/local/include/bitcoin/system/chain/chain.hpp:22,
                 from /usr/local/include/bitcoin/system/settings.hpp:22,
                 from /usr/local/include/bitcoin/system.hpp:29,
                 from ./include/bitcoin/network/messages/alert.hpp:23,
                 from src/messages/alert.cpp:19:
/usr/local/include/bitcoin/system/stream/streamers/byte_reader.hpp: In function 'byte_reader(IStream&, libbitcoin::arena* const&)-> libbitcoin::system::byte_reader<IStream> [with IStream = libbitcoin::system::istream<>; libbitcoin::system::bytereader::memory_arena = libbitcoin::arena*]':
/usr/local/include/bitcoin/system/stream/streamers/byte_reader.hpp:44:48: error: 'static libbitcoin::arena* libbitcoin::system::byte_reader<IStream>::default_arena() [with IStream = libbitcoin::system::istream<>; libbitcoin::system::bytereader::memory_arena = libbitcoin::arena*]' is private within this context
   44 |         const memory_arena& arena=default_arena()) NOEXCEPT;
      |                                   ~~~~^
In file included from /usr/local/include/bitcoin/system/stream/streamers/byte_reader.hpp:229,
                 from /usr/local/include/bitcoin/system/stream/streamers/bit_reader.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/streamers/bit_flipper.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/stream.hpp:33,
                 from /usr/local/include/bitcoin/system/chain/header.hpp:29,
                 from /usr/local/include/bitcoin/system/chain/block.hpp:26,
                 from /usr/local/include/bitcoin/system/chain/chain.hpp:22,
                 from /usr/local/include/bitcoin/system/settings.hpp:22,
                 from /usr/local/include/bitcoin/system.hpp:29,
                 from ./include/bitcoin/network/messages/alert.hpp:23,
                 from src/messages/alert.cpp:19:
/usr/local/include/bitcoin/system/impl/stream/streamers/byte_reader.ipp:45:1: note: declared private here
   45 | byte_reader<IStream>::default_arena() NOEXCEPT
      | ^~~~~~~~
In file included from /usr/local/include/bitcoin/system/stream/streamers/bit_reader.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/streamers/bit_flipper.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/stream.hpp:33,
                 from /usr/local/include/bitcoin/system/chain/header.hpp:29,
                 from /usr/local/include/bitcoin/system/chain/block.hpp:26,
                 from /usr/local/include/bitcoin/system/chain/chain.hpp:22,
                 from /usr/local/include/bitcoin/system/settings.hpp:22,
                 from /usr/local/include/bitcoin/system.hpp:29,
                 from ./include/bitcoin/network/messages/alert.hpp:23,
                 from src/messages/alert.cpp:19:
/usr/local/include/bitcoin/system/stream/streamers/byte_reader.hpp:44:48: error: 'static libbitcoin::arena* libbitcoin::system::byte_reader<IStream>::default_arena() [with IStream = libbitcoin::system::istream<>; libbitcoin::system::bytereader::memory_arena = libbitcoin::arena*]' is private within this context
   44 |         const memory_arena& arena=default_arena()) NOEXCEPT;
      |                                   ~~~~^
In file included from /usr/local/include/bitcoin/system/stream/streamers/byte_reader.hpp:229,
                 from /usr/local/include/bitcoin/system/stream/streamers/bit_reader.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/streamers/bit_flipper.hpp:27,
                 from /usr/local/include/bitcoin/system/stream/stream.hpp:33,
                 from /usr/local/include/bitcoin/system/chain/header.hpp:29,
                 from /usr/local/include/bitcoin/system/chain/block.hpp:26,
                 from /usr/local/include/bitcoin/system/chain/chain.hpp:22,
                 from /usr/local/include/bitcoin/system/settings.hpp:22,
                 from /usr/local/include/bitcoin/system.hpp:29,
                 from ./include/bitcoin/network/messages/alert.hpp:23,
                 from src/messages/alert.cpp:19:
/usr/local/include/bitcoin/system/impl/stream/streamers/byte_reader.ipp:45:1: note: declared private here
   45 | byte_reader<IStream>::default_arena() NOEXCEPT
      | ^~~~~~~~
src/messages/alert.cpp:44:40: note:   when instantiating default argument for call to 'byte_reader(IStream&, libbitcoin::arena* const&)-> libbitcoin::system::byte_reader<IStream> [with IStream = libbitcoin::system::istream<>; libbitcoin::system::bytereader::memory_arena = libbitcoin::arena*]'
   44 |     system::byte_reader reader{ source };
      |                                        ^
make: * [Makefile:2366: src/messages/libbitcoin_network_la-alert.lo] Error 1

real	11m29.040s
user	31m51.719s
sys	2m16.342s
I have no idea how to resolve this one :(
evoskuil21:04
Those are not issues, just documented minimum requirements. https://github.com/libbitcoin/libbitcoin-system?tab=readme-ov-file#debianubuntu
✅ 1
Tanay Raikhere21:04
Ohh let me try that again!
evoskuil21:05
Though it looks like we need to bump minimum versions on the readme.
evoskuil21:06
The compilation issue looks like a dated build. Maybe try again with latest.
👆🏻 1
Tanay Raikhere21:11
I have all the build systems installed and pulled latest update from GitHub, but it still doesn't compile! Maybe I'll have to play around with build system versions! Check each individuals ones to see if they are above the minimum required
(edited)
Tanay Raikhere21:15
Yup! all of them fulfill the minimum requirements!
evoskuil21:18
Regarding the build system I was just pointing out that there was no “issue” as that’s documented and normal/expected.
Tanay Raikhere21:31
Thank you for your clarification, but I am still not able to understand what is the actual problem. I'd be happy if you could clarify!
evoskuil21:32
Redownload the repos (or clear dir and rerun install.sh).
✅ 1
P
parsevalbtc09:42
@Tanay Raikhere probably silly question. The install.sh you are using is the one in libbitcoin-node? https://github.com/libbitcoin/libbitcoin-node/blob/master/install.sh
P
parsevalbtc10:04
This install script basically install everything automatically (all the repos required + compilations). So you don't need to configure each repo on your own.
(edited)
Tanay Raikhere12:04
Yep, I'm using the latest pulled version of node! and running the same command you've described!
Tanay Raikhere12:04
I ran the install script for libbitcoin-system and that installed the system without any issues!
Tanay Raikhere12:23
Cleaned the repo! (deleted the old one and pulled it again) , trying to install the node once again! using the install.sh script
(edited)
Tanay Raikhere12:56
Update! It seems to me that there are some errors unresolved with the libbitcoin-network library! I confirmed that by separately cloning the libbitcoin-network library, ran the install.sh command inside this repo, got logged with the same error I described above. If I am missing out on any extra details, please let me know!
Tanay Raikhere13:31
It compiled (libbitcoin-node) in my laptop which runs on Linux Manjaro. Seems like there is something up with my old machine running Linux Mint!
🙌 1
P
parsevalbtc20:16
Great to hear ! Maybe is the compiler? Even if the script should detect compiler version and libraries needed...
evoskuil20:34
It was a build issue limited to g++. It reproduced in the dependent builds, but not in the system builds, because it was header-based and not covered in system unit tests. The issue is well described by the error messages in the build output. It's not clear why g++ requires a public member for use as a default parameter value while other compilers do not. It has been resolved in the latest builds. I suspect it compiled on the laptop because it used clang++.
👍 2
P
parsevalbtc22:09
I used g++ as well, but the error didn't show...
evoskuil22:21
It may be version dependent. I assume it’s a g++ bug.
Tanay Raikhere16:59
export CC=gcc export CXX=g++ sudo ./install.sh Ah! This finally worked with these settings!
evoskuil21:05
The settings didn't change anything, I patched the build yesterday.