Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all state rent related complexity #906

Closed
1 task
cmichi opened this issue Sep 6, 2021 · 5 comments
Closed
1 task

Remove all state rent related complexity #906

cmichi opened this issue Sep 6, 2021 · 5 comments
Labels
A-ink_lang [ink_lang] Work item

Comments

@cmichi
Copy link
Collaborator

cmichi commented Sep 6, 2021

Follow-up to paritytech/substrate#9669.

ToDo

  • Remove all logic originally introduced for state rent ‒ tombtone, deposit, rent status, etc..
@cmichi cmichi added good first issue Good for newcomers A-ink_lang [ink_lang] Work item and removed good first issue Good for newcomers labels Sep 6, 2021
@Robbepop
Copy link
Collaborator

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.

@cmichi
Copy link
Collaborator Author

cmichi commented Sep 14, 2021

[…] 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 paritytech/substrate#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.

@Robbepop
Copy link
Collaborator

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.

@Robbepop
Copy link
Collaborator

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.

@cmichi cmichi changed the title Remove all state rent related code Remove all state rent related complexity Oct 31, 2021
@HCastano
Copy link
Contributor

We remove state rent et. al a while ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ink_lang [ink_lang] Work item
Projects
None yet
Development

No branches or pull requests

3 participants