I can't see how it makes sense to scan the blocks for transactions in that case, but that happened, and all was well. Sadly, there was no surprise BTC
Failure on my part, "isNew" flag not being propagated correctly I expect.
It seems there are methods in cppforswig/BridgeAPI/WalletManager to convert the 0.96.x format to the new one? Can I call them somehow, or is there no userspace interface yet?
CppBridge loads all wallets in the datadir and converts them to the new format on the fly. Old wallet files are ignored past that point. Those wallets that carry encrypted private keys will lead to a prompt in GUI to unlock them. The same password used to unlock them will be used to encrypt the new file. There is no client facing API to call the conversion code directly. It is all baked into loadWallets (
https://github.com/goatpig/BitcoinArmory/blob/dev/cppForSwig/BridgeAPI/WalletManager.cpp#L199).
It will be part of the last major new piece of GUI I need to implement. I want to add a settings dialog that precedes ArmoryQt itself to do a few things:
---------
- Wallets: need a tab that lists all wallets found in the data dir and offer users the choice to convert. I don't like the tacit conversion but it was a cheap solution at the time. I'm very bad at GUI development =D. Also need to offer the option to unlock wallets. The new wallet container encrypts public data with a different passphrase. This is set to a cleartext key by default, but with some minor GUI at wallet creation time, users can have the option to set a passphrase of their own choosing.
With fully encrypted wallets, users need unlock the public data prior to loading Armory itself. I could have gone with a simple message box prompt but that would get very obnoxious with more than 2-3 wallets loading.
---------
- AEAD key management: CppBridge couldn't talk to ArmoryDB because ArmoryDB wasn't set to --public. All sockets are encrypted now (this means from ArmoryDB to CppBridge and from CppBridge to ArmoryQt). The AEAD allows both 1-way auth (client authenticates the server) and 2-way auth (server authenticates the client back).
It defaults to 2-way, meaning ArmoryDB's key vault needs to know of CppBridge's key prior to the connection. As for ArmoryDB's key, if it's missing from CppBridge's vault, the user should be prompted to accept the key, but since I'm lazy, I defaulted the accept to true instead of writing a prompt (
https://github.com/goatpig/BitcoinArmory/blob/dev/cppForSwig/BridgeAPI/CppBridge.cpp#L324).
Since ArmoryQt spawns CppBridge, adhoc keys are setup every run, and discarded after use.I haven't looked at automating ArmoryDB yet, so you're left running it yourself. As it is missing the keys in its vault, it will reject all clients, unless you run it with --public (accept all clients). The 1-way and 2-way handshakes are incompatible on purpose, there is no downgrading of a 2-way handshake to 1-way for convenience purposes.
There's a command prompt tool to manage keys, aptly dubbed "KeyManager" (I'm good with names 'n stuff) ->
https://github.com/goatpig/BitcoinArmory/blob/dev/cppForSwig/KeyManager.cppThis needs some GUI around it, considering it isn't just for your local instances, but remote ones as well (considering running a supernode for those people who can't get fullnode Armory up locally, just so they can move their coins out). With 2-way auth, you can actually manage who gets in a WAN exposed DB and/or CppBridge.
This tab will also be a good place to manage IPs for remote DB/Bridge. The bridge handles all things wallets, ArmoryQt is more or less a dumb interface now, so you could run CppBridge in say a Docker container and plug ArmoryQt to it from somewhere else.
---------
- DB/Core management: Need some GUI for people to discover block/db paths to ease the pain around initial setup. Also a place to reintroduce the settings for Core and DB automation. It's a lot harder to make the bootstrap consistent if ArmoryQt starts before the DB or Core. It's simpler to assume these pieces of software have to run before ArmoryQt is up and handle the complexity in this new pre-start dialog.