Storage value seems inconsistent for arrays

Hi there,

I'm playing around with ethereum right now and I'm encountering issues when I want to retrieve the storage of my contract. Here is my setup:
- I use geth and I work on a local testnet (I followed more or less this blog article).
- I've been able to create my contract and call one of its method
- for the sake of simplicity, I won't go into the details of the method, but let's say it populates an array of uint in the storage, something like

uint[] stuff;
function do_stuff() returns (uint256) {
stuff[stuff.length - 1] = 3217893; // a dumb number
return stuff.length;
So what i'm sure of, is that the contract method is called (I can see the transaction in the logs), and when I wait enough time for the transaction to be mined, here is what I have when trying to get the storage:

// in geth console for instance
eth.getStorageAt('0x......', 1)
This is driving me nuts, I don't understand what's happening there. Anyone encountered this issue? What have I done wrong?


Sign In or Register to comment.