I would like to explore the storage data of a contract. I have geth fully synched and I interact with it over RPC. There is the function "eth.getStorageAt(addr, index, block)" provided, but you need to pass an index to it. Unfortunately this index doesn't seem to be an incrementing integer as I thought. I tried accessing the storage of the DAO as an example, and you can view the storage of it here: https://live.ether.camp/account/0xbb9bc244d798123fde783fcc1c72d3bb8c189413 (be sure to turn "Smart mode" off). As you can see, the first few indices of the storage are the numbers 0-22 with some missing in between, but then it changes to hashes. Now, if you're running a node, you need to be able to iterate over the full storage, and thus you need to be able to calculate these indices. How would I do that?
tl;dr: I want to iterate over the whole storage of a contract, how would I do that?