-
Notifications
You must be signed in to change notification settings - Fork 1.6k
XCM remote lock consumers #6947
XCM remote lock consumers #6947
Conversation
bot rebase |
Rebased |
Are you 100000% sure that no one is using this right now? Otherwise we should at least put the runtime migration label and leave some small text in the description on how to check and then at least tell them to reach out as I assume they may can not write the migration on their own. |
I cant be that sure (:, but worth the label for sure. |
bot rebase |
Rebased |
bot merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am reading this code and super confused.
consumers
is never pushed. RemoteLockConsumerIdentifier
is never passed or created.
How do we exactly configure our chain for MaxRemoteLockConsumers
and RemoteLockConsumerIdentifier
??
@xlc right now its not utilized. the main purpose of this PR was to change the storage schema into desired one. |
The current version of the remote lock entry only tracks the total count of its local users, which means that each local user can only hold the entire amount of the lock. However, to allow for partial locking and unlocking of the remote lock, as well as the ability to extend the lock for a specific user, we need more information than just the user count. Specifically, we store identifiers for each user and the exact amount held by them.
Also in this PR we rename
users
toconsumers
.cumulus companion: paritytech/cumulus#2463
Migration
Since there is no universal solution to migrate the storage to the new storage version, all clients who have used the remote locks has to write the migration them-self. Contact me for support.
All polkadot and cumulus repos' runtimes have no trusted lockers, hence the changed storage item is empty, no migration needed.
I also assume no one yet using the feature, since it was introduced in XCMv3, and there is no yet API to allocate the remote lock.