|
Bugs in Ethereum contracts have led to ETH being locked up. This specific example has locked up 1100 ETH because the large array cannot be cleared without blowing the gas limit. The RChain compiler should throw an error on this pattern.
Prevent the following problem from happening:
As posted by reddit user ethererik on GovernMental's 1100 ETH jackpot payout is stuck because it uses too much gas , the payout for this pyramid scheme may be stuck because the payout code requires the array of past creditors and amounts to be cleared, and this operation costs too much gas. The code to clear internal storage is:
creditorAddresses = new address[](0);
creditorAmounts = new uint[](0);
Apparently 1100 ethers are stuck in limbo.
WARNING - This is a situation Smart Contract developers need to be aware of!
The question How to clear large arrays without blowing the gas limit? has one answer to work around this issue. Thanks @Nick Johnson
.
# | Title | User Story | Importance | Notes |
---|---|---|---|---|
1 | Short identifier for the story | Describe the user and what they are trying to achieve | Must Have |
|
2 |
Include any mockups, diagrams or visual designs relating to these requirements.
Below is a list of questions to be addressed as a result of this requirements document:
Question | Outcome |
---|---|
(e.g. How we make users more aware of this feature?) | Communicate the decision reached |