Finally upgraded bcexchange and it keeps crashing at startup

for the record, this started to happen with 4.0.0 branch and keeps on happening after I have upgraded to 4.0.1. btw it’s a pain in the ass to download and compile bcexchange with git because of the git commands being a mess and bcexchange having multiple branches to choose from. I was lucky to discover that for 4.0.1 I had to choose 4.0-stable branch. not intuitive at all. so next time you publish a new version I’d like to see git instructions not just tar.gz download links. I’m not using those I’m downloading from git and I use git pull to get the latest changes. I’m a software developer and linux user myself and I can’t get this shit working, no wonder regular investors are not attracted to these projects if they have to go through the inferno like this just to set up minting. And then the minting fails all of sudden because of assertation failures in the code (not cool, bros)

P mai   01 13:44:28 2016 :: Starting BCExchange Wallet Loop.
P mai   01 13:44:29 2016 :: Main bcexchanged process (PID 0) is dead, restarting.
P mai   01 13:54:29 2016 :: Main bcexchanged process (PID 1676) is alive.
P mai   01 13:54:29 2016 :: Unlocking wallet for minting only.
error: couldn't connect to server
bcexchanged: kernel.cpp:494: unsigned int GetStakeModifierChecksum(const CBlockIndex*): Assertion `pindex->pprev || pindex->GetBlockHash() == hashGenesisBlock' failed.
P mai   01 14:04:29 2016 :: Main bcexchanged process (PID 1676) is dead, restarting.
P mai   01 14:14:31 2016 :: Main bcexchanged process (PID 4219) is alive.
P mai   01 14:14:31 2016 :: Unlocking wallet for minting only.
error: couldn't connect to server
bcexchanged: kernel.cpp:494: unsigned int GetStakeModifierChecksum(const CBlockIndex*): Assertion `pindex->pprev || pindex->GetBlockHash() == hashGenesisBlock' failed.

and from the debug.log file we can see this:

2016-05-01 11:04:29 UTC B&C Exchange version v4.0.1-1-g9559d42-dirty-beta (2016-03-31 22:06:16 +0200)
2016-05-01 11:04:29 UTC Default data directory /home/pi/.bcexchange
2016-05-01 11:04:29 UTC Loading addresses...
2016-05-01 11:04:29 UTC dbenv.open LogDir=/media/TOURO/bcexchange/data/database ErrorFile=/media/TOURO/bcexchange/data/db.log
2016-05-01 11:04:30 UTC Loaded 1538 addresses
2016-05-01 11:04:30 UTC  addresses              1321ms
2016-05-01 11:04:30 UTC Loading block index...
2016-05-01 11:04:30 UTC PPCoin Network: genesis=0x00000c2c71c0a0df4da4 nBitsLimit=0x1e0fffff nBitsInitial=0x1e00ffff nStakeMinAge=604800 nCoinbaseMaturity=100 nCoinstakeMaturity=5000 nModifierInterval=14400
pi@pi-desktop:/media/TOURO/bcexchange/data$

and it gets better, being frustrated to death I purged the data directory to re-download the block chain and now I’m getting this:

terminate called after throwing an instance of 'DbRunRecoveryException'
  what():  DbEnv::txn_checkpoint: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery

edit:
and this keeps happening again and again. bcexchanged is simply broken. Should I downgrade to 3.0.0 branch? at least then I’m able to mint shares but right now my shares lose their value because I cannot mint and others who can mint will get more shares at my expense :smiley:

I don’t remember having had those problems.
Did you follow http://docs.nubits.com/nu-raspberry-minting/ when you compiled bcexchanged 4.0.1 (e.g. using libdb4.8 to ensure wallet file compatibility with official releases)?

no I didn’t. and I discovered that I had to delete wallet files for the block chain to start downloading. but now the question is, how do I get my money back if the old wallet files are not working any more?

anyway, I don’t have time for this shit. Or perhaps I’m too old for this shit :stuck_out_tongue: like they said in lethal weapon 4. When I download software from git and compile it, that’s all a person should ever do to get the software working. I’m not going to start messing around with the default libs, making symlinks and what not. This is not worth the hassle. blockshares are not worth that hassle. I used to mint nushares on my pi until it started failing due to nud having too large memory and CPU consumption. now that I cannot even mint blockshares I don’t even know any more why I even bought that pi. It has wasted more of my time than it has created me shares.

Why arent they working? Try importing them. Try doing a fresh 3.0.0 install and import. If you remember your password you could also probably manually decrypt it and retrieve the private keys (i dont know how to do that). Make sure to back up the files befoee doing anything else.

Mine was plug and play.

easier said than done. I’m on pi2. It compiled for an hour the 4.0.1. I’m not going to compile another hour just to get the old version back so that I could send my coins to the wallet of the new version. this is just soo messed up no matter how I look at it. I don’t even know what would be the easiest — to send coins from old wallet to new wallet or to get the old wallet working on the 4.0.1? no wonder people didn’t upgrade. I wouldn’t have upgraded either if I knew it was going to cost me a whole day. it’s not worth it. my free time is not worth it.

I think you can just install 3.0.0 on a desktop and dumpprivkey. You dont need the blockchain. I’m sorry you’re feeling so frusterated.

So I deleted the wallet files and waited some time for the block chain to download. I then CTRL+C’d the bcexchanged and copied the old wallet files back and started bcexchanged again, and it crashed soon after with this:

terminate called after throwing an instance of 'DbRunRecoveryException'
  what():  DbEnv::txn_checkpoint: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
Aborted (core dumped)

Why on earth didn’t the bcexchanged devs implement wallet conversion? This is not how you develop software!!! If the old data file is not compatible with the next version then the next version has to convert the old data file into the new version. Unbelievable.

If you don’t compile bcexchanged with libdb4.8 you won’t have (wallet file) compatibility with official releases.
But nothing is lost.
You just need a bcexchanged compiled with libdb version 4.8

Follow the instructions here and adapt them for bcexchanged http://docs.nubits.com/nu-raspberry-minting/ and your wallet files will work.

Then I suggest you

  • use an official release
  • import the privkeys, like @Nagalim proposed[quote=“Hyena, post:5, topic:3846”]
    I don’t even know any more why I even bought that pi.
    [/quote]

Because it works reliable and like a charm with Raspbian, comsuming almost no power and needs no heatsink or even fan?

I’m sorry to hear that.

I feel like when MoD asked if you did the upgrade using the official documentation you said no. You want the B&C release to update your pi to libdb4.8 for you?

I don’t think it’s about that. The 4.0.1 does not accept my old 4.0.0 wallet files but it will create new ones without problems.

Ahhh i see, so you want old wallet versions to work in new client versions? A reasonable request for sure.

At this point, all you need is the private keys to proceed though, right? So you just have to open the wallet, you don’t have to download the whole blockchain.

yes, it makes so much sense. I just need the private keys from the old wallet and I don’t even care if there will be one-time full rescan after that to update my balance for the new wallet version. it would be so much easier for the developer to do such conversion than for the user to find a old bcexchange wallet, then dumpprivatekey and then import that private key to the new wallet with the new bcexchange version. I don’t even know what exactly should I do right now to get everything to work again. I am downloading the block chain from scratch to my pc and to my pi in parallel. both are the 4.0.1 versions so my old wallet is probably not going to work on neither of the devices. I don’t know how I can get it to work.

ok the block chain download is taking forever. this is going nowhere

Download 3.0.0 somewhere and try to import your wallet. Don’t worry about the blockchain.

where do I get 3.0.0?

I copied the old block chain to my pc from the pi and now the bcexchange does not start up:

A fatal error occured. B&C Exchange can no longer continue safely and will quit.


EXCEPTION: 22DbRunRecoveryException       
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery       
nu in Runaway exception       

so this is pretty hopeless. I’m not going to get anything to work today. the block chain downloads forever on this slow internet, tomorrow I won’t be here at the pi to fix anything. my only hope is that in the city my other PC still has the old 3.0.0 version so I can get the shares from its wallet to a new wallet version. but I won’t be coming back to my farm then so even though I could get my shares on a new wallet version I cannot start minting on my pi.

Wait so your wallet is stuck in 4.0.0, not 3.0.0?