btcinfo  

Hic inserere motto

trb mirror updates and build notes

February 26, 2020 — shinohai

The Bitcoin Foundation chairman mod6 recently published some new vpatches and added them to the foundation's website for testing. I haven't updated my personal mirror here on btcinfo in some time, at least since the Keccak regrind so this post will serve to do precisely that, and provide updated build instructions and notes.

Though mod6's post only mentions 3 vpatches, there are a total of 5 new vpatches that we will be adding to the trb mirror, as the last updated patch here was "asciilifeform_aggressive_pushgetblocks.vpatch". These vpatches are (listed in press order):

  • mod6_privkey_tools.vpatch
  • mod6_manifest.vpatch
  • mod6_phexdigit_fix.vpatch
  • mod6_excise_hash_truncation.vpatch
  • mod6_whogaveblox.vpatch

In order to press and build trb you will need a Keccak vtron, for these tests I used esthlos-v. The Bitcoin Foundation also has an alternative "how to" using another vtron version here. I am using the "OFFLINE" build instructions because I host my own dependency mirror and am using that.

My normal development and testing laptop is down at the time of writing, so I used my "daily driver" Gentoo computer when testing, which is unfortunately cursed with glibc-2.28. Though the initial press went fine, I quickly hit a wall during the buildroot step and got the following error:

freadahead.c: In function 'freadahead':
freadahead.c:91:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of 
fflush, fread, ungetc on your system, then report this to bug-gnulib."
  #error "Please port gnulib freadahead.c to your platform! Look at the definition of 
fflush, fread, ungetc on your system, then report this to bug-gnulib."
   ^
make[6]: *** [Makefile:1842: freadahead.o] Error 1
make[6]: *** Waiting for unfinished jobs....
In file included from fseeko.c:17:0:
./config.h:78:0: warning: "_FORTIFY_SOURCE" redefined
    # define _FORTIFY_SOURCE 2
 ^
: note: this is the location of the previous definition
fseeko.c: In function 'rpl_fseeko':
fseeko.c:109:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, 
then report this to bug-gnulib."
   #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, 
then report this to bug-gnulib."

My solution was to simply add a patch to `buildroot-2015.05/package/m4` and restart the build. While I can't recommend doing this under normal circumstances (rather, one should instead use a Linux that isn't cursed) I have uploaded the patch I used here for the sake of documentation and thoroughness.

After applying the above duct-tape, the build proceeded smoothly and spat out the usual static bitcoind. To recap, here are the steps:

  • Download the patches, seals, wot, and dependencies from my mirror.
  • Press using esthlos-v: `v press mod6_whogaveblox trb054`
  • Move the dependencies to the proper location: `mv deps/*.asc trb054/bitcoin/deps`
  • Change directories and build: `cd trb054/bitcoin && make`

With all the uncertainty surrounding the fate of the foundation in certain circles, it feels good to have a page where my particular build is made public and commented. For the most part trb is in a "leave it the fuck alone" state, though at some point I'd like to see some Common Lisp or scheme wallet functions added to the mix.

As always, the journey continues!

Tags: News, Bitcoin, UNIX