casper-network / casper-network/roadmap

update purse documentation

Open
#169 1 comment 0 reactions 1 assignee Assigned to @darthsiroftardis View on GitHub
Dominant language
No language data
Stars
12
Forks
2
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.