Does it have to fit in a single block?
Asked
Active
Viewed 415 times
0
-
Related (same question - unanswered): Is there a maximum array size in Solidity? – Richard Horrocks Sep 08 '17 at 17:25
1 Answers
2
Pushing into it or groupings of computation and storage do have to fit in a single block. For instance, looping the entirety of an array that has a million members will run out of gas in a block. The number of loops that can be done is also dependent on the computation occurring in each loop too. If you have a few lines of code in each loop that burn a lot of gas, then you will be able to loop fewer times before reaching the block gas limit.
But the total size can be 2^256 32 byte words which you will never have or be able to afford.
JohnAllen
- 1,318
- 1
- 13
- 29