@AlexeyAkhunov Wow, I can imagine these write-ups took a lot of time.
I hope that you’ll maybe find some time to answer some of the questions I have. I really liked your first proposal.
I like the version 3 improvements regarding simpler way to use txcount to prevent non-contract account resurrection issues, but I am confused with the other changes.
It seems to me that the introduction of the linear cross-contract storage was to bind the costs of paying for the storage to the beneficiary account? Why was that removed from proposal version 3?
It seemed to me that the primary high level purpose of this should be to bind beneficiaries of data storage with the costs of data storage.
I can’t see how the proposal version 3 will stop anyone from storage spamming shared storage contracts (exchanges, tokens) which form the majority of the ecosystem and have the regular users pay for that storage. It seems to me it actually adds malicious spamming incentives.
Maybe I’m misunderstanding something so please help me to understand. Let’s assume that there is some useful ERC20 token and there is a small set of users actually using it for some beneficial purpose. Let’s also assume that 90% of storage is used by whales, ICO scammers or is a result of dust attacks, or what ever. I don’t think this is far fetched percentage, it’s probably even far worse in practice. It seems to me that those 10% of users who are actually using it will cover the 100% of maintenance costs. How is this fair?
I can’t see what are the benefits of evicting contracts from the storage. As far as I can tell there are 2 cases.
- Either all nodes still need to store graveyard state, in which case there is no benefits.
- There is some way to recover data using merkle proofs, in which case there isn’t any benefits from doing that vs just creating a new contract and filling the data. (please read below for shared libraries)
Can somebody please help me to understand this dilemma or point me to some links that solve it?
I can understand that there are probably some library contracts which are used by multiple contracts and that poses an issue what happens if the disappear, but IMHO that’s a bad design anyway because if makes it harder to reason who should bear the costs of maintaining these shared contracts.
I think that library contracts were the first idea how to reduce code storage costs, but that problem could be solved in a different way.
Instead of using a shared library for which it’s hard to define who is paying for it, one could use properties of RLP encoding and patricia trees to make sure that shared codebases are deduplicated because of the way data is stored in Ethereum.
That would give automatic garbage state collection to the platform. If somebody is not using some contract, the patricia tree nodes would be unreachable and it would be possible to clean them up, forever.