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

update purse documentation #169

Open
RitaMAllenCA opened this issue May 8, 2023 · 1 comment
Open

update purse documentation #169

RitaMAllenCA opened this issue May 8, 2023 · 1 comment
Assignees

Comments

@RitaMAllenCA
Copy link

RitaMAllenCA commented May 8, 2023

History: inner (mint held) uref and outer uref (purse owner). Later created a new balance key variant (has an inner payload same as a uref). Purse is an outer key addr which points to an inner "unit" which has the same inner payload as a uref. Only the mint knows how to access this balance-tagged key. Now: managed via strong types. Use strong typing to separate "purse" from URefs.

  • On upgrade to 2.0: Find existing purse urefs, put them into a new variant key entry called 'purse'. Use the expiry feature to add expiry date to the uref of the old 'purse' uref.
  • Separates out purses from other urefs and allows us to implement proper commutative subtraction on urefs, because we know there are no longer any urefs that are purses - and allows transfers to be an atomic transaction. Only way to tell if a uref is a purse is to call get-balance and see if it errors.... Will need updates to purse documentation.
  • Stretch feature - remove 'zombie' purses: Existing purses have to be retained. COULD mark the purse for purging later - for example, add a field to mark when the purse was last used. zero balance purses that have not been used in a long while can be purged.
@devendran-m
Copy link

Triaged on 27th Sep '24 and moved to backlog.

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

No branches or pull requests

4 participants