Alright! Back to where I was 10 days ago...
[----------] 7 tests from BlockUtilsTest
[ RUN ] BlockUtilsTest.HeadersOnly
[ OK ] BlockUtilsTest.HeadersOnly (338 ms)
[ RUN ] BlockUtilsTest.HeadersOnly_Reorg
[ OK ] BlockUtilsTest.HeadersOnly_Reorg (390 ms)
[ RUN ] BlockUtilsTest.Load5Blocks
[ OK ] BlockUtilsTest.Load5Blocks (579 ms)
[ RUN ] BlockUtilsTest.Load4BlocksPlus1
[ OK ] BlockUtilsTest.Load4BlocksPlus1 (808 ms)
[ RUN ] BlockUtilsTest.Load5Blocks_Plus2NoReorg
[ OK ] BlockUtilsTest.Load5Blocks_Plus2NoReorg (583 ms)
[ RUN ] BlockUtilsTest.Load5Blocks_FullReorg
-WARN - 11:05:33: (../BlockUtils.cpp:3284) Blockchain Reorganization detected!
-INFO - 11:05:33: (../BlockUtils.cpp:3657) Reassessing Tx validity after reorg
-INFO - 11:05:33: (../BlockUtils.cpp:3664) Invalidating old-chain transactions...
-WARN - 11:05:33: (../BlockUtils.cpp:3683) Tx: 43ec5922686d522a
-WARN - 11:05:33: (../BlockUtils.cpp:3683) Tx: 223212f753be87b7
-WARN - 11:05:33: (../BlockUtils.cpp:3683) Tx: 01b5f6ef7777d882
-WARN - 11:05:33: (../BlockUtils.cpp:3683) Tx: 26179c6b775920bb
-WARN - 11:05:33: (../BlockUtils.cpp:3683) Tx: 2cc4fd715ab91f39
-INFO - 11:05:33: (../BlockUtils.cpp:3697) Marking new-chain transactions valid...
-WARN - 11:05:33: (../BlockUtils.cpp:3712) Tx: 2354b5d7322acbcd
-WARN - 11:05:33: (../BlockUtils.cpp:3712) Tx: 26179c6b775920bb
-WARN - 11:05:33: (../BlockUtils.cpp:3712) Tx: 48d6e930800e23b1
-WARN - 11:05:33: (../BlockUtils.cpp:3712) Tx: 7fa55061fc4bd2a3
-WARN - 11:05:33: (../BlockUtils.cpp:3712) Tx: 8e7e076d76bbfbe7
-WARN - 11:05:33: (../BlockUtils.cpp:3712) Tx: 223212f753be87b7
-WARN - 11:05:33: (../BlockUtils.cpp:3718) Done reassessing tx validity
[ OK ] BlockUtilsTest.Load5Blocks_FullReorg (783 ms)
The difference is that now the DB operations are
much better optimized for handling excessively-reused addresses like 1VayNert and all the SatoshiDice buckets (at the expense of a ton of extra DB complexity). I'm in the middle of profiling the new stuff, but the dramatic improvement is immediately obvious: My previous design was bottlenecked in RAM and speed by the address being updated with the most historical transactions. Now processing time is fairly independent of that, and only dependent on blockchain size in MB.
So far, the DB itself is a bit bigger than I expected (about 1.7x the .bitcoin/blocks directory). But that's because this is running in "super-node" mode which tracks the entire history of all addresses/scripts, which could be more appropriately named "Armory - Server Version". But it was easier to implement than the "regular" version which needs extra logic to reliably track only a specific set of addresses (i.e. your wallets). When this version is done, I will implement the "regular" mode which use less space and even less RAM, and may be able to work with a remote bitcoind/bitcoin-qt instance. For now, you'll need a lot of disk space to run the new version, but RAM should no longer be a constraint.
And in case you're wondering about the RAM: it looks
good (finally!). As I type this, my testing run is already deep into SatoshiDice territory and it's been using only 276-279 MB of RAM the whole time. And this should be the most intense part of the whole process. It might go up a little bit once I create wallets, etc, but will also go down when it's done batching and updating the DB with thousands of tx per second.
Of course plenty of work left to do, but progress is being made!