I'm working on some code to generate a balance history of an address. That is, I want to be able to determine at any point within an address's lifetime, what the balance was at that point. This means I need to determine on what dates inputs and outputs occurred.
Yes, yes, I know this is not the wallet balance. I really am interested in the address balance. And also, I'm interested in the balance, not the sum of outputs to that address. Balance at any point in time is sum(outputs to the address) at time T - sum(inputs drawn from address) at time T of the address.
I'm using blockchain.info's address history api function and I'm finding some bogus transaction/block times in the output. Specifically, one transaction has a time stamp of 2005.12.24. Right Christmas Eve, 2005. Now... you KNOW that's not correct!
After reading this thread and a couple others, I surmise that the miner that generated the block didn't have the time set correctly on the machine. This tells me that these timestamps aren't reliable. So, how do I determine, within a reasonable accuracy of a few minutes, when a transaction actually made it into a block? Is there some independent source of accurate data on this?
I was thinking I could apply some heuristics to the times and then if I find a bad one, simply interpolate between the times of the neighboring blocks. That's probably close enough for my purposes.
Any ideas gratefully accepted!