Remove all state rent related complexity
Follow-up to https://github.com/paritytech/substrate/pull/9669.
ToDo
- [ ] Remove all logic originally introduced for state rent ‒ tombtone, deposit, rent status, etc..
There is a lot more tied to the decision to entirely disregard state rent for ink!.
For example, we will need a partial rewrite of our storage infrastructure and traits as the SpreadLayout and PackedLayout clear functionality will no longer really be needed.
Many storage facilities have been written in a way to allow for automatic removal of unused storage which also is no longer necessary with this decision and therefore those data structures should be entirely rewritten or even redesigned in order to allow to maximum performance.
We can keep SpreadLayout and PackedLayout traits and the general infrastructure that is inferred by them but there is definitely a lot of cruft going to appear once we are decided to drop state rent entirely.
[…] there is definitely a lot of cruft going to appear once we are decided to drop state rent entirely.
State rent was removed entirely from the contracts pallet with https://github.com/paritytech/substrate/pull/9669, the reasoning is described further in the PR. Right now the methods seal_rent_status et al. still exist, so existing contracts don't break. They are only stubs though and return constant values.
The Substrate issue contains close to ten follow-up issues in different repos, where state rent now has been removed as well (or is about to be removed) as a consequence.
Okay, so state rent removal is pretty much set into stone from what this reads. If that's the case we will require some ink! adjustments as well that go well beyond removing those APIs.
I thought about it for a moment. Maybe it makes sense to create a project to have a platform where we can discuss what needs to be done for ink! in order to adjust the whole codebase for a world without state rent.
Mainly this will affect ink_storage and partially ink_env.
There is going to be the need to rewrite a lot of ink_storage data structures, redefine the base traits SpreadLayout and PackedLayout (e.g. remove the clear parts) and redesign utilities such as ink_storage::Box.
We remove state rent et. al a while ago