I have a contract that will store a lot of data. Offline solutions really don't apply to the problem I'm trying to solve, short of caching (but then I have a cache invalidation problem I'd have to solve too).
I only need to update small amounts of data at a time, so that fits easily under maxGas because of the "gas charge only on changing to non-zero value" feature of the EVM, but I need to be able to read a large amount of data at a time, and I'm having problems with that.
When I try to read a large amount via a solidity ABI, I get an out of gas error in the geth logfile (but nothing programmatically from web3.js call() which doesn't even take a gas argument), and I just get all zeros from web3.js despite the fact that I've modified a memory location.
Will web3.eth.getStorageAt
work more efficiently or will it also run out of gas? If this method works better than invoking the EVM, and I'm using fixed arrays, how do I find the address of the data? Is there an alternative solution that minimizes overhead on the Ethereum node I'm talking to?
example code:
uint8 [10][10][100][100] public blocks;
// this quietly runs out of gas even in a call()
function getBlocks() returns (uint8[10][10][100][100]) {
return blocks;
}
}