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

Need token standard that mandates storage format #86

Open
jsolman opened this issue Mar 26, 2019 · 7 comments
Open

Need token standard that mandates storage format #86

jsolman opened this issue Mar 26, 2019 · 7 comments

Comments

@jsolman
Copy link

jsolman commented Mar 26, 2019

The NEP-5 token standard does not mandate a storage key format or expose a mandatory method to get the prefix or or format of storage keys for the contract. We need this in the token standard in order to be able to use Patricia Tree in Neo 3.0 to validate balances. Also we need it to track token balance changes more efficiently.

@erikzhang
Copy link
Member

Even if you specify the format of the key, the value may be a serialized struct.

@jsolman
Copy link
Author

jsolman commented Mar 26, 2019

The value needs to be mandated also in the standard. It could support more than one type as long as the standard defines it sufficiently to it determine the balance programmatically.

@erikzhang
Copy link
Member

Values can be difficult to be mandated because they are business related. Even some of the contract balances are calculated, not directly stored.

@jsolman
Copy link
Author

jsolman commented Mar 27, 2019

Then it needs to mandate a key that will exist if there is a non-zero balance for an address if the storage does not conform to the standard format. It would be acceptable if there were some false positives.

I should note though that the Patricia tree will not really help validate a balance if the balance value format is not defined in a standard way.

@erikzhang
Copy link
Member

erikzhang commented Mar 27, 2019

Maybe it can be another NEP? Example: NEP: Verifiable Token Standard.

@jsolman
Copy link
Author

jsolman commented Mar 31, 2019

@erikzhang Yes, I expected it will need to be an additional NEP; native NEO and GAS assets should use it.

@roman-khimov
Copy link
Contributor

#151 can help with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants