I cant download the blockchain, getting 3kb/s and getting slower

make sure to delete addr.dat, log/, and has an empty walletS.dat, before starting with downloaded blk.dat

if you still get problems, tell us the last 20 lines in db.log and debug.log

I removed all the old files and brought in the two downloaded database files, db.log says:

file blkindex.dat has LSN 11813/8847726, past end of log at 1/17684
Commonly caused by moving a database from one database environment
to another without clearing the database LSNs, or by removing all of
the log files from a database environment
__db_meta_setup: /home/amnesia/Persistent/nubits/Data/blkindex.dat: unexpected file type or format
Database handles still open at environment close

and debug.log says:

Nu version v2.0.3-unk-beta ()
Default data directory /home/amnesia/.nu
Loading addresses

dbenv.open LogDir=/home/amnesia/Persistent/nubits/Data/database ErrorFile=/home/amnesia/Persistent/nubits/Data/db.log
Loaded 0 addresses
addresses 98ms
Loading block index

PPCoin Network: genesis=0x000003cc2da5a0a289ad nBitsLimit=0x1e0fffff nBitsInitial=0x1e00ffff nStakeMinAge=604800 nCoinbaseMaturity=100 nCoinstakeMaturity=5000 nModifierInterval=14400


EXCEPTION: 11DbException
Db::open: Invalid argument
nu in Runaway exception

How do i remove all old database .lsn’s?

After leaving the client on all night again it downloaded 120MB, the blockchain files only increased by 40MB, and the status bar only increased by 2%, so it will take at least several weeks of leaving my computer on to finish.

What’s the BerkeleyDB version you compiled the Nu wallet with?
Like I said, the dat files are generated by a Nu wallet compiled with version 4.8 and aren’t compatible with newer versions.

I have no idea, i took the code from this guys thread

Whoops its paraphrasing my post on the thread for some reason, this is the code

sudo apt-get install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb5.1+±dev build-essential libssl-dev libboost-all-dev libqrencode-dev libminiupnpc-dev qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev

Step 3. Delete datafeeds related code.

In Makefile just search for any dependency or target that has the phrase “datafeed” as part of the name and delete it.

The following files in src and src/qt must be modified:

init.cpp : delete lines with “curl” in them.
main.cpp : delete the four lines starting with "if (strDataFeedError != “”)"
bitcoinrpc.cpp : delete all code related to “setvote” “setdatafeed” and "getdatafeed"
net.cpp : delete the line "StartUpdateFromDataFeed();"
bitcoingui.cpp : delete code related to votePage and gotoVotePage
bitcoingui.h : delete code related to votePage and gotoVotePage
votepage.cpp : delete code mentioning "datafeed"
votepage.h : delete line "void on_dataFeedButton_clicked();"
walletmodel.cpp : delete code mentioning “datafeed”

Step 4. Compile a version that doesn’t need the dependencies.

qmake "RELEASE=1"
make

This should make an executable called “nu” which can be run in the
future with a fresh Tails. You should copy this somewhere, like a flash
drive at /media/nuflash. Later you can start it in a fresh Tails like:

/media/nuflash/nu -datadir=/media/nuflash/.nu -proxy=127.0.0.1:9050

Hope this helps someone. I’m not sure what effect deleting the
datafeed related code has, but it is able to keep up with the block
chain and send transactions. That’s good enough for me.

Someone might advise that there’s an easier way, but until then at least there is some way.

Try
dpkg --get-selections | grep libdb
to determine your version of BerkeleyDB.
I bet it’s 5.1 or newer.

ninjaedit: with your last update to your post I think we’ve found the likely issue - libdb5.1

Have a look at https://docs.nubits.com/nu-raspberry-minting/ which contains a guide how to compile libdb4.8

amnesia@amnesia:~$ dpkg --get-selections | grep libdb
libdb5.1:i386 install
libdb5.1++:i386 install
libdbus-1-3:i386 install
libdbus-glib-1-2:i386 install

So what do i do, will this not work with nu or am i forced to wait on this to download?

Compile a new version of the Nu wallet using libdb4.8.
I’m not 100% sure, but quite confident that this will solve the problem.
Plus it will make the files created by your Nu wallet compatible with official releases (important for walletB.dat and walletS.dat).

Is there anything from that large block of apt-get code i should remove? That nuclient was the first thing ive ever compiled and i dont know what any of that code means

First
sudo apt-get remove libdb5.1++-dev
Or whatever is needed to remove libdb5.1.
Then follow the guide to compile libdb4.8.
Then compile Nu wallet using libdb4.8.

I followed your guide all the way up to

make -f makefile.unix

and it gives me this error:

root@amnesia:/home/amnesia/Persistent/nubits/src# make -f makefile.unix
make: makefile.unix: No such file or directory
make: *** No rule to make target `makefile.unix’. Stop.

But i had to skip the nubits download section because i already downloaded it and did alot of editing to all the files to get it to work in the first place. I did try to make it with the makefile i previously had but it threw an error so i deleted it figuring it was based off the old dependecies. Then i tried using

qmake “RELEASE=1”

but it says command not found.

That’s strange.
https://bitbucket.org/JordanLeePeershares/nubit/src/6fe88883f316b1ff3448d52438e9d122f808da51/src/?at=master clearly contains makefile.unix:
https://bitbucket.org/JordanLeePeershares/nubit/src/6fe88883f316b1ff3448d52438e9d122f808da51/src/makefile.unix?at=master

i do have a makefile but its in /src/src, im trying to build from the /src directory and its looking for it in there i guess, thats how i had to do it before. Should i move it?

That’s strange. The repo has no src/src directory

I guess downloading a fresh version from https://bitbucket.org/JordanLeePeershares/nubit/get/6fe88883f316.zip doesn’t sound very well, because of the extensive editing you had to do.
Moving makefile.unix from src/src to src shouldn’t hurt. I hope that’s all then


I wonder how you compiled the version you currently have.

In the official 2.0.3 wallet there is a source folder which has nubit.tar.gz which extracts to the source files which also have another src folder in it.

I copied makefile.unix in the main directory, now it gives

root@amnesia:/home/amnesia/Persistent/nubits/src# make -f makefile.unix
make: *** No rule to make target obj/scanbalance.o', needed bynud’. Stop.

Maybe if there was an equivalent of qmake that your listed dependencies would allow me to run it would resolve itself?

Ok. If you use the source code that comes along with a compiled version of the wallet software, then you have to do the compiling in that folder.
Please move makrfile.unix to src/src, change into that directory and compile in there with the same command you compiled the wallet the first time.

Compiling libdb4.8 worked according to the guide?

Ouch, ok that worked and it hijacked my computer and gave me this error:

error writing to /tmp/ccDo6Y3g.s: No space left on device
compilation terminated.

Yes the lib4.8 compile worked just fine, the only thing that didnt work was creating a swapfile which is probably why this didnt work. Tails is a live OS, it doesnt have a swapfile, everything is done in ram, it has persistence but no tmp-like swap files are written to it, this is done for security reasons and because its usually run on a flash drive and swap would destroy it.

Is there some way to get this to compile in ram?

I looked into setting up a ramdisk but i dont think tails would allow that. There arent any options in make to change where the tmp files are stored else i could create a tmp swap in my persistent drive, and the mkswap command doesnt list any options to relocate the swap directory, at least when i try it i get “amensia/home is a directory” and it doesnt create anything, ‘Swapon’ doesnt show anything either and despite issuing those commands it still tries to create files in the locked /tmp directory.

So unless you know how to change the directory from /tmp to somewhere else during compiling short of downloading and installing an entirely new OS i dont see how to make this work, which is absurd as i just compiled it successfully without it trying to store files in locked directories.

Why again cant i use the command qmake with these dependecies?

Do you think an alternative tmpdir can be set via environment variables?