[spam][personal][crazy] Trying to Build Bitcoin from Source

Karl gmkarl at gmail.com
Sun Nov 7 04:14:14 PST 2021


0523
I put a breakpoint on line 197, and m_pathname.size() is
140737488342416, so likely a memory error, maybe caused by some
mismatch library version.

0526
valgrind --vgdb-error=1 reports that uninitialised memory is accessed
on that same line

0529
idea: maybe boost headers differ from libs.

0531
setting LD_LIBRARY path resolved the crash.

0536
2021-11-07T10:36:02Z Error: Error initializing wallet database
environment "/home/user/.bitcoin"! This error could occur if this
wallet was not shutdown cleanly and was last loaded using a build with
a newer version of Berkeley DB. If so, please use the software that
last loaded this wallet

could be related to me kill -9'ing the valgrind process

0537
gdb, catch throw -- did not catch the error, so i'll grep the source or its text

or view the log

2021-11-07T10:37:28Z BerkeleyEnvironment::Open:
LogDir=/home/user/.bitcoin/database
ErrorFile=/home/user/.bitcoin/db.log
2021-11-07T10:37:28Z BerkeleyEnvironment::Open: Error -30974 opening
database environment: DB_RUNRECOVERY: Fatal error, run database
recovery

that sounds pretty simple!  i just have to run database recovery,
whatever that is.  0538 .

logfile is full of this:
Unacceptable log file /home/user/.bitcoin/database/log.0000000002:
unsupported log version 19
Invalid log file: log.0000000002: Invalid argument
PANIC: Invalid argument
process-private: unable to find environment

0542
i backed up my .bitcoin/database folder and it's running

0547
i'm spending some time trying to normalise my boost setup so it won't
make crashes from misloading itself

0548
some dialog:
i experience weird network separations.  for example, i have
experienced these things:
- broadcasting a transaction locally, having peers hold it in their
mempool, and not have it show up on exchange UIs
- broadcast a transaction on exchange UIs, and not have it show up locally
- running an onion service locally, connect to it on the same system
via tor, but get connection refused over tor from my cell phone
- getting dns resolution failures on some systems for some websites,
that resolve fine on other systems

so basically i have paranoia around huge network attacks.  i'd like to
know my use of the blockchain is functional even if my internet is
entirely fake.  but what's most important is being able to do things
at all.  it can be hard to keep that clear in my emotions.

0552 i reinstalled boost, i'll rebuild bitcoin using system libs

0602 i looked a little for my blockchain indexing project.  i found
libgame, which was a previous version of it.  i think i had forgotten
about libgame when i made it.  libgame was going to be like a video
stream sharing app with other functionalities too.  the indexing
project would fit in well.

0604 ok here it is: libonchain.

0605 i'd like to move straight towards indexing files or blocks or
something in a way the user can see.  so maybe find a spot in one of
these projects where that could fit.

0609 things seem stalled.  moving again after handling some motor issues.

0611 libonchain is updating submodules but appears stalled.  i checked
the process writing to disk and its file position isn't moving.
wonder if there's a verbose mode.

0612 --progress

0616 running into this in my own code:
fatal: No url found for submodule path
'deps/libbtc/src/trezor-crypto/tests/wycheproof' in .gitmodules

i'm guessing there's a submodule inside a subtree dependency, and this
is make the universe look like a giraffe wearing a vr helmet at a
submarine party doing undersea research.  possibly normal when i'm
involved in something.

0617

0621 i ended up looking into the error a little which i guess should
just be adding a line to .gitmodules or somesuch.
i discovered my strategy for taking on partial maintenance of libbtc
partly involved an attempt to reference the work of other projects
directly to make things easier to maintain.  interesting idea.  if
libbtc isn't a normative library, it could reuse work from some other
library that is.

it makes most sense to reference bitcoin core directly.  then protocol
change updates are pulled in.  i think i recall settling on that plan
with libonchain, not sure.  0622

0631

i'm glancing through my cmake file for libonchain and i think the
issue i ran into once is that the state of the main bitcoin tree is
partial for library dependencies.  some of the functionality has been
pulled out into a library, but this set of functionality is roughly
random.  it looks like the goal of modularising it fell to the
wayside, dominated instead by a goal of making working changes to the
main client.

i'm thinking it might be simplest to handle that by making my own
library that references sourcefiles in the subtree.  could be wrong.
since i'm not much here.

what i'd basically like to do is connect to the peer network and
retrieve blocks without actually syncing.  so, most of the bitcoind
binary, but maybe with a different main function.

0633

the tags in bitcoin are a little strange ... seem to jump from v0.19.2
to v22.0 ? maybe they decided to drop the '0' and skipped a few
versions ...?

0639 libbtc pull requests require test passing to merge, and the ci
service is no longer running jobs.  yeesh.  for later.

0640 found the tags my eyes had missed

0643 things i was rebuilding are encountering build errors.

0648 build is using std::__cxx11, libraries don't .  make VERBOSE=1
shows -D_GLIBCXX_USE_CXX11_ABI=0

0650.  must have made an error.  build appears to not use __cxx11,
whereas libraries do.

0702 ok i jumped through some git hooks.
when i try to build the current libonchain code, which includes libbtc
as a submodule dependency, it fails due to an incorrect preprocessor
symbol in wallet.h  i thought when i looked at the source in the main
libbtc tree, that wallet.h was correct, and i thought i just updated
to the main source.  my psychosis makes it hard to check things that
don't line up, as then i can notice when it is teaching me to be
delusional.

1. check main tree again.  libbtc/master correctly has
LIBBTC_BEGIN_DECL . 07933995eb5010a016c75fb703a66023116013a3

2. check the tree that is failing build.  libbtc/master is _also_
correct in the submodule tree.

i'm guessing cmake copies the sources and didn't update.  i must have
struggled with that for some time in the past, so i'll just wipe it
and see if that helps

0712 onchain built.

libbtc provides an existing interface to a simple bitcoin p2p network thingy.
it gets inv and header messages.  it's probably reasonable to also ask
for blocks somehow.
this could be a path to just enumerate blocks available on the peer
network, and index their content.

the existing code is likely not organised very well.  but it's likely
workable in some manner.

0713

not sure whether i will continue this at this time.

i would like to make a fuse interface to the blockchain, because i
haven't been able to use fuse since my problems began around 2014 when
i made a fuse interface to another computer's live ram.


More information about the cypherpunks mailing list