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

Migrate lease deposits from reserves to named holds #1794

Closed
wants to merge 14 commits into from

Conversation

Ank4n
Copy link
Contributor

@Ank4n Ank4n commented Oct 5, 2023

Partially addresses #226.

Useful for redoing this PR without needing to have an extra storage for keeping track of reserved amounts.

This PR will be followed by another PR that adds the new extrinsic early_lease_refund functionally same as these changes.

Migration note

Leases storage is unbounded but leases can only be assigned via auction and new auctions can only be created by root origin. The number of leases currently on Kusama and Polkadot is 45 and 53 respectively and hence safe to migrate all of them in one block (instead of a lazy migrate approach).

You can use the following query to check the count of keys that we are iterating over in the migration:

console.log((await api.query.slots.leases.entries()).length);

@Ank4n Ank4n mentioned this pull request Oct 5, 2023
8 tasks
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable 3/3
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3903851

@Ank4n Ank4n closed this Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants