I'd like to throw my own personal wish list on top if I may be so bold.
I have a design need in my code which is presently very hard to support: The replaying of block chains. I understand that the current design presupposed that you are saving your wallets along with your blockchains, but my requirements preclude such an option as it requires generating wallets with keys that may already have transactions and needing to sync those.
I've looked at the work done in Multibit with the ReplayableBlockChain, and while it's a step in the right direction in that it allows you to replay a wallet, the only way to get the data is from the PeerGroup.
This means downloading it every time. I was really confused by this design at first, as I was expecting the block store to provide me with some way of accomplishing this once it's been populated, but everything I've been hacking apart tells me no. I've looked at how all the stores implement replaying: By choosing the oldest block to be the head, and downloading everything the comes afterwords.
So I'd like to propose a separation between PeerGroup and BlockStore, namely a BlockProducer which PeerGroup can implement, and a BlockReader which BlockStore can implement.
I'm envisioning a scenario where a PeerGroup gets hooked up to a file or database writer, instead of a block chain, and the blocks are all written out to the database. Then, later, when you want to replay a wallet, you can replace the PeerGroup with a Database reader for a completely offline solution. You can also build a hybrid BlockWriter that pulls from the DB, and listens to Peers for new blocks/transactions.This would allow for trivial replaying of wallets very quickly.
I was sure in looking over the code that something like this would already exist, but everything I've seen always has PeerGroup being the one who initiates blocks flowing through the system.
Am I missing something? Does this already exist? Can we replay a wallet without redownloading the entire BlockChain if we don't know the key creation date? Is this what 'deterministic wallets' refers to?
Thanks for everything...
-T